annotate UI/Books/UIMapBook.cpp @ 1444:7b1a94270756

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