annotate UI/UIPopup.cpp @ 1720:5f2583a4fa7d

m
author Ritor1
date Wed, 25 Sep 2013 08:59:01 +0600
parents 5863074ed9ba
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;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
138 v78 = 100 - pIcons_LOD->LoadTexturePtr(pItemsTable->pItems[inspect_item->uItemID].pIconName, TEXTURE_16BIT_PALETTE)->uTextureWidth;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
139 v81 = 144 - pIcons_LOD->LoadTexturePtr(pItemsTable->pItems[inspect_item->uItemID].pIconName, TEXTURE_16BIT_PALETTE)->uTextureHeight;
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;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
149 if (pItemsTable->pItems[inspect_item->uItemID].uEquipType == EQUIP_GOLD)
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;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
200 pRenderer->DrawTransparentRedShade(iteminfo_window.uFrameX + v78, v81 + iteminfo_window.uFrameY + 30, pIcons_LOD->LoadTexturePtr(pItemsTable->pItems[inspect_item->uItemID].pIconName, TEXTURE_16BIT_PALETTE));
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 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
211 pIcons_LOD->LoadTexturePtr(pItemsTable->pItems[inspect_item->uItemID].pIconName, TEXTURE_16BIT_PALETTE)->Release();
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;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
225 pRenderer->DrawTextureTransparent(iteminfo_window.uFrameX + v78, v81 + iteminfo_window.uFrameY + 30, pIcons_LOD->LoadTexturePtr(pItemsTable->pItems[inspect_item->uItemID].pIconName, TEXTURE_16BIT_PALETTE));
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 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
232 pIcons_LOD->LoadTexturePtr(pItemsTable->pItems[inspect_item->uItemID].pIconName, TEXTURE_16BIT_PALETTE)->Release();
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;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
240 switch (pItemsTable->pItems[inspect_item->uItemID].uEquipType)
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],
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
245 (int)pItemsTable->pItems[inspect_item->uItemID].uDamageMod, pGlobalTXT_LocalizationStrings[53],
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
246 (int)pItemsTable->pItems[inspect_item->uItemID].uDamageDice, (int)pItemsTable->pItems[inspect_item->uItemID].uDamageRoll); //"Damage"
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
247 if (pItemsTable->pItems[inspect_item->uItemID].uDamageMod)
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
248 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
249 char mod[16];
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
250 sprintf(mod, "+%d", (int)pItemsTable->pItems[inspect_item->uItemID].uDamageMod);
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"
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
257 (int)pItemsTable->pItems[inspect_item->uItemID].uDamageMod, pGlobalTXT_LocalizationStrings[53], //"Damage"
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
258 (int)pItemsTable->pItems[inspect_item->uItemID].uDamageDice, (int)pItemsTable->pItems[inspect_item->uItemID].uDamageRoll);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
259 if (pItemsTable->pItems[inspect_item->uItemID].uDamageMod)
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
260 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
261 char mod[16];
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
262 sprintf(mod, "+%d", (int)pItemsTable->pItems[inspect_item->uItemID].uDamageMod);
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:
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
276 if (pItemsTable->pItems[inspect_item->uItemID].uDamageDice) //"Armor"
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
277 sprintfex(out_text + 100, "%s: +%d", pGlobalTXT_LocalizationStrings[11],
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
278 pItemsTable->pItems[inspect_item->uItemID].uDamageDice + pItemsTable->pItems[inspect_item->uItemID].uDamageMod);
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 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
284 if (pItemsTable->pItems[inspect_item->uItemID].uEquipType ==EQUIP_POTION) //this is CORRECT! do not move to switch!
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 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
289 else if (pItemsTable->pItems[inspect_item->uItemID].uEquipType == EQUIP_REAGENT)
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
290 sprintf(out_text + 200, "%s: %d", pGlobalTXT_LocalizationStrings[449], pItemsTable->pItems[inspect_item->uItemID].uDamageDice); //"Power"
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);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
312 iteminfo_window.uFrameHeight = pIcons_LOD->LoadTexturePtr(pItemsTable->pItems[inspect_item->uItemID].pIconName,
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,
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
338 iteminfo_window.uFrameY + (signed int)(iteminfo_window.uFrameHeight - pIcons_LOD->LoadTexturePtr(pItemsTable->pItems[inspect_item->uItemID].pIconName, TEXTURE_16BIT_PALETTE)->uTextureHeight) / 2,
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
339 pIcons_LOD->LoadTexturePtr(pItemsTable->pItems[inspect_item->uItemID].pIconName, 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 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
404 pIcons_LOD->LoadTexturePtr(pItemsTable->pItems[inspect_item->uItemID].pIconName, TEXTURE_16BIT_PALETTE)->Release();
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 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
418 pIcons_LOD->LoadTexturePtr(pItemsTable->pItems[inspect_item->uItemID].pIconName, TEXTURE_16BIT_PALETTE)->Release();
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
1720
Ritor1
parents: 1718
diff changeset
443 int skill_points; // edi@61
Ritor1
parents: 1718
diff changeset
444 unsigned int skill_level; // eax@61
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
445 int pTextHeight; // edi@90
1720
Ritor1
parents: 1718
diff changeset
446 PlayerSpeech speech; // [sp-8h] [bp-1F4h]@79
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
447 DDBLTFX Dst; // [sp+Ch] [bp-1E0h]@18
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
448 DDSURFACEDESC2 pDesc; // [sp+70h] [bp-17Ch]@18
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
449 RECT v84; // [sp+ECh] [bp-100h]@26
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
450 char *string_name[10]; // [sp+FCh] [bp-F0h]@145
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
451 char *content[11]; // [sp+124h] [bp-C8h]@127
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
452 RenderBillboardTransform_local0 v106; // [sp+150h] [bp-9Ch]@3
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
453 unsigned int v107; // [sp+1A0h] [bp-4Ch]@18
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
454 unsigned __int16 *v108; // [sp+1A4h] [bp-48h]@34
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
455 unsigned int v109; // [sp+1A8h] [bp-44h]@32
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
456 LPVOID v110; // [sp+1ACh] [bp-40h]@28
1720
Ritor1
parents: 1718
diff changeset
457 bool for_effects; // [sp+1C0h] [bp-2Ch]@3
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
458 bool normal_level; // [sp+1D0h] [bp-1Ch]@18
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
459 bool expert_level; // [sp+1C4h] [bp-28h]@18
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
460 bool master_level; // [sp+1C8h] [bp-24h]@18
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
461 bool grandmaster_level; // [sp+1B4h] [bp-38h]@3
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
462 char *pText; // [sp+1D4h] [bp-18h]@18
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
463 int pTextColorID; // [sp+1E4h] [bp-8h]@18
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
464 int a4; // [sp+1E8h] [bp-4h]@18
1720
Ritor1
parents: 1718
diff changeset
465 int v115;
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
466
1720
Ritor1
parents: 1718
diff changeset
467 bool monster_full_informations = false;
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
468 static Actor pMonsterInfoUI_Doll;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
469 /*if ( !(bMonsterInfoUI_bDollInitialized & 1) )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
470 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
471 bMonsterInfoUI_bDollInitialized |= 1u;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
472 Actor::Actor(&pMonsterInfoUI_Doll);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
473 atexit(nullsub_3);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
474 }*/
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
475 v106.uParentBillboardID = -1;
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
476 v115 = monster_popup_y_offsets[((signed __int16)pActors[uActorID].pMonsterInfo.uID - 1) / 3] - 40;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
477 if ( pActors[uActorID].pMonsterInfo.uID == pMonsterInfoUI_Doll.pMonsterInfo.uID )
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
478 v9 = pMonsterInfoUI_Doll.uCurrentActionLength;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
479 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
480 {
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
481 memcpy(&pMonsterInfoUI_Doll, &pActors[uActorID], sizeof(pMonsterInfoUI_Doll));
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
482 pMonsterInfoUI_Doll.uCurrentActionAnimation = ANIM_Bored;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
483 pMonsterInfoUI_Doll.uCurrentActionTime = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
484 v8 = rand();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
485 v9 = v8 % 256 + 128;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
486 pMonsterInfoUI_Doll.uCurrentActionLength = v8 % 256 + 128;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
487 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
488
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
489 if ( (signed int)pMonsterInfoUI_Doll.uCurrentActionTime > (signed __int16)v9 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
490 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
491 pMonsterInfoUI_Doll.uCurrentActionTime = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
492 if ( pMonsterInfoUI_Doll.uCurrentActionAnimation == ANIM_Bored || pMonsterInfoUI_Doll.uCurrentActionAnimation == ANIM_AtkMelee)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
493 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
494 pMonsterInfoUI_Doll.uCurrentActionAnimation = ANIM_Standing;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
495 pMonsterInfoUI_Doll.uCurrentActionLength = rand() % 128 + 128;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
496 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
497 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
498 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
499 //rand();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
500 pMonsterInfoUI_Doll.uCurrentActionAnimation = ANIM_Bored;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
501 if ( (pMonsterInfoUI_Doll.pMonsterInfo.uID < 115 || pMonsterInfoUI_Doll.pMonsterInfo.uID > 186) &&
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
502 (pMonsterInfoUI_Doll.pMonsterInfo.uID < 232 || pMonsterInfoUI_Doll.pMonsterInfo.uID > 249) && rand() % 30 < 100 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
503 pMonsterInfoUI_Doll.uCurrentActionAnimation = ANIM_AtkMelee;
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
504 pMonsterInfoUI_Doll.uCurrentActionLength = 8 * pSpriteFrameTable->pSpriteSFrames[pActors[uActorID].pSpriteIDs[(signed __int16)pMonsterInfoUI_Doll.uCurrentActionAnimation]].uAnimLength;
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
505 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
506 }
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
507 v10 = pSpriteFrameTable->GetFrame( pActors[uActorID].pSpriteIDs[pMonsterInfoUI_Doll.uCurrentActionAnimation], pMonsterInfoUI_Doll.uCurrentActionTime);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
508 v106.pTarget = pRenderer->pTargetSurface;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
509 v106.pTargetZ = pRenderer->pActiveZBuffer;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
510 v106.uTargetPitch = pRenderer->uTargetSurfacePitch;
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
511 v106.uViewportX = window->uFrameX + 13;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
512 v106.uViewportY = window->uFrameY + 52;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
513 v106.uViewportW = (window->uFrameY + 52) + 128;
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
514 v106.uViewportZ = v106.uViewportX + 128;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
515 v106.uScreenSpaceX = (signed int)(v106.uViewportX + 128 + v106.uViewportX) / 2;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
516 v106._screenspace_x_scaler_packedfloat = 65536;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
517 v106._screenspace_y_scaler_packedfloat = 65536;
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
518 v106.uScreenSpaceY = v115 + (window->uFrameY + 52) + pSprites_LOD->pSpriteHeaders[v10->pHwSpriteIDs[0]].uHeight;
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
519 v106.pPalette = PaletteManager::Get_Dark_or_Red_LUT(v10->uPaletteIndex, 0, 1);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
520 v106.sZValue = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
521 v106.uFlags = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
522 pRenderer->SetRasterClipRect(0, 0, 0x27Fu, 0x1DFu);
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
523 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
524 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
525 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
526 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
527 if ( pRenderer->pRenderD3D )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
528 {
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
529 v106.uScreenSpaceY = v115 + v106.uViewportY + pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].uBufferHeight;
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
530 memset(&Dst, 0, 0x64u);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
531 Dst.dwSize = 100;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
532 Dst.dwFillColor = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
533 memset(&pDesc, 0, 0x7Cu);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
534 pDesc.dwSize = 124;
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
535 pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].pTextureSurface->GetSurfaceDesc(&pDesc);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
536 v107 = 0;
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
537 uint i = 0;
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
538 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
539 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
540 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
541 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
542 if (dst_x < v106.uViewportX)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
543 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
544 v18 = v106.uViewportX - dst_x;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
545 dst_x = v106.uViewportX;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
546 v107 = v18;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
547 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
548 if (dst_y < v106.uViewportY)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
549 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
550 v19 = v106.uViewportY - dst_y;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
551 dst_y = v106.uViewportY;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
552 i = v19;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
553 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
554 if (dst_z > v106.uViewportZ)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
555 dst_z = v106.uViewportZ;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
556 if (dst_w > v106.uViewportW)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
557 dst_w = v106.uViewportW;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
558 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
559 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
560 v84.left = v106.uViewportX;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
561 v84.top = v106.uViewportY;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
562 v84.right = v106.uViewportZ;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
563 v84.bottom = v106.uViewportW;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
564 ErrD3D(pRenderer->pBackBuffer4->Blt(&v84, 0, 0, 16778240u, &Dst));
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
565 if ( pRenderer->uTargetGBits == 5 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
566 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
567 __debugbreak(); // no monster popup for r5g5b5 yet
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
568 memset(&pDesc, 0, 0x7Cu);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
569 pDesc.dwSize = 124;
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
570 if ( pRenderer->LockSurface_DDraw4(pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].pTextureSurface, &pDesc, DDLOCK_WAIT))
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
571 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
572 v20 = (char *)dst_y;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
573 v110 = pDesc.lpSurface;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
574 if (dst_y < dst_w)
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
575 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
576 v21 = dst_x;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
577 v22 = &pRenderer->pTargetSurface[dst_y * pRenderer->uTargetSurfacePitch + dst_x];
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
578 auto _v22_2 = v22;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
579 v23 = i - dst_y;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
580 v115 = i - dst_y;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
581 while ( 1 )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
582 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
583 dst_y = v21;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
584 if ( v21 < dst_z )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
585 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
586 v25 = v107 - v21;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
587 v109 = (int)&v20[v23];
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
588 for ( i = v107 - v21; ; v25 = i )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
589 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
590 v108 = (unsigned __int16 *)((pDesc.lPitch >> 1) * pDesc.dwHeight * v109 / pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].uAreaHeight);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
591 v26 = (char *)v108 + pDesc.dwWidth * (v25 + dst_y++) / pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].uAreaWidth;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
592 *v22 = *((short *)v110 + (int)v26);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
593 ++v22;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
594 if ( dst_y >= dst_z )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
595 break;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
596 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
597 v23 = v115;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
598 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
599 v22 = (unsigned __int16 *)((char *)_v22_2 + 2 * pRenderer->uTargetSurfacePitch);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
600 _v22_2 = v22;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
601 v20 = (char *)(dst_y + 1);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
602 v28 = __OFSUB__(dst_y + 1, dst_w);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
603 v27 = (signed int)(dst_y++ + 1 - dst_w) < 0;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
604 if ( !(v27 ^ v28) )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
605 break;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
606 v21 = dst_x;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
607 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
608 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
609 pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].pTextureSurface->Unlock(0);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
610 }
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
611 }
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
612 else
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
613 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
614 memset(&pDesc, 0, 0x7Cu);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
615 pDesc.dwSize = 124;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
616 if ( pRenderer->LockSurface_DDraw4(pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].pTextureSurface, &pDesc, DDLOCK_WAIT) )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
617 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
618 auto src = (unsigned __int16 *)pDesc.lpSurface;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
619 uint num_top_scanlines_above_frame_y = i - dst_y;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
620 for (uint y = dst_y; y < dst_w; ++y)
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
621 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
622 auto dst = &pRenderer->pTargetSurface[y * pRenderer->uTargetSurfacePitch + dst_x];
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
623
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
624 uint src_y = num_top_scanlines_above_frame_y + y;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
625 for (uint x = dst_x; x < dst_z; ++x)
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
626 {
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
627 uint src_x = v107 - dst_x + x; // num scanlines left to frame_x + current x
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
628
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
629 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
630 pDesc.dwWidth * src_x / pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].uAreaWidth;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
631 uint b = src[idx] & 0x1F;
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
632 *dst++ = b | 2 * (src[idx] & 0xFFE0);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
633 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
634 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
635 pSprites_LOD->pHardwareSprites[v10->pHwSpriteIDs[0]].pTextureSurface->Unlock(0);
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
636 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
637 }
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
638 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
639 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
640 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
641 pRenderer->FillRectFast(v106.uViewportX, v106.uViewportY, v106.uViewportZ - v106.uViewportX, v106.uViewportW - v106.uViewportY, 0);
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
642 if ( v10->pHwSpriteIDs[0] >= 0 )
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
643 pSprites_LOD->pSpriteHeaders[v10->pHwSpriteIDs[0]].DrawSprite_sw(&v106, 0);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
644 }
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
645 //name and profession
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
646 if ( pActors[uActorID].sNPC_ID )
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
647 {
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
648 if (GetNPCData(pActors[uActorID].sNPC_ID)->uProfession)
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
649 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
650 else
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
651 strncpy(pTmpBuf.data(), GetNPCData(pActors[uActorID].sNPC_ID)->pName, 2000);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
652 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
653 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
654 {
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
655 if ( pActors[uActorID].dword_000334_unique_name )
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
656 strncpy(pTmpBuf.data(), pMonsterStats->pPlaceStrings[pActors[uActorID].dword_000334_unique_name], 2000);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
657 else
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
658 strncpy(pTmpBuf.data(), pMonsterStats->pInfos[pActors[uActorID].pMonsterInfo.uID].pName, 2000);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
659 }
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
660 window->DrawTitleText(pFontComic, 0, 0xCu, TargetColor(0xFFu, 0xFFu, 0x9Bu), pTmpBuf.data(), 3);
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
661 //health bar
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
662 Actor::DrawHealthBar(&pActors[uActorID], window);
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
663
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
664 normal_level = 0;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
665 expert_level = 0;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
666 master_level = 0;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
667 grandmaster_level = 0;
1720
Ritor1
parents: 1718
diff changeset
668 for_effects = 0;
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
669 pMonsterInfoUI_Doll.uCurrentActionTime += pMiscTimer->uTimeElapsed;
1720
Ritor1
parents: 1718
diff changeset
670 if ( pPlayers[uActiveCharacter]->GetActualSkillLevel(PLAYER_SKILL_MONSTER_ID) )
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
671 {
1720
Ritor1
parents: 1718
diff changeset
672 skill_points = (unsigned __int8)pPlayers[uActiveCharacter]->GetActualSkillLevel(PLAYER_SKILL_MONSTER_ID) & 0x3F;
Ritor1
parents: 1718
diff changeset
673 skill_level = SkillToMastery(pPlayers[uActiveCharacter]->GetActualSkillLevel(PLAYER_SKILL_MONSTER_ID)) - 1;
Ritor1
parents: 1718
diff changeset
674 if ( skill_level == 0 )//(normal)
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
675 {
1720
Ritor1
parents: 1718
diff changeset
676 if ( skill_points + 10 >= pActors[uActorID].pMonsterInfo.uLevel )
Ritor1
parents: 1718
diff changeset
677 normal_level = 1;
Ritor1
parents: 1718
diff changeset
678 }
Ritor1
parents: 1718
diff changeset
679 else if ( skill_level == 1 )//(expert)
Ritor1
parents: 1718
diff changeset
680 {
Ritor1
parents: 1718
diff changeset
681 if ( 2 * skill_points + 10 >= pActors[uActorID].pMonsterInfo.uLevel )
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
682 {
1720
Ritor1
parents: 1718
diff changeset
683 normal_level = 1;
Ritor1
parents: 1718
diff changeset
684 expert_level = 1;
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
685 }
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
686 }
1720
Ritor1
parents: 1718
diff changeset
687 else if ( skill_level == 2 )//(master)
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
688 {
1720
Ritor1
parents: 1718
diff changeset
689 if ( 3 * skill_points + 10 >= pActors[uActorID].pMonsterInfo.uLevel )
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
690 {
1720
Ritor1
parents: 1718
diff changeset
691 normal_level = 1;
Ritor1
parents: 1718
diff changeset
692 expert_level = 1;
Ritor1
parents: 1718
diff changeset
693 master_level = 1;
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
694 }
1720
Ritor1
parents: 1718
diff changeset
695 }
Ritor1
parents: 1718
diff changeset
696 else if ( skill_level == 3 )//grandmaster
Ritor1
parents: 1718
diff changeset
697 {
Ritor1
parents: 1718
diff changeset
698 normal_level = 1;
Ritor1
parents: 1718
diff changeset
699 expert_level = 1;
Ritor1
parents: 1718
diff changeset
700 master_level = 1;
Ritor1
parents: 1718
diff changeset
701 grandmaster_level = 1;
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
702 }
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
703 }
1720
Ritor1
parents: 1718
diff changeset
704 if ( pActors[uActorID].uAIState != Dead
Ritor1
parents: 1718
diff changeset
705 && pActors[uActorID].uAIState != Dying
Ritor1
parents: 1718
diff changeset
706 && !dword_507BF0_is_there_popup_onscreen && pPlayers[uActiveCharacter]->GetActualSkillLevel(PLAYER_SKILL_MONSTER_ID) )
Ritor1
parents: 1718
diff changeset
707 {
Ritor1
parents: 1718
diff changeset
708 if ( normal_level | expert_level | master_level | grandmaster_level )
Ritor1
parents: 1718
diff changeset
709 {
Ritor1
parents: 1718
diff changeset
710 if ( pActors[uActorID].pMonsterInfo.uLevel >= pPlayers[uActiveCharacter]->uLevel - 5 )
Ritor1
parents: 1718
diff changeset
711 speech = SPEECH_IDENTIFY_MONSTER_STRONGER;
Ritor1
parents: 1718
diff changeset
712 else
Ritor1
parents: 1718
diff changeset
713 speech = SPEECH_IDENTIFY_MONSTER_WEAKER;
Ritor1
parents: 1718
diff changeset
714 }
Ritor1
parents: 1718
diff changeset
715 else
Ritor1
parents: 1718
diff changeset
716 speech = SPEECH_IDENTIFY_MONSTER_106;
Ritor1
parents: 1718
diff changeset
717 pPlayers[uActiveCharacter]->PlaySound(speech, 0);
Ritor1
parents: 1718
diff changeset
718 }
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
719
1720
Ritor1
parents: 1718
diff changeset
720 if ( (signed int)SkillToMastery(pParty->pPlayers[uActiveCharacter - 1].GetActualSkillLevel(PLAYER_SKILL_MONSTER_ID)) >= 3 )
Ritor1
parents: 1718
diff changeset
721 for_effects = 1;
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
722
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
723 if ( monster_full_informations == true )
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
724 {
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
725 normal_level = 1;//
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
726 expert_level = 1;//
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
727 master_level = 1;//
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
728 grandmaster_level = 1;//
1720
Ritor1
parents: 1718
diff changeset
729 for_effects = 1;
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
730 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
731
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
732 window->DrawText(pFontSmallnum, 12, 196, TargetColor(0xE1u, 255, 0x9Bu), pGlobalTXT_LocalizationStrings[631], 0, 0, 0);//Effects
1720
Ritor1
parents: 1718
diff changeset
733 if ( !for_effects )
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
734 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
735 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
736 {
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
737 pText = "";
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
738 pTextHeight = LOBYTE(pFontSmallnum->uFontHeight) + 193;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
739 for ( uint i = 1; i <= 21; ++i )
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
740 {
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
741 if ( pActors[uActorID].pActorBuffs[i].uExpireTime > 0 )
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
742 {
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
743 switch ( i - 1 )
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
744 {
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
745 case 0:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
746 pTextColorID = 60;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
747 pText = pGlobalTXT_LocalizationStrings[591];//Charmed
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
748 break;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
749 case 1:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
750 pTextColorID = 82;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
751 pText = pGlobalTXT_LocalizationStrings[649];//Summoned
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
752 break;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
753 case 2:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
754 pTextColorID = 92;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
755 pText = pGlobalTXT_LocalizationStrings[592];//Shrunk
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
756 break;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
757 case 3:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
758 pTextColorID = 63;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
759 pText = pGlobalTXT_LocalizationStrings[4];//Afraid
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
760 break;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
761 case 4:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
762 pText = pGlobalTXT_LocalizationStrings[220];//Stoned
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
763 pTextColorID = 81;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
764 break;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
765 case 5:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
766 pText = pGlobalTXT_LocalizationStrings[162];//Paralyzed
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
767 pTextColorID = 81;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
768 break;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
769 case 6:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
770 pText = pGlobalTXT_LocalizationStrings[593];//Slowed
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
771 pTextColorID = 35;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
772 break;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
773 case 8:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
774 pText = pGlobalTXT_LocalizationStrings[608];//Berserk
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
775 pTextColorID = 62;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
776 break;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
777 case 7:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
778 case 9:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
779 pText = "";
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
780 pTextColorID = 0;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
781 continue;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
782 case 10:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
783 pTextColorID = 47;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
784 pText = pGlobalTXT_LocalizationStrings[221];//Fate
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
785 break;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
786 case 11:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
787 pTextColorID = 66;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
788 pText = pGlobalTXT_LocalizationStrings[607];//Enslaved
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
789 break;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
790 case 12:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
791 pTextColorID = 85;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
792 pText = pGlobalTXT_LocalizationStrings[610];//Day of Protection
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
793 break;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
794 case 13:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
795 pTextColorID = 86;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
796 pText = pGlobalTXT_LocalizationStrings[609];//Hour of Power
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
797 break;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
798 case 14:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
799 pTextColorID = 17;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
800 pText = pGlobalTXT_LocalizationStrings[279];//Shield
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
801 break;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
802 case 15:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
803 pTextColorID = 38;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
804 pText = pGlobalTXT_LocalizationStrings[442];//Stoneskin
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
805 break;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
806 case 16:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
807 pTextColorID = 46;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
808 pText = pGlobalTXT_LocalizationStrings[443];//Bless
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
809 break;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
810 case 17:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
811 pTextColorID = 51;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
812 pText = pGlobalTXT_LocalizationStrings[440];//Heroism
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
813 break;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
814 case 18:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
815 pTextColorID = 5;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
816 pText = pGlobalTXT_LocalizationStrings[441];//Haste
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
817 break;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
818 case 19:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
819 pTextColorID = 95;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
820 pText = pGlobalTXT_LocalizationStrings[229];//Pain Reflection
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
821 break;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
822 case 20:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
823 pTextColorID = 73;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
824 pText = pGlobalTXT_LocalizationStrings[228];//Hammerhands
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
825 break;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
826 default:
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
827 pText = "";
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
828 break;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
829 }
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
830 if ( pText != "" )
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
831 {
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
832 window->DrawText(pFontSmallnum, 28, pTextHeight, GetSpellColor(pTextColorID), pText, 0, 0, 0);
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
833 pTextHeight = pTextHeight + *(char *)((int)pFontSmallnum + 5) - 3;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
834 }
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
835 }
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
836 }
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
837 if ( pText == "" )
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
838 window->DrawText(pFontSmallnum, 28, pTextHeight, TargetColor(0xE1u, 255, 0x9Bu), pGlobalTXT_LocalizationStrings[153], 0, 0, 0);//Нет
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
839 }
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
840
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
841 if ( normal_level )
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
842 {
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
843 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
844 window->DrawText(pFontSmallnum, 150, (int)v106.uViewportY, TargetColor(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0);
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
845 pTextHeight = v106.uViewportY + LOBYTE(pFontSmallnum->uFontHeight) - 3;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
846 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
847 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
848 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
849 {
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
850 sprintf(pTmpBuf.data(), "%s\f%05u\t100%s\n", pGlobalTXT_LocalizationStrings[108], 0, pGlobalTXT_LocalizationStrings[630]);//?
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
851 window->DrawText(pFontSmallnum, 150, (int)v106.uViewportY, TargetColor(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0);
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
852 pTextHeight = v106.uViewportY + LOBYTE(pFontSmallnum->uFontHeight) - 3;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
853 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
854 }
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
855 window->DrawText(pFontSmallnum, 150, pTextHeight, TargetColor(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0);
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
856 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 6 + LOBYTE(pFontSmallnum->uFontHeight);
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
857
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
858 content[0] = pGlobalTXT_LocalizationStrings[87];
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
859 content[1] = pGlobalTXT_LocalizationStrings[6];
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
860 content[2] = pGlobalTXT_LocalizationStrings[240];
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
861 content[3] = pGlobalTXT_LocalizationStrings[70];
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
862 content[4] = pGlobalTXT_LocalizationStrings[624];
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
863 content[5] = pGlobalTXT_LocalizationStrings[138];
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
864 content[6] = pGlobalTXT_LocalizationStrings[214];
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
865 content[7] = pGlobalTXT_LocalizationStrings[142];
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
866 content[8] = pGlobalTXT_LocalizationStrings[29];
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
867 content[9] = pGlobalTXT_LocalizationStrings[133];
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
868 content[10] = pGlobalTXT_LocalizationStrings[54];
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
869
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
870 if ( expert_level )
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
871 {
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
872 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
873 window->DrawText(pFontSmallnum, 150, (int)pTextHeight, TargetColor(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0);
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
874 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 3;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
875 if ( pActors[uActorID].pMonsterInfo.uAttack1DamageBonus )
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
876 sprintf(pTmpBuf.data(), "%s\f%05u\t080%dd%d+%d\n", pGlobalTXT_LocalizationStrings[53],
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
877 0, pActors[uActorID].pMonsterInfo.uAttack1DamageDiceRolls, pActors[uActorID].pMonsterInfo.uAttack1DamageDiceSides, pActors[uActorID].pMonsterInfo.uAttack1DamageBonus);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
878 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
879 sprintf(pTmpBuf.data(), "%s\f%05u\t080%dd%d\n", pGlobalTXT_LocalizationStrings[53],
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
880 0, pActors[uActorID].pMonsterInfo.uAttack1DamageDiceRolls, pActors[uActorID].pMonsterInfo.uAttack1DamageDiceSides);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
881 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
882 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
883 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
884 sprintf(pTmpBuf.data(), "%s\f%05u\t080%s\n", pGlobalTXT_LocalizationStrings[18], 0, pGlobalTXT_LocalizationStrings[630]);
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
885 window->DrawText(pFontSmallnum, 150, (int)pTextHeight, TargetColor(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0);
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
886 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 3;
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
887 sprintf(pTmpBuf.data(), "%s\f%05u\t080%s\n", pGlobalTXT_LocalizationStrings[53], 0, pGlobalTXT_LocalizationStrings[630]);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
888 }
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
889 window->DrawText(pFontSmallnum, 150, pTextHeight, TargetColor(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0);
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
890 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 6 + LOBYTE(pFontSmallnum->uFontHeight);
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
891
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
892 if ( !master_level )
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
893 {
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
894 sprintf(pTmpBuf.data(), "%s\f%05u\t080%s\n", pGlobalTXT_LocalizationStrings[628], 0, pGlobalTXT_LocalizationStrings[630]);//"Spell" "?"
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
895 window->DrawText(pFontSmallnum, 150, (int)pTextHeight, TargetColor(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0);
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
896 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 3;
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
897 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
898 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
899 {
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
900 pText = pGlobalTXT_LocalizationStrings[628];//Spell
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
901 if ( pActors[uActorID].pMonsterInfo.uSpell1ID && pActors[uActorID].pMonsterInfo.uSpell2ID )
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
902 pText = pGlobalTXT_LocalizationStrings[629];//Spells
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
903 if ( pActors[uActorID].pMonsterInfo.uSpell1ID )
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
904 {
1718
Ritor1
parents: 1705
diff changeset
905 sprintf(pTmpBuf.data(), "%s\f%05u\t070%s\n", pText, 0, pSpellStats->pInfos[pActors[uActorID].pMonsterInfo.uSpell1ID].pShortName);//"%s\f%05u\t060%s\n"
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
906 window->DrawText(pFontSmallnum, 150, (int)pTextHeight, TargetColor(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0);
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
907 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 3;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
908 }
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
909 if ( pActors[uActorID].pMonsterInfo.uSpell2ID )
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
910 {
1718
Ritor1
parents: 1705
diff changeset
911 sprintf(pTmpBuf.data(), "\f%05u\t070%s\n", 0, pSpellStats->pInfos[pActors[uActorID].pMonsterInfo.uSpell2ID].pShortName);//"%s\f%05u\t060%s\n"
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
912 window->DrawText(pFontSmallnum, 150, (int)pTextHeight, TargetColor(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0);
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
913 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 3;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
914 }
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
915 if ( !pActors[uActorID].pMonsterInfo.uSpell1ID && !pActors[uActorID].pMonsterInfo.uSpell2ID )
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
916 {
1718
Ritor1
parents: 1705
diff changeset
917 sprintf(pTmpBuf.data(), "%s\f%05u\t070%s\n", pGlobalTXT_LocalizationStrings[628], 0, pGlobalTXT_LocalizationStrings[153]);//"%s\f%05u\t060%s\n"
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
918 window->DrawText(pFontSmallnum, 150, (int)pTextHeight, TargetColor(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0);
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
919 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 3;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
920 }
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
921 }
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
922 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 3;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
923 window->DrawText(pFontSmallnum, 150, pTextHeight, TargetColor(0xE1u, 255, 0x9Bu), pGlobalTXT_LocalizationStrings[626], 0, 0, 0);//Immune
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
924 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 3;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
925
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
926 string_name[0] = pGlobalTXT_LocalizationStrings[87];//Fire
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
927 string_name[1] = pGlobalTXT_LocalizationStrings[6];//Air
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
928 string_name[2] = pGlobalTXT_LocalizationStrings[240];
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
929 string_name[3] = pGlobalTXT_LocalizationStrings[70];
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
930 string_name[4] = pGlobalTXT_LocalizationStrings[142];
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
931 string_name[5] = pGlobalTXT_LocalizationStrings[214];
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
932 string_name[6] = pGlobalTXT_LocalizationStrings[29];
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
933 string_name[7] = pGlobalTXT_LocalizationStrings[133];
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
934 string_name[8] = pGlobalTXT_LocalizationStrings[54];
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
935 string_name[9] = pGlobalTXT_LocalizationStrings[624];
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
936
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
937 content[0] = (char *)pActors[uActorID].pMonsterInfo.uResFire;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
938 content[1] = (char *)pActors[uActorID].pMonsterInfo.uResAir;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
939 content[2] = (char *)pActors[uActorID].pMonsterInfo.uResWater;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
940 content[3] = (char *)pActors[uActorID].pMonsterInfo.uResEarth;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
941 content[4] = (char *)pActors[uActorID].pMonsterInfo.uResMind;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
942 content[5] = (char *)pActors[uActorID].pMonsterInfo.uResSpirit;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
943 content[6] = (char *)pActors[uActorID].pMonsterInfo.uResBody;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
944 content[7] = (char *)pActors[uActorID].pMonsterInfo.uResLight;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
945 content[8] = (char *)pActors[uActorID].pMonsterInfo.uResPhysical;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
946 content[9] = (char *)pActors[uActorID].pMonsterInfo.uResDark;
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
947
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
948 if ( grandmaster_level )
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
949 {
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
950 for ( uint i = 0; i < 10; i++ )
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
951 {
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
952 if ( content[i] == (char *)200 )
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
953 {
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
954 pText = pGlobalTXT_LocalizationStrings[625];//Immune
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
955 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
956 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
957 {
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
958 if ( content[i] )
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
959 pText = pGlobalTXT_LocalizationStrings[627];//Resistant
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
960 else
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
961 pText = pGlobalTXT_LocalizationStrings[153];//None
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
962 }
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
963 sprintf(pTmpBuf.data(), "%s\f%05u\t070%s\n", string_name[i], 0, pText);
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
964 window->DrawText(pFontSmallnum, 170, pTextHeight, TargetColor(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0);
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
965 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 3;
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
966 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
967 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
968 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
969 {
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
970 for ( uint i = 0; i < 10; ++i )
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
971 {
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
972 sprintf(pTmpBuf.data(), "%s\f%05u\t070%s\n", string_name[i], 0, pGlobalTXT_LocalizationStrings[630]); // "?"
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
973 window->DrawText(pFontSmallnum, 170, pTextHeight, TargetColor(0xE1u, 255, 0x9Bu), pTmpBuf.data(), 0, 0, 0);
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
974 pTextHeight = pTextHeight + LOBYTE(pFontSmallnum->uFontHeight) - 3;
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
975 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
976 }
1720
Ritor1
parents: 1718
diff changeset
977 //cast spell: Detect life
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
978 if ( (signed __int64)pParty->pPartyBuffs[PARTY_BUFF_DETECT_LIFE].uExpireTime > 0 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
979 {
1705
a395359afc8f MonsterPopup
Ritor1
parents: 1699
diff changeset
980 sprintf(pTmpBuf.data(), "%s: %d", pGlobalTXT_LocalizationStrings[650], pActors[uActorID].sCurrentHP);//Current Hit Points
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
981 pFontSmallnum->GetLineWidth(pTmpBuf.data());
1699
33c7cc2d48d5 MonsterPopup_Draw
Ritor1
parents: 1678
diff changeset
982 window->DrawTitleText(pFontSmallnum, 0, window->uFrameHeight - LOBYTE(pFontSmallnum->uFontHeight) - 12, 0, pTmpBuf.data(), 3);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
983 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
984 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
985
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
986 //----- (00417BB5) --------------------------------------------------------
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
987 const char *CharacterUI_GetSkillDescText(unsigned int uPlayerID, PLAYER_SKILL_TYPE uPlayerSkillType)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
988 {
1720
Ritor1
parents: 1718
diff changeset
989 char a2[1200]; // [sp+Ch] [bp-538h]@7
Ritor1
parents: 1718
diff changeset
990 char Source[120]; // [sp+4BCh] [bp-88h]@7
Ritor1
parents: 1718
diff changeset
991 int v35; // [sp+53Ch] [bp-8h]@1
Ritor1
parents: 1718
diff changeset
992
Ritor1
parents: 1718
diff changeset
993 v35 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[431]);// Normal
Ritor1
parents: 1718
diff changeset
994 if ( pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[433]) > (signed int)v35 )
Ritor1
parents: 1718
diff changeset
995 v35 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[433]);// Expert
Ritor1
parents: 1718
diff changeset
996 if ( pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[432]) > (signed int)v35 )
Ritor1
parents: 1718
diff changeset
997 v35 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[432]);// Master
Ritor1
parents: 1718
diff changeset
998 if ( pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[96]) > (signed int)v35 )
Ritor1
parents: 1718
diff changeset
999 v35 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[96]);// Grand
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1000
1720
Ritor1
parents: 1718
diff changeset
1001 a2[0] = 0;
Ritor1
parents: 1718
diff changeset
1002 Source[0] = 0;
Ritor1
parents: 1718
diff changeset
1003 strcpy(a2, "%s\n\n");
Ritor1
parents: 1718
diff changeset
1004 sprintf(Source, "\f%05d", GetSkillColor(pParty->pPlayers[uPlayerID].classType, uPlayerSkillType, 1));
Ritor1
parents: 1718
diff changeset
1005 strcat(a2, Source);
Ritor1
parents: 1718
diff changeset
1006 strcat(a2, "%s\t%03d:\t%03d%s\t000\n");
Ritor1
parents: 1718
diff changeset
1007 sprintf(Source, "\f%05d", GetSkillColor(pParty->pPlayers[uPlayerID].classType, uPlayerSkillType, 2));
Ritor1
parents: 1718
diff changeset
1008 strcat(a2, Source);
Ritor1
parents: 1718
diff changeset
1009 strcat(a2, "%s\t%03d:\t%03d%s\t000\n");
Ritor1
parents: 1718
diff changeset
1010 sprintf(Source, "\f%05d", GetSkillColor(pParty->pPlayers[uPlayerID].classType, uPlayerSkillType, 3));
Ritor1
parents: 1718
diff changeset
1011 strcat(a2, Source);
Ritor1
parents: 1718
diff changeset
1012 strcat(a2, "%s\t%03d:\t%03d%s\t000\n");
Ritor1
parents: 1718
diff changeset
1013 sprintf(Source, "\f%05d", GetSkillColor(pParty->pPlayers[uPlayerID].classType, uPlayerSkillType, 4));
Ritor1
parents: 1718
diff changeset
1014 strcat(a2, Source);
Ritor1
parents: 1718
diff changeset
1015 strcat(a2, "%s\t%03d:\t%03d%s\t000\n");
Ritor1
parents: 1718
diff changeset
1016 if ( (pParty->pPlayers[uPlayerID].pActiveSkills[uPlayerSkillType] & 0x3F) == (pParty->pPlayers[uPlayerID].GetActualSkillLevel(uPlayerSkillType) & 0x3F) )
Ritor1
parents: 1718
diff changeset
1017 {
Ritor1
parents: 1718
diff changeset
1018 sprintf(static_sub_417BB5_out_string, a2, pSkillDesc[uPlayerSkillType],
Ritor1
parents: 1718
diff changeset
1019 pGlobalTXT_LocalizationStrings[431], v35 + 3, v35 + 5, pNormalSkillDesc[uPlayerSkillType], // Normal
Ritor1
parents: 1718
diff changeset
1020 pGlobalTXT_LocalizationStrings[433], v35 + 3, v35 + 5, pExpertSkillDesc[uPlayerSkillType], // Expert
Ritor1
parents: 1718
diff changeset
1021 pGlobalTXT_LocalizationStrings[432], v35 + 3, v35 + 5, pMasterSkillDesc[uPlayerSkillType], // Master
Ritor1
parents: 1718
diff changeset
1022 pGlobalTXT_LocalizationStrings[96], v35 + 3, v35 + 5, pGrandSkillDesc[uPlayerSkillType]); // Grand
Ritor1
parents: 1718
diff changeset
1023 }
Ritor1
parents: 1718
diff changeset
1024 else
Ritor1
parents: 1718
diff changeset
1025 {
Ritor1
parents: 1718
diff changeset
1026 sprintf(Source, "\f%05d", TargetColor(0xFFu, 0xFFu, 0xFFu));
Ritor1
parents: 1718
diff changeset
1027 strcat(a2, Source);
Ritor1
parents: 1718
diff changeset
1028 strcat(a2, "%s: +%d");
Ritor1
parents: 1718
diff changeset
1029 sprintf(static_sub_417BB5_out_string, a2, pSkillDesc[uPlayerSkillType],
Ritor1
parents: 1718
diff changeset
1030 pGlobalTXT_LocalizationStrings[431], v35 + 3, v35 + 5, pNormalSkillDesc[uPlayerSkillType],
Ritor1
parents: 1718
diff changeset
1031 pGlobalTXT_LocalizationStrings[433], v35 + 3, v35 + 5, pExpertSkillDesc[uPlayerSkillType],
Ritor1
parents: 1718
diff changeset
1032 pGlobalTXT_LocalizationStrings[432], v35 + 3, v35 + 5, pMasterSkillDesc[uPlayerSkillType],
Ritor1
parents: 1718
diff changeset
1033 pGlobalTXT_LocalizationStrings[96], v35 + 3, v35 + 5, pGrandSkillDesc[uPlayerSkillType],
Ritor1
parents: 1718
diff changeset
1034 pGlobalTXT_LocalizationStrings[623], //Bonus
Ritor1
parents: 1718
diff changeset
1035 (pParty->pPlayers[uPlayerID].GetActualSkillLevel(uPlayerSkillType) & 0x3F) - (pParty->pPlayers[uPlayerID].pActiveSkills[uPlayerSkillType] & 0x3F));
Ritor1
parents: 1718
diff changeset
1036 }
Ritor1
parents: 1718
diff changeset
1037 return static_sub_417BB5_out_string;
Ritor1
parents: 1718
diff changeset
1038 }
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1039
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1040 //----- (00417FE5) --------------------------------------------------------
1720
Ritor1
parents: 1718
diff changeset
1041 void CharacterUI_SkillsTab_ShowHint()
Ritor1
parents: 1718
diff changeset
1042 {
Ritor1
parents: 1718
diff changeset
1043 GUIButton *pButton; // esi@6
Ritor1
parents: 1718
diff changeset
1044 unsigned int pX; // [sp+4h] [bp-8h]@1
Ritor1
parents: 1718
diff changeset
1045 unsigned int pY; // [sp+8h] [bp-4h]@1
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1046
1720
Ritor1
parents: 1718
diff changeset
1047 pMouse->GetClickPos(&pX, &pY);
Ritor1
parents: 1718
diff changeset
1048 if ( (signed int)pX < 24 || (signed int)pX > 455 || (signed int)pY < 18 || (signed int)pY > 36 )
Ritor1
parents: 1718
diff changeset
1049 {
Ritor1
parents: 1718
diff changeset
1050 for ( pButton = pGUIWindow_CurrentMenu->pControlsHead; pButton; pButton = pButton->pNext )
Ritor1
parents: 1718
diff changeset
1051 {
Ritor1
parents: 1718
diff changeset
1052 if ( pButton->msg == UIMSG_SkillUp
Ritor1
parents: 1718
diff changeset
1053 && (signed int)pX >= (signed int)pButton->uX
Ritor1
parents: 1718
diff changeset
1054 && (signed int)pX <= (signed int)pButton->uZ
Ritor1
parents: 1718
diff changeset
1055 && (signed int)pY >= (signed int)pButton->uY
Ritor1
parents: 1718
diff changeset
1056 && (signed int)pY <= (signed int)pButton->uW )
Ritor1
parents: 1718
diff changeset
1057 {
Ritor1
parents: 1718
diff changeset
1058 CharacterUI_DrawTooltip(pSkillNames[pButton->msg_param], CharacterUI_GetSkillDescText(uActiveCharacter - 1, (PLAYER_SKILL_TYPE)pButton->msg_param));
Ritor1
parents: 1718
diff changeset
1059 }
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1060 }
1720
Ritor1
parents: 1718
diff changeset
1061 }
Ritor1
parents: 1718
diff changeset
1062 else
Ritor1
parents: 1718
diff changeset
1063 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[207], pSkillPointsAttributeDescription);//Очки навыков
Ritor1
parents: 1718
diff changeset
1064 }
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1065
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1066 //----- (00418083) --------------------------------------------------------
1458
934074e7fcc1 ModalWindow
Nomad
parents: 1393
diff changeset
1067 void CharacterUI_StatsTab_ShowHint()
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1068 {
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1069 int pStringNum; // edi@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1070 signed int pTextColor; // eax@15
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1071 char *pHourWord; // ecx@17
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1072 char *pDayWord; // eax@20
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1073 int v15; // ebx@28
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1074 POINT a2; // [sp+Ch] [bp-24h]@1
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1075 int pHour; // [sp+14h] [bp-1Ch]@15
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1076 unsigned int pDay; // [sp+24h] [bp-Ch]@15
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1077
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1078 pMouse->GetCursorPos(&a2);
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1079 for ( pStringNum = 0; pStringNum < stat_string_coord.size(); ++pStringNum )
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1080 {
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1081 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
1082 {
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1083 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
1084 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1085 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1086 }
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1087
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1088 switch ( pStringNum )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1089 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1090 case 0:// Attributes
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1091 case 1:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1092 case 2:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1093 case 3:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1094 case 4:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1095 case 5:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1096 case 6:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1097 if ( aAttributeNames[pStringNum] && pAttributeDescriptions[pStringNum] )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1098 CharacterUI_DrawTooltip(aAttributeNames[pStringNum], pAttributeDescriptions[pStringNum]);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1099 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1100 case 7:// Health Points
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1101 if ( pGlobalTXT_LocalizationStrings[108] && pHealthPointsAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1102 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[108], pHealthPointsAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1103 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1104 case 8:// Spell Points
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1105 if ( pGlobalTXT_LocalizationStrings[212] && pSpellPointsAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1106 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[212], pSpellPointsAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1107 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1108 case 9:// Armor Class
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1109 if ( pGlobalTXT_LocalizationStrings[12] && pArmourClassAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1110 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[12], pArmourClassAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1111 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1112 case 10:// Player Condition
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1113 strcpy(pTmpBuf2.data(), pPlayerConditionAttributeDescription);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1114 strcat(pTmpBuf2.data(), "\n");
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1115 extern std::array<unsigned int, 18> pConditionImportancyTable;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1116 for ( uint i = 0; i < 18; ++i )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1117 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1118 if ( pPlayers[uActiveCharacter]->pConditions[pConditionImportancyTable[i]] )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1119 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1120 strcat(pTmpBuf2.data(), " \n");
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1121 pHour = pParty->uTimePlayed - pPlayers[uActiveCharacter]->pConditions[pConditionImportancyTable[i]];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1122 pHour = (unsigned int)((pHour * 0.234375) / 60 / 60);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1123 pDay = (unsigned int)pHour / 24;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1124 pHour %= 24i64;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1125 pTextColor = GetConditionDrawColor(pConditionImportancyTable[i]);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1126 sprintfex(pTmpBuf.data(), format_4E2DE8, pTextColor, aCharacterConditionNames[pConditionImportancyTable[i]]);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1127 strcat(pTmpBuf2.data(), pTmpBuf.data());
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1128 if ( pHour && pHour <= 1 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1129 pHourWord = pGlobalTXT_LocalizationStrings[109];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1130 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1131 pHourWord = pGlobalTXT_LocalizationStrings[110];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1132 if ( !pDay || (pDayWord = pGlobalTXT_LocalizationStrings[56], pDay > 1) )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1133 pDayWord = pGlobalTXT_LocalizationStrings[57];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1134 sprintfex(pTmpBuf.data(), "%lu %s, %lu %s", pDay, pDayWord, pHour, pHourWord);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1135 strcat(pTmpBuf2.data(), pTmpBuf.data());
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1136 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1137 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1138 if ( pGlobalTXT_LocalizationStrings[47] && pTmpBuf2.data() )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1139 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[47], pTmpBuf2.data());
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1140 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1141 case 11:// Fast Spell
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1142 if ( pGlobalTXT_LocalizationStrings[172] && pFastSpellAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1143 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[172], pFastSpellAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1144 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1145 case 12:// Player Age
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1146 if ( pGlobalTXT_LocalizationStrings[5] && pPlayerAgeAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1147 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[5], pPlayerAgeAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1148 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1149 case 13:// Player Level
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1150 if ( pGlobalTXT_LocalizationStrings[131] && pPlayerLevelAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1151 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[131], pPlayerLevelAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1152 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1153 case 14://Experience
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1154 v15 = pPlayers[uActiveCharacter]->uLevel;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1155 do
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1156 {
1459
2ca62c9e7b3c Function names
Nomad
parents: 1458
diff changeset
1157 if ( (signed __int64)pPlayers[uActiveCharacter]->uExperience < (unsigned int)GetExperienceRequiredForLevel(v15) )
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1158 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1159 ++v15;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1160 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1161 while ( v15 <= 10000 );
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1162 pTmpBuf[0] = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1163 pTmpBuf2[0] = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1164 if ( v15 > pPlayers[uActiveCharacter]->uLevel )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1165 sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[147], v15);
1720
Ritor1
parents: 1718
diff changeset
1166 sprintfex(pTmpBuf2.data(), pGlobalTXT_LocalizationStrings[538], GetExperienceRequiredForLevel(v15) - LODWORD(pPlayers[uActiveCharacter]->uExperience), v15 + 1);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1167 strcat(pTmpBuf.data(), "\n");
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1168 strcat(pTmpBuf.data(), pTmpBuf2.data());
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1169 sprintf(pTmpBuf2.data(), "%s\n \n%s", pPlayerExperienceAttributeDescription, pTmpBuf.data());
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1170 if ( pGlobalTXT_LocalizationStrings[83] && pTmpBuf2.data() )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1171 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[83], pTmpBuf2.data());
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1172 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1173 case 15:// Attack Bonus
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1174 if ( pGlobalTXT_LocalizationStrings[587] && pAttackBonusAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1175 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[587], pAttackBonusAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1176 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1177 case 16:// Attack Damage
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1178 if ( pGlobalTXT_LocalizationStrings[588] && pAttackDamageAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1179 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[588], pAttackDamageAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1180 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1181 case 17:// Missle Bonus
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1182 if ( pGlobalTXT_LocalizationStrings[589] && pMissleBonusAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1183 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[589], pMissleBonusAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1184 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1185 case 18:// Missle Damage
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1186 if ( pGlobalTXT_LocalizationStrings[590] && pMissleDamageAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1187 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[590], pMissleDamageAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1188 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1189 case 19:// Fire Resistance
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1190 if ( pGlobalTXT_LocalizationStrings[87] && pFireResistanceAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1191 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[87], pFireResistanceAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1192 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1193 case 20:// Air Resistance
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1194 if ( pGlobalTXT_LocalizationStrings[6] && pAirResistanceAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1195 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[6], pAirResistanceAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1196 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1197 case 21:// Water Resistance
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1198 if ( pGlobalTXT_LocalizationStrings[240] && pWaterResistanceAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1199 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[240], pWaterResistanceAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1200 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1201 case 22:// Earth Resistance
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1202 if ( pGlobalTXT_LocalizationStrings[70] && pEarthResistanceAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1203 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[70], pEarthResistanceAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1204 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1205 case 23:// Mind Resistance
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1206 if ( pGlobalTXT_LocalizationStrings[142] && pMindResistanceAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1207 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[142], pMindResistanceAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1208 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1209 case 24:// Body Resistance
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1210 if ( pGlobalTXT_LocalizationStrings[29] && pBodyResistanceAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1211 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[29], pBodyResistanceAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1212 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1213 case 25: // Skill Points
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1214 if ( pGlobalTXT_LocalizationStrings[207] && pSkillPointsAttributeDescription )
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1215 CharacterUI_DrawTooltip(pGlobalTXT_LocalizationStrings[207], pSkillPointsAttributeDescription);
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1216 break;
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1217 case 26: // Class description
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1218 {
1678
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
1219 if (pClassDescriptions[pPlayers[uActiveCharacter]->classType] && pClassNames[pPlayers[uActiveCharacter]->classType])
6faacde46271 DrawPopupWindow
Ritor1
parents: 1602
diff changeset
1220 CharacterUI_DrawTooltip(pClassNames[pPlayers[uActiveCharacter]->classType], pClassDescriptions[pPlayers[uActiveCharacter]->classType]);
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1221 }
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1222 break;
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1299
diff changeset
1223
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1224 default:
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 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1228
1720
Ritor1
parents: 1718
diff changeset
1229 //----- (00410B28) --------------------------------------------------------
Ritor1
parents: 1718
diff changeset
1230 void DrawSpellDescriptionPopup(int spell_index)
Ritor1
parents: 1718
diff changeset
1231 {
Ritor1
parents: 1718
diff changeset
1232 SpellInfo *spell; // esi@1
Ritor1
parents: 1718
diff changeset
1233 unsigned int v3; // eax@2
Ritor1
parents: 1718
diff changeset
1234 LONG v5; // ecx@4
Ritor1
parents: 1718
diff changeset
1235 GUIWindow spell_info_window; // [sp+Ch] [bp-68h]@4
Ritor1
parents: 1718
diff changeset
1236 POINT mouse; // [sp+64h] [bp-10h]@1
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1237
1720
Ritor1
parents: 1718
diff changeset
1238 spell = &pSpellStats->pInfos[spell_index + 11 * pPlayers[uActiveCharacter]->lastOpenedSpellbookPage + 1];
Ritor1
parents: 1718
diff changeset
1239 if ( pMouse->GetCursorPos(&mouse)->y <= 250 )
Ritor1
parents: 1718
diff changeset
1240 v3 = pMouse->GetCursorPos(&mouse)->y + 30;
Ritor1
parents: 1718
diff changeset
1241 else
Ritor1
parents: 1718
diff changeset
1242 v3 = 30;
Ritor1
parents: 1718
diff changeset
1243 spell_info_window.uFrameY = v3;
Ritor1
parents: 1718
diff changeset
1244 spell_info_window.uFrameWidth = 328;
Ritor1
parents: 1718
diff changeset
1245 spell_info_window.uFrameHeight = 68;
Ritor1
parents: 1718
diff changeset
1246 spell_info_window.uFrameX = 90;
Ritor1
parents: 1718
diff changeset
1247 spell_info_window.uFrameZ = 417;
Ritor1
parents: 1718
diff changeset
1248 spell_info_window.uFrameW = v3 + 67;
Ritor1
parents: 1718
diff changeset
1249 spell_info_window.Hint = 0;
Ritor1
parents: 1718
diff changeset
1250 v5 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[LOCSTR_NORMAL]);
Ritor1
parents: 1718
diff changeset
1251 if ( pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[LOCSTR_MASTER]) > v5 )
Ritor1
parents: 1718
diff changeset
1252 v5 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[LOCSTR_MASTER]);
Ritor1
parents: 1718
diff changeset
1253 if ( pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[LOCSTR_EXPERT]) > v5 )
Ritor1
parents: 1718
diff changeset
1254 v5 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[LOCSTR_EXPERT]);
Ritor1
parents: 1718
diff changeset
1255 if ( pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[LOCSTR_GRAND]) > v5 )
Ritor1
parents: 1718
diff changeset
1256 v5 = pFontSmallnum->GetLineWidth(pGlobalTXT_LocalizationStrings[LOCSTR_GRAND]);
Ritor1
parents: 1718
diff changeset
1257 sprintf(pTmpBuf2.data(),
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1258 "%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",
1720
Ritor1
parents: 1718
diff changeset
1259 spell->pDescription,
Ritor1
parents: 1718
diff changeset
1260 pGlobalTXT_LocalizationStrings[LOCSTR_NORMAL], v5 + 3, v5 + 10, spell->pBasicSkillDesc,
Ritor1
parents: 1718
diff changeset
1261 pGlobalTXT_LocalizationStrings[LOCSTR_EXPERT], v5 + 3, v5 + 10, spell->pExpertSkillDesc,
Ritor1
parents: 1718
diff changeset
1262 pGlobalTXT_LocalizationStrings[LOCSTR_MASTER], v5 + 3, v5 + 10, spell->pMasterSkillDesc,
Ritor1
parents: 1718
diff changeset
1263 pGlobalTXT_LocalizationStrings[LOCSTR_GRAND], v5 + 3, v5 + 10, spell->pGrandmasterSkillDesc);
Ritor1
parents: 1718
diff changeset
1264 spell_info_window.uFrameHeight += pFontSmallnum->CalcTextHeight(pTmpBuf2.data(), &spell_info_window, 0, 0);
Ritor1
parents: 1718
diff changeset
1265 if ( (signed int)spell_info_window.uFrameHeight < 150 )
Ritor1
parents: 1718
diff changeset
1266 spell_info_window.uFrameHeight = 150;
Ritor1
parents: 1718
diff changeset
1267 spell_info_window.uFrameWidth = game_viewport_width;
Ritor1
parents: 1718
diff changeset
1268 spell_info_window.DrawMessageBox(0);
Ritor1
parents: 1718
diff changeset
1269 spell_info_window.uFrameWidth -= 12;
Ritor1
parents: 1718
diff changeset
1270 spell_info_window.uFrameHeight -= 12;
Ritor1
parents: 1718
diff changeset
1271 spell_info_window.uFrameZ = spell_info_window.uFrameX + spell_info_window.uFrameWidth - 1;
Ritor1
parents: 1718
diff changeset
1272 spell_info_window.uFrameW = spell_info_window.uFrameHeight + spell_info_window.uFrameY - 1;
Ritor1
parents: 1718
diff changeset
1273 spell_info_window.DrawTitleText(pFontArrus, 0x78u, 0xCu, TargetColor(0xFFu, 0xFFu, 0x9Bu), spell->pName, 3);
Ritor1
parents: 1718
diff changeset
1274 spell_info_window.DrawText(pFontSmallnum, 120, 44, 0, pTmpBuf2.data(), 0, 0, 0);
Ritor1
parents: 1718
diff changeset
1275 spell_info_window.uFrameWidth = 108;
Ritor1
parents: 1718
diff changeset
1276 spell_info_window.uFrameZ = spell_info_window.uFrameX + 107;
Ritor1
parents: 1718
diff changeset
1277 spell_info_window.DrawTitleText(pFontComic, 0xCu, 0x4Bu, 0, pSkillNames[pPlayers[uActiveCharacter]->lastOpenedSpellbookPage + 12], 3);
Ritor1
parents: 1718
diff changeset
1278 sprintf( pTmpBuf.data(), "%s\n%d", pGlobalTXT_LocalizationStrings[LOCSTR_SP_COST],
Ritor1
parents: 1718
diff changeset
1279 pSpellDatas[spell_index + 11 * pPlayers[uActiveCharacter]->lastOpenedSpellbookPage + 1].mana_per_skill[pPlayers[uActiveCharacter]->pActiveSkills[pPlayers[uActiveCharacter]->lastOpenedSpellbookPage + PLAYER_SKILL_FIRE]]);
Ritor1
parents: 1718
diff changeset
1280 spell_info_window.DrawTitleText(pFontComic, 0xCu, spell_info_window.uFrameHeight - LOBYTE(pFontComic->uFontHeight) - 16, 0, pTmpBuf.data(), 3);
Ritor1
parents: 1718
diff changeset
1281 dword_507B00_spell_info_to_draw_in_popup = 0;
Ritor1
parents: 1718
diff changeset
1282 }
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1283 // 507B00: using guessed type int dword_507B00_spell_info_to_draw_in_popup;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1284
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1285 //----- (00416D62) --------------------------------------------------------
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1286 void sub_416D62_ShowPopupWindow_MonsterRecord_ItemInfo_etcsub_416D62(Vec2_int_ *_this)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1287 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1288 signed int pPlayerNum; // eax@12
1720
Ritor1
parents: 1718
diff changeset
1289 //char *v2; // eax@32
Ritor1
parents: 1718
diff changeset
1290 //void *v3; // ecx@52
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1291 unsigned int v4; // eax@59
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1292 int v5; // esi@62
1720
Ritor1
parents: 1718
diff changeset
1293 //signed int v6; // esi@64
Ritor1
parents: 1718
diff changeset
1294 //signed int v7; // esi@69
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1295 unsigned int v10; // eax@76
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1296 //char v11; // zf@83
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1297 GUIButton *pButton; // esi@84
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1298 unsigned int v13; // ecx@85
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1299 char *pStr; // edi@85
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1300 //signed int pControlID; // eax@92
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1301 int v16; // eax@95
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1302 int v17; // eax@96
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1303 PLAYER_SKILL_TYPE v18; // eax@98
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1304 char *pStr2; // eax@99
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1305 unsigned int v20; // eax@108
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1306 unsigned int pSkillId; // eax@109
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1307 const char *pSkillInfo; // eax@111
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1308 //char *v23; // ebx@112
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1309 char *pHint; // edx@113
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1310 unsigned int pColor; // eax@113
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1311 GUIWindow pWindow; // [sp+4h] [bp-74h]@32
1720
Ritor1
parents: 1718
diff changeset
1312 //double v27; // [sp+58h] [bp-20h]@33
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1313 struct tagPOINT Point; // [sp+60h] [bp-18h]@6
1720
Ritor1
parents: 1718
diff changeset
1314 //char *v29; // [sp+68h] [bp-10h]@33
Ritor1
parents: 1718
diff changeset
1315 //float v30; // [sp+6Ch] [bp-Ch]@33
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1316 unsigned int pX; // [sp+70h] [bp-8h]@3
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1317 unsigned int pY; // [sp+74h] [bp-4h]@3
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1318
1720
Ritor1
parents: 1718
diff changeset
1319 if ( pCurrentScreen == SCREEN_VIDEO )
Ritor1
parents: 1718
diff changeset
1320 return;
Ritor1
parents: 1718
diff changeset
1321 if ( _this )
Ritor1
parents: 1718
diff changeset
1322 {
Ritor1
parents: 1718
diff changeset
1323 pX = _this->x;
Ritor1
parents: 1718
diff changeset
1324 pY = _this->y;
Ritor1
parents: 1718
diff changeset
1325 }
Ritor1
parents: 1718
diff changeset
1326 else
Ritor1
parents: 1718
diff changeset
1327 {
Ritor1
parents: 1718
diff changeset
1328 pMouse->GetClickPos(&pX, &pY);
Ritor1
parents: 1718
diff changeset
1329 }
Ritor1
parents: 1718
diff changeset
1330 if ( pRenderer->bWindowMode )
Ritor1
parents: 1718
diff changeset
1331 {
Ritor1
parents: 1718
diff changeset
1332 GetCursorPos(&Point);
Ritor1
parents: 1718
diff changeset
1333 ScreenToClient(hWnd, &Point);
Ritor1
parents: 1718
diff changeset
1334 if ( Point.x < 1 || Point.y < 1 || Point.x > 638 || Point.y > 478 )
Ritor1
parents: 1718
diff changeset
1335 {
Ritor1
parents: 1718
diff changeset
1336 back_to_game();
Ritor1
parents: 1718
diff changeset
1337 return;
Ritor1
parents: 1718
diff changeset
1338 }
Ritor1
parents: 1718
diff changeset
1339 }
Ritor1
parents: 1718
diff changeset
1340 if ( pParty->pPickedItem.uItemID )//нажатие на портрет перса правой кнопкой мыши с раствором
Ritor1
parents: 1718
diff changeset
1341 {
Ritor1
parents: 1718
diff changeset
1342 for ( uint i = 0; i < 4; ++i )
Ritor1
parents: 1718
diff changeset
1343 {
Ritor1
parents: 1718
diff changeset
1344 if ( (signed int)pX > RightClickPortraitXmin[i] && (signed int)pX < RightClickPortraitXmax[i]
Ritor1
parents: 1718
diff changeset
1345 && (signed int)pY > 375 && (signed int)pY < 466 )
Ritor1
parents: 1718
diff changeset
1346 {
Ritor1
parents: 1718
diff changeset
1347 pPlayers[uActiveCharacter]->UseItem_DrinkPotion_etc(i + 1, 1);
Ritor1
parents: 1718
diff changeset
1348 return;
Ritor1
parents: 1718
diff changeset
1349 }
Ritor1
parents: 1718
diff changeset
1350 }
Ritor1
parents: 1718
diff changeset
1351 }
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1352
1720
Ritor1
parents: 1718
diff changeset
1353 pEventTimer->Pause();
Ritor1
parents: 1718
diff changeset
1354 switch(pCurrentScreen)
Ritor1
parents: 1718
diff changeset
1355 {
Ritor1
parents: 1718
diff changeset
1356 case SCREEN_CASTING:
Ritor1
parents: 1718
diff changeset
1357 {
Ritor1
parents: 1718
diff changeset
1358 OnInventoryItemRightClick();
Ritor1
parents: 1718
diff changeset
1359 break;
Ritor1
parents: 1718
diff changeset
1360 }
Ritor1
parents: 1718
diff changeset
1361 case SCREEN_CHEST:
Ritor1
parents: 1718
diff changeset
1362 {
Ritor1
parents: 1718
diff changeset
1363 if ( !pPlayers[uActiveCharacter]->CanAct() )
Ritor1
parents: 1718
diff changeset
1364 {
Ritor1
parents: 1718
diff changeset
1365 sprintf(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[427], pPlayers[uActiveCharacter]->pName, pGlobalTXT_LocalizationStrings[541]);//%s не в состоянии %s Опознать предметы
Ritor1
parents: 1718
diff changeset
1366 pWindow.Hint = pTmpBuf.data();
Ritor1
parents: 1718
diff changeset
1367 pWindow.uFrameWidth = 384;
Ritor1
parents: 1718
diff changeset
1368 pWindow.uFrameHeight = 180;
Ritor1
parents: 1718
diff changeset
1369 pWindow.uFrameY = 40;
Ritor1
parents: 1718
diff changeset
1370 if ( (signed int)pX <= 320 )
Ritor1
parents: 1718
diff changeset
1371 v10 = pX + 30;
Ritor1
parents: 1718
diff changeset
1372 else
Ritor1
parents: 1718
diff changeset
1373 v10 = pX - 414;
Ritor1
parents: 1718
diff changeset
1374 pWindow.uFrameX = v10;
Ritor1
parents: 1718
diff changeset
1375 pWindow.DrawMessageBox(0);
Ritor1
parents: 1718
diff changeset
1376 }
Ritor1
parents: 1718
diff changeset
1377 else
Ritor1
parents: 1718
diff changeset
1378 {
Ritor1
parents: 1718
diff changeset
1379 if ( pRenderer->pActiveZBuffer[pX + pSRZBufferLineOffsets[pY]] & 0xFFFF )
Ritor1
parents: 1718
diff changeset
1380 {
Ritor1
parents: 1718
diff changeset
1381 v10 = pChests[pChestWindow->par1C].pInventoryIndices[(pRenderer->pActiveZBuffer[pX + pSRZBufferLineOffsets[pY]] & 0xFFFF)-1];
Ritor1
parents: 1718
diff changeset
1382 GameUI_DrawItemInfo(&pChests[pChestWindow->par1C].igChestItems[v10 - 1]);
Ritor1
parents: 1718
diff changeset
1383 }
Ritor1
parents: 1718
diff changeset
1384 }
Ritor1
parents: 1718
diff changeset
1385 break;
Ritor1
parents: 1718
diff changeset
1386 }
Ritor1
parents: 1718
diff changeset
1387 case SCREEN_GAME:
Ritor1
parents: 1718
diff changeset
1388 {
Ritor1
parents: 1718
diff changeset
1389 if (GetCurrentMenuID() > 0)
Ritor1
parents: 1718
diff changeset
1390 break;
Ritor1
parents: 1718
diff changeset
1391 if ( (signed int)pY > (signed int)pViewport->uViewportBR_Y )
Ritor1
parents: 1718
diff changeset
1392 {
Ritor1
parents: 1718
diff changeset
1393 pWindow.ptr_1C = (void *)((signed int)pX / 118);
Ritor1
parents: 1718
diff changeset
1394 if ( (signed int)pX / 118 < 4 )//portaits zone
Ritor1
parents: 1718
diff changeset
1395 {
Ritor1
parents: 1718
diff changeset
1396 pWindow.Hint = 0;
Ritor1
parents: 1718
diff changeset
1397 pWindow.uFrameWidth = 400;
Ritor1
parents: 1718
diff changeset
1398 pWindow.uFrameHeight = 200;
Ritor1
parents: 1718
diff changeset
1399 pWindow.uFrameX = 38;
Ritor1
parents: 1718
diff changeset
1400 pWindow.uFrameY = 60;
Ritor1
parents: 1718
diff changeset
1401 pAudioPlayer->StopChannels(-1, -1);
Ritor1
parents: 1718
diff changeset
1402 GameUI_CharacterQuickRecord_Draw(&pWindow, pPlayers[(int)pWindow.ptr_1C + 1]);
Ritor1
parents: 1718
diff changeset
1403 }
Ritor1
parents: 1718
diff changeset
1404 }
Ritor1
parents: 1718
diff changeset
1405 else if ( (signed int)pX > (signed int)pViewport->uViewportBR_X )
Ritor1
parents: 1718
diff changeset
1406 {
Ritor1
parents: 1718
diff changeset
1407 if ( (signed int)pY >= 130 )
Ritor1
parents: 1718
diff changeset
1408 {
Ritor1
parents: 1718
diff changeset
1409 if ( (signed int)pX >= 476 && (signed int)pX <= 636 && (signed int)pY >= 240 && (signed int)pY <= 300 )//buff_tooltip zone
Ritor1
parents: 1718
diff changeset
1410 {
Ritor1
parents: 1718
diff changeset
1411 pWindow.Hint = 0;
Ritor1
parents: 1718
diff changeset
1412 pWindow.uFrameWidth = 400;
Ritor1
parents: 1718
diff changeset
1413 pWindow.uFrameHeight = 200;
Ritor1
parents: 1718
diff changeset
1414 pWindow.uFrameX = 38;
Ritor1
parents: 1718
diff changeset
1415 pWindow.uFrameY = 60;
Ritor1
parents: 1718
diff changeset
1416 pAudioPlayer->StopChannels(-1, -1);
Ritor1
parents: 1718
diff changeset
1417 pWindow._41D73D_draw_buff_tooltip();
Ritor1
parents: 1718
diff changeset
1418 }
Ritor1
parents: 1718
diff changeset
1419 else if ( (signed int)pX < 485 || (signed int)pX > 548 || (signed int)pY < 156 || (signed int)pY > 229 )//NPC zone
Ritor1
parents: 1718
diff changeset
1420 {
Ritor1
parents: 1718
diff changeset
1421 if (!( (signed int)pX < 566 || (signed int)pX > 629 || (signed int)pY < 156 || (signed int)pY > 229 ))
Ritor1
parents: 1718
diff changeset
1422 {
Ritor1
parents: 1718
diff changeset
1423 pAudioPlayer->StopChannels(-1, -1);
Ritor1
parents: 1718
diff changeset
1424 GameUI_DrawNPCPopup((void *)1);//NPC 2
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1425 }
1720
Ritor1
parents: 1718
diff changeset
1426 }
Ritor1
parents: 1718
diff changeset
1427 else
Ritor1
parents: 1718
diff changeset
1428 {
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1429 pAudioPlayer->StopChannels(-1, -1);
1720
Ritor1
parents: 1718
diff changeset
1430 GameUI_DrawNPCPopup(0);//NPC 1
Ritor1
parents: 1718
diff changeset
1431 }
Ritor1
parents: 1718
diff changeset
1432 }
Ritor1
parents: 1718
diff changeset
1433 else//minimap zone
Ritor1
parents: 1718
diff changeset
1434 {
Ritor1
parents: 1718
diff changeset
1435 pWindow.Hint = (char *)GameUI_GetMinimapHintText();
Ritor1
parents: 1718
diff changeset
1436 pWindow.uFrameWidth = 256;
Ritor1
parents: 1718
diff changeset
1437 pWindow.uFrameX = 130;
Ritor1
parents: 1718
diff changeset
1438 pWindow.uFrameY = 140;
Ritor1
parents: 1718
diff changeset
1439 pWindow.uFrameHeight = 64;
Ritor1
parents: 1718
diff changeset
1440 pAudioPlayer->StopChannels(-1, -1);
Ritor1
parents: 1718
diff changeset
1441 pWindow.DrawMessageBox(0);
Ritor1
parents: 1718
diff changeset
1442 }
Ritor1
parents: 1718
diff changeset
1443 }
Ritor1
parents: 1718
diff changeset
1444 else//game zone
Ritor1
parents: 1718
diff changeset
1445 {
Ritor1
parents: 1718
diff changeset
1446 pWindow.Hint = 0;
Ritor1
parents: 1718
diff changeset
1447 pWindow.uFrameWidth = 320;
Ritor1
parents: 1718
diff changeset
1448 pWindow.uFrameHeight = 320;
Ritor1
parents: 1718
diff changeset
1449 v4 = pX - 350;
Ritor1
parents: 1718
diff changeset
1450 if ( (signed int)pX <= 320 )
Ritor1
parents: 1718
diff changeset
1451 v4 = pX + 30;
Ritor1
parents: 1718
diff changeset
1452 pWindow.uFrameX = v4;
Ritor1
parents: 1718
diff changeset
1453 pWindow.uFrameY = 40;
Ritor1
parents: 1718
diff changeset
1454 if ( pRenderer->pRenderD3D )
Ritor1
parents: 1718
diff changeset
1455 LOWORD(v5) = pGame->pVisInstance->get_picked_object_zbuf_val();
Ritor1
parents: 1718
diff changeset
1456 else
Ritor1
parents: 1718
diff changeset
1457 v5 = pRenderer->pActiveZBuffer[pX + pSRZBufferLineOffsets[pY]];
Ritor1
parents: 1718
diff changeset
1458 if (PID_TYPE((unsigned __int16)v5) == OBJECT_Actor)
Ritor1
parents: 1718
diff changeset
1459 {
Ritor1
parents: 1718
diff changeset
1460 if ( pRenderer->uNumSceneBegins )
Ritor1
parents: 1718
diff changeset
1461 {
Ritor1
parents: 1718
diff changeset
1462 pWindow.DrawMessageBox(1);
Ritor1
parents: 1718
diff changeset
1463 MonsterPopup_Draw(PID_ID((unsigned __int16)v5), &pWindow);
Ritor1
parents: 1718
diff changeset
1464 }
Ritor1
parents: 1718
diff changeset
1465 else
Ritor1
parents: 1718
diff changeset
1466 {
Ritor1
parents: 1718
diff changeset
1467 pRenderer->BeginScene();
Ritor1
parents: 1718
diff changeset
1468 pWindow.DrawMessageBox(1);
Ritor1
parents: 1718
diff changeset
1469 MonsterPopup_Draw(PID_ID((unsigned __int16)v5), &pWindow);
Ritor1
parents: 1718
diff changeset
1470 pRenderer->EndScene();
Ritor1
parents: 1718
diff changeset
1471 }
Ritor1
parents: 1718
diff changeset
1472 }
Ritor1
parents: 1718
diff changeset
1473 if (PID_TYPE((unsigned __int16)v5) == OBJECT_Item)
Ritor1
parents: 1718
diff changeset
1474 {
Ritor1
parents: 1718
diff changeset
1475 if ( !(pObjectList->pObjects[pSpriteObjects[PID_ID((unsigned __int16)v5)].uObjectDescID].uFlags & 0x10 ) )
Ritor1
parents: 1718
diff changeset
1476 {
Ritor1
parents: 1718
diff changeset
1477 GameUI_DrawItemInfo(&pSpriteObjects[PID_ID((unsigned __int16)v5)].stru_24);
Ritor1
parents: 1718
diff changeset
1478 }
Ritor1
parents: 1718
diff changeset
1479 }
Ritor1
parents: 1718
diff changeset
1480 }
Ritor1
parents: 1718
diff changeset
1481 break;
Ritor1
parents: 1718
diff changeset
1482 }
Ritor1
parents: 1718
diff changeset
1483 case SCREEN_BOOKS:
Ritor1
parents: 1718
diff changeset
1484 {
Ritor1
parents: 1718
diff changeset
1485 if ( !dword_506364
Ritor1
parents: 1718
diff changeset
1486 || (signed int)pX < (signed int)pViewport->uViewportTL_X || (signed int)pX > (signed int)pViewport->uViewportBR_X
Ritor1
parents: 1718
diff changeset
1487 || (signed int)pY < (signed int)pViewport->uViewportTL_Y || (signed int)pY > (signed int)pViewport->uViewportBR_Y
Ritor1
parents: 1718
diff changeset
1488 || ((pWindow.Hint = (char *)GetMapBookHintText()) == 0) )
Ritor1
parents: 1718
diff changeset
1489 break;
Ritor1
parents: 1718
diff changeset
1490 pWindow.uFrameWidth = (pFontArrus->GetLineWidth(pWindow.Hint) + 32) + 0.5f;
Ritor1
parents: 1718
diff changeset
1491 pWindow.uFrameX = pX + 5;
Ritor1
parents: 1718
diff changeset
1492 pWindow.uFrameY = pY + 5;
Ritor1
parents: 1718
diff changeset
1493 pWindow.uFrameHeight = 64;
Ritor1
parents: 1718
diff changeset
1494 pAudioPlayer->StopChannels(-1, -1);
Ritor1
parents: 1718
diff changeset
1495 pWindow.DrawMessageBox(0);
Ritor1
parents: 1718
diff changeset
1496 break;
Ritor1
parents: 1718
diff changeset
1497 }
Ritor1
parents: 1718
diff changeset
1498 case SCREEN_CHARACTERS:
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1499 case SCREEN_E:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1500 case SCREEN_CHEST_INVENTORY:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1501 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1502 if ( (signed int)pX > 467 && pCurrentScreen != SCREEN_E )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1503 {
1575
43d3536a20f7 OnInventoryItemRightClick
Nomad
parents: 1567
diff changeset
1504 OnInventoryItemRightClick();
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1505 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1506 else if ( (signed int)pY >= 345 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1507 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1508 else if ( pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] == 100 )//2DEvent - CharacerScreenStats
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1509 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1510 CharacterUI_StatsTab_ShowHint();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1511 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1512 else if ( pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] == 101 )//2DEvent - CharacerScreenSkills
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1513 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1514 CharacterUI_SkillsTab_ShowHint();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1515 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1516 else
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1517 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1518 if ( pWindowList_at_506F50_minus1_indexing_buttons____and_an_int_[0] == 103 )//2DEvent - CharacerScreenInventory
1575
43d3536a20f7 OnInventoryItemRightClick
Nomad
parents: 1567
diff changeset
1519 OnInventoryItemRightClick();
1298
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1520 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1521 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1522 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1523 case SCREEN_SPELL_BOOK:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1524 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1525 if ( dword_507B00_spell_info_to_draw_in_popup )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1526 DrawSpellDescriptionPopup(dword_507B00_spell_info_to_draw_in_popup - 1);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1527 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1528 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1529 case SCREEN_HOUSE:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1530 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1531 if ( (signed int)pY < 345 && (signed int)pX < 469 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1532 ShowPopupShopItem();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1533 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1534 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1535 case SCREEN_PARTY_CREATION:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1536 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1537 pWindow.Hint = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1538 pStr = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1539 for ( pButton = pGUIWindow_CurrentMenu->pControlsHead; pButton; pButton = pButton->pNext)
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1540 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1541 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
1542 && (signed int)pY > (signed int)pButton->uY && (signed int)pY < (signed int)pButton->uW )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1543 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1544 switch ( pButton->msg )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1545 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1546 case UIMSG_0: //stats info
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1547 pWindow.Hint = pAttributeDescriptions[(signed int)pButton->msg_param % 7];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1548 pStr = aAttributeNames[(signed int)pButton->msg_param % 7];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1549 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1550 case UIMSG_PlayerCreationClickPlus: //Plus button info
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1551 pStr = pGlobalTXT_LocalizationStrings[670];//Добавить
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1552 pWindow.Hint = pGlobalTXT_LocalizationStrings[671];//"Добавляет очко к выделенному навыку, забирая его из накопителя очков"
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1553 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1554 case UIMSG_PlayerCreationClickMinus: //Minus button info
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1555 pStr = pGlobalTXT_LocalizationStrings[668];//Вычесть
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1556 pWindow.Hint = pGlobalTXT_LocalizationStrings[669];//"Вычитает очко из выделенного навыка, возвращая его в накопитель очков"
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1557 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1558 case UIMSG_PlayerCreationSelectActiveSkill: //Available skill button info
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1559 v18 = pParty->pPlayers[uPlayerCreationUI_SelectedCharacter].GetSkillIdxByOrder(pButton->msg_param + 4);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1560 pStr = pSkillNames[v18];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1561 pWindow.Hint = pSkillDesc[v18];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1562 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1563 case UIMSG_PlayerCreationSelectClass: //Available Class Info
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1564 pWindow.Hint = pClassDescriptions[pButton->msg_param];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1565 pStr = pClassNames[pButton->msg_param];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1566 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1567 case UIMSG_PlayerCreationClickOK: //OK Info
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1568 pWindow.Hint = pGlobalTXT_LocalizationStrings[664];//Щелкните здесь для утверждения состава отряда и продолжения игры.
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1569 pStr = pGlobalTXT_LocalizationStrings[665];//Кнопка ОК
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1570 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1571 case UIMSG_PlayerCreationClickReset: //Clear info
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1572 pWindow.Hint = pGlobalTXT_LocalizationStrings[666];//Сбрасывает все параметры и навыки отряда.
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1573 pStr = pGlobalTXT_LocalizationStrings[667];//Кнопка Очистить
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1574 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1575 case UIMSG_PlayerCreation_SelectAttribute: // Character info
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1576 pStr = pParty->pPlayers[pButton->msg_param].pName;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1577 pWindow.Hint = pClassDescriptions[pParty->pPlayers[pButton->msg_param].classType];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1578 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1579 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1580 if ( pButton->msg > UIMSG_44 && pButton->msg <= UIMSG_PlayerCreationRemoveDownSkill ) //Sellected skills info
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1581 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1582 pSkillId = pParty->pPlayers[pButton->msg_param].GetSkillIdxByOrder(pButton->msg - UIMSG_48);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1583 pY = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1584 if ( (signed int)pSkillId < 37 )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1585 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1586 pSkillInfo = CharacterUI_GetSkillDescText(pButton->msg_param, (PLAYER_SKILL_TYPE)pSkillId);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1587 strcpy(pTmpBuf2.data(), pSkillInfo);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1588 pWindow.Hint = pTmpBuf2.data();
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1589 pStr = pSkillNames[pSkillId];
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1590 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1591 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1592 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1593 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1594 if ( pWindow.Hint )
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1595 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1596 pHint = (char*)pWindow.Hint;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1597 pWindow.Hint = 0;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1598 pWindow.uFrameWidth = 384;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1599 pWindow.uFrameHeight = 256;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1600 pWindow.uFrameX = 128;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1601 pWindow.uFrameY = 40;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1602 pWindow.uFrameHeight = pFontSmallnum->CalcTextHeight(pHint, &pWindow, 24, 0) + 2 * LOBYTE(pFontLucida->uFontHeight) + 24;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1603 pWindow.uFrameZ = pWindow.uFrameX + pWindow.uFrameWidth - 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1604 pWindow.uFrameW = pWindow.uFrameY + pWindow.uFrameHeight - 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1605 pWindow.DrawMessageBox(0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1606 pWindow.uFrameX += 12;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1607 pWindow.uFrameWidth -= 24;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1608 pWindow.uFrameY += 12;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1609 pWindow.uFrameHeight -= 12;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1610 pWindow.uFrameZ = pWindow.uFrameX + pWindow.uFrameWidth - 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1611 pWindow.uFrameW = pWindow.uFrameY + pWindow.uFrameHeight - 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1612 pColor = TargetColor(0xFF, 0xFF, 0x9B);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1613 sprintf(pTmpBuf.data(), format_4E2D80, pColor, pStr);//"\f%05d%s\f00000\n"
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1614 pWindow.DrawTitleText(pFontCreate, 0, 0, 0, pTmpBuf.data(), 3);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1615 pWindow.DrawText(pFontSmallnum, 1, pFontLucida->uFontHeight, 0, pHint, 0, 0, 0);
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1616 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1617 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1618 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1619 default:
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1620 {
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1621 break;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1622 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1623 }
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1624 dword_507BF0_is_there_popup_onscreen = 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1625 viewparams->bRedrawGameUI = 1;
b97d0cdd6c79 new folder UI
Ritor1
parents:
diff changeset
1626 }