annotate UI/Books/UIMapBook.cpp @ 1442:c3bfa7e7cee1

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