annotate UI/Books/UIMapBook.cpp @ 1419:9a1adf08f4ed

more label cleaning 2
author zipi
date Sun, 28 Jul 2013 18:54:40 +0100
parents 28f87f5234a1
children 71a2cf416478 c3bfa7e7cee1
rev   line source
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
1 #ifdef _MSC_VER
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
2 #define _CRT_SECURE_NO_WARNINGS
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
3 #endif
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
4
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
5 #include <assert.h>
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
6
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
7 #include "..\..\MM7.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
8 #include "..\..\Render.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
9 #include "..\..\Mouse.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
10 #include "..\UIBooks.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
11 #include "..\..\MapInfo.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
12 #include "..\..\GUIWindow.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
13 #include "..\..\GUIFont.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
14 #include "..\..\Party.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
15 #include "..\..\AudioPlayer.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
16 #include "..\..\Outdoor.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
17 #include "..\..\LOD.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
18 #include "..\..\Allocator.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
19 #include "..\..\Viewport.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
20 #include "..\..\Math.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
21 #include "..\..\texts.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
22 //
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
23 #include "..\..\mm7_data.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
24
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
25 std::array<__int16, 6> pTownPortalBook_xs = {{260, 324, 147, 385, 390, 19}};
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
26 std::array<__int16, 6> pTownPortalBook_ys = {{206, 84, 182, 239, 17, 283}};
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
27
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
28 std::array<unsigned int, 5> pLloydsBeaconsPreviewXs = {{61, 281, 61, 281, 171}}; // 004E249C
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
29 std::array<unsigned int, 5> pLloydsBeaconsPreviewYs = {{84, 84, 228, 228, 155}};
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
30 std::array<unsigned int, 5> pLloydsBeacons_SomeXs = {{59, 279, 59, 279, 169}};
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
31 std::array<unsigned int, 5> pLloydsBeacons_SomeYs = {{82, 82, 226, 226, 153}};
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
32
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
33
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
34
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
35
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
36
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
37
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
38 //----- (00411150) --------------------------------------------------------
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
39 void BookUI_DrawTownPortalMap()
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
40 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
41 //signed int v0; // edi@1
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
42 //__int16 v1; // dx@8
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
43 //POINT *v2; // edi@17
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
44 int v3; // edi@17
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
45 //__int16 v4; // dx@24
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
46 GUIWindow v6; // [sp+Ch] [bp-64h]@1
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
47 //POINT v7; // [sp+60h] [bp-10h]@17
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
48 POINT a2; // [sp+68h] [bp-8h]@17
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
49
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
50 pRenderer->ClearZBuffer(0, 479);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
51 pRenderer->DrawTextureTransparent(8, 8, pTexture_CurrentBook);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
52 pRenderer->DrawTextureTransparent(471, 445, pIcons_LOD->GetTexture(uExitCancelTextureId));
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
53
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
54 v6.uFrameX = game_viewport_x;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
55 v6.uFrameY = game_viewport_y;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
56 v6.uFrameWidth = game_viewport_width;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
57 v6.uFrameHeight = game_viewport_height;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
58 v6.uFrameZ = game_viewport_z;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
59 v6.uFrameW = game_viewport_w;
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1312
diff changeset
60
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
61 const uint fountain_bits_lut[] = {PARTY_QUEST_FOUNTAIN_HARMONDALE,
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
62 PARTY_QUEST_FOUNTAIN_PIERPONT,
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
63 PARTY_QUEST_FOUNTAIN_NIGHON,
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
64 PARTY_QUEST_FOUNTAIN_EVENMORN_ISLE,
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
65 PARTY_QUEST_FOUNTAIN_CELESTIA,
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
66 PARTY_QUEST_FOUNTAIN_THE_PIT};
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
67 for (uint i = 0; i < 6; ++i)
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
68 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
69
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
70 if (_449B57_test_bit(pParty->_quest_bits, fountain_bits_lut[i]))
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
71 pRenderer->DrawMaskToZBuffer(pTownPortalBook_xs[i],
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
72 pTownPortalBook_ys[i],
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
73 pTexture_TownPortalIcons[i], i + 1);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
74 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
75
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
76 pMouse->GetCursorPos(&a2);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
77 v3 = pRenderer->pActiveZBuffer[a2.x + pSRZBufferLineOffsets[a2.y]] & 0xFFFF;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
78
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
79 if (v3)
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
80 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
81 if (_449B57_test_bit(pParty->_quest_bits, fountain_bits_lut[v3 - 1]))
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
82 pRenderer->DrawTextureIndexed(pTownPortalBook_xs[v3 - 1], pTownPortalBook_ys[v3 - 1], pTexture_TownPortalIcons[v3 - 1]);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
83 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
84 v6.DrawTitleText(pBook2Font, 0, 22u, 0, pGlobalTXT_LocalizationStrings[10], 3u);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
85 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
86
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
87 //----- (00410DEC) --------------------------------------------------------
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
88 unsigned int __cdecl DrawLloydBeaconsScreen()
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
89 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
90 Player *pPlayer; // esi@1
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
91 char *v1; // eax@1
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
92 unsigned __int16 v2; // ax@6
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
93 unsigned int result; // eax@11
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
94 unsigned int v4; // esi@13
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
95 unsigned int v5; // ecx@13
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
96 char v6; // zf@13
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
97 LloydBeacon *v7; // esi@14
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
98 int v8; // eax@14
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
99 unsigned __int64 v9; // kr08_8@14
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
100 unsigned int v10; // esi@14
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
101 unsigned int v11; // eax@14
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
102 char *v12; // eax@19
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
103 char *v13; // ecx@22
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
104 int v14; // eax@27
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
105 Texture *v19; // [sp-4h] [bp-8Ch]@4
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
106 GUIWindow pWindow; // [sp+Ch] [bp-7Ch]@1
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
107 unsigned int v23; // [sp+64h] [bp-24h]@14
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
108 __int64 v24; // [sp+68h] [bp-20h]@14
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
109 unsigned int v25; // [sp+70h] [bp-18h]@13
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
110 char *Str; // [sp+74h] [bp-14h]@14
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
111 int v27; // [sp+78h] [bp-10h]@11
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
112 LloydBeacon *v28; // [sp+7Ch] [bp-Ch]@12
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
113 RGBTexture *v29; // [sp+80h] [bp-8h]@12
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
114 int uNumMaxBeacons; // [sp+84h] [bp-4h]@6
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
115
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
116 pPlayer = &pParty->pPlayers[_506348_current_lloyd_playerid];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
117 pRenderer->DrawTextureIndexed(8u, 8u, pTexture_LloydBeacons[(unsigned __int8)bRecallingBeacon]);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
118 v1 = pGlobalTXT_LocalizationStrings[523]; // Recall Beacon
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
119 pWindow.uFrameX = game_viewport_x;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
120 pWindow.uFrameY = game_viewport_y;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
121 pWindow.uFrameWidth = 428;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
122 pWindow.uFrameHeight = game_viewport_height;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
123 pWindow.uFrameZ = 435;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
124 pWindow.uFrameW = game_viewport_w;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
125 if ( !bRecallingBeacon )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
126 v1 = pGlobalTXT_LocalizationStrings[375]; // Set Beacon
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
127 sprintf(pTmpBuf.data(), "%s", v1);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
128 pWindow.DrawTitleText(pBook2Font, 0, 22u, 0, pTmpBuf.data(), 3u);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
129 if ( bRecallingBeacon )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
130 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
131 pRenderer->DrawTextureTransparent(pBtn_Book_1->uX, pBtn_Book_1->uY, pTex_tab_an_6b__zoom_on);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
132 v19 = pTex_tab_an_6a__zoom_off;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
133 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
134 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
135 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
136 pRenderer->DrawTextureTransparent(pBtn_Book_1->uX, pBtn_Book_1->uY, pTex_tab_an_6a__zoom_off);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
137 v19 = pTex_tab_an_6b__zoom_on;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
138 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
139 pRenderer->DrawTextureTransparent(pBtn_Book_2->uX, pBtn_Book_2->uY, v19);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
140 v2 = pPlayer->pActiveSkills[14];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
141 uNumMaxBeacons = 1;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
142 if ( HIBYTE(v2) & 1 || (v2 & 0x80u) != 0 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
143 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
144 uNumMaxBeacons = 5;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
145 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
146 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
147 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
148 if ( v2 & 0x40 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
149 uNumMaxBeacons = 3;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
150 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
151 result = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
152 v27 = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
153 if ( uNumMaxBeacons > 0 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
154 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
155 v29 = pSavegameThumbnails.data();
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
156 v28 = pPlayer->pInstalledBeacons;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
157 while ( 1 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
158 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
159 pWindow.uFrameWidth = 92;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
160 v4 = result;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
161 pWindow.uFrameHeight = 68;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
162 v5 = pLloydsBeaconsPreviewXs[result];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
163 pWindow.uFrameY = pLloydsBeaconsPreviewYs[result];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
164 v25 = pWindow.uFrameY;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
165 pWindow.uFrameX = v5;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
166 pWindow.uFrameW = pWindow.uFrameY + 67;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
167 v6 = v29->pPixels == 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
168 pWindow.uFrameZ = v5 + 91;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
169 if ( !v6 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
170 break;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
171 if ( !bRecallingBeacon )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
172 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
173 pRenderer->DrawTextureTransparent(pLloydsBeacons_SomeXs[v4], pLloydsBeacons_SomeYs[v4], pTexture_CurrentBook);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
174 v14 = pSpellFont->CalcTextHeight(pGlobalTXT_LocalizationStrings[19], &pWindow, 0, 0);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
175 pWindow.DrawTitleText(pSpellFont, 0, (signed int)pWindow.uFrameHeight / 2 - v14 / 2, 1, pGlobalTXT_LocalizationStrings[19], 3);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
176 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
177 LABEL_29:
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
178 ++v29;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
179 ++v28;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
180 result = v27++ + 1;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
181 if ( v27 >= uNumMaxBeacons )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
182 goto LABEL_30;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
183 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
184 pRenderer->DrawTextureTransparent(pLloydsBeacons_SomeXs[v4], pLloydsBeacons_SomeYs[v4], pTexture_CurrentBook);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
185 pRenderer->DrawTextureRGB(pLloydsBeaconsPreviewXs[v4], pLloydsBeaconsPreviewYs[v4], v29);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
186 v7 = v28;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
187 Str = pMapStats->pInfos[sub_410D99_get_map_index(HIWORD(v28->field_18))].pName;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
188 v8 = pSpellFont->CalcTextHeight(Str, &pWindow, 0, 0);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
189 pWindow.uFrameY += -6 - v8;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
190 pWindow.DrawTitleText(pSpellFont, 0, 0, 1u, Str, 3u);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
191 v9 = v7->uBeaconTime - pParty->uTimePlayed;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
192 LODWORD(v24) = LODWORD(v7->uBeaconTime) - LODWORD(pParty->uTimePlayed);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
193 HIDWORD(v24) = HIDWORD(v9);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
194 v23 = (unsigned __int64)((signed __int64)((double)v24 * 0.234375) / 60 / 60) >> 32;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
195 v10 = (signed __int64)((double)v24 * 0.234375) / 60 / 60;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
196 v11 = v10 / 0x18;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
197 if ( (unsigned int)((signed __int64)((double)v24 * 0.234375) / 60 / 60) / 0x18 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
198 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
199 v13 = pGlobalTXT_LocalizationStrings[57]; // Days
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
200 if ( v11 > 1 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
201 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
202 sprintf(pTmpBuf.data(), "%lu %s", v11 + 1, v13);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
203 pWindow.uFrameY = v25 + pWindow.uFrameHeight + 4;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
204 pWindow.DrawTitleText(pSpellFont, 0, 0, 1, pTmpBuf.data(), 3);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
205 goto LABEL_29;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
206 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
207 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
208 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
209 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
210 if ( (signed __int64)(__PAIR__(v23, v10) + 1) <= 23 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
211 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
212 if ( (v23 & 0x80000000u) != 0 || (signed int)v23 <= 0 && v10 <= 1 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
213 v12 = pGlobalTXT_LocalizationStrings[109];// Hour
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
214 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
215 v12 = pGlobalTXT_LocalizationStrings[110];// Hours
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
216 sprintf(pTmpBuf.data(), "%lu %s", v10 + 1, v12);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
217 pWindow.uFrameY = v25 + pWindow.uFrameHeight + 4;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
218 pWindow.DrawTitleText(pSpellFont, 0, 0, 1, pTmpBuf.data(), 3);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
219 goto LABEL_29;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
220 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
221 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
222 v13 = pGlobalTXT_LocalizationStrings[56]; // Day
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
223 sprintf(pTmpBuf.data(), "%lu %s", v11 + 1, v13);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
224 pWindow.uFrameY = v25 + pWindow.uFrameHeight + 4;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
225 pWindow.DrawTitleText(pSpellFont, 0, 0, 1, pTmpBuf.data(), 3);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
226 goto LABEL_29;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
227 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
228 LABEL_30:
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
229 if ( byte_506360 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
230 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
231 /*result = pMessageQueue_50CBD0->uNumMessages;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
232 if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
233 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
234 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].eType = UIMSG_CloseAfterInstallBeacon;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
235 pMessageQueue_50CBD0->pMessages[pMessageQueue_50CBD0->uNumMessages].param = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
236 result = 3 * pMessageQueue_50CBD0->uNumMessages + 3;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
237 *(&pMessageQueue_50CBD0->uNumMessages + result) = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
238 ++pMessageQueue_50CBD0->uNumMessages;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
239 }*/
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
240 pMessageQueue_50CBD0->AddMessage(UIMSG_CloseAfterInstallBeacon, 0, 0);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
241 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
242 return result;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
243 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
244
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
245
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
246 //----- (00413980) --------------------------------------------------------
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
247 void BookUI_Map_Draw()
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
248 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
249 int v6; // eax@31
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
250 unsigned int map_id; // eax@35
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
251 Texture *buttnTxtr; // [sp-4h] [bp-DCh]@3
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
252 char party_coord[120]; // [sp+Ch] [bp-CCh]@37
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
253 GUIWindow map_window; // [sp+84h] [bp-54h]@35
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
254 unsigned int textrX, textrY;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
255
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
256 pRenderer->DrawTextureIndexed(pViewport->uViewportTL_X, pViewport->uViewportTL_Y, pSpellBookPagesTextr_12);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
257 if ( BtnUp_flag || viewparams->field_2C / 128 >= 12 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
258 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
259 buttnTxtr = pTex_tab_an_6a__zoom_off;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
260 textrY = pViewport->uViewportTL_Y + 2;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
261 textrX = pViewport->uViewportTL_X + 408;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
262 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
263 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
264 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
265 buttnTxtr = pTex_tab_an_6b__zoom_on;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
266 textrY = pViewport->uViewportTL_Y + 1;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
267 textrX = pViewport->uViewportTL_X + 398;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
268 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
269 pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
270 if ( BtnDown_flag || viewparams->field_2C / 128 <= 3 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
271 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
272 buttnTxtr = pTex_tab_an_7a__zoot_off;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
273 textrY = pViewport->uViewportTL_Y + 38;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
274 textrX = pViewport->uViewportTL_X + 408;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
275 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
276 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
277 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
278 buttnTxtr = pTex_tab_an_7b__zoot_on;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
279 textrY = pViewport->uViewportTL_Y + 38;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
280 textrX = pViewport->uViewportTL_X + 398;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
281 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
282 pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
283 if ( Book_PageBtn3_flag )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
284 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
285 buttnTxtr = pTexture_506390;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
286 textrY = pViewport->uViewportTL_Y + 113;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
287 textrX = pViewport->uViewportTL_X + 408;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
288 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
289 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
290 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
291 buttnTxtr = pTexture_506394;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
292 textrY = pViewport->uViewportTL_Y + 113;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
293 textrX = pViewport->uViewportTL_X + 398;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
294 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
295 pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
296 if ( Book_PageBtn4_flag )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
297 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
298 buttnTxtr = pTexture_506388;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
299 textrY = pViewport->uViewportTL_X + 150;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
300 textrX = pViewport->uViewportTL_Y + 408;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
301 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
302 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
303 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
304 buttnTxtr = pTexture_50638C;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
305 textrY = pViewport->uViewportTL_X + 150;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
306 textrX = pViewport->uViewportTL_Y + 399;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
307 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
308 pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
309 if ( Book_PageBtn5_flag )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
310 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
311 buttnTxtr = pTexture_506380;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
312 textrY = pViewport->uViewportTL_Y + 188;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
313 textrX = pViewport->uViewportTL_X + 408;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
314 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
315 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
316 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
317 buttnTxtr = pTexture_506384;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
318 textrY = pViewport->uViewportTL_Y + 188;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
319 textrX = pViewport->uViewportTL_X + 397;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
320 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
321 pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
322 if ( Book_PageBtn6_flag )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
323 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
324 buttnTxtr = pTexture_506378;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
325 textrY = pViewport->uViewportTL_Y + 226;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
326 textrX = pViewport->uViewportTL_X + 408;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
327 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
328 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
329 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
330 buttnTxtr = pTexture_50637C;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
331 textrY = pViewport->uViewportTL_Y + 226;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
332 textrX = pViewport->uViewportTL_X + 397;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
333 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
334 pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
335 if ( BtnDown_flag )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
336 viewparams->CenterOnParty2();
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
337 if ( BtnUp_flag )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
338 viewparams->CenterOnParty();
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
339 if ( Book_PageBtn3_flag )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
340 viewparams->_443219();
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
341 if ( Book_PageBtn4_flag )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
342 viewparams->_443231();
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
343 if ( Book_PageBtn5_flag )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
344 viewparams->_44323D();
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
345 if ( Book_PageBtn6_flag )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
346 viewparams->_443225();
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
347
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
348 if ( BtnUp_flag | BtnDown_flag | Book_PageBtn3_flag | Book_PageBtn4_flag | Book_PageBtn5_flag | Book_PageBtn6_flag )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
349 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
350 BtnUp_flag = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
351 BtnDown_flag = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
352 Book_PageBtn6_flag = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
353 Book_PageBtn5_flag = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
354 Book_PageBtn4_flag = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
355 Book_PageBtn3_flag = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
356 DrawBook_Map_sub(97, 49, 361, 313, 0);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
357 pRenderer->DrawTextureTransparent(75, 22, pTexture_mapbordr);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
358 map_window.uFrameWidth = game_viewport_width;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
359 map_window.uFrameHeight = game_viewport_height;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
360 map_window.uFrameX = game_viewport_x;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
361 map_window.uFrameY = game_viewport_y;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
362 map_window.uFrameZ = game_viewport_z;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
363 map_window.uFrameW = game_viewport_w;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
364 map_id = pMapStats->GetMapInfo(pCurrentMapName.data());
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
365 if ( map_id )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
366 map_window.DrawTitleText(pBook2Font, -14, 12, ui_book_map_title_color, pMapStats->pInfos[map_id].pName, 3);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
367
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
368 map_window.uFrameX = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
369 sprintf(party_coord, pGlobalTXT_LocalizationStrings[659], pParty->vPosition.x, pParty->vPosition.y); //"x: %d y: %d"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
370 map_window.DrawTitleText(pFontComic, 0, 320, ui_book_map_coordinates_color, party_coord, 0);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
371 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
372
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
373 //----- (00442955) --------------------------------------------------------
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
374 void DrawBook_Map_sub( unsigned int tl_x, unsigned int tl_y, unsigned int br_x, int br_y, int _48074 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
375 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
376 int v5; // ebx@1
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
377 int v6; // edi@1
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
378 BLVMapOutlines *v7; // eax@8
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
379 unsigned __int8 v8; // zf@8
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
380 unsigned __int8 v9; // sf@8
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
381 int v10; // esi@10
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
382 unsigned int v11; // edx@11
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
383 __int16 v12; // cx@12
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
384 signed int v13; // eax@15
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
385 int v14; // eax@16
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
386 Vec3_short_ *v15; // ecx@16
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
387 int v16; // edx@16
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
388 int v17; // ecx@16
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
389 Vec3_short_ *v18; // eax@16
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
390 int v19; // ecx@16
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
391 int v20; // eax@16
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
392 signed int v21; // esi@18
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
393 int v22; // ecx@21
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
394 BLVMapOutline *v23; // ecx@21
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
395 Vec3_short_ *v24; // edx@21
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
396 Vec3_short_ *v25; // eax@21
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
397 int v26; // ecx@21
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
398 unsigned __int16 *v27; // edi@21
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
399 int v28; // edx@21
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
400 int v29; // eax@21
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
401 double v30; // st7@23
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
402 signed __int64 v31; // qax@23
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
403 unsigned short *v32; // edx@23
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
404 int textr_width; // esi@23
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
405 signed int v34; // eax@23
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
406 signed int v35; // ecx@23
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
407 int v36; // esi@27
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
408 int v37; // ecx@27
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
409 int v38; // edx@31
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
410 unsigned int v39; // eax@33
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
411 short *v40; // esi@33
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
412 short *v41; // edi@33
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
413 unsigned __int8 v42; // cf@33
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
414 unsigned int v43; // ecx@33
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
415 short *v44; // edi@33
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
416 short *v45; // esi@33
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
417 int v46; // ecx@33
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
418 signed int v47; // esi@38
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
419 signed int v48; // ecx@38
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
420 int v49; // eax@38
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
421 signed int v50; // edx@55
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
422 unsigned int v51; // ecx@55
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
423 int result; // eax@72
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
424 int v53; // eax@75
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
425 int v54; // esi@75
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
426 int v55; // eax@75
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
427 __int16 v56; // si@85
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
428 double v57; // st7@85
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
429 int v58; // ebx@85
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
430 signed __int64 v59; // qax@85
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
431 signed int v60; // edi@85
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
432 signed __int64 v61; // qax@85
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
433 signed int v62; // ebx@85
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
434 signed int v63; // esi@85
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
435 int v64; // eax@87
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
436 unsigned int v65; // ebx@95
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
437 unsigned short *v66; // edx@95
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
438 unsigned __int16 *v67; // esi@96
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
439 int v68; // edi@98
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
440 unsigned __int16 v69; // cx@99
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
441 unsigned int v70; // [sp-10h] [bp-48074h]@80
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
442 unsigned int v71; // [sp-Ch] [bp-48070h]@80
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
443 unsigned int v72; // [sp-8h] [bp-4806Ch]@80
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
444 signed int v73; // [sp-4h] [bp-48068h]@59
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
445 unsigned __int16 v74; // [sp-4h] [bp-48068h]@79
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
446 unsigned short map_texture_16[147456]; // [sp+Ch] [bp-48058h]@23
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
447 int v76; // [sp+4800Ch] [bp-58h]@23
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
448 unsigned __int16 *v77; // [sp+48010h] [bp-54h]@27
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
449 unsigned __int16 *pPalette_16; // [sp+48014h] [bp-50h]@23
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
450 unsigned int surfPitch; // [sp+48018h] [bp-4Ch]@1
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
451
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
452 int v81; // [sp+48020h] [bp-44h]@23
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
453 unsigned __int16* render16_data;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
454 unsigned char* texture8_data;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
455 unsigned char* curr_line;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
456 int scale_increment;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
457 int scaled_posX;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
458 int scaled_posY;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
459 int stepX_r;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
460 int stepY_r;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
461
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
462
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
463 unsigned int teal; // [sp+48028h] [bp-3Ch]@8
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
464 int v84; // [sp+4802Ch] [bp-38h]@1
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
465 int screenCenter_X; // [sp+48030h] [bp-34h]@1
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
466 int v86; // [sp+48034h] [bp-30h]@1
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
467 int v87; // [sp+48038h] [bp-2Ch]@16
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
468 unsigned int v88; // [sp+4803Ch] [bp-28h]@16
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
469 int black; // [sp+48040h] [bp-24h]@8
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
470 int screenCenterY; // [sp+48044h] [bp-20h]@1
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
471 unsigned int i; // [sp+48048h] [bp-1Ch]@9
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
472 unsigned int screenHeight; // [sp+4804Ch] [bp-18h]@16
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
473 unsigned __int16 *v93; // [sp+48050h] [bp-14h]@16
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
474 signed int screenWidth; // [sp+48054h] [bp-10h]@8
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
475 unsigned int v95; // [sp+48058h] [bp-Ch]@16
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
476 int v96; // [sp+4805Ch] [bp-8h]@10
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
477 const void *v97; // [sp+48060h] [bp-4h]@16
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
478 unsigned short *a4a; // [sp+4806Ch] [bp+8h]@85
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
479 int a5a; // [sp+48070h] [bp+Ch]@86
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
480
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
481 tl_x = tl_x;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
482 tl_y = tl_y;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
483 screenCenter_X = (signed int)(tl_x + br_x) >> 1;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
484 screenCenterY = (signed int)(tl_y + br_y) >> 1;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
485 surfPitch = pRenderer->uTargetSurfacePitch;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
486 pRenderer->SetRasterClipRect(tl_x, tl_y, br_x, br_y);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
487 v5 = viewparams->field_2C;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
488 v6 = viewparams->sViewCenterX;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
489 v86 = viewparams->sViewCenterX;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
490 v84 = viewparams->sViewCenterY;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
491 if ( viewparams->field_2C != 384 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
492 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
493 if ( viewparams->field_2C == 768 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
494 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
495 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor)
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
496 v5 = 680;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
497 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
498 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
499 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
500 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
501 v6 = viewparams->indoor_center_x;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
502 v86 = viewparams->indoor_center_x;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
503 v84 = viewparams->indoor_center_y;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
504 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor)
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
505 v5 = viewparams->field_2C - 34;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
506 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
507 if ( uCurrentlyLoadedLevelType != LEVEL_Indoor)
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
508 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
509 screenWidth = br_x - tl_x + 1;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
510 screenHeight = br_y - tl_y + 1;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
511 render16_data = &pRenderer->pTargetSurface[tl_x + tl_y * surfPitch];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
512 texture8_data = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].pLevelOfDetail0_prolly_alpha_mask;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
513 pPalette_16 = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].pPalette16;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
514 scale_increment = (1 << (pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].uWidthLn2 + 16)) / v5;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
515
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
516 v30 = (double)(1 << (16 - pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].uWidthLn2));
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
517
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
518
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
519 teal = (unsigned int)(signed __int64)((double)(v6 - 22528 / (v5 / 384) + 32768) / v30) << 16;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
520 // v97 = (const void *)((unsigned int)(signed __int64)((double)(v6 - 22528 / (v5 / 384) + 32768) / v30) << 16);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
521
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
522 // v32 = map_texture_16;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
523 textr_width = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].uTextureWidth;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
524 stepY_r = (int)(signed __int64)((double)(- v84 - 22528 / (v5 / 384)+ 32768) / v30) << 16;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
525 // v81 = (signed __int16)(signed __int64)((double)(v6 - 22528 / (v5 / 384) + 32768) / v30);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
526 black = (signed __int16)(signed __int64)((double)(v6 - 22528 / (v5 / 384) + 32768) / v30);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
527
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
528 // v76 = textr_width;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
529 scaled_posY = stepY_r >> 16;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
530 //nearest neiborhood scaling
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
531 if ( texture8_data)
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
532 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
533 for(uint i=0; i<screenHeight;++i)
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
534 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
535 curr_line=&texture8_data[scaled_posY*textr_width];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
536 stepX_r=teal;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
537 for(uint j=0; j<screenWidth;++j)
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
538 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
539 scaled_posX=stepX_r>>16;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
540 map_texture_16[i*screenWidth+j]=pPalette_16[*(curr_line+scaled_posX)];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
541 stepX_r+=scale_increment;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
542 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
543 stepY_r+=scale_increment;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
544 scaled_posY=stepY_r>>16;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
545 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
546 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
547 //move visible square to render
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
548 for(uint i=0; i<screenHeight;++i)
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
549 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
550 if ( screenWidth > 0 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
551 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
552 memcpy((void*)&render16_data[surfPitch*i],(void*)&map_texture_16[i*screenWidth], screenWidth*2);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
553 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
554 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
555 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
556 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
557 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
558 black = TargetColor(0, 0, 0);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
559 teal = TargetColor(0, 0xFFu, 0xFFu);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
560 v7 = pIndoor->pMapOutlines;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
561 uNumBlueFacesInBLVMinimap = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
562 v8 = pIndoor->pMapOutlines->uNumOutlines == 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
563 v9 = pIndoor->pMapOutlines->uNumOutlines < 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
564 screenWidth = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
565 if ( !(v9 | v8) )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
566 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
567 i = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
568 do
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
569 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
570 v10 = (int)((char *)v7 + i + 4);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
571 v96 = pIndoor->pFaces[*(short *)((char *)v7 + i + 8)].uAttributes;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
572 if ( !(BYTE1(v96) & 0x20 || (v11 = pIndoor->pFaces[*(short *)((char *)v7 + i + 10)].uAttributes, BYTE1(v11) & 0x20) ))
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
573 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
574 v12 = *(short *)((char *)v7 + i + 14);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
575 if ( !(v12 & 1) )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
576 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
577 if ( !(!(v96 & 0x80) && (v11 & 0x80u) == 0 ))
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
578 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
579 v96 = (signed int)screenWidth >> 3;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
580 v13 = screenWidth;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
581 *(short *)(v10 + 10) = v12 | 1;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
582 pIndoor->_visible_outlines[v96] |= 1 << (7 - v13 % 8);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
583 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
584 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
585 if ( (!(v12 & 1) && !(!(v96 & 0x80) && (v11 & 0x80u) == 0 )) || v12 & 1)
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
586 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
587 v14 = *(short *)v10;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
588 v88 = v5;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
589 v15 = &pIndoor->pVertices[v14];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
590 v16 = v15->x;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
591 v17 = v15->y - v84;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
592 v93 = (unsigned __int16 *)(v16 - v6);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
593 screenHeight = v17;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
594 v18 = &pIndoor->pVertices[*(short *)(v10 + 2)];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
595 v19 = v18->x;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
596 v20 = v18->y - v84;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
597 v95 = v19 - v6;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
598 v97 = (const void *)v20;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
599 v88 = (unsigned __int64)((v16 - v6) * (signed __int64)v5) >> 16;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
600 v87 = (unsigned __int64)((signed int)screenHeight * (signed __int64)v5) >> 16;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
601 v93 = (unsigned __int16 *)((unsigned __int64)((v19 - v6) * (signed __int64)v5) >> 16);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
602 screenHeight = (unsigned __int64)(v20 * (signed __int64)v5) >> 16;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
603 pRenderer->RasterLine2D(
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
604 screenCenter_X + v88,
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
605 screenCenterY - v87,
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
606 screenCenter_X + ((unsigned __int64)((v19 - v6) * (signed __int64)v5) >> 16),
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
607 screenCenterY - screenHeight,
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
608 black);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
609 v7 = pIndoor->pMapOutlines;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
610 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
611 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
612 ++screenWidth;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
613 i += 12;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
614 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
615 while ( screenWidth < (signed int)v7->uNumOutlines );
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
616 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
617 v21 = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
618 if ( (signed int)uNumBlueFacesInBLVMinimap > 0 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
619 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
620 while ( 1 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
621 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
622 v22 = pBlueFacesInBLVMinimapIDs[v21];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
623 v87 = v5;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
624 v23 = &v7->pOutlines[v22];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
625 v24 = &pIndoor->pVertices[v23->uVertex1ID];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
626 v25 = &pIndoor->pVertices[v23->uVertex2ID];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
627 v26 = v25->x;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
628 v27 = (unsigned __int16 *)(v24->x - v86);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
629 v28 = v24->y - v84;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
630 v29 = v25->y - v84;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
631 v93 = v27;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
632 screenHeight = v28;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
633 v97 = (const void *)v29;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
634 v87 = (unsigned __int64)((signed int)v27 * (signed __int64)v5) >> 16;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
635 v88 = (unsigned __int64)(v28 * (signed __int64)v5) >> 16;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
636 i = (unsigned __int64)((v26 - v86) * (signed __int64)v5) >> 16;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
637 v95 = (unsigned __int64)(v29 * (signed __int64)v5) >> 16;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
638 pRenderer->RasterLine2D(
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
639 screenCenter_X + ((unsigned __int64)((signed int)v27 * (signed __int64)v5) >> 16),
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
640 screenCenterY - v88,
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
641 screenCenter_X + ((unsigned __int64)((v26 - v86) * (signed __int64)v5) >> 16),
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
642 screenCenterY - v95,
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
643 teal);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
644 ++v21;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
645 if ( v21 >= (signed int)uNumBlueFacesInBLVMinimap )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
646 break;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
647 v7 = pIndoor->pMapOutlines;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
648 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
649 v6 = v86;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
650 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
651 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
652 v47 = ((unsigned __int64)((pParty->vPosition.x - v6) * (signed __int64)v5) >> 16) + screenCenter_X - 3;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
653 v81 = pParty->vPosition.y - v84;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
654 v97 = (const void *)((unsigned __int64)((pParty->vPosition.y - v84) * (signed __int64)v5) >> 16);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
655 v48 = 1;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
656 v49 = screenCenterY - (int)v97 - 3;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
657 if ( v47 >= (signed int)tl_x )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
658 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
659 if ( v47 > (signed int)br_x )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
660 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
661 if ( (signed int)(((unsigned __int64)((pParty->vPosition.x - v6) * (signed __int64)v5) >> 16) + screenCenter_X - 6) > (signed int)br_x )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
662 v48 = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
663 v47 = br_x;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
664 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
665 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
666 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
667 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
668 if ( (signed int)(((unsigned __int64)((pParty->vPosition.x - v6) * (signed __int64)v5) >> 16) + screenCenter_X) < (signed int)tl_x )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
669 v48 = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
670 v47 = tl_x;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
671 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
672 if ( v49 >= (signed int)tl_y )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
673 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
674 if ( v49 > br_y )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
675 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
676 if ( screenCenterY - (signed int)v97 - 6 > br_y )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
677 v48 = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
678 v49 = br_y;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
679 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
680 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
681 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
682 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
683 if ( screenCenterY - (signed int)v97 < (signed int)tl_y )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
684 v48 = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
685 v49 = tl_y;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
686 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
687 if ( v48 == 1 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
688 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
689 v50 = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
690 v51 = pParty->sRotationY & stru_5C6E00->uDoublePiMask;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
691 if ( (signed int)(pParty->sRotationY & stru_5C6E00->uDoublePiMask) >= 128 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
692 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
693 if ( (signed int)v51 > 384 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
694 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
695 if ( (signed int)v51 >= 640 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
696 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
697 if ( (signed int)v51 > 896 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
698 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
699 if ( (signed int)v51 >= 1152 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
700 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
701 if ( (signed int)v51 > 1408 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
702 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
703 if ( (signed int)v51 >= 1664 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
704 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
705 if ( (signed int)v51 <= 1920 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
706 v73 = 7;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
707 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
708 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
709 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
710 v73 = 6;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
711 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
712 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
713 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
714 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
715 v73 = 5;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
716 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
717 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
718 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
719 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
720 v73 = 4;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
721 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
722 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
723 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
724 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
725 v73 = 3;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
726 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
727 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
728 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
729 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
730 v73 = 2;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
731 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
732 if( (signed int)v51 <=1920)
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
733 v50 = v73;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
734 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
735 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
736 v50 = 1;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
737 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
738 pRenderer->DrawTransparentRedShade(v47, v49, pIcons_LOD->GetTexture(pTextureIDs_pMapDirs[v50]));
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
739 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
740 result = TargetColor(0xFFu, 0xFFu, 0xFFu);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
741 v95 = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
742 v86 = result;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
743 if ( (signed int)uNumLevelDecorations > 0 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
744 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
745 screenWidth = (unsigned int)&pLevelDecorations[0].vPosition;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
746 do
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
747 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
748 if ( *(char *)(screenWidth - 2) & 8 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
749 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
750 v53 = *(int *)(screenWidth + 4) - v84;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
751 v93 = (unsigned __int16 *)(*(int *)screenWidth - v6);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
752 screenHeight = v53;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
753 v54 = ((unsigned __int64)((signed int)v93 * (signed __int64)v5) >> 16) + screenCenter_X;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
754 v97 = (const void *)((unsigned __int64)(v53 * (signed __int64)v5) >> 16);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
755 v55 = screenCenterY - (int)v97;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
756 if ( v54 >= pRenderer->raster_clip_x )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
757 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
758 if ( v54 <= pRenderer->raster_clip_z && v55 >= pRenderer->raster_clip_y && v55 <= pRenderer->raster_clip_w )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
759 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
760 v74 = v86;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
761 if ( v5 > 512 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
762 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
763 v96 = v55 + 1;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
764 black = v55 - 1;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
765 pRenderer->RasterLine2D(v54 - 1, v55 - 1, v54 - 1, v55 + 1, v86);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
766 pRenderer->RasterLine2D(v54, black, v54, v96, v86);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
767 ++v54;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
768 v74 = v86;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
769 v72 = v96;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
770 v71 = v54;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
771 v70 = black;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
772 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
773 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
774 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
775 v72 = screenCenterY - (int)v97;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
776 v71 = ((unsigned __int64)((signed int)v93 * (signed __int64)v5) >> 16) + screenCenter_X;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
777 v70 = screenCenterY - (int)v97;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
778 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
779 pRenderer->RasterLine2D(v54, v70, v71, v72, v74);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
780 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
781 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
782 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
783 ++v95;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
784 result = v95;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
785 screenWidth += 32;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
786 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
787 while ( (signed int)v95 < (signed int)uNumLevelDecorations );
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
788 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
789 if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor)
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
790 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
791 screenCenterY = br_x - tl_x + 1;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
792 v95 = br_y - tl_y + 1;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
793 v77 = &pRenderer->pTargetSurface[tl_x + tl_y * surfPitch];
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
794 v56 = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].uWidthLn2;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
795 black = (1 << (v56 + 16)) / v5;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
796 v57 = (double)(1 << (16 - v56));
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
797 v58 = 22528 / (v5 / 384);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
798 v59 = (signed __int64)((double)(v6 - v58 + 32768) / v57);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
799 v60 = (int)v59 << 16;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
800 v97 = (const void *)((int)v59 << 16);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
801 v61 = (signed __int64)((double)(32768 - v58 - v84) / v57);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
802 pPalette_16 = (unsigned __int16 *)(v60 >> 16);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
803 v62 = (int)v61 << 16;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
804 teal = v60 >> 16;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
805 v63 = (signed __int16)v61;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
806 a4a = map_texture_16;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
807 result = TargetColor(0xCu, 0xCu, 0xCu);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
808 screenCenter_X = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
809 for ( i = result; screenCenter_X < (signed int)v95; result = screenCenter_X )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
810 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
811 a5a = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
812 if ( screenCenterY > 0 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
813 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
814 v96 = (v63 - 80) / 4;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
815 v64 = teal;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
816 do
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
817 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
818 v81 = (v64 - 80) / 4;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
819 if ( !pOutdoor->_47F04C(v81, v96) )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
820 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
821 if ( pOutdoor->_47F097(v81, v96) )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
822 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
823 if ( !((a5a + screenCenter_X) % 2) )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
824 *a4a = i;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
825 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
826 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
827 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
828 *a4a = 0;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
829 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
830 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
831 ++a4a;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
832 v97 = (char *)v97 + black;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
833 v64 = (signed int)v97 >> 16;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
834 ++a5a;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
835 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
836 while ( a5a < screenCenterY );
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
837 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
838 v62 += black;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
839 v97 = (const void *)v60;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
840 a4a += screenCenterY - a5a;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
841 v63 = v62 >> 16;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
842 ++screenCenter_X;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
843 teal = (unsigned int)pPalette_16;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
844 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
845 v65 = v95;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
846 v66 = map_texture_16;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
847 if ( (signed int)v95 > 0 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
848 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
849 v67 = v77;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
850 result = 2 * (surfPitch - screenCenterY);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
851 do
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
852 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
853 if ( screenCenterY > 0 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
854 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
855 v68 = screenCenterY;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
856 do
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
857 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
858 v69 = *(short *)v66;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
859 if ( !*(short *)v66 || v69 == (short)i )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
860 *v67 = v69;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
861 ++v66;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
862 ++v67;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
863 --v68;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
864 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
865 while ( v68 );
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
866 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
867 v67 = (unsigned __int16 *)((char *)v67 + result);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
868 --v65;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
869 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
870 while ( v65 );
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
871 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
872 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
873 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
874
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
875