annotate UI/Books/UIMapBook.cpp @ 1430:71a2cf416478

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