annotate UIPartyCreation.cpp @ 1106:3395579f6c4d

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