annotate UIBooks.cpp @ 823:c1da83d8223f

More spell renames
author Nomad
date Tue, 26 Mar 2013 20:05:57 +0200
parents 9359c114f98c
children dfd683c4f538
rev   line source
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1 #include <assert.h>
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
2
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
3 #include "MM7.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
4
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
5 #include "MapInfo.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
6 #include "Game.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
7 #include "GUIWindow.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
8 #include "GUIFont.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
9 #include "GUIButton.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
10 #include "GUIProgressBar.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
11 #include "Party.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
12 #include "AudioPlayer.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
13 #include "Outdoor.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
14 #include "IndoorCamera.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
15 #include "Overlays.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
16 #include "Monsters.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
17 #include "Arcomage.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
18 #include "LOD.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
19 #include "Actor.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
20 #include "Allocator.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
21 #include "Events.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
22 #include "Viewport.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
23 #include "FrameTableInc.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
24 #include "Math.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
25 #include "SpriteObject.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
26 #include "ObjectList.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
27 #include "Chest.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
28 #include "PaletteManager.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
29 #include "DecorationList.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
30 #include "SaveLoad.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
31 #include "stru123.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
32 #include "Time.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
33 #include "IconFrameTable.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
34 #include "Awards.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
35 #include "Autonotes.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
36 #include "stru160.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
37 #include "stru279.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
38 #include "TurnEngine.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
39 #include "stru277.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
40 #include "Weather.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
41 #include "stru272.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
42 #include "stru298.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
43 #include "StorylineTextTable.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
44 #include "Events2D.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
45 #include "texts.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
46 #include "stru351.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
47
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
48 #include "mm7_data.h"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
49
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
50
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
51
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
52
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
53 //----- (00411300) --------------------------------------------------------
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
54 void LoadSpellbook(unsigned int spell_school)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
55 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
56 //unsigned int v1; // esi@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
57 Player *pPlayer; // ecx@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
58 char v3; // al@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
59 //int v4; // edi@5
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
60 //Texture *result; // eax@6
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
61 //unsigned char *v6; // edi@7
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
62 //unsigned int v7; // eax@7
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
63 //unsigned __int8 v8; // sf@8
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
64 //unsigned __int8 v9; // of@8
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
65 char pContainer[20]; // [sp+Ch] [bp-1Ch]@7
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
66 //Texture *v11; // [sp+20h] [bp-8h]@5
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
67 //int v12; // [sp+24h] [bp-4h]@5
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
68
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
69 byte_506550 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
70 //v1 = uID;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
71 pPlayer = pPlayers[uActiveCharacter];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
72 v3 = pPlayer->uQuickSpell;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
73 if ( v3 && (unsigned __int8)v3 / 11 == spell_school )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
74 quick_spell_at_page = (unsigned __int8)v3 - 11 * spell_school;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
75 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
76 quick_spell_at_page = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
77
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
78 for (uint i = 1; i < 12; ++i)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
79 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
80 if (pPlayer->spellbook.pChapters[spell_school].bIsSpellAvailable[i - 1])
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
81 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
82 sprintf(pContainer, "SB%sS%02d", spellbook_texture_filename_suffices[spell_school], pSpellbookSpellIndices[spell_school][i]);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
83 dword_506408[i] = pIcons_LOD->LoadTexturePtr(pContainer, TEXTURE_16BIT_PALETTE);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
84
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
85 sprintf(pContainer, "SB%sC%02d", spellbook_texture_filename_suffices[spell_school], pSpellbookSpellIndices[spell_school][i]);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
86 dword_5063D8[i] = pIcons_LOD->LoadTexturePtr(pContainer, TEXTURE_16BIT_PALETTE);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
87 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
88 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
89 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
90
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
91 //----- (0041140B) --------------------------------------------------------
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
92 GUIWindow *__cdecl sub_41140B()
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
93 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
94 signed int v0; // esi@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
95 GUIButton *v1; // eax@3
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
96 GUIButton *v2; // esi@4
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
97 GUIWindow *result; // eax@5
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
98
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
99 v0 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
100 do
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
101 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
102 dword_5063D8[11+v0]->Release();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
103 dword_506408[11+v0]->Release();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
104 --v0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
105 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
106 while ( v0 >= -11 );
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
107 pIcons_LOD->_40F9C5();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
108 v1 = pGUIWindow_CurrentMenu->pControlsHead;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
109 if ( v1 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
110 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
111 do
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
112 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
113 v2 = v1->pNext;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
114 pAllocator->FreeChunk(v1);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
115 v1 = v2;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
116 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
117 while ( v2 );
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
118 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
119 pGUIWindow_CurrentMenu->pControlsHead = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
120 pGUIWindow_CurrentMenu->pControlsTail = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
121 result = pGUIWindow_CurrentMenu;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
122 pGUIWindow_CurrentMenu->uNumControls = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
123 return result;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
124 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
125
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
126 //----- (00411473) --------------------------------------------------------
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
127 void __cdecl sub_411473()
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
128 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
129 pTexture_pagemask->Release();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
130 pTexture_506448->Release();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
131 pTexture_50643C->Release();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
132 for (uint i = 0; i < 8; ++i)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
133 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
134 pSpellBookPagesTextr[i]->Release();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
135 pTextures_tabs[i][0]->Release();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
136 pTextures_tabs[i][1]->Release();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
137 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
138 pAudioPlayer->PlaySound((SoundID)231, 0, 0, -1, 0, 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
139 pIcons_LOD->_4114F2();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
140 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
141
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
142
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
143 //----- (00411597) --------------------------------------------------------
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
144 void __cdecl OnCloseSpellook()
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
145 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
146 pAllocator->FreeChunk(pSpellFont);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
147 pSpellFont = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
148 pAllocator->FreeChunk(pBookFont);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
149 pBookFont = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
150 pAllocator->FreeChunk(pBook2Font);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
151 pBook2Font = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
152 pAllocator->FreeChunk(pAutonoteFont);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
153 pAutonoteFont = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
154 pTexture_mapbordr->Release();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
155 pAudioPlayer->PlaySound((SoundID)231, 0, 0, -1, 0, 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
156 pIcons_LOD->_4114F2();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
157 dword_506364 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
158 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
159 // 506364: using guessed type int dword_506364;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
160
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
161
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
162
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
163
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
164
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
165
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
166
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
167 //----- (00412AF9) --------------------------------------------------------
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
168 void sub_412AF9()
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
169 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
170 int v0; // ecx@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
171
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
172 v0 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
173 if ( uActiveCharacter )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
174 v0 = pParty->pPlayers[uActiveCharacter-1].lastOpenedSpellbookPage;//*((char *)&pParty->pPartyBuffs[5].uExpireTime + 6972 * uActiveCharacter + 2);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
175 pRenderer->DrawTextureIndexed(8u, 8u, pSpellBookPagesTextr[v0]);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
176 pRenderer->DrawTextureIndexed(0x1DCu, 0x1C2u, pTexture_50643C);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
177 pRenderer->DrawTextureIndexed(0x231u, 0x1C2u, pTexture_506448);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
178 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
179
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
180 //----- (00412B58) --------------------------------------------------------
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
181 void __cdecl DrawSpellBookContent()
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
182 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
183 Player *v0; // ebx@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
184 int v1; // ebp@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
185 unsigned int v2; // eax@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
186 Texture *v3; // edi@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
187 int v4; // esi@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
188 Texture *v5; // eax@3
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
189 Texture *v6; // edx@5
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
190 int v7; // eax@8
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
191 int v8; // eax@11
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
192 POINT *v9; // esi@13
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
193 int v10; // eax@13
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
194 Texture *v11; // edx@14
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
195 int v12; // eax@15
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
196 signed int v13; // ecx@18
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
197 unsigned int v14; // esi@18
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
198 unsigned int v15; // edi@18
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
199 Texture *pPageTexture; // eax@21
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
200 unsigned int v17; // [sp-Ch] [bp-2Ch]@8
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
201 unsigned int v18; // [sp-Ch] [bp-2Ch]@15
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
202 unsigned int v19; // [sp-8h] [bp-28h]@8
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
203 unsigned int v20; // [sp-8h] [bp-28h]@15
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
204 Texture *v21; // [sp-4h] [bp-24h]@15
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
205 signed int v22; // [sp-4h] [bp-24h]@22
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
206 Texture *v23; // [sp+10h] [bp-10h]@5
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
207 POINT a2; // [sp+18h] [bp-8h]@13
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
208 POINT v24;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
209 int v25;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
210
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
211 sub_412AF9();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
212 v0 = pPlayers[uActiveCharacter];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
213 v1 = 11 * v0->lastOpenedSpellbookPage;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
214 v2 = pIcons_LOD->FindTextureByName("Pending");
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
215 v3 = (Texture *)(v2 != -1 ? (int)&pIcons_LOD->pTextures[v2] : 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
216 pRenderer->ClearZBuffer(0, 479);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
217 v4 = 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
218 if ( __OFSUB__(v1, v1 + 11) ^ 1 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
219 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
220 do
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
221 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
222 if ( *(&v0->_guilds_member_bits[v1 + 63] + v4) )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
223 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
224 v5 = (Texture *)dword_506408[v4];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
225 if ( v5 != v3 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
226 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
227 if ( quick_spell_at_page == v4 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
228 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
229 v6 = dword_5063D8[v4];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
230 v23 = dword_5063D8[v4];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
231 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
232 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
233 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
234 v23 = dword_506408[v4];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
235 v6 = v5;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
236 }
710
735dab8d3c9a Town portal screen + misc gui const replacements
Nomad
parents: 709
diff changeset
237 if ( v6->pLevelOfDetail0_prolly_alpha_mask )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
238 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
239 v7 = v0->lastOpenedSpellbookPage;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
240 // v7 = (12 * v0->lastOpenedSpellbookPage + pSpellbookSpellIndices[v0->lastOpenedSpellbookPage][v4]);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
241 v19 = pViewport->uViewportTL_Y + pIconPos[v7][pSpellbookSpellIndices[v7][v4]].Ypos;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
242 v17 = pViewport->uViewportTL_X + pIconPos[v7][pSpellbookSpellIndices[v7][v4]].Xpos;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
243 if ( BYTE1(v6->pBits) & 2 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
244 pRenderer->DrawTextureTransparent(v17, v19, v6);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
245 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
246 pRenderer->DrawTextureIndexed(v17, v19, v6);
710
735dab8d3c9a Town portal screen + misc gui const replacements
Nomad
parents: 709
diff changeset
247 pRenderer->DrawMaskToZBuffer(pIconPos[v7][pSpellbookSpellIndices[v7][v4]].Xpos,
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
248 pIconPos[v7][pSpellbookSpellIndices[v7][v4]].Ypos, v23, v4);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
249 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
250 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
251 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
252 ++v4;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
253 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
254 while ( v4 + v1 - 1 < v1 + 11 );
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
255 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
256 v9 = pMouse->GetCursorPos(&a2);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
257 v10 = pRenderer->pActiveZBuffer[v9->x + pSRZBufferLineOffsets[pMouse->GetCursorPos(&v24)->y]] & 0xFFFF;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
258 if ( v10 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
259 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
260 v11 = dword_5063D8[v10];
710
735dab8d3c9a Town portal screen + misc gui const replacements
Nomad
parents: 709
diff changeset
261 if ( v11->pLevelOfDetail0_prolly_alpha_mask )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
262 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
263 v21 = dword_5063D8[v10];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
264 v12 = v0->lastOpenedSpellbookPage;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
265 // v12 = (12 * v0->lastOpenedSpellbookPage + pSpellbookSpellIndices[v0->lastOpenedSpellbookPage][v10]);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
266 v20 = pViewport->uViewportTL_Y + pIconPos[v12][pSpellbookSpellIndices[v12][v10]].Ypos;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
267 v18 = pViewport->uViewportTL_X + pIconPos[v12][pSpellbookSpellIndices[v12][v10]].Xpos;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
268 if ( BYTE1(v11->pBits) & 2 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
269 pRenderer->DrawTextureTransparent(v18, v20, v21);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
270 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
271 pRenderer->DrawTextureIndexed(v18, v20, v21);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
272 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
273 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
274 v13 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
275 a2.x = (LONG)&v0->pActiveSkills[12];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
276 v14 = (unsigned int)&v0->pActiveSkills[12];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
277 v15 = (unsigned int)&v0->pActiveSkills[12];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
278 v25 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
279 do
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
280 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
281 if ( *(short *)a2.x )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
282 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
283 if ( v0->lastOpenedSpellbookPage == v13 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
284 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
285 pPageTexture = pTextures_tabs[v13][1];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
286 switch ( v13 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
287 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
288 case 0:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
289 v14 = 406;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
290 v22 = 9;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
291 goto LABEL_27;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
292 case 1:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
293 v14 = 406;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
294 goto LABEL_38;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
295 case 2:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
296 v14 = 406;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
297 v22 = 84;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
298 goto LABEL_27;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
299 case 3:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
300 v14 = 406;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
301 goto LABEL_26;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
302 case 4:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
303 v14 = 407;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
304 goto LABEL_29;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
305 case 5:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
306 v15 = 196;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
307 goto LABEL_34;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
308 case 6:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
309 v15 = 234;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
310 goto LABEL_34;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
311 case 7:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
312 v15 = 272;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
313 goto LABEL_34;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
314 case 8:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
315 v15 = 309;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
316 LABEL_34:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
317 v14 = 405;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
318 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
319 default:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
320 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
321 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
322 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
323 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
324 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
325 pPageTexture = pTextures_tabs[v13][0];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
326 switch ( v13 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
327 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
328 case 0:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
329 v14 = 415;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
330 v22 = 10;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
331 goto LABEL_27;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
332 case 1:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
333 v14 = 415;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
334 LABEL_38:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
335 v22 = 46;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
336 goto LABEL_27;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
337 case 2:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
338 v14 = 415;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
339 v22 = 83;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
340 goto LABEL_27;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
341 case 3:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
342 v14 = 415;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
343 LABEL_26:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
344 v22 = 121;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
345 LABEL_27:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
346 v15 = v22;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
347 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
348 case 4:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
349 v14 = 415;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
350 LABEL_29:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
351 v15 = 158;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
352 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
353 case 5:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
354 v15 = 196;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
355 goto LABEL_46;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
356 case 6:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
357 v15 = 234;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
358 goto LABEL_46;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
359 case 7:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
360 v15 = 271;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
361 goto LABEL_46;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
362 case 8:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
363 v15 = 307;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
364 LABEL_46:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
365 v14 = 416;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
366 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
367 default:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
368 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
369 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
370 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
371 pRenderer->DrawTextureTransparent(v14, v15, pPageTexture);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
372 v13 = v25;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
373 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
374 a2.x += 2;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
375 ++v13;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
376 v25 = v13;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
377 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
378 while ( v13 < 9 );
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
379 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
380 // 506408: using guessed type int dword_506408[];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
381 // 50654C: using guessed type int dword_50654C;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
382
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
383 //----- (00412E85) --------------------------------------------------------
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
384 char __cdecl DrawBook_History()
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
385 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
386 unsigned int v0; // eax@3
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
387 unsigned int v1; // eax@7
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
388 int v2; // eax@10
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
389 const char *v3; // eax@10
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
390 signed int v4; // ecx@12
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
391 int v5; // ecx@14
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
392 int v6; // eax@21
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
393 int v7; // esi@21
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
394 char *v8; // eax@21
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
395 int v9; // eax@22
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
396 unsigned int v11; // [sp-8h] [bp-64h]@3
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
397 unsigned int v12; // [sp-8h] [bp-64h]@7
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
398 Texture *v13; // [sp-4h] [bp-60h]@3
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
399 Texture *v14; // [sp-4h] [bp-60h]@7
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
400 GUIWindow a1; // [sp+8h] [bp-54h]@10
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
401
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
402 pRenderer->DrawTextureIndexed(pViewport->uViewportTL_X, pViewport->uViewportTL_Y, pSpellBookPagesTextr_11);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
403 if ( dword_506548 || !dword_506528 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
404 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
405 v13 = pTex_tab_an_6a__zoom_off;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
406 v11 = pViewport->uViewportTL_Y + 2;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
407 v0 = pViewport->uViewportTL_X + 407;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
408 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
409 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
410 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
411 v13 = pTex_tab_an_6b__zoom_on;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
412 v11 = pViewport->uViewportTL_Y + 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
413 v0 = pViewport->uViewportTL_X + 398;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
414 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
415 pRenderer->DrawTextureTransparent(v0, v11, v13);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
416 if ( dword_506544 || dword_506528 + awards_count >= awards_count2 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
417 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
418 v14 = pTex_tab_an_7a__zoot_off;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
419 v12 = pViewport->uViewportTL_Y + 38;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
420 v1 = pViewport->uViewportTL_X + 407;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
421 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
422 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
423 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
424 v14 = pTex_tab_an_7b__zoot_on;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
425 v12 = pViewport->uViewportTL_Y + 38;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
426 v1 = pViewport->uViewportTL_X + 398;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
427 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
428 pRenderer->DrawTextureTransparent(v1, v12, v14);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
429 if ( !byte_5C6D50[dword_506528] )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
430 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
431 v2 = achievedAwardsIndex[dword_506528];
819
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
432 a1.uFrameWidth = game_viewport_width;
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
433 a1.uFrameX = game_viewport_x;
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
434 a1.uFrameY = game_viewport_y;
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
435 a1.uFrameHeight = game_viewport_height;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
436 v3 = (const char *)pStorylineText->StoreLine[v2].pPageTitle;//field_4[];
819
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
437 a1.uFrameZ = game_viewport_z;
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
438 a1.uFrameW = game_viewport_w;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
439 if ( v3 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
440 a1.DrawTitleText(pBook2Font, 0, 0x16u, 0, v3, 3u);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
441 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
442 a1.uFrameX = 48;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
443 a1.uFrameY = 70;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
444 a1.uFrameWidth = 360;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
445 a1.uFrameHeight = 264;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
446 v4 = LOBYTE(pAutonoteFont->uFontHeight) - 3;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
447 a1.uFrameZ = 407;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
448 a1.uFrameHeight = v4 * 264 / v4;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
449 a1.uFrameW = a1.uFrameHeight + 69;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
450 if ( dword_506544 && dword_506528 + awards_count < awards_count2 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
451 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
452 pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
453 v5 = dword_50651C++;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
454 dword_506528 += awards_count;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
455 byte_506130[v5] = awards_count;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
456 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
457 if ( dword_506548 && dword_50651C )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
458 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
459 pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
460 --dword_50651C;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
461 dword_506528 -= (unsigned __int8)byte_506130[dword_50651C];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
462 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
463 if ( !awards_count || dword_506528 < 1 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
464 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
465 dword_506528 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
466 dword_50651C = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
467 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
468 dword_506544 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
469 v6 = achievedAwardsIndex[dword_506528];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
470 dword_506548 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
471 awards_count = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
472 //v7 = *pStorylineText->StoreLine[v6].pText;//*(&pStorylineText->field_0 + 3 * v6);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
473 v7 = (int)pStorylineText->StoreLine[v6].pText;//*(&pStorylineText->field_0 + 3 * v6);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
474 v8 = BuilDialogueString(
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
475 pStorylineText->StoreLine[v6].pText,
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
476 uActiveCharacter - 1,
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
477 0,
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
478 0,
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
479 0,
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
480 (__int64 *)&pParty->field_3C._s_times[ v6 + 21]);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
481 if ( v7 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
482 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
483 v9 = pAutonoteFont->_44C6C2(v8, &a1, 1u, (unsigned __int8)byte_5C6D50[dword_506528]);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
484 LOBYTE(v8) = a1.DrawText(pAutonoteFont, 1, 0, 0, (const char *)v9, 0, a1.uFrameY + a1.uFrameHeight, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
485 ++awards_count;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
486 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
487 return (char)v8;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
488 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
489
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
490
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
491 //----- (00413126) --------------------------------------------------------
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
492 void __cdecl DrawBook_Quests()
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
493 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
494 unsigned int v0; // eax@3
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
495 unsigned int v1; // eax@7
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
496 int v2; // ecx@11
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
497 int v3; // ebx@16
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
498 int v4; // eax@19
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
499 const char *v5; // edi@19
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
500 int v6; // eax@19
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
501 unsigned int v7; // edi@19
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
502 unsigned int v8; // [sp-8h] [bp-68h]@3
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
503 unsigned int v9; // [sp-8h] [bp-68h]@7
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
504 Texture *v10; // [sp-4h] [bp-64h]@3
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
505 Texture *v11; // [sp-4h] [bp-64h]@7
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
506 GUIWindow a1; // [sp+Ch] [bp-54h]@9
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
507
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
508 pRenderer->DrawTextureIndexed(pViewport->uViewportTL_X, pViewport->uViewportTL_Y, pTexture_CurrentBook);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
509 if ( dword_506548 || !dword_506528 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
510 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
511 v10 = pTex_tab_an_6a__zoom_off;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
512 v8 = pViewport->uViewportTL_Y + 2;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
513 v0 = pViewport->uViewportTL_X + 407;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
514 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
515 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
516 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
517 v10 = pTex_tab_an_6b__zoom_on;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
518 v8 = pViewport->uViewportTL_Y + 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
519 v0 = pViewport->uViewportTL_X + 398;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
520 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
521 pRenderer->DrawTextureTransparent(v0, v8, v10);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
522 if ( dword_506544 || dword_506528 + awards_count >= awards_count2 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
523 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
524 v11 = pTex_tab_an_7a__zoot_off;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
525 v9 = pViewport->uViewportTL_Y + 38;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
526 v1 = pViewport->uViewportTL_X + 407;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
527 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
528 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
529 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
530 v11 = pTex_tab_an_7b__zoot_on;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
531 v9 = pViewport->uViewportTL_Y + 38;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
532 v1 = pViewport->uViewportTL_X + 398;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
533 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
534 pRenderer->DrawTextureTransparent(v1, v9, v11);
819
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
535 a1.uFrameWidth = game_viewport_width;
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
536 a1.uFrameHeight = game_viewport_height;
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
537 a1.uFrameX = game_viewport_x;
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
538 a1.uFrameY = game_viewport_y;
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
539 a1.uFrameZ = game_viewport_z;
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
540 a1.uFrameW = game_viewport_w;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
541 a1.DrawTitleText(pBook2Font, 0, 0x16u, 0, pGlobalTXT_LocalizationStrings[174], 3u);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
542 a1.uFrameX = 48;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
543 a1.uFrameY = 70;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
544 a1.uFrameWidth = 360;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
545 a1.uFrameHeight = 264;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
546 a1.uFrameZ = 407;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
547 a1.uFrameW = 333;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
548 if ( dword_506544 && dword_506528 + awards_count < awards_count2 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
549 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
550 pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
551 v2 = dword_50651C++;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
552 dword_506528 += awards_count;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
553 byte_506130[v2] = awards_count;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
554 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
555 if ( dword_506548 && dword_50651C )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
556 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
557 pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
558 --dword_50651C;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
559 dword_506528 -= (unsigned __int8)byte_506130[dword_50651C];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
560 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
561 if ( !awards_count || (v3 = dword_506528, dword_506528 < 1) )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
562 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
563 v3 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
564 dword_50651C = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
565 dword_506528 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
566 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
567 dword_506544 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
568 dword_506548 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
569 awards_count = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
570 while ( v3 < awards_count2 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
571 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
572 v4 = achievedAwardsIndex[v3];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
573 ++awards_count;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
574 v5 = pQuestTable[v4-1];//(&dword_722F10)[4 * v4];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
575 a1.DrawText(pAutonoteFont, 1, 0, 0, pQuestTable[v4-1], 0, 0, 0);//(&dword_722F10)[4 * v4], 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
576 v6 = pAutonoteFont->CalcTextHeight(v5, &a1, 1, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
577 v7 = a1.uFrameY + v6;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
578 if ( (signed int)(a1.uFrameY + v6) > (signed int)a1.uFrameHeight )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
579 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
580 pRenderer->DrawTextureTransparent(100, v7 + 12, pSpellBookPagesTextr_10);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
581 ++v3;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
582 a1.uFrameY = v7 + 24;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
583 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
584 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
585
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
586
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
587 //----- (0041338E) --------------------------------------------------------
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
588 void __cdecl DrawBook_Autonotes()
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
589 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
590 unsigned int v0; // eax@3
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
591 unsigned int v1; // eax@7
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
592 signed int v2; // ebp@11
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
593 unsigned int v3; // eax@18
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
594 unsigned int v4; // eax@24
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
595 unsigned int v5; // eax@30
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
596 unsigned int v6; // eax@36
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
597 unsigned int v7; // eax@42
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
598 signed int v8; // ebp@47
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
599 int v9; // eax@52
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
600 int v10; // eax@56
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
601 int v11; // edx@57
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
602 int v12; // ebp@64
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
603 int v13; // eax@65
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
604 const char *v14; // edi@65
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
605 int v15; // eax@65
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
606 unsigned int v16; // edi@65
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
607 unsigned int v17; // [sp-8h] [bp-70h]@3
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
608 unsigned int v18; // [sp-8h] [bp-70h]@7
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
609 unsigned int v19; // [sp-8h] [bp-70h]@18
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
610 unsigned int v20; // [sp-8h] [bp-70h]@24
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
611 unsigned int v21; // [sp-8h] [bp-70h]@30
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
612 unsigned int v22; // [sp-8h] [bp-70h]@36
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
613 unsigned int v23; // [sp-8h] [bp-70h]@42
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
614 Texture *v24; // [sp-4h] [bp-6Ch]@3
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
615 Texture *v25; // [sp-4h] [bp-6Ch]@7
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
616 Texture *v26; // [sp-4h] [bp-6Ch]@18
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
617 Texture *v27; // [sp-4h] [bp-6Ch]@24
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
618 Texture *v28; // [sp-4h] [bp-6Ch]@30
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
619 Texture *v29; // [sp-4h] [bp-6Ch]@36
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
620 Texture *v30; // [sp-4h] [bp-6Ch]@42
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
621 signed __int16 v31; // [sp+10h] [bp-58h]@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
622 char *v32; // [sp+10h] [bp-58h]@49
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
623 GUIWindow a1; // [sp+14h] [bp-54h]@46
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
624
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
625 v31 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
626 pRenderer->DrawTextureIndexed(pViewport->uViewportTL_X, pViewport->uViewportTL_Y, pTexture_AutonotesBook);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
627 if ( dword_506548 || !dword_506528 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
628 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
629 v24 = pTex_tab_an_6a__zoom_off;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
630 v17 = pViewport->uViewportTL_Y + 2;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
631 v0 = pViewport->uViewportTL_X + 407;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
632 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
633 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
634 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
635 v24 = pTex_tab_an_6b__zoom_on;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
636 v17 = pViewport->uViewportTL_Y + 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
637 v0 = pViewport->uViewportTL_X + 398;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
638 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
639 pRenderer->DrawTextureTransparent(v0, v17, v24);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
640 if ( dword_506544 || dword_506528 + awards_count >= awards_count2 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
641 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
642 v25 = pTex_tab_an_7a__zoot_off;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
643 v18 = pViewport->uViewportTL_Y + 38;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
644 v1 = pViewport->uViewportTL_X + 407;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
645 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
646 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
647 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
648 v25 = pTex_tab_an_7b__zoot_on;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
649 v18 = pViewport->uViewportTL_Y + 38;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
650 v1 = pViewport->uViewportTL_X + 398;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
651 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
652 pRenderer->DrawTextureTransparent(v1, v18, v25);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
653 if ( !dword_506540 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
654 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
655 if ( dword_506568 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
656 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
657 pRenderer->DrawTextureTransparent(
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
658 pViewport->uViewportTL_X + 408,
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
659 pViewport->uViewportTL_Y + 113,
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
660 pTexture_506390);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
661 v2 = 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
662 goto LABEL_16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
663 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
664 goto LABEL_14;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
665 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
666 if ( !dword_506568 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
667 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
668 LABEL_14:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
669 v2 = 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
670 goto LABEL_15;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
671 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
672 v2 = 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
673 v31 = 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
674 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
675 LABEL_15:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
676 dword_506568 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
677 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 113, pTexture_506394);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
678 LABEL_16:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
679 if ( dword_50653C )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
680 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
681 if ( dword_506568 != v2 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
682 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
683 v31 = v2;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
684 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
685 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
686 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
687 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
688 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
689 if ( dword_506568 != v2 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
690 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
691 v26 = pTexture_506388;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
692 v19 = pViewport->uViewportTL_Y + 150;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
693 v3 = pViewport->uViewportTL_X + 408;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
694 goto LABEL_22;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
695 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
696 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
697 v26 = pTexture_50638C;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
698 dword_506568 = v2;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
699 v19 = pViewport->uViewportTL_Y + 150;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
700 v3 = pViewport->uViewportTL_X + 399;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
701 LABEL_22:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
702 pRenderer->DrawTextureTransparent(v3, v19, v26);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
703 if ( dword_506538 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
704 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
705 if ( dword_506568 != 2 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
706 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
707 v31 = v2;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
708 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
709 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
710 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
711 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
712 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
713 if ( dword_506568 != 2 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
714 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
715 v27 = pTexture_506380;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
716 v20 = pViewport->uViewportTL_Y + 188;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
717 v4 = pViewport->uViewportTL_X + 408;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
718 goto LABEL_28;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
719 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
720 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
721 v27 = pTexture_506384;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
722 dword_506568 = 2;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
723 v20 = pViewport->uViewportTL_Y + 188;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
724 v4 = pViewport->uViewportTL_X + 397;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
725 LABEL_28:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
726 pRenderer->DrawTextureTransparent(v4, v20, v27);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
727 if ( dword_506534 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
728 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
729 if ( dword_506568 != 3 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
730 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
731 v31 = v2;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
732 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
733 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
734 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
735 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
736 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
737 if ( dword_506568 != 3 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
738 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
739 v28 = pTexture_506378;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
740 v21 = pViewport->uViewportTL_Y + 226;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
741 v5 = pViewport->uViewportTL_X + 408;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
742 goto LABEL_34;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
743 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
744 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
745 v28 = pTexture_50637C;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
746 dword_506568 = 3;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
747 v21 = pViewport->uViewportTL_Y + 226;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
748 v5 = pViewport->uViewportTL_X + 397;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
749 LABEL_34:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
750 pRenderer->DrawTextureTransparent(v5, v21, v28);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
751 if ( dword_506530 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
752 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
753 if ( dword_506568 != 4 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
754 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
755 v31 = v2;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
756 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
757 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
758 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
759 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
760 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
761 if ( dword_506568 != 4 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
762 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
763 v29 = pTexture_506370;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
764 v22 = pViewport->uViewportTL_Y + 263;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
765 v6 = pViewport->uViewportTL_X + 408;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
766 goto LABEL_40;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
767 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
768 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
769 v29 = pTexture_506374;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
770 dword_506568 = 4;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
771 v22 = pViewport->uViewportTL_Y + 264;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
772 v6 = pViewport->uViewportTL_X + 397;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
773 LABEL_40:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
774 pRenderer->DrawTextureTransparent(v6, v22, v29);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
775 if ( dword_50652C )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
776 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
777 if ( dword_506568 != 5 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
778 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
779 v31 = v2;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
780 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
781 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
782 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
783 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
784 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
785 if ( dword_506568 != 5 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
786 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
787 v30 = pTexture_506368;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
788 v23 = pViewport->uViewportTL_Y + 302;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
789 v7 = pViewport->uViewportTL_X + 408;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
790 goto LABEL_46;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
791 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
792 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
793 v30 = pTexture_50636C;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
794 dword_506568 = 5;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
795 v23 = pViewport->uViewportTL_Y + 302;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
796 v7 = pViewport->uViewportTL_X + 397;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
797 LABEL_46:
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
798 pRenderer->DrawTextureTransparent(v7, v23, v30);
819
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
799 a1.uFrameWidth = game_viewport_width;
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
800 a1.uFrameHeight = game_viewport_height;
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
801 a1.uFrameX = game_viewport_x;
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
802 a1.uFrameY = game_viewport_z;
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
803 a1.uFrameZ = game_viewport_z;
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
804 a1.uFrameW = game_viewport_w;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
805 a1.DrawTitleText(pBook2Font, 0, 0x16u, 0, pGlobalTXT_LocalizationStrings[154], 3u);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
806 a1.uFrameX = 48;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
807 a1.uFrameY = 70;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
808 a1.uFrameWidth = 360;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
809 a1.uFrameHeight = 264;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
810 a1.uFrameZ = 407;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
811 a1.uFrameW = 333;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
812 if ( v31 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
813 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
814 awards_count2 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
815 dword_506528 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
816 dword_50651C = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
817 awards_count = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
818 v8 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
819 do
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
820 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
821 //if ( dword_72371C[2 * v8] == dword_506568 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
822 if ( pAutonoteTxt[v8-1].eType == dword_506568 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
823 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
824 //v32 = (&dword_723718_autonote_related)[8 * (signed __int16)v8];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
825 v32 = (char *)pAutonoteTxt[v8-1].pText;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
826 if ( (short)v8 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
827 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
828 if ( (unsigned __int16)_449B57_test_bit(pParty->_autonote_bits, v8) && v32 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
829 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
830 v9 = awards_count++;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
831 achievedAwardsIndex[v9] = (signed __int16)v8;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
832 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
833 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
834 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
835 ++v8;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
836 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
837 while ( v8 < 196 );
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
838 awards_count2 = awards_count;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
839 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
840 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
841 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
842 if ( dword_506544 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
843 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
844 v10 = awards_count + dword_506528;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
845 if ( awards_count + dword_506528 < awards_count2 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
846 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
847 v11 = dword_50651C++;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
848 byte_506130[v11] = awards_count;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
849 dword_506528 = v10;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
850 pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
851 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
852 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
853 if ( dword_506548 && dword_50651C )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
854 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
855 --dword_50651C;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
856 dword_506528 -= (unsigned __int8)byte_506130[dword_50651C];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
857 pAudioPlayer->PlaySound((SoundID)230, 0, 0, -1, 0, 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
858 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
859 if ( !awards_count || dword_506528 < 1 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
860 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
861 dword_506528 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
862 dword_50651C = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
863 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
864 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
865 v12 = dword_506528;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
866 dword_50652C = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
867 dword_506544 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
868 dword_506548 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
869 awards_count = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
870 dword_506530 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
871 dword_506534 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
872 dword_506538 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
873 dword_50653C = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
874 dword_506540 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
875 while ( v12 < awards_count2 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
876 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
877 v13 = achievedAwardsIndex[v12];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
878 ++awards_count;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
879 //v14 = (&dword_723718_autonote_related)[8 * v13];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
880 v14 = pAutonoteTxt[v13-1].pText;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
881 //a1.DrawText(pAutonoteFont, 1, 0, 0, (&dword_723718_autonote_related)[8 * v13], 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
882 a1.DrawText(pAutonoteFont, 1, 0, 0, pAutonoteTxt[v13-1].pText, 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
883 v15 = pAutonoteFont->CalcTextHeight(v14, &a1, 1, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
884 v16 = a1.uFrameY + v15;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
885 if ( (signed int)(a1.uFrameY + v15) > (signed int)a1.uFrameHeight )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
886 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
887 pRenderer->DrawTextureTransparent(0x64u, v16 + 12, pSpellBookPagesTextr_10);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
888 ++v12;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
889 a1.uFrameY = v16 + 24;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
890 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
891 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
892
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
893
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
894 //----- (00413980) --------------------------------------------------------
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
895 void DrawBook_Maps()
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
896 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
897
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
898 int v6; // eax@31
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
899 unsigned int map_id; // eax@35
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
900 Texture *buttnTxtr; // [sp-4h] [bp-DCh]@3
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
901 char party_coord[120]; // [sp+Ch] [bp-CCh]@37
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
902 GUIWindow map_window; // [sp+84h] [bp-54h]@35
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
903 unsigned int textrX, textrY;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
904
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
905 pRenderer->DrawTextureIndexed(pViewport->uViewportTL_X, pViewport->uViewportTL_Y, pSpellBookPagesTextr_12);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
906 if ( dword_506548 || viewparams->field_2C / 128 >= 12 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
907 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
908 buttnTxtr = pTex_tab_an_6a__zoom_off;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
909 textrY = pViewport->uViewportTL_Y + 2;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
910 textrX = pViewport->uViewportTL_X + 408;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
911 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
912 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
913 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
914 buttnTxtr = pTex_tab_an_6b__zoom_on;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
915 textrY = pViewport->uViewportTL_Y + 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
916 textrX = pViewport->uViewportTL_X + 398;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
917 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
918 pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
919 if ( dword_506544 || viewparams->field_2C / 128 <= 3 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
920 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
921 buttnTxtr = pTex_tab_an_7a__zoot_off;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
922 textrY = pViewport->uViewportTL_Y + 38;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
923 textrX = pViewport->uViewportTL_X + 408;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
924 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
925 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
926 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
927 buttnTxtr = pTex_tab_an_7b__zoot_on;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
928 textrY = pViewport->uViewportTL_Y + 38;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
929 textrX = pViewport->uViewportTL_X + 398;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
930 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
931 pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
932 if ( dword_506540 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
933 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
934 buttnTxtr = pTexture_506390;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
935 textrY = pViewport->uViewportTL_Y + 113;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
936 textrX = pViewport->uViewportTL_X + 408;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
937 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
938 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
939 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
940 buttnTxtr = pTexture_506394;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
941 textrY = pViewport->uViewportTL_Y + 113;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
942 textrX = pViewport->uViewportTL_X + 398;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
943 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
944 pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
945 if ( dword_50653C )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
946 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
947 buttnTxtr = pTexture_506388;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
948 textrY = pViewport->uViewportTL_X + 150;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
949 textrX = pViewport->uViewportTL_Y + 408;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
950 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
951 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
952 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
953 buttnTxtr = pTexture_50638C;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
954 textrY = pViewport->uViewportTL_X + 150;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
955 textrX = pViewport->uViewportTL_Y + 399;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
956 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
957 pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
958 if ( dword_506538 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
959 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
960 buttnTxtr = pTexture_506380;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
961 textrY = pViewport->uViewportTL_Y + 188;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
962 textrX = pViewport->uViewportTL_X + 408;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
963 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
964 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
965 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
966 buttnTxtr = pTexture_506384;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
967 textrY = pViewport->uViewportTL_Y + 188;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
968 textrX = pViewport->uViewportTL_X + 397;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
969 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
970 pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
971 if ( dword_506534 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
972 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
973 buttnTxtr = pTexture_506378;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
974 textrY = pViewport->uViewportTL_Y + 226;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
975 textrX = pViewport->uViewportTL_X + 408;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
976 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
977 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
978 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
979 buttnTxtr = pTexture_50637C;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
980 textrY = pViewport->uViewportTL_Y + 226;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
981 textrX = pViewport->uViewportTL_X + 397;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
982 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
983 pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
984 if ( dword_506544 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
985 viewparams->CenterOnParty2();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
986 if ( dword_506548 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
987 viewparams->CenterOnParty();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
988 if ( dword_506540 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
989 viewparams->_443219();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
990 if ( dword_50653C )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
991 viewparams->_443231();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
992 if ( dword_506538 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
993 viewparams->_44323D();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
994 if ( dword_506534 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
995 viewparams->_443225();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
996
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
997 if ( dword_506548 | dword_506544 | dword_506540 | dword_50653C | dword_506538 | dword_506534 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
998 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
999 dword_506548 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1000 dword_506544 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1001 dword_506534 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1002 dword_506538 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1003 dword_50653C = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1004 dword_506540 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1005 DrawBook_Map_sub(97, 49, 361, 313, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1006 pRenderer->DrawTextureTransparent(75, 22, pTexture_mapbordr);
819
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
1007 map_window.uFrameWidth = game_viewport_width;
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
1008 map_window.uFrameHeight = game_viewport_height;
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
1009 map_window.uFrameX = game_viewport_x;
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
1010 map_window.uFrameY = game_viewport_y;
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
1011 map_window.uFrameZ = game_viewport_z;
9359c114f98c More on screenshot
Nomad
parents: 712
diff changeset
1012 map_window.uFrameW = game_viewport_w;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1013 map_id = pMapStats->GetMapInfo(pCurrentMapName);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1014 if ( map_id )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1015 map_window.DrawTitleText(pBook2Font, -14, 12, 0, pMapStats->pInfos[map_id].pName, 3);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1016 map_window.uFrameX = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1017 sprintf(party_coord, pGlobalTXT_LocalizationStrings[659], pParty->vPosition.x, pParty->vPosition.y); //"x: %d y: %d"
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1018 map_window.DrawTitleText(pFontComic, 0, 320, 0, party_coord, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1019 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1020
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1021 //----- (00442955) --------------------------------------------------------
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1022 void DrawBook_Map_sub( unsigned int tl_x, unsigned int tl_y, unsigned int br_x, int br_y, int _48074 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1023 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1024 int v5; // ebx@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1025 int v6; // edi@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1026 BLVMapOutlines *v7; // eax@8
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1027 unsigned __int8 v8; // zf@8
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1028 unsigned __int8 v9; // sf@8
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1029 int v10; // esi@10
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1030 unsigned int v11; // edx@11
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1031 __int16 v12; // cx@12
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1032 signed int v13; // eax@15
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1033 int v14; // eax@16
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1034 Vec3_short_ *v15; // ecx@16
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1035 int v16; // edx@16
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1036 int v17; // ecx@16
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1037 Vec3_short_ *v18; // eax@16
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1038 int v19; // ecx@16
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1039 int v20; // eax@16
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1040 signed int v21; // esi@18
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1041 int v22; // ecx@21
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1042 BLVMapOutline *v23; // ecx@21
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1043 Vec3_short_ *v24; // edx@21
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1044 Vec3_short_ *v25; // eax@21
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1045 int v26; // ecx@21
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1046 unsigned __int16 *v27; // edi@21
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1047 int v28; // edx@21
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1048 int v29; // eax@21
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1049 double v30; // st7@23
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1050 signed __int64 v31; // qax@23
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1051 unsigned short *v32; // edx@23
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1052 int textr_width; // esi@23
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1053 signed int v34; // eax@23
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1054 signed int v35; // ecx@23
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1055 int v36; // esi@27
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1056 int v37; // ecx@27
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1057 int v38; // edx@31
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1058 unsigned int v39; // eax@33
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1059 short *v40; // esi@33
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1060 short *v41; // edi@33
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1061 unsigned __int8 v42; // cf@33
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1062 unsigned int v43; // ecx@33
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1063 short *v44; // edi@33
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1064 short *v45; // esi@33
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1065 int v46; // ecx@33
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1066 signed int v47; // esi@38
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1067 signed int v48; // ecx@38
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1068 int v49; // eax@38
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1069 signed int v50; // edx@55
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1070 unsigned int v51; // ecx@55
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1071 int result; // eax@72
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1072 int v53; // eax@75
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1073 int v54; // esi@75
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1074 int v55; // eax@75
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1075 __int16 v56; // si@85
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1076 double v57; // st7@85
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1077 int v58; // ebx@85
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1078 signed __int64 v59; // qax@85
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1079 signed int v60; // edi@85
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1080 signed __int64 v61; // qax@85
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1081 signed int v62; // ebx@85
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1082 signed int v63; // esi@85
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1083 int v64; // eax@87
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1084 unsigned int v65; // ebx@95
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1085 unsigned short *v66; // edx@95
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1086 unsigned __int16 *v67; // esi@96
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1087 int v68; // edi@98
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1088 unsigned __int16 v69; // cx@99
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1089 unsigned int v70; // [sp-10h] [bp-48074h]@80
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1090 unsigned int v71; // [sp-Ch] [bp-48070h]@80
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1091 unsigned int v72; // [sp-8h] [bp-4806Ch]@80
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1092 signed int v73; // [sp-4h] [bp-48068h]@59
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1093 unsigned __int16 v74; // [sp-4h] [bp-48068h]@79
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1094 unsigned short map_texture_16[147456]; // [sp+Ch] [bp-48058h]@23
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1095 int v76; // [sp+4800Ch] [bp-58h]@23
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1096 unsigned __int16 *v77; // [sp+48010h] [bp-54h]@27
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1097 unsigned __int16 *pPalette_16; // [sp+48014h] [bp-50h]@23
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1098 unsigned int surfPitch; // [sp+48018h] [bp-4Ch]@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1099
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1100 int v81; // [sp+48020h] [bp-44h]@23
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1101 unsigned __int16* render16_data;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1102 unsigned char* texture8_data;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1103 unsigned char* curr_line;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1104 int scale_increment;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1105 int scaled_posX;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1106 int scaled_posY;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1107 int stepX_r;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1108 int stepY_r;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1109
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1110
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1111 unsigned int teal; // [sp+48028h] [bp-3Ch]@8
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1112 int v84; // [sp+4802Ch] [bp-38h]@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1113 int screenCenter_X; // [sp+48030h] [bp-34h]@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1114 int v86; // [sp+48034h] [bp-30h]@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1115 int v87; // [sp+48038h] [bp-2Ch]@16
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1116 unsigned int v88; // [sp+4803Ch] [bp-28h]@16
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1117 int black; // [sp+48040h] [bp-24h]@8
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1118 int screenCenterY; // [sp+48044h] [bp-20h]@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1119 unsigned int i; // [sp+48048h] [bp-1Ch]@9
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1120 unsigned int screenHeight; // [sp+4804Ch] [bp-18h]@16
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1121 unsigned __int16 *v93; // [sp+48050h] [bp-14h]@16
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1122 signed int screenWidth; // [sp+48054h] [bp-10h]@8
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1123 unsigned int v95; // [sp+48058h] [bp-Ch]@16
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1124 int v96; // [sp+4805Ch] [bp-8h]@10
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1125 const void *v97; // [sp+48060h] [bp-4h]@16
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1126 unsigned short *a4a; // [sp+4806Ch] [bp+8h]@85
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1127 int a5a; // [sp+48070h] [bp+Ch]@86
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1128
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1129 tl_x = tl_x;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1130 tl_y = tl_y;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1131 screenCenter_X = (signed int)(tl_x + br_x) >> 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1132 screenCenterY = (signed int)(tl_y + br_y) >> 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1133 surfPitch = pRenderer->uTargetSurfacePitch;
709
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1134 pRenderer->SetRasterClipRect(tl_x, tl_y, br_x, br_y);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1135 v5 = viewparams->field_2C;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1136 v6 = viewparams->sViewCenterX;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1137 v86 = viewparams->sViewCenterX;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1138 v84 = viewparams->sViewCenterY;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1139 if ( viewparams->field_2C != 384 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1140 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1141 if ( viewparams->field_2C == 768 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1142 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1143 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1144 v5 = 680;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1145 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1146 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1147 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1148 {
711
a5e587c8e30e some cleaning
Gloval
parents: 709
diff changeset
1149 v6 = viewparams->indoor_center_x;
a5e587c8e30e some cleaning
Gloval
parents: 709
diff changeset
1150 v86 = viewparams->indoor_center_x;
a5e587c8e30e some cleaning
Gloval
parents: 709
diff changeset
1151 v84 = viewparams->indoor_center_y;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1152 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1153 v5 = viewparams->field_2C - 34;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1154 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1155 if ( uCurrentlyLoadedLevelType != LEVEL_Indoor)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1156 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1157 screenWidth = br_x - tl_x + 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1158 screenHeight = br_y - tl_y + 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1159 render16_data = &pRenderer->pTargetSurface[tl_x + tl_y * surfPitch];
710
735dab8d3c9a Town portal screen + misc gui const replacements
Nomad
parents: 709
diff changeset
1160 texture8_data = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].pLevelOfDetail0_prolly_alpha_mask;
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1161 pPalette_16 = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].pPalette16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1162 scale_increment = (1 << (pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].uWidthLn2 + 16)) / v5;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1163
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1164 v30 = (double)(1 << (16 - pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].uWidthLn2));
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1165
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1166
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1167 teal = (unsigned int)(signed __int64)((double)(v6 - 22528 / (v5 / 384) + 32768) / v30) << 16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1168 v97 = (const void *)((unsigned int)(signed __int64)((double)(v6 - 22528 / (v5 / 384) + 32768) / v30) << 16);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1169
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1170 v32 = map_texture_16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1171 textr_width = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].uTextureWidth;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1172 stepY_r = (int)(signed __int64)((double)(- v84 - 22528 / (v5 / 384)+ 32768) / v30) << 16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1173 v81 = (signed __int16)(signed __int64)((double)(v6 - 22528 / (v5 / 384) + 32768) / v30);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1174 black = (signed __int16)(signed __int64)((double)(v6 - 22528 / (v5 / 384) + 32768) / v30);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1175
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1176 v76 = textr_width;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1177 scaled_posY = stepY_r >> 16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1178 //nearest neiborhood scaling
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1179 if ( texture8_data)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1180 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1181 for(uint i=0; i<screenHeight;++i)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1182 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1183 curr_line=&texture8_data[scaled_posY*textr_width];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1184 stepX_r=teal;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1185 for(uint j=0; j<screenWidth;++j)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1186 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1187 scaled_posX=stepX_r>>16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1188 map_texture_16[i*screenWidth+j]=pPalette_16[*(curr_line+scaled_posX)];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1189 stepX_r+=scale_increment;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1190 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1191 stepY_r+=scale_increment;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1192 scaled_posY=stepY_r>>16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1193 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1194 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1195 //move visible square to render
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1196 for(uint i=0; i<screenHeight;++i)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1197 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1198 if ( screenWidth > 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1199 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1200 memcpy((void*)&render16_data[surfPitch*i],(void*)&map_texture_16[i*screenWidth], screenWidth*2);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1201 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1202 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1203 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1204 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1205 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1206 black = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0, 0);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1207 teal = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0, 0xFFu, 0xFFu);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1208 v7 = pIndoor->pMapOutlines;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1209 uNumBlueFacesInBLVMinimap = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1210 v8 = pIndoor->pMapOutlines->uNumOutlines == 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1211 v9 = pIndoor->pMapOutlines->uNumOutlines < 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1212 screenWidth = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1213 if ( !(v9 | v8) )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1214 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1215 i = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1216 do
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1217 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1218 v10 = (int)((char *)v7 + i + 4);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1219 v96 = pIndoor->pFaces[*(short *)((char *)v7 + i + 8)].uAttributes;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1220 if ( !(BYTE1(v96) & 0x20 || (v11 = pIndoor->pFaces[*(short *)((char *)v7 + i + 10)].uAttributes, BYTE1(v11) & 0x20) ))
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1221 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1222 v12 = *(short *)((char *)v7 + i + 14);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1223 if ( !(v12 & 1) )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1224 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1225 if ( !(!(v96 & 0x80) && (v11 & 0x80u) == 0 ))
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1226 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1227 v96 = (signed int)screenWidth >> 3;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1228 v13 = screenWidth;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1229 *(short *)(v10 + 10) = v12 | 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1230 pIndoor->_visible_outlines[v96] |= 1 << (7 - v13 % 8);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1231 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1232 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1233 if ( (!(v12 & 1) && !(!(v96 & 0x80) && (v11 & 0x80u) == 0 )) || v12 & 1)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1234 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1235 v14 = *(short *)v10;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1236 v88 = v5;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1237 v15 = &pIndoor->pVertices[v14];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1238 v16 = v15->x;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1239 v17 = v15->y - v84;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1240 v93 = (unsigned __int16 *)(v16 - v6);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1241 screenHeight = v17;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1242 v18 = &pIndoor->pVertices[*(short *)(v10 + 2)];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1243 v19 = v18->x;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1244 v20 = v18->y - v84;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1245 v95 = v19 - v6;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1246 v97 = (const void *)v20;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1247 v88 = (unsigned __int64)((v16 - v6) * (signed __int64)v5) >> 16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1248 v87 = (unsigned __int64)((signed int)screenHeight * (signed __int64)v5) >> 16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1249 v93 = (unsigned __int16 *)((unsigned __int64)((v19 - v6) * (signed __int64)v5) >> 16);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1250 screenHeight = (unsigned __int64)(v20 * (signed __int64)v5) >> 16;
709
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1251 pRenderer->RasterLine2D(
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1252 screenCenter_X + v88,
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1253 screenCenterY - v87,
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1254 screenCenter_X + ((unsigned __int64)((v19 - v6) * (signed __int64)v5) >> 16),
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1255 screenCenterY - screenHeight,
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1256 black);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1257 v7 = pIndoor->pMapOutlines;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1258 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1259 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1260 ++screenWidth;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1261 i += 12;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1262 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1263 while ( screenWidth < (signed int)v7->uNumOutlines );
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1264 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1265 v21 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1266 if ( (signed int)uNumBlueFacesInBLVMinimap > 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1267 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1268 while ( 1 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1269 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1270 v22 = pBlueFacesInBLVMinimapIDs[v21];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1271 v87 = v5;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1272 v23 = &v7->pOutlines[v22];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1273 v24 = &pIndoor->pVertices[v23->uVertex1ID];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1274 v25 = &pIndoor->pVertices[v23->uVertex2ID];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1275 v26 = v25->x;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1276 v27 = (unsigned __int16 *)(v24->x - v86);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1277 v28 = v24->y - v84;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1278 v29 = v25->y - v84;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1279 v93 = v27;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1280 screenHeight = v28;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1281 v97 = (const void *)v29;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1282 v87 = (unsigned __int64)((signed int)v27 * (signed __int64)v5) >> 16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1283 v88 = (unsigned __int64)(v28 * (signed __int64)v5) >> 16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1284 i = (unsigned __int64)((v26 - v86) * (signed __int64)v5) >> 16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1285 v95 = (unsigned __int64)(v29 * (signed __int64)v5) >> 16;
709
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1286 pRenderer->RasterLine2D(
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1287 screenCenter_X + ((unsigned __int64)((signed int)v27 * (signed __int64)v5) >> 16),
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1288 screenCenterY - v88,
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1289 screenCenter_X + ((unsigned __int64)((v26 - v86) * (signed __int64)v5) >> 16),
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1290 screenCenterY - v95,
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1291 teal);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1292 ++v21;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1293 if ( v21 >= (signed int)uNumBlueFacesInBLVMinimap )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1294 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1295 v7 = pIndoor->pMapOutlines;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1296 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1297 v6 = v86;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1298 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1299 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1300 v47 = ((unsigned __int64)((pParty->vPosition.x - v6) * (signed __int64)v5) >> 16) + screenCenter_X - 3;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1301 v81 = pParty->vPosition.y - v84;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1302 v97 = (const void *)((unsigned __int64)((pParty->vPosition.y - v84) * (signed __int64)v5) >> 16);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1303 v48 = 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1304 v49 = screenCenterY - (int)v97 - 3;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1305 if ( v47 >= (signed int)tl_x )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1306 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1307 if ( v47 > (signed int)br_x )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1308 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1309 if ( (signed int)(((unsigned __int64)((pParty->vPosition.x - v6) * (signed __int64)v5) >> 16) + screenCenter_X - 6) > (signed int)br_x )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1310 v48 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1311 v47 = br_x;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1312 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1313 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1314 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1315 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1316 if ( (signed int)(((unsigned __int64)((pParty->vPosition.x - v6) * (signed __int64)v5) >> 16) + screenCenter_X) < (signed int)tl_x )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1317 v48 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1318 v47 = tl_x;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1319 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1320 if ( v49 >= (signed int)tl_y )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1321 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1322 if ( v49 > br_y )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1323 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1324 if ( screenCenterY - (signed int)v97 - 6 > br_y )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1325 v48 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1326 v49 = br_y;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1327 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1328 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1329 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1330 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1331 if ( screenCenterY - (signed int)v97 < (signed int)tl_y )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1332 v48 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1333 v49 = tl_y;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1334 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1335 if ( v48 == 1 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1336 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1337 v50 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1338 v51 = pParty->sRotationY & stru_5C6E00->uDoublePiMask;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1339 if ( (signed int)(pParty->sRotationY & stru_5C6E00->uDoublePiMask) >= 128 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1340 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1341 if ( (signed int)v51 > 384 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1342 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1343 if ( (signed int)v51 >= 640 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1344 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1345 if ( (signed int)v51 > 896 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1346 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1347 if ( (signed int)v51 >= 1152 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1348 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1349 if ( (signed int)v51 > 1408 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1350 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1351 if ( (signed int)v51 >= 1664 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1352 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1353 if ( (signed int)v51 <= 1920 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1354 v73 = 7;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1355 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1356 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1357 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1358 v73 = 6;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1359 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1360 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1361 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1362 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1363 v73 = 5;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1364 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1365 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1366 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1367 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1368 v73 = 4;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1369 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1370 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1371 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1372 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1373 v73 = 3;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1374 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1375 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1376 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1377 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1378 v73 = 2;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1379 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1380 if( (signed int)v51 <=1920)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1381 v50 = v73;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1382 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1383 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1384 v50 = 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1385 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1386 pRenderer->DrawTransparentRedShade(v47, v49, (Texture *)(pTextureIDs_pMapDirs[v50] != -1 ? (int)&pIcons_LOD->pTextures[pTextureIDs_pMapDirs[v50]] : 0));
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1387 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1388 result = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xFFu, 0xFFu, 0xFFu);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1389 v95 = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1390 v86 = result;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1391 if ( (signed int)uNumLevelDecorations > 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1392 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1393 screenWidth = (unsigned int)&pLevelDecorations[0].vPosition;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1394 do
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1395 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1396 if ( *(char *)(screenWidth - 2) & 8 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1397 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1398 v53 = *(int *)(screenWidth + 4) - v84;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1399 v93 = (unsigned __int16 *)(*(int *)screenWidth - v6);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1400 screenHeight = v53;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1401 v54 = ((unsigned __int64)((signed int)v93 * (signed __int64)v5) >> 16) + screenCenter_X;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1402 v97 = (const void *)((unsigned __int64)(v53 * (signed __int64)v5) >> 16);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1403 v55 = screenCenterY - (int)v97;
709
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1404 if ( v54 >= pRenderer->raster_clip_x )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1405 {
709
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1406 if ( v54 <= pRenderer->raster_clip_z && v55 >= pRenderer->raster_clip_y && v55 <= pRenderer->raster_clip_w )
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1407 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1408 v74 = v86;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1409 if ( v5 > 512 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1410 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1411 v96 = v55 + 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1412 black = v55 - 1;
709
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1413 pRenderer->RasterLine2D(v54 - 1, v55 - 1, v54 - 1, v55 + 1, v86);
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1414 pRenderer->RasterLine2D(v54, black, v54, v96, v86);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1415 ++v54;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1416 v74 = v86;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1417 v72 = v96;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1418 v71 = v54;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1419 v70 = black;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1420 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1421 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1422 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1423 v72 = screenCenterY - (int)v97;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1424 v71 = ((unsigned __int64)((signed int)v93 * (signed __int64)v5) >> 16) + screenCenter_X;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1425 v70 = screenCenterY - (int)v97;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1426 }
709
af08fc9e29c8 Items (blue dots) on minimap fixed
Nomad
parents: 706
diff changeset
1427 pRenderer->RasterLine2D(v54, v70, v71, v72, v74);
706
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1428 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1429 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1430 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1431 ++v95;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1432 result = v95;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1433 screenWidth += 32;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1434 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1435 while ( (signed int)v95 < (signed int)uNumLevelDecorations );
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1436 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1437 if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1438 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1439 screenCenterY = br_x - tl_x + 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1440 v95 = br_y - tl_y + 1;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1441 v77 = &pRenderer->pTargetSurface[tl_x + tl_y * surfPitch];
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1442 v56 = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].uWidthLn2;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1443 black = (1 << (v56 + 16)) / v5;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1444 v57 = (double)(1 << (16 - v56));
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1445 v58 = 22528 / (v5 / 384);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1446 v59 = (signed __int64)((double)(v6 - v58 + 32768) / v57);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1447 v60 = (int)v59 << 16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1448 v97 = (const void *)((int)v59 << 16);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1449 v61 = (signed __int64)((double)(32768 - v58 - v84) / v57);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1450 pPalette_16 = (unsigned __int16 *)(v60 >> 16);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1451 v62 = (int)v61 << 16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1452 teal = v60 >> 16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1453 v63 = (signed __int16)v61;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1454 a4a = map_texture_16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1455 result = GenerateColorAsCloseAsPossibleToR8G8B8InTargetFormat(0xCu, 0xCu, 0xCu);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1456 screenCenter_X = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1457 for ( i = result; screenCenter_X < (signed int)v95; result = screenCenter_X )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1458 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1459 a5a = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1460 if ( screenCenterY > 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1461 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1462 v96 = (v63 - 80) / 4;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1463 v64 = teal;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1464 do
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1465 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1466 v81 = (v64 - 80) / 4;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1467 if ( !pOutdoor->_47F04C(v81, v96) )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1468 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1469 if ( pOutdoor->_47F097(v81, v96) )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1470 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1471 if ( !((a5a + screenCenter_X) % 2) )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1472 *a4a = i;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1473 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1474 else
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1475 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1476 *a4a = 0;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1477 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1478 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1479 ++a4a;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1480 v97 = (char *)v97 + black;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1481 v64 = (signed int)v97 >> 16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1482 ++a5a;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1483 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1484 while ( a5a < screenCenterY );
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1485 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1486 v62 += black;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1487 v97 = (const void *)v60;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1488 a4a += screenCenterY - a5a;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1489 v63 = v62 >> 16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1490 ++screenCenter_X;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1491 teal = (unsigned int)pPalette_16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1492 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1493 v65 = v95;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1494 v66 = map_texture_16;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1495 if ( (signed int)v95 > 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1496 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1497 v67 = v77;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1498 result = 2 * (surfPitch - screenCenterY);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1499 do
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1500 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1501 if ( screenCenterY > 0 )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1502 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1503 v68 = screenCenterY;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1504 do
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1505 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1506 v69 = *(short *)v66;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1507 if ( !*(short *)v66 || v69 == (short)i )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1508 *v67 = v69;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1509 ++v66;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1510 ++v67;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1511 --v68;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1512 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1513 while ( v68 );
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1514 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1515 v67 = (unsigned __int16 *)((char *)v67 + result);
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1516 --v65;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1517 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1518 while ( v65 );
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1519 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1520 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1521 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1522
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1523
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1524
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1525
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1526 //----- (00413CC6) --------------------------------------------------------
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1527 void __thiscall SellectDrawBook(unsigned int uBook)
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1528 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1529 enum WindowType pWindowType; // esi@1
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1530
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1531 pWindowType = (enum WindowType)uBook;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1532 pRenderer->DrawTextureIndexed(471u, 445u, (Texture *)(uExitCancelTextureId != -1 ? (int)&pIcons_LOD->pTextures[uExitCancelTextureId] : 0));
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1533 switch ( pWindowType )
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1534 {
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1535 case WINDOW_Lloyd: // 177
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1536 DrawLloydBeaconsScreen();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1537 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1538 case WINDOW_TownPortal: //195
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1539 DrawTownPortalScreen();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1540 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1541 case WINDOW_QuestBook: //200
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1542 DrawBook_Quests();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1543 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1544 case WINDOW_AutonotesBook: //201
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1545 DrawBook_Autonotes();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1546 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1547 case WINDOW_MapsBook://202
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1548 DrawBook_Maps();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1549 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1550 case WINDOW_CalendarBook://203
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1551 DrawBook_Calendar();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1552 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1553 case WINDOW_HistoryBook://224
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1554 DrawBook_History();
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1555 break;
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1556 }
d6236f6a9882 Rough function rearranging to new files
Gloval
parents: 701
diff changeset
1557 }