annotate UIPartyCreation.cpp @ 801:5f0029b4bf09

m
author Ritor1
date Mon, 25 Mar 2013 14:29:01 +0600
parents b27dd658ea77
children 5e3f4bf3b8e6
rev   line source
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
1 #include <assert.h>
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
2
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
3 #include "MM7.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
4
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
5 #include "MapInfo.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
6 #include "Game.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
7 #include "GUIWindow.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
8 #include "GUIFont.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
9 #include "GUIButton.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
10 #include "GUIProgressBar.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
11 #include "Party.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
12 #include "AudioPlayer.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
13 #include "Outdoor.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
14 #include "IndoorCamera.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
15 #include "Overlays.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
16 #include "Monsters.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
17 #include "Arcomage.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
18 #include "LOD.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
19 #include "Actor.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
20 #include "Allocator.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
21 #include "Events.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
22 #include "Viewport.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
23 #include "FrameTableInc.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
24 #include "Math.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
25 #include "SpriteObject.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
26 #include "ObjectList.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
27 #include "Chest.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
28 #include "PaletteManager.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
29 #include "DecorationList.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
30 #include "SaveLoad.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
31 #include "stru123.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
32 #include "Time.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
33 #include "IconFrameTable.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
34 #include "Awards.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
35 #include "Autonotes.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
36 #include "stru160.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
37 #include "stru279.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
38 #include "TurnEngine.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
39 #include "stru277.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
40 #include "Weather.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
41 #include "stru272.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
42 #include "stru298.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
43 #include "StorylineTextTable.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
44 #include "Events2D.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
45 #include "texts.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
46 #include "stru351.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
47
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
48 #include "mm7_data.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
49
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
50
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
51
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
52 //----- (004908DE) --------------------------------------------------------
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
53 signed int __cdecl PlayerCreation_Chose4Skills()
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
54 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
55 Player *v0; // esi@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
56 signed int v1; // edx@2
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
57 unsigned short *v2; // eax@2
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
58 signed int v3; // ecx@2
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
59
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
60 v0 = pParty->pPlayers;//[0].pActiveSkills;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
61 while ( 1 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
62 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
63 v1 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
64 v2 = v0->pActiveSkills;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
65 v3 = 37;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
66 do
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
67 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
68 if ( *v2 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
69 ++v1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
70 ++v2;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
71 --v3;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
72 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
73 while ( v3 );
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
74 if ( v1 < 4 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
75 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
76 ++v0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
77 if ( v0 > &pParty->pPlayers[3] )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
78 return 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
79 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
80 return 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
81 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
82
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
83
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
84
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
85
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
86 //----- (00491CB5) --------------------------------------------------------
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
87 void __cdecl LoadPlayerPortraintsAndVoices()
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
88 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
89 //Texture **v0; // ebx@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
90 //int v1; // eax@2
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
91 //int v2; // edi@3
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
92 char *v3; // esi@5
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
93 char *v4; // [sp+10h] [bp-4h]@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
94
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
95 pIcons_LOD->pFacesLock = pIcons_LOD->uNumLoadedFiles;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
96
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
97 for (uint i = 0; i < 4; ++i)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
98 for (uint j = 0; j < 56; ++j)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
99 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
100 sprintf(pTmpBuf, "%s%02d", pPlayerPortraitsNames[pParty->pPlayers[i].uFace], j + 1);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
101 pTextures_PlayerFaces[i][j] = pIcons_LOD->LoadTexturePtr(pTmpBuf, TEXTURE_16BIT_PALETTE);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
102 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
103
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
104 pTexture_PlayerFaceEradicated = pIcons_LOD->LoadTexturePtr("ERADCATE", TEXTURE_16BIT_PALETTE);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
105 pTexture_PlayerFaceDead = pIcons_LOD->LoadTexturePtr("DEAD", TEXTURE_16BIT_PALETTE);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
106 pTexture_PlayerFaceMask = pIcons_LOD->LoadTexturePtr("FACEMASK", TEXTURE_16BIT_PALETTE);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
107
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
108 if (SoundSetAction[24][0])
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
109 for (uint i = 0; i < 4; ++i)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
110 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
111 pSoundList->LoadSound(2 * (SoundSetAction[24][0] + 50 * pParty->pPlayers[i].uVoiceID) + 4998, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
112 pSoundList->LoadSound(2 * (SoundSetAction[24][0] + 50 * pParty->pPlayers[i].uVoiceID) + 4999, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
113 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
114 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
115
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
116 //----- (00491DE7) --------------------------------------------------------
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
117 int __fastcall ReloadPlayerPortraits(int a1, int a2)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
118 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
119 int result; // eax@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
120 const char **v3; // ebp@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
121 Texture **v4; // ebx@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
122 int v5; // esi@2
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
123
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
124 result = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
125 v3 = &pPlayerPortraitsNames[a2];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
126 v4 = pTextures_PlayerFaces[a1];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
127 do
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
128 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
129 v5 = result + 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
130 sprintf(pTmpBuf, "%s%02d", *v3, result + 1);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
131 pIcons_LOD->ReloadTexture(*v4, pTmpBuf, 2);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
132 result = v5;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
133 ++v4;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
134 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
135 while ( v5 < 56 );
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
136 return result;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
137 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
138 //----- (00495B39) --------------------------------------------------------
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
139 void __cdecl PlayerCreationUI_Draw()
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
140 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
141 const char *uTitleText; // ST10_4@3
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
142 int pTextCenter; // eax@3
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
143 IconFrame *v3; // eax@3
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
144 int v4; // ecx@7
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
145 GUIButton *uPosActiveItem; // edi@12
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
146 int v6; // esi@14
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
147 int uNumLet; // eax@14
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
148 char v8; // al@17
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
149 int v9; // ecx@17
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
150 char v10; // sf@17
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
151 int v11; // ecx@19
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
152 void *v12; // eax@20
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
153 int v13; // ecx@21
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
154 int v14; // ecx@22
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
155 char *v15; // ST14_4@24
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
156 size_t v16; // eax@28
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
157 int v17; // eax@33
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
158 //enum CHARACTER_RACE uNumRace; // eax@35
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
159 int v19; // eax@36
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
160 int v20; // eax@37
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
161 int uNumMight; // eax@44
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
162 unsigned int v24; // eax@44
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
163 int v25; // eax@44
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
164 unsigned int v26; // eax@44
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
165 int v27; // eax@44
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
166 unsigned int v28; // eax@44
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
167 int v29; // eax@44
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
168 unsigned int v30; // eax@44
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
169 int v31; // eax@44
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
170 unsigned int v32; // eax@44
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
171 int v33; // eax@44
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
172 unsigned int v34; // eax@44
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
173 int v35; // eax@44
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
174 unsigned int v36; // eax@44
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
175 enum PLAYER_SKILL_TYPE v37; // eax@44
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
176 enum PLAYER_SKILL_TYPE v39; // eax@44
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
177 enum PLAYER_SKILL_TYPE v41; // eax@44
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
178 const char *v42; // edx@44
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
179 char *v43; // ST1C_4@44
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
180 int v45; // eax@44
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
181 enum PLAYER_SKILL_TYPE v46; // eax@46
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
182 const char *v47; // edx@46
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
183 char *v48; // ST1C_4@46
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
184 int v50; // eax@46
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
185 int v51; // eax@49
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
186 char *v52; // edi@52
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
187 char v53; // al@52
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
188 PLAYER_CLASS_TYPE uClassType; // edi@53
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
189 int v55; // ST0C_4@53
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
190 int v57; // eax@53
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
191 int v61; // ecx@55
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
192 int v64; // ST08_4@57
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
193 int v66; // ecx@57
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
194 int v71; // eax@59
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
195 int v75; // eax@61
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
196 int v80; // eax@63
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
197 int v85; // eax@65
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
198 int v89; // eax@67
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
199 int v94; // eax@69
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
200 enum PLAYER_SKILL_TYPE pSkillId; // edi@72
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
201 size_t pLenText; // eax@72
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
202 signed int v104; // ecx@72
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
203 int pColorText; // ecx@79
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
204 unsigned int v107; // ST0C_4@81
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
205 int pTextY; // ST08_4@81
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
206 int v111; // ST0C_4@82
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
207 signed int v113; // edi@82
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
208 int v114; // ST0C_4@82
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
209 const char *uRaceName; // [sp+0h] [bp-170h]@39
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
210 char pText[200]; // [sp+10h] [bp-160h]@14
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
211 GUIWindow pWindow; // [sp+D8h] [bp-98h]@83
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
212 int v119; // [sp+12Ch] [bp-44h]@18
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
213 size_t v120; // [sp+130h] [bp-40h]@25
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
214 int uY; // [sp+134h] [bp-3Ch]@18
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
215 int v122; // [sp+138h] [bp-38h]@18
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
216 int v123; // [sp+13Ch] [bp-34h]@11
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
217 void *v124; // [sp+140h] [bp-30h]@18
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
218 int uColor1; // [sp+144h] [bp-2Ch]@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
219 int v126; // [sp+148h] [bp-28h]@25
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
220 int uColorGreen; // [sp+14Ch] [bp-24h]@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
221 int v128; // [sp+150h] [bp-20h]@14
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
222 int v129; // [sp+154h] [bp-1Ch]@18
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
223 int uColorTeal; // [sp+158h] [bp-18h]@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
224 int uColorWhite; // [sp+15Ch] [bp-14h]@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
225 int uX; // [sp+160h] [bp-10h]@18
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
226 unsigned int v133; // [sp+164h] [bp-Ch]@25
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
227 int pOrder; // [sp+168h] [bp-8h]@14
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
228 //char *Str; // [sp+16Ch] [bp-4h]@18
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
229 //Player *pPlayer;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
230 const char *pSkillName;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
231
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
232 uColor1 = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xD1, 0xBB, 0x61);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
233 uColorTeal = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xF7, 0xF7);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
234 uColorGreen = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFF, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
235 uColorWhite = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFF, 0xFF, 0xFF);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
236 pRenderer->BeginScene();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
237 pRenderer->DrawTextureRGB(0, 0, &pTexture_PCX);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
238 uPlayerCreationUI_SkySliderPos = (GetTickCount() % 12800) / 20;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
239 pRenderer->DrawTextureIndexed(uPlayerCreationUI_SkySliderPos, 2, pTexture_MAKESKY);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
240 pRenderer->DrawTextureIndexed(uPlayerCreationUI_SkySliderPos - 640, 2, pTexture_MAKESKY);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
241 //if (uPlayerCreationUI_SkySliderPos > 640)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
242 //uPlayerCreationUI_SkySliderPos = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
243 pRenderer->DrawTextureTransparent(0, 0, pTexture_MAKETOP);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
244 uTitleText = pGlobalTXT_LocalizationStrings[51];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
245 uPlayerCreationUI_SelectedCharacter = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) / 7;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
246 pTextCenter = pFontCChar->AlignText_Center(640, pGlobalTXT_LocalizationStrings[51]);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
247 pGUIWindow_CurrentMenu->DrawText(pFontCChar, pTextCenter + 1, 0, 0, uTitleText, 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
248 pRenderer->DrawTextureTransparent(17, 35, pPlayerPortraits[pParty->pPlayers[0].uFace]);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
249 pRenderer->DrawTextureTransparent(176, 35, pPlayerPortraits[pParty->pPlayers[1].uFace]);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
250 pRenderer->DrawTextureTransparent(335, 35, pPlayerPortraits[pParty->pPlayers[2].uFace]);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
251 pRenderer->DrawTextureTransparent(494, 35, pPlayerPortraits[pParty->pPlayers[3].uFace]);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
252 v3 = pIconsFrameTable->GetFrame(uIconID_CharacterFrame, pEventTimer->uStartTime);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
253 if ( uPlayerCreationUI_SelectedCharacter )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
254 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
255 switch ( uPlayerCreationUI_SelectedCharacter )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
256 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
257 case 1:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
258 v4 = 171;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
259 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
260 case 2:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
261 v4 = 329;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
262 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
263 case 3:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
264 v4 = 488;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
265 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
266 default:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
267 v4 = v123;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
268 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
269 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
270 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
271 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
272 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
273 v4 = 12;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
274 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
275
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
276 pRenderer->DrawTextureTransparent(v4, 29, &pIcons_LOD->pTextures[v3->uTextureID]);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
277 uPosActiveItem = pGUIWindow_CurrentMenu->GetControl(pGUIWindow_CurrentMenu->pCurrentPosActiveItem);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
278 uPlayerCreationUI_ArrowAnim = 19 - (GetTickCount() % 500) / 25;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
279 pRenderer->DrawTextureTransparent(uPosActiveItem->uZ - 4, uPosActiveItem->uY, pTextures_arrowl[uPlayerCreationUI_ArrowAnim]);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
280 pRenderer->DrawTextureTransparent(uPosActiveItem->uX - 12, uPosActiveItem->uY, pTextures_arrowr[uPlayerCreationUI_ArrowAnim]);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
281 //if (uPlayerCreationUI_ArrowAnim < 0)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
282 // uPlayerCreationUI_ArrowAnim = 18;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
283 v6 = pFontCreate->uFontHeight - 2;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
284 v128 = pFontCreate->uFontHeight - 2;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
285 memset(pText, 0, 200);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
286 strcpy(pText, pGlobalTXT_LocalizationStrings[205]);// "Skills"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
287 uNumLet = strlen(pText) - 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
288 pOrder = uNumLet;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
289 if ( uNumLet >= 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
290 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
291 while ( 1 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
292 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
293 v8 = toupper((unsigned __int8)pText[uNumLet]);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
294 v9 = pOrder;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
295 v10 = pOrder-- - 1 < 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
296 pText[v9] = v8;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
297 if ( v10 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
298 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
299 uNumLet = pOrder;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
300 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
301 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
302 pOrder = 18;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
303 v124 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
304 uX = 32;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
305 uY = 3 * v6 + 169;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
306 v122 = 5 * v6 + 169;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
307 v123 = 3 * v6 + 311;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
308 v129 = 493;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
309 //pPlayer = pParty->pPlayers;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
310 v119 = 6 * v6 + 169;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
311 //do
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
312
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
313 //for ( pPlayer = pParty->pPlayers; (signed int)pPlayer->pName < (signed int)&pParty->pPickedItem.uNumCharges; pPlayer++)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
314 for (int i = 0; i < 4; ++i)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
315 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
316 auto player = pParty->pPlayers + i;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
317
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
318 //Str = pPlayer->pName;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
319 pGUIWindow_CurrentMenu->DrawText(pFontCreate, pOrder + 73, 100, 0, pClassNames[player->classType], 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
320 pRenderer->DrawTextureTransparent(pOrder + 77, 50, pTexture_IC_KNIGHT[player->classType / 4]);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
321 v11 = pGUIWindow_CurrentMenu->field_40;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
322 if ( v11 && (v12 = pGUIWindow_CurrentMenu->ptr_1C, v12 == v124) )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
323 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
324 v13 = v11 - 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
325 if ( v13 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
326 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
327 v14 = v13 - 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
328 if ( v14 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
329 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
330 if ( v14 == 1 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
331 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
332 pGUIWindow_CurrentMenu->field_40 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
333 pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, pOrder, 124, 0, player->pName, 130, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
334 SetCurrentMenuID(MENU_NAMEPANELESC);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
335 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
336 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
337 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
338 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
339 pGUIWindow_CurrentMenu->field_40 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
340 v120 = strlen((const char *)pKeyActionMap->pPressedKeysBuffer);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
341 v126 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
342 v133 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
343 if ( strlen((const char *)pKeyActionMap->pPressedKeysBuffer) )//edit name
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
344 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
345 do
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
346 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
347 if ( pKeyActionMap->pPressedKeysBuffer[v133] == ' ' )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
348 ++v126;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
349 ++v133;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
350 v16 = strlen((const char *)pKeyActionMap->pPressedKeysBuffer);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
351 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
352 while ( v133 < v16 );
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
353 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
354 if ( v120 && v126 != v120 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
355 strcpy(player->pName, (const char *)pKeyActionMap->pPressedKeysBuffer);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
356 pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, pOrder, 0x7C, 0, player->pName, 130, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
357 *(short *)&player->field_1988[27] = 1; //
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
358 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
359 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
360 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
361 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
362 v17 = pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, 159 * (int)v12 + 18, 0x7Cu, 0, (const char *)pKeyActionMap->pPressedKeysBuffer, 120, 1);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
363 pGUIWindow_CurrentMenu->DrawFlashingInputCursor(159 * (unsigned int)pGUIWindow_CurrentMenu->ptr_1C + v17 + 20, 124, pFontCreate);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
364 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
365 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
366 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
367 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
368 pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, pOrder, 0x7C, 0, player->pName, 130, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
369 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
370 switch (player->GetRace())
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
371 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
372 case 0: uRaceName = pGlobalTXT_LocalizationStrings[99]; break; // "Human"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
373 case 1: uRaceName = pGlobalTXT_LocalizationStrings[103]; break; // "Dwarf"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
374 case 2: uRaceName = pGlobalTXT_LocalizationStrings[106]; break; // "Goblin"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
375 case 3: uRaceName = pGlobalTXT_LocalizationStrings[101]; break; // "Elf"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
376 };
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
377 strcpy(pTmpBuf, uRaceName);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
378 pGUIWindow_CurrentMenu->DrawTextInRect(pFontCreate, pOrder + 72, v128 + 12, 0, pTmpBuf, 130, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
379 pTextCenter = pFontCreate->AlignText_Center(0x96, pText);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
380 pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + uX - 24, 291, uColor1, pText, 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
381 uNumMight = player->GetActualMight();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
382 sprintf(pTmpBuf, "%s\r%03d%d", pGlobalTXT_LocalizationStrings[144], v129, uNumMight);// "Might"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
383 LOWORD(v24) = player->GetStatColor(0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
384 pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, 169, v24, pTmpBuf, 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
385 v25 = player->GetActualIntelligence();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
386 sprintf(pTmpBuf, "%s\r%03d%d", pGlobalTXT_LocalizationStrings[116], v129, v25);// "Intellect"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
387 LOWORD(v26) = player->GetStatColor(1);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
388 pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, v128 + 169, v26, pTmpBuf, 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
389 v27 = player->GetActualWillpower();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
390 sprintf(pTmpBuf, "%s\r%03d%d", pGlobalTXT_LocalizationStrings[163], v129, v27);// "Personality"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
391 LOWORD(v28) = player->GetStatColor(2);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
392 pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, 2 * v128 + 169, v28, pTmpBuf, 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
393 v29 = player->GetActualEndurance();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
394 sprintf(pTmpBuf, "%s\r%03d%d", pGlobalTXT_LocalizationStrings[75], v129, v29);// "Endurance"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
395 LOWORD(v30) = player->GetStatColor(3);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
396 pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, uY, v30, pTmpBuf, 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
397 v31 = player->GetActualAccuracy();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
398 sprintf(pTmpBuf, "%s\r%03d%d", pGlobalTXT_LocalizationStrings[1], v129, v31);// "Accuracy"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
399 LOWORD(v32) = player->GetStatColor(4);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
400 pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, 4 * v128 + 169, v32, pTmpBuf, 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
401 v33 = player->GetActualSpeed();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
402 sprintf(pTmpBuf, "%s\r%03d%d", pGlobalTXT_LocalizationStrings[211], v129, v33);// "Speed"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
403 LOWORD(v34) = player->GetStatColor(5);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
404 pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, v122, v34, pTmpBuf, 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
405 v35 = player->GetActualLuck();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
406 sprintf(pTmpBuf, "%s\r%03d%d", pGlobalTXT_LocalizationStrings[136], v129, v35);// "Luck"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
407 LOWORD(v36) = player->GetStatColor(6);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
408 pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX, v119, v36, pTmpBuf, 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
409 v37 = player->GetSkillIdxByOrder(0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
410 pTextCenter = pFontCreate->AlignText_Center(0x96u, pSkillNames[v37]);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
411 sprintf(pTmpBuf, "\t%03u%s", pTextCenter, pSkillNames[v37]);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
412 pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX - 24, 311, uColorWhite, pTmpBuf, 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
413 v39 = player->GetSkillIdxByOrder(1);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
414 pTextCenter = pFontCreate->AlignText_Center(0x96u, pSkillNames[v39]);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
415 sprintf(pTmpBuf, "\t%03u%s", pTextCenter, pSkillNames[v39]);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
416 pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX - 24, v128 + 311, uColorWhite, pTmpBuf, 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
417 v41 = player->GetSkillIdxByOrder(2);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
418 pTextCenter = pFontCreate->AlignText_Center(150u, pSkillNames[v41]);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
419 sprintf(pTmpBuf, "\t%03u%s", pTextCenter, pSkillNames[v41]);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
420 v45 = uColorGreen;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
421 if ( (signed int)v41 >= 37 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
422 v45 = uColorTeal;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
423 pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX - 24, 2 * v128 + 311, v45, pTmpBuf, 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
424 v46 = player->GetSkillIdxByOrder(3);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
425 pTextCenter = pFontCreate->AlignText_Center(150u, pSkillNames[v46]);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
426 sprintf(pTmpBuf, "\t%03u%s", pTextCenter, pSkillNames[v46]);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
427 v50 = uColorGreen;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
428 if ( (signed int)v46 >= 37 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
429 v50 = uColorTeal;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
430 pGUIWindow_CurrentMenu->DrawText(pFontCreate, uX - 24, v123, v50, pTmpBuf, 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
431 //pPlayer++;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
432 v124 = (char *)v124 + 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
433 pOrder += 159;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
434 v129 -= 158;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
435 uX += 158;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
436 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
437
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
438 //while ( (signed int)pPlayer->pName < (signed int)&pParty->pPickedItem.uNumCharges );
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
439 strcpy(pText, pGlobalTXT_LocalizationStrings[41]);// "Class"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
440 v51 = strlen(pText) - 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
441 pOrder = v51;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
442 if ( v51 >= 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
443 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
444 while ( 1 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
445 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
446 v52 = &pText[v51];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
447 v53 = toupper((unsigned __int8)pText[v51]);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
448 v10 = pOrder-- - 1 < 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
449 *v52 = v53;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
450 if ( v10 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
451 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
452 v51 = pOrder;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
453 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
454 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
455 uClassType = pParty->pPlayers[uPlayerCreationUI_SelectedCharacter].classType;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
456 pTextCenter = pFontCreate->AlignText_Center(193u, pText);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
457 pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 324, 395, uColor1, pText, 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
458 v57 = uColorTeal;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
459 if ( uClassType )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
460 v57 = uColorWhite;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
461 pTextCenter = pFontCreate->AlignText_Center(65, pClassNames[0]);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
462 pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 323, 417, v57, pClassNames[0], 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
463 v61 = uColorTeal;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
464 if ( uClassType != PLAYER_CLASS_PALADIN )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
465 v61 = uColorWhite;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
466 uColorGreen = v128 + 417;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
467 pTextCenter = pFontCreate->AlignText_Center(65, pClassNames[12]);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
468 pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 323, v128 + 417, v61, pClassNames[12], 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
469 v66 = uColorTeal;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
470 if ( uClassType != PLAYER_CLASS_DRUID )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
471 v66 = uColorWhite;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
472 pTextCenter = pFontCreate->AlignText_Center(65, pClassNames[20]);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
473 pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 323, 2 * v128 + 417, v66, pClassNames[20], 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
474 v71 = uColorTeal;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
475 if ( uClassType != PLAYER_CLASS_CLERIC )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
476 v71 = uColorWhite;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
477 pTextCenter = pFontCreate->AlignText_Center(65, pClassNames[24]);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
478 pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 388, 417, v71, pClassNames[24], 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
479 v75 = uColorTeal;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
480 if ( uClassType != PLAYER_CLASS_DRUID)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
481 v75 = uColorWhite;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
482 pTextCenter = pFontCreate->AlignText_Center(65, pClassNames[28]);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
483 pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 388, uColorGreen, v75, pClassNames[28], 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
484 v80 = uColorTeal;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
485 if ( uClassType != PLAYER_CLASS_SORCERER )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
486 v80 = uColorWhite;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
487 pTextCenter = pFontCreate->AlignText_Center(65, pClassNames[32]);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
488 pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 388, 2 * v128 + 417, v80, pClassNames[32], 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
489 v85 = uColorTeal;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
490 if ( uClassType != PLAYER_CLASS_ARCHER )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
491 v85 = uColorWhite;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
492 pTextCenter = pFontCreate->AlignText_Center(65, pClassNames[16]);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
493 pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 453, 417, v85, pClassNames[16], 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
494 v89 = uColorTeal;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
495 if ( uClassType != PLAYER_CLASS_MONK )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
496 v89 = uColorWhite;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
497 pTextCenter = pFontCreate->AlignText_Center(65, pClassNames[8]);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
498 pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 453, uColorGreen, v89, pClassNames[8], 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
499 v94 = uColorTeal;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
500 if ( uClassType != PLAYER_CLASS_THEIF )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
501 v94 = uColorWhite;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
502 pTextCenter = pFontCreate->AlignText_Center(65, pClassNames[4]);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
503 pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 453, 2 * v128 + 417, v94, pClassNames[4], 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
504 pTextCenter = pFontCreate->AlignText_Center(0xECu, pGlobalTXT_LocalizationStrings[20]); // "Available Skills"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
505 pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 37, 395, uColor1, pGlobalTXT_LocalizationStrings[20], 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
506 //pOrder = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
507 //do
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
508 for (pOrder = 0; pOrder < 9; ++pOrder)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
509 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
510 pSkillId = pParty->pPlayers[uPlayerCreationUI_SelectedCharacter].GetSkillIdxByOrder(pOrder + 4);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
511 strcpy(pText, pSkillNames[pSkillId]);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
512 pLenText = strlen(pText);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
513 v104 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
514 if ( (signed int)pLenText > 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
515 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
516 if ( pText[v104] == 32 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
517 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
518 pText[v104] = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
519 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
520 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
521 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
522 while ( pText[v104] != 32 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
523 //for (v104 = 0; v104 < (signed int)pLenText || pText[v104] != 32; ++v104)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
524 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
525 ++v104;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
526 if ( v104 >= (signed int)pLenText )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
527 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
528 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
529 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
530 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
531 uColorGreen = -5;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
532 if ( (signed int)v124 > 2 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
533 uColorGreen = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
534 pColorText = uColorTeal;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
535 if ( !pParty->pPlayers[uPlayerCreationUI_SelectedCharacter].pActiveSkills[pSkillId] )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
536 pColorText = uColorWhite;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
537 pTextCenter = pFontCreate->AlignText_Center(100, pText);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
538 pGUIWindow_CurrentMenu->DrawText(pFontCreate, 100 * (pOrder / 3) + pTextCenter + uColorGreen + 17, v128 * (pOrder % 3) + 417, pColorText, pText, 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
539 //++pOrder;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
540 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
541 //while ( pOrder < 9 );
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
542 pTextCenter = pFontCreate->AlignText_Center(0x5C, pGlobalTXT_LocalizationStrings[30]);// "Bonus"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
543 pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 533, 394, uColor1, pGlobalTXT_LocalizationStrings[30], 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
544 v113 = PlayerCreation_ComputeAttributeBonus();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
545 sprintf(pTmpBuf, "%d", v113);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
546 pTextCenter = pFontCreate->AlignText_Center(84, pTmpBuf);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
547 pGUIWindow_CurrentMenu->DrawText(pFontCreate, pTextCenter + 530, 410, uColorWhite, pTmpBuf, 0, 0, 0);
783
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 706
diff changeset
548 if ( GameUI_Footer_TimeLeft > GetTickCount() )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
549 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
550 pWindow.Hint = pGlobalTXT_LocalizationStrings[412];// "Create Party cannot be completed unless you have assigned all characters 2 extra skills and have spent all of your bonus points."
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
551 if ( v113 < 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
552 pWindow.Hint = pGlobalTXT_LocalizationStrings[413];// "You can't spend more than 50 points."
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
553 pWindow.uFrameWidth = 300;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
554 pWindow.uFrameHeight = 100;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
555 pWindow.uFrameX = 170;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
556 pWindow.uFrameY = 140;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
557 pWindow.uFrameZ = 469;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
558 pWindow.uFrameW = 239;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
559 pWindow.DrawMessageBox(0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
560 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
561 pRenderer->EndScene();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
562 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
563
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
564 //----- (0049695A) --------------------------------------------------------
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
565 void __cdecl PlayerCreationUI_Initialize()
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
566 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
567 unsigned int v0; // ebx@5
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
568 unsigned int v1; // eax@6
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
569 int v2; // ecx@6
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
570 unsigned int v3; // eax@8
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
571 signed int v4; // ecx@8
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
572 signed int uControlParam; // [sp+10h] [bp-Ch]@7
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
573 unsigned int uControlParama; // [sp+10h] [bp-Ch]@9
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
574 unsigned int uControlParamb; // [sp+10h] [bp-Ch]@11
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
575 unsigned int uControlParamc; // [sp+10h] [bp-Ch]@13
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
576 signed int uControlParamd; // [sp+10h] [bp-Ch]@15
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
577 signed int uX; // [sp+14h] [bp-8h]@5
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
578 unsigned int uXa; // [sp+14h] [bp-8h]@9
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
579 unsigned int uXb; // [sp+14h] [bp-8h]@11
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
580 unsigned int uXc; // [sp+14h] [bp-8h]@13
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
581 signed int uXd; // [sp+14h] [bp-8h]@16
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
582
783
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 706
diff changeset
583 pMessageQueue_50CBD0->Flush();
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 706
diff changeset
584
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
585 pAudioPlayer->SetMusicVolume(pSoundVolumeLevels[uMusicVolimeMultiplier] * 64.0f);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
586 ++pIcons_LOD->uTexturePacksCount;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
587 if ( !pIcons_LOD->uNumPrevLoadedFiles )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
588 pIcons_LOD->uNumPrevLoadedFiles = pIcons_LOD->uNumLoadedFiles;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
589 pCurrentScreen = SCREEN_PARTY_CREATION;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
590 uPlayerCreationUI_ArrowAnim = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
591 uPlayerCreationUI_SkySliderPos = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
592 uPlayerCreationUI_SelectedCharacter = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
593 v0 = LOBYTE(pFontCreate->uFontHeight) - 2;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
594 pTexture_IC_KNIGHT[0] = pIcons_LOD->LoadTexturePtr("IC_KNIGHT", TEXTURE_16BIT_PALETTE);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
595 pTexture_IC_KNIGHT[1] = pIcons_LOD->LoadTexturePtr("IC_THIEF", TEXTURE_16BIT_PALETTE);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
596 pTexture_IC_KNIGHT[2] = pIcons_LOD->LoadTexturePtr("IC_MONK", TEXTURE_16BIT_PALETTE);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
597 pTexture_IC_KNIGHT[3] = pIcons_LOD->LoadTexturePtr("IC_PALAD", TEXTURE_16BIT_PALETTE);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
598 pTexture_IC_KNIGHT[4] = pIcons_LOD->LoadTexturePtr("IC_ARCH", TEXTURE_16BIT_PALETTE);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
599 pTexture_IC_KNIGHT[5] = pIcons_LOD->LoadTexturePtr("IC_RANGER", TEXTURE_16BIT_PALETTE);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
600 pTexture_IC_KNIGHT[6] = pIcons_LOD->LoadTexturePtr("IC_CLER", TEXTURE_16BIT_PALETTE);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
601 pTexture_IC_KNIGHT[7] = pIcons_LOD->LoadTexturePtr("IC_DRUID", TEXTURE_16BIT_PALETTE);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
602 pTexture_IC_KNIGHT[8] = pIcons_LOD->LoadTexturePtr("IC_SORC", TEXTURE_16BIT_PALETTE);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
603 pTexture_MAKETOP = pIcons_LOD->LoadTexturePtr("MAKETOP", TEXTURE_16BIT_PALETTE);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
604 pTexture_MAKESKY = pIcons_LOD->LoadTexturePtr("MAKESKY", TEXTURE_16BIT_PALETTE);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
605 for(uX=0;uX < 22;++uX ) // load PlayerPortraits texture
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
606 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
607 sprintf(pTmpBuf, "%s01", pPlayerPortraitsNames[uX]);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
608 v1 = pIcons_LOD->LoadTexture(pTmpBuf, TEXTURE_16BIT_PALETTE);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
609 pPlayerPortraits[uX] = &pIcons_LOD->pTextures[v1];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
610
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
611 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
612 pTexture_PlayerFaceMask = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("FACEMASK", TEXTURE_16BIT_PALETTE)];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
613 pTexture_buttminu = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("buttminu", TEXTURE_16BIT_PALETTE)];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
614 pTexture_buttplus = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("buttplus", TEXTURE_16BIT_PALETTE)];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
615 pTexture_pressrigh = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("presrigh", TEXTURE_16BIT_PALETTE)];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
616 pTexture_presleft = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture("presleft", TEXTURE_16BIT_PALETTE)];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
617 uControlParam = 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
618 do
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
619 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
620 sprintf(pTmpBuf, "arrowl%d", uControlParam);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
621 pTextures_arrowl[uControlParam] = &pIcons_LOD->pTextures[pIcons_LOD->LoadTexture(pTmpBuf, TEXTURE_16BIT_PALETTE)];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
622 sprintf(pTmpBuf, "arrowr%d", uControlParam);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
623 v3 = pIcons_LOD->LoadTexture(pTmpBuf, TEXTURE_16BIT_PALETTE);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
624 v4 = uControlParam++;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
625 pTextures_arrowr[v4] = &pIcons_LOD->pTextures[v3];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
626 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
627 while ( uControlParam < 20 );
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
628 pGUIWindow_CurrentMenu = GUIWindow::Create(0, 0, 640, 480, WINDOW_MainMenu, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
629 uControlParama = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
630 uXa = 8;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
631 do
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
632 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
633 pGUIWindow_CurrentMenu->CreateButton(uXa, 120u, 145u, 25u, 1, 0, 0x3Cu, uControlParama, 0, "", 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
634 uXa += 158;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
635 ++uControlParama;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
636 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
637 while ( (signed int)uXa < 640 );
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
638 pCreationUI_BtnPressLeft[0] = pGUIWindow_CurrentMenu->CreateButton(10, 32, 11, 13, 1, 0, 0xABu, 0, 0, "", pTexture_presleft, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
639 pCreationUI_BtnPressLeft[1] = pGUIWindow_CurrentMenu->CreateButton(169, 32, 11, 13, 1, 0, 0xABu, 1, 0, "", pTexture_presleft, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
640 pCreationUI_BtnPressLeft[2] = pGUIWindow_CurrentMenu->CreateButton(327, 32, 11, 13, 1, 0, 0xABu, 2, 0, "", pTexture_presleft, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
641 pCreationUI_BtnPressLeft[3] = pGUIWindow_CurrentMenu->CreateButton(486, 32, 11, 13, 1, 0, 0xABu, 3, 0, "", pTexture_presleft, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
642 pCreationUI_BtnPressRight[0] = pGUIWindow_CurrentMenu->CreateButton(74, 32, 11, 13, 1, 0, 0xACu, 0, 0, "", pTexture_pressrigh, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
643 pCreationUI_BtnPressRight[1] = pGUIWindow_CurrentMenu->CreateButton(233, 32, 11, 13, 1, 0, 0xACu, 1, 0, "", pTexture_pressrigh, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
644 pCreationUI_BtnPressRight[2] = pGUIWindow_CurrentMenu->CreateButton(391, 32, 11, 13, 1, 0, 0xACu, 2, 0, "", pTexture_pressrigh, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
645 pCreationUI_BtnPressRight[3] = pGUIWindow_CurrentMenu->CreateButton(549, 32, 11, 13, 1, 0, 0xACu, 3, 0, "", pTexture_pressrigh, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
646 pCreationUI_BtnPressLeft2[0] = pGUIWindow_CurrentMenu->CreateButton(10, 103, 11, 13, 1, 0, 0x90u, 0, 0, "", pTexture_presleft, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
647 pCreationUI_BtnPressLeft2[1] = pGUIWindow_CurrentMenu->CreateButton(169, 103, 11, 13, 1, 0, 0x90u, 1, 0, "", pTexture_presleft, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
648 pCreationUI_BtnPressLeft2[2] = pGUIWindow_CurrentMenu->CreateButton(327, 103, 11, 13, 1, 0, 0x90u, 2, 0, "", pTexture_presleft, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
649 pCreationUI_BtnPressLeft2[3] = pGUIWindow_CurrentMenu->CreateButton(486, 103, 11, 13, 1, 0, 0x90u, 3, 0, "", pTexture_presleft, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
650 pCreationUI_BtnPressRight2[0] = pGUIWindow_CurrentMenu->CreateButton(74, 103, 11, 13, 1, 0, 0x91u, 0, 0, "", pTexture_pressrigh, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
651 pCreationUI_BtnPressRight2[1] = pGUIWindow_CurrentMenu->CreateButton(233, 103, 11, 13, 1, 0, 0x91u, 1, 0, "", pTexture_pressrigh, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
652 pCreationUI_BtnPressRight2[2] = pGUIWindow_CurrentMenu->CreateButton(391, 103, 11, 13, 1, 0, 0x91u, 2, 0, "", pTexture_pressrigh, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
653 pCreationUI_BtnPressRight2[3] = pGUIWindow_CurrentMenu->CreateButton(549, 103, 11, 13, 1, 0, 0x91u, 3, 0, "", pTexture_pressrigh, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
654 uControlParamb = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
655 uXb = 8;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
656 do
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
657 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
658 pGUIWindow_CurrentMenu->CreateButton(uXb, 308, 150, v0, 1, 0, 0x48u, uControlParamb, 0, "", 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
659 pGUIWindow_CurrentMenu->CreateButton(uXb, v0 + 308, 150, v0, 1, 0, 0x49u, uControlParamb, 0, "", 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
660 pGUIWindow_CurrentMenu->CreateButton(uXb, 2 * v0 + 308, 150u, v0, 1, 0, 0x4Au, uControlParamb, 0, "", 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
661 pGUIWindow_CurrentMenu->CreateButton(uXb, 3 * v0 + 308, 150u, v0, 1, 0, 0x4Bu, uControlParamb, 0, "", 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
662 uXb += 158;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
663 ++uControlParamb;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
664 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
665 while ( (signed int)uXb < 640 );
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
666 pGUIWindow_CurrentMenu->CreateButton(5u, 21u, 0x99u, 0x16Du, 1, 0, 0x76u, 0, 0x31u, "", 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
667 pGUIWindow_CurrentMenu->CreateButton(163u, 21u, 0x99u, 0x16Du, 1, 0, 0x76u, 1u, 0x32u, "", 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
668 pGUIWindow_CurrentMenu->CreateButton(321u, 21u, 0x99u, 0x16Du, 1, 0, 0x76u, 2u, 0x33u, "", 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
669 pGUIWindow_CurrentMenu->CreateButton(479u, 21u, 0x99u, 0x16Du, 1, 0, 0x76u, 3u, 0x34u, "", 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
670 uXc = 23;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
671 uControlParamc = 2;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
672 do
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
673 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
674 pGUIWindow_CurrentMenu->CreateButton(uXc, 169, 120, 20, 1, 0, 0, uControlParamc - 2, 0, "", 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
675 pGUIWindow_CurrentMenu->CreateButton(uXc, v0 + 169, 120, 20, 1, 0, 0, uControlParamc - 1, 0, "", 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
676 pGUIWindow_CurrentMenu->CreateButton(uXc, 2 * v0 + 169, 120, 20, 1, 0, 0, uControlParamc, 0, "", 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
677 pGUIWindow_CurrentMenu->CreateButton(uXc, 3 * v0 + 169, 120, 20, 1, 0, 0, uControlParamc + 1, 0, "", 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
678 pGUIWindow_CurrentMenu->CreateButton(uXc, 4 * v0 + 169, 120, 20, 1, 0, 0, uControlParamc + 2, 0, "", 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
679 pGUIWindow_CurrentMenu->CreateButton(uXc, 5 * v0 + 169, 120, 20, 1, 0, 0, uControlParamc + 3, 0, "", 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
680 pGUIWindow_CurrentMenu->CreateButton(uXc, 6 * v0 + 169, 120, 20, 1, 0, 0, uControlParamc + 4, 0, "", 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
681 uControlParamc += 7;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
682 uXc += 158;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
683 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
684 while ( (signed int)uControlParamc < 30 );
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
685 pGUIWindow_CurrentMenu->_41D08F(28, 0, 7, 40);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
686 pGUIWindow_CurrentMenu->CreateButton(323, 417, 65, v0, 1, 0, 0x41, 0, 0, "", 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
687 pGUIWindow_CurrentMenu->CreateButton(323, v0 + 417, 65, v0, 1, 0, 0x41, 0xC, 0, "", 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
688 pGUIWindow_CurrentMenu->CreateButton(323, 2 * v0 + 417, 65, v0, 1, 0, 0x41, 0x14, 0, "", 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
689 pGUIWindow_CurrentMenu->CreateButton(388, 417, 65, v0, 1, 0, 0x41, 0x18, 0, "", 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
690 pGUIWindow_CurrentMenu->CreateButton(388, v0 + 417, 65, v0, 1, 0, 0x41, 0x1C, 0, "", 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
691 pGUIWindow_CurrentMenu->CreateButton(388, 2 * v0 + 417, 65, v0, 1, 0, 0x41, 0x20, 0, "", 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
692 pGUIWindow_CurrentMenu->CreateButton(453, 417, 65, v0, 1, 0, 0x41, 0x10, 0, "", 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
693 pGUIWindow_CurrentMenu->CreateButton(453, v0 + 417, 65, v0, 1, 0, 0x41, 8, 0, "", 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
694 pGUIWindow_CurrentMenu->CreateButton(453, 2 * v0 + 417, 65, v0, 1, 0, 0x41, 4, 0, "", 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
695 uControlParamd = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
696 do
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
697 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
698 uXd = -5;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
699 if ( uControlParamd <= 3 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
700 uXd = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
701 pGUIWindow_CurrentMenu->CreateButton(100 * (uControlParamd / 3) + uXd + 17, v0 * (uControlParamd % 3) + 417, 100, v0, 1, 0, 0x40,
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
702 uControlParamd, 0, "", 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
703 ++uControlParamd;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
704 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
705 while ( uControlParamd < 9 );
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
706 pPlayerCreationUI_BtnOK = pGUIWindow_CurrentMenu->CreateButton(580, 431, 51, 39, 1, 0, 0x42, 0, 0xD, "",
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
707 (Texture *)(uTextureID_BUTTMAKE != -1 ? &pIcons_LOD->pTextures[uTextureID_BUTTMAKE] : 0), 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
708 pPlayerCreationUI_BtnReset = pGUIWindow_CurrentMenu->CreateButton(527, 431, 51, 39, 1, 0, 0x43, 0, 0x43, "",
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
709 (Texture *)(uTextureID_BUTTMAKE2 != -1 ? &pIcons_LOD->pTextures[uTextureID_BUTTMAKE2] : 0), 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
710 pPlayerCreationUI_BtnMinus = pGUIWindow_CurrentMenu->CreateButton(523, 393, 20, 35, 1, 0, 0x3F, 0, 0x2D, "", pTexture_buttminu, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
711 pPlayerCreationUI_BtnPlus = pGUIWindow_CurrentMenu->CreateButton(613, 393, 20, 35, 1, 0, 0x3E, 1, 0x2B, "", pTexture_buttplus, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
712 pFontCChar = LoadFont("cchar.fnt", "FONTPAL", NULL);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
713 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
714 // 4E28F8: using guessed type int pCurrentScreen;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
715
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
716 //----- (0049750E) --------------------------------------------------------
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
717 void __cdecl DeleteCCharFont()
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
718 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
719 pAllocator->FreeChunk(pFontCChar);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
720 pFontCChar = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
721 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
722 //----- (00497526) --------------------------------------------------------
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
723 bool __cdecl PlayerCreationUI_Loop()
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
724 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
725 //RGBTexture *pTexture; // ebx@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
726 UINT v1; // esi@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
727 unsigned int v2; // ecx@3
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
728 LONG uMouseX; // edi@6
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
729 LONG uMouseY; // eax@6
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
730 GUIButton *pControlsHead; // edx@6
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
731 //unsigned int pNumMessage; // ecx@7
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
732 int pControlParam; // esi@12
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
733 signed int v8; // edi@30
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
734 int v9; // edx@31
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
735 char *v10; // ebx@37
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
736 Player *v11; // esi@38
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
737 //signed int uSpellBookPageCount; // ecx@40
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
738 int v13; // eax@40
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
739 //signed int uSkillIdx; // eax@45
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
740 int v15; // eax@70
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
741 signed int v16; // ecx@70
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
742 //unsigned int v18; // [sp-4h] [bp-84h]@48
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
743 ItemGen item; // [sp+Ch] [bp-74h]@37
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
744 char v20[32]; // [sp+30h] [bp-50h]@29
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
745 //char v21; // [sp+31h] [bp-4Fh]@29
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
746 //__int16 v22; // [sp+4Dh] [bp-33h]@29
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
747 char v23; // [sp+4Fh] [bp-31h]@29
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
748 MSG Msg; // [sp+50h] [bp-30h]@17
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
749 POINT v25; // [sp+6Ch] [bp-14h]@6
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
750 bool v26; // [sp+74h] [bp-Ch]@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
751 //POINT v24; // [sp+78h] [bp-8h]@6
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
752 //Player *pPlayer;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
753
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
754 //pTexture = &pTexture_PCX;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
755 v1 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
756 v26 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
757 pTexture_PCX.Release();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
758 pTexture_PCX.Load("makeme.pcx", 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
759 if (pAsyncMouse)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
760 pAsyncMouse->Resume();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
761 v2 = 6;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
762 pGUIWindow_CurrentMenu->field_40 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
763 //LABEL_27:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
764 SetCurrentMenuID((MENU_STATE)v2);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
765 while ( GetCurrentMenuID() == MENU_CREATEPARTY )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
766 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
767 if ( pAsyncMouse != (void *)v1 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
768 pAsyncMouse->_46B736_consume_click_lists(1);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
769 uMouseX = pMouse->GetCursorPos(&v25)->x;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
770 uMouseY = pMouse->GetCursorPos(&v25)->y;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
771 pControlsHead = pGUIWindow_CurrentMenu->pControlsHead;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
772
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
773 //does nothing actually
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
774 /*if ( pControlsHead != (GUIButton *)v1 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
775 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
776 pNumMessage = pMessageQueue_50CBD0->uNumMessages;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
777 do
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
778 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
779 if ( uMouseX >= (signed int)pControlsHead->uX && uMouseX <= (signed int)pControlsHead->uZ
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
780 && uMouseY >= (signed int)pControlsHead->uY && uMouseY <= (signed int)pControlsHead->uW )//mouse movement
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
781 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
782 pControlParam = pControlsHead->uControlParam;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
783 pMessageQueue_50CBD0->AddMessage((UIMessageType)pControlsHead->field_1C, pControlParam, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
784 v1 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
785 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
786 pControlsHead = pControlsHead->pNext;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
787 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
788 while ( pControlsHead != (GUIButton *)v1 );
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
789 }*/
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
790
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
791 while ( PeekMessageA(&Msg, (HWND)v1, v1, v1, PM_REMOVE) )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
792 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
793 if ( Msg.message == WM_QUIT )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
794 Game_DeinitializeAndTerminate(0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
795 TranslateMessage(&Msg);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
796 DispatchMessageA(&Msg);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
797 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
798 if ( BYTE1(dword_6BE364_game_settings_1) & 1 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
799 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
800 WaitMessage();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
801 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
802 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
803 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
804 PlayerCreationUI_Draw();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
805 GUI_MainMenuMessageProc();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
806 pRenderer->BeginScene();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
807 GUI_UpdateWindows();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
808 pRenderer->EndScene();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
809 pRenderer->Present();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
810 if ( uGameState == 1 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
811 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
812 v26 = 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
813 v2 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
814 //goto LABEL_27;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
815 SetCurrentMenuID((MENU_STATE)v2);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
816 continue;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
817 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
818 if ( uGameState == 6 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
819 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
820 uGameState = v1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
821 v2 = 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
822 //goto LABEL_27;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
823 SetCurrentMenuID((MENU_STATE)v2);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
824 continue;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
825 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
826 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
827 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
828 pTexture_PCX.Release();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
829 pGUIWindow_CurrentMenu->Release();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
830 pIcons_LOD->_4114F2();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
831
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
832 memset(v20, 0, 32);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
833 do
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
834 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
835 v8 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
836 do
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
837 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
838 v9 = rand() % 32;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
839 if ( !v20[v9] )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
840 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
841 ++v8;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
842 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
843 while ( v8 < 10 );
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
844 if ( v8 == 10 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
845 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
846 v9 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
847 if ( v20[0] )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
848 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
849 do
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
850 ++v9;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
851 while ( v20[v9] );
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
852 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
853 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
854 pParty->field_854[v1++] = v9;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
855 v20[v9] = 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
856 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
857 while ( (signed int)v1 < 32 );
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
858 //v10 = (char *)&pParty->pPlayers[0].sResMagicBase;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
859
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
860 item.Reset();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
861 //for ( pPlayer = &pParty->pPlayers[0]; pPlayer < &pParty->pPlayers[4]; pPlayer++)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
862 for (uint i = 0; i < 4; ++i)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
863 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
864 auto player = &pParty->pPlayers[i];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
865 //v11 = pPlayer;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
866 if (player->classType == PLAYER_CLASS_KNIGHT)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
867 player->sResMagicBase = 10;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
868 //*((short *)v10 + 400) = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
869 player->pPlayerBuffs[22].uExpireTime = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
870 for (uint j = 0; j < 9; j++)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
871 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
872 if (player->pActiveSkills[PLAYER_SKILL_FIRE + j])
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
873 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
874 player->lastOpenedSpellbookPage = j;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
875 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
876 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
877 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
878 pItemsTable->GenerateItem(2, 40, &item);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
879 player->AddItem2(-1, &item);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
880 //uSkillIdx = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
881 //v24.y = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
882
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
883 player->sHealth = player->GetMaxHealth();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
884 player->sMana = player->GetMaxMana();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
885 for (uint j = 0; j < 37; ++j)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
886 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
887 if (!player->pActiveSkills[j])
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
888 continue;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
889
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
890 switch (j)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
891 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
892 case PLAYER_SKILL_STAFF: player->AddItem(-1, 61); break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
893 case PLAYER_SKILL_SWORD: player->AddItem(-1, 1); break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
894 case PLAYER_SKILL_DAGGER: player->AddItem(-1, 15); break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
895 case PLAYER_SKILL_AXE: player->AddItem(-1, 23); break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
896 case PLAYER_SKILL_SPEAR: player->AddItem(-1, 31); break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
897 case PLAYER_SKILL_BOW: player->AddItem(-1, 47); break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
898 case PLAYER_SKILL_MACE: player->AddItem(-1, 50); break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
899 case PLAYER_SKILL_BLASTER: assert(false); break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
900 case PLAYER_SKILL_SHIELD: player->AddItem(-1, 84); break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
901 case PLAYER_SKILL_LEATHER: player->AddItem(-1, 66); break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
902 case PLAYER_SKILL_CHAIN: player->AddItem(-1, 71); break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
903 case PLAYER_SKILL_PLATE: player->AddItem(-1, 76); break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
904 case PLAYER_SKILL_FIRE:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
905 player->AddItem(-1, 0x191);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
906 player->spellbook.pFireSpellbook.bIsSpellAvailable[0] = true;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
907 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
908 case PLAYER_SKILL_AIR:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
909 player->AddItem(-1, 0x19C);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
910 player->spellbook.pAirSpellbook.bIsSpellAvailable[0] = true;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
911 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
912 case PLAYER_SKILL_WATER:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
913 player->AddItem(-1, 0x1A7);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
914 player->spellbook.pWaterSpellbook.bIsSpellAvailable[0] = true;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
915 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
916 case PLAYER_SKILL_EARTH:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
917 player->AddItem(-1, 0x1B2);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
918 player->spellbook.pEarthSpellbook.bIsSpellAvailable[0] = true;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
919 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
920 case PLAYER_SKILL_SPIRIT:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
921 player->AddItem(-1, 0x1BD);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
922 player->spellbook.pSpiritSpellbook.bIsSpellAvailable[0] = true;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
923 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
924 case PLAYER_SKILL_MIND:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
925 player->AddItem(-1, 0x1C8);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
926 player->spellbook.pMindSpellbook.bIsSpellAvailable[0] = true;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
927 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
928 case PLAYER_SKILL_BODY:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
929 player->AddItem(-1, 0x1D3);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
930 player->spellbook.pBodySpellbook.bIsSpellAvailable[0] = true;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
931 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
932 case PLAYER_SKILL_LIGHT:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
933 case PLAYER_SKILL_DARK:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
934 case PLAYER_SKILL_DIPLOMACY:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
935 assert(false);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
936 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
937 case PLAYER_SKILL_ITEM_ID:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
938 case PLAYER_SKILL_REPAIR:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
939 case PLAYER_SKILL_MEDITATION:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
940 case PLAYER_SKILL_PERCEPTION:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
941 case PLAYER_SKILL_TRAP_DISARM:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
942 case PLAYER_SKILL_LEARNING:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
943 player->AddItem(-1, 0xDC);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
944 player->AddItem(-1, 5 * (rand() % 3 + 40));
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
945 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
946 case PLAYER_SKILL_DODGE: player->AddItem(-1, 115); break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
947 case PLAYER_SKILL_UNARMED: player->AddItem(-1, 110); break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
948 default:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
949 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
950 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
951
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
952 for (uint k = 0; k < 138; k++)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
953 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
954 if (&player->pInventoryItems[k])
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
955 player->pInventoryItems[k].SetIdentified();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
956 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
957 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
958 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
959
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
960 pAudioPlayer->StopChannels(-1, -1);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
961 if (pAsyncMouse)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
962 pAsyncMouse->Suspend();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
963 return v26;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents:
diff changeset
964 }