annotate UI/Books/UIMapBook.cpp @ 2343:5d263539bbec

Moving functions from unsorted_subs.h pt5
author Grumpy7
date Sun, 06 Apr 2014 21:12:24 +0200
parents d6887ee81068
children 7ebc07cd6c53
rev   line source
2253
aff7a7b072b7 adding _CRT_SECURE_NO_WARNINGS to get rid of a few hundrer annoying warnings + adding count parameter to swprintf
Grumpy7
parents: 2198
diff changeset
1 #define _CRT_SECURE_NO_WARNINGS
2343
5d263539bbec Moving functions from unsorted_subs.h pt5
Grumpy7
parents: 2336
diff changeset
2 #include "..\..\Events.h"
2336
d6887ee81068 header file include cleanup
Grumpy7
parents: 2334
diff changeset
3 #include "..\..\mm7_unsorted_subs.h"
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
4 #include "..\..\MM7.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
5 #include "..\..\Render.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
6 #include "..\..\Mouse.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
7 #include "..\UIBooks.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
8 #include "..\..\MapInfo.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
9 #include "..\..\GUIWindow.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
10 #include "..\..\GUIFont.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
11 #include "..\..\Party.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
12 #include "..\..\AudioPlayer.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
13 #include "..\..\Outdoor.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
14 #include "..\..\LOD.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
15 #include "..\..\Viewport.h"
2037
7a9477135943 Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Nomad
parents: 1838
diff changeset
16 #include "..\..\OurMath.h"
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
17 #include "..\..\texts.h"
1828
35c1e4ff6ba7 party_finds_gold to Party::PartyFindsGold, cleaned up, moved Level/Decoration.h reference out of Indoor.h
Grumpy7
parents: 1730
diff changeset
18 #include "..\..\Level/Decoration.h"
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
19 //
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
20 #include "..\..\mm7_data.h"
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
21
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
22 std::array<__int16, 6> pTownPortalBook_xs = {{260, 324, 147, 385, 390, 19}};
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
23 std::array<__int16, 6> pTownPortalBook_ys = {{206, 84, 182, 239, 17, 283}};
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<unsigned int, 5> pLloydsBeaconsPreviewXs = {{61, 281, 61, 281, 171}}; // 004E249C
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
26 std::array<unsigned int, 5> pLloydsBeaconsPreviewYs = {{84, 84, 228, 228, 155}};
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
27 std::array<unsigned int, 5> pLloydsBeacons_SomeXs = {{59, 279, 59, 279, 169}};
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
28 std::array<unsigned int, 5> pLloydsBeacons_SomeYs = {{82, 82, 226, 226, 153}};
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
29
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
30
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
31
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
32
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
33 //----- (00411150) --------------------------------------------------------
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
34 void BookUI_DrawTownPortalMap()
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
35 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
36 int v3; // edi@17
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
37 GUIWindow TownPortalWindow; // [sp+Ch] [bp-64h]@1
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
38 POINT a2; // [sp+68h] [bp-8h]@17
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
39
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
40 pRenderer->ClearZBuffer(0, 479);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
41 pRenderer->DrawTextureTransparent(8, 8, pTexture_CurrentBook);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
42 pRenderer->DrawTextureTransparent(471, 445, pIcons_LOD->GetTexture(uExitCancelTextureId));
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
43
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
44 TownPortalWindow.uFrameX = game_viewport_x;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
45 TownPortalWindow.uFrameY = game_viewport_y;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
46 TownPortalWindow.uFrameWidth = game_viewport_width;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
47 TownPortalWindow.uFrameHeight = game_viewport_height;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
48 TownPortalWindow.uFrameZ = game_viewport_z;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
49 TownPortalWindow.uFrameW = game_viewport_w;
1393
28f87f5234a1 More hardcoded UI colors moved to varibables.
Nomad
parents: 1312
diff changeset
50
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
51 const uint fountain_bits_lut[] = {PARTY_QUEST_FOUNTAIN_HARMONDALE,
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
52 PARTY_QUEST_FOUNTAIN_PIERPONT,
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
53 PARTY_QUEST_FOUNTAIN_NIGHON,
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
54 PARTY_QUEST_FOUNTAIN_EVENMORN_ISLE,
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
55 PARTY_QUEST_FOUNTAIN_CELESTIA,
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
56 PARTY_QUEST_FOUNTAIN_THE_PIT};
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
57 for (uint i = 0; i < 6; ++i)
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
58 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
59
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
60 if (_449B57_test_bit(pParty->_quest_bits, fountain_bits_lut[i]))
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
61 pRenderer->DrawMaskToZBuffer(pTownPortalBook_xs[i],
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
62 pTownPortalBook_ys[i],
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
63 pTexture_TownPortalIcons[i], i + 1);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
64 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
65
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
66 pMouse->GetCursorPos(&a2);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
67 v3 = pRenderer->pActiveZBuffer[a2.x + pSRZBufferLineOffsets[a2.y]] & 0xFFFF;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
68
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
69 if (v3)
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
70 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
71 if (_449B57_test_bit(pParty->_quest_bits, fountain_bits_lut[v3 - 1]))
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
72 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
73 }
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
74 TownPortalWindow.DrawTitleText(pBook2Font, 0, 22, 0, pGlobalTXT_LocalizationStrings[10], 3);
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
75 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
76
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
77 //----- (00410DEC) --------------------------------------------------------
1458
934074e7fcc1 ModalWindow
Nomad
parents: 1453
diff changeset
78 unsigned int DrawLloydBeaconsScreen()
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
79 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
80 Player *pPlayer; // esi@1
1838
211dfe2d8db1 changing global char* vars to const char* vars
Grumpy7
parents: 1828
diff changeset
81 const char *pText; // eax@1
1430
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
82 int pTextHeight; // eax@14
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
83 int RemainingTime; // kr08_8@14
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
84 unsigned int pHours; // esi@14
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
85 unsigned int pDays; // eax@14
1838
211dfe2d8db1 changing global char* vars to const char* vars
Grumpy7
parents: 1828
diff changeset
86 const char *pSelectionText; // eax@19
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
87 Texture *v19; // [sp-4h] [bp-8Ch]@4
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
88 GUIWindow pWindow; // [sp+Ch] [bp-7Ch]@1
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
89 char *Str; // [sp+74h] [bp-14h]@14
1430
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
90 int BeaconID; // [sp+78h] [bp-10h]@11
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
91 int uNumMaxBeacons; // [sp+84h] [bp-4h]@6
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
92
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
93 pPlayer = &pParty->pPlayers[_506348_current_lloyd_playerid];
1430
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
94 pRenderer->DrawTextureIndexed(8, 8, pTexture_LloydBeacons[(unsigned __int8)bRecallingBeacon]);
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
95 pText = pGlobalTXT_LocalizationStrings[523]; // Recall Beacon
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
96 pWindow.uFrameX = game_viewport_x;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
97 pWindow.uFrameY = game_viewport_y;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
98 pWindow.uFrameWidth = 428;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
99 pWindow.uFrameHeight = game_viewport_height;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
100 pWindow.uFrameZ = 435;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
101 pWindow.uFrameW = game_viewport_w;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
102 if ( !bRecallingBeacon )
1430
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
103 pText = pGlobalTXT_LocalizationStrings[375]; // Set Beacon
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
104 sprintf(pTmpBuf.data(), "%s", pText);
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
105 pWindow.DrawTitleText(pBook2Font, 0, 22, 0, pTmpBuf.data(), 3);
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
106 if ( bRecallingBeacon )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
107 {
1453
dfc9484ed94c GetDayPart and Journal_Draw
Ritor1
parents: 1446
diff changeset
108 pRenderer->DrawTextureTransparent(pBtn_Book_1->uX, pBtn_Book_1->uY, pTex_book_button1_on);
dfc9484ed94c GetDayPart and Journal_Draw
Ritor1
parents: 1446
diff changeset
109 v19 = pTex_book_button1_off;
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
110 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
111 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
112 {
1453
dfc9484ed94c GetDayPart and Journal_Draw
Ritor1
parents: 1446
diff changeset
113 pRenderer->DrawTextureTransparent(pBtn_Book_1->uX, pBtn_Book_1->uY, pTex_book_button1_off);
dfc9484ed94c GetDayPart and Journal_Draw
Ritor1
parents: 1446
diff changeset
114 v19 = pTex_book_button1_on;
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
115 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
116 pRenderer->DrawTextureTransparent(pBtn_Book_2->uX, pBtn_Book_2->uY, v19);
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
117 uNumMaxBeacons = 1;
2197
42c8807225a2 UIMSG_SpellBook_PressTab continue
Ritor1
parents: 2169
diff changeset
118 if ( HIBYTE(pPlayer->pActiveSkills[PLAYER_SKILL_WATER]) & 1 || (pPlayer->pActiveSkills[PLAYER_SKILL_WATER] & 0x80u) != 0 )
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
119 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
120 uNumMaxBeacons = 5;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
121 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
122 else
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
123 {
2197
42c8807225a2 UIMSG_SpellBook_PressTab continue
Ritor1
parents: 2169
diff changeset
124 if ( pPlayer->pActiveSkills[PLAYER_SKILL_WATER] & 0x40 )
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
125 uNumMaxBeacons = 3;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
126 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
127 if ( uNumMaxBeacons > 0 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
128 {
1430
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
129 for ( BeaconID = 0; BeaconID < uNumMaxBeacons; BeaconID++ )
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
130 {
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
131 pWindow.uFrameWidth = 92;
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
132 pWindow.uFrameHeight = 68;
1430
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
133 pWindow.uFrameY = pLloydsBeaconsPreviewYs[BeaconID];
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
134 pWindow.uFrameX = pLloydsBeaconsPreviewXs[BeaconID];
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
135 pWindow.uFrameW = pWindow.uFrameY + 67;
1430
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
136 pWindow.uFrameZ = pLloydsBeaconsPreviewXs[BeaconID] + 91;
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
137 //if ( pSavegameThumbnails[BeaconID].pPixels != 0 )
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
138 if ( pPlayer->pInstalledBeacons[BeaconID].SaveFileID != 0 )
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
139 {
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
140 pRenderer->DrawTextureTransparent(pLloydsBeacons_SomeXs[BeaconID], pLloydsBeacons_SomeYs[BeaconID], pTexture_CurrentBook);
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
141 pRenderer->DrawTextureRGB(pLloydsBeaconsPreviewXs[BeaconID], pLloydsBeaconsPreviewYs[BeaconID], &pSavegameThumbnails[BeaconID]);
2259
43a508455445 Adding MapInfo.cpp, moving a few functions there
Grumpy7
parents: 2253
diff changeset
142 Str = pMapStats->pInfos[pMapStats->sub_410D99_get_map_index(pPlayer->pInstalledBeacons[BeaconID].SaveFileID)].pName;
1430
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
143 pTextHeight = pSpellFont->CalcTextHeight(Str, &pWindow, 0, 0);
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
144 pWindow.uFrameY += -6 - pTextHeight;
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
145 pWindow.DrawTitleText(pSpellFont, 0, 0, 1, Str, 3);
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
146 RemainingTime = pPlayer->pInstalledBeacons[BeaconID].uBeaconTime - pParty->uTimePlayed;
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
147 pHours = (signed __int64)((double)RemainingTime * 0.234375) / 60 / 60;
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
148 pDays = pHours / 24;
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
149 if ( pDays )
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
150 {
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
151 sprintf(pTmpBuf.data(), "%lu %s", pDays + 1, pGlobalTXT_LocalizationStrings[57]);//days
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
152 pWindow.uFrameY = pWindow.uFrameY + pWindow.uFrameHeight + 4;
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
153 pWindow.DrawTitleText(pSpellFont, 0, 0, 1, pTmpBuf.data(), 3);
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
154 continue;
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
155 }
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
156 else
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
157 {
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
158 if ( pHours + 1 <= 23 )
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
159 {
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
160 if ( pHours < 1 )
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
161 pSelectionText = pGlobalTXT_LocalizationStrings[109];// Hour
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
162 else
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
163 pSelectionText = pGlobalTXT_LocalizationStrings[110];// Hours
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
164 sprintf(pTmpBuf.data(), "%lu %s", pHours + 1, pSelectionText);
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
165 pWindow.uFrameY = pWindow.uFrameY + pWindow.uFrameHeight + 4;
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
166 pWindow.DrawTitleText(pSpellFont, 0, 0, 1, pTmpBuf.data(), 3);
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
167 continue;
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
168 }
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
169 }
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
170 sprintf(pTmpBuf.data(), "%lu %s", pDays + 1, pGlobalTXT_LocalizationStrings[56]);//Day
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
171 pWindow.uFrameY = pWindow.uFrameY + pWindow.uFrameHeight + 4;
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
172 pWindow.DrawTitleText(pSpellFont, 0, 0, 1, pTmpBuf.data(), 3);
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
173 continue;
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
174 }
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
175 if ( !bRecallingBeacon )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
176 {
1430
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
177 pRenderer->DrawTextureTransparent(pLloydsBeacons_SomeXs[BeaconID], pLloydsBeacons_SomeYs[BeaconID], pTexture_CurrentBook);
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
178 pTextHeight = pSpellFont->CalcTextHeight(pGlobalTXT_LocalizationStrings[19], &pWindow, 0, 0);
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
179 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
180 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
181 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
182 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
183 if ( byte_506360 )
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
184 pMessageQueue_50CBD0->AddMessage(UIMSG_CloseAfterInstallBeacon, 0, 0);
1430
71a2cf416478 LloydBeacons
Ritor1
parents: 1393
diff changeset
185 return BeaconID;
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
186 }
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
187
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
188 //----- (00413980) --------------------------------------------------------
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
189 void BookUI_Map_Draw()
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
190 {
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
191 unsigned int map_id; // eax@35
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
192 char party_coord[120]; // [sp+Ch] [bp-CCh]@37
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
193 GUIWindow map_window; // [sp+84h] [bp-54h]@35
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
194
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
195 pRenderer->DrawTextureIndexed(pViewport->uViewportTL_X, pViewport->uViewportTL_Y, pSpellBookPagesTextr_12);
1720
Ritor1
parents: 1583
diff changeset
196 if ( BtnUp_flag || viewparams->uMapBookMapZoom / 128 >= 12 )//Button 1
1453
dfc9484ed94c GetDayPart and Journal_Draw
Ritor1
parents: 1446
diff changeset
197 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 2, pTex_book_button1_off);
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
198 else
1453
dfc9484ed94c GetDayPart and Journal_Draw
Ritor1
parents: 1446
diff changeset
199 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 1, pTex_book_button1_on);
dfc9484ed94c GetDayPart and Journal_Draw
Ritor1
parents: 1446
diff changeset
200
1720
Ritor1
parents: 1583
diff changeset
201 if ( BtnDown_flag || viewparams->uMapBookMapZoom / 128 <= 3 )//Button 2
1453
dfc9484ed94c GetDayPart and Journal_Draw
Ritor1
parents: 1446
diff changeset
202 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 38, pTex_book_button2_off);
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
203 else
1453
dfc9484ed94c GetDayPart and Journal_Draw
Ritor1
parents: 1446
diff changeset
204 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 38, pTex_book_button2_on);
dfc9484ed94c GetDayPart and Journal_Draw
Ritor1
parents: 1446
diff changeset
205
dfc9484ed94c GetDayPart and Journal_Draw
Ritor1
parents: 1446
diff changeset
206 if ( Book_PageBtn3_flag )//Button 3
dfc9484ed94c GetDayPart and Journal_Draw
Ritor1
parents: 1446
diff changeset
207 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 113, pTex_book_button3_off);
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
208 else
1453
dfc9484ed94c GetDayPart and Journal_Draw
Ritor1
parents: 1446
diff changeset
209 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 398, pViewport->uViewportTL_Y + 113, pTex_book_button3_on);
dfc9484ed94c GetDayPart and Journal_Draw
Ritor1
parents: 1446
diff changeset
210
dfc9484ed94c GetDayPart and Journal_Draw
Ritor1
parents: 1446
diff changeset
211 if ( Book_PageBtn4_flag )//Button 4
dfc9484ed94c GetDayPart and Journal_Draw
Ritor1
parents: 1446
diff changeset
212 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 150, pTex_book_button4_off);
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
213 else
1453
dfc9484ed94c GetDayPart and Journal_Draw
Ritor1
parents: 1446
diff changeset
214 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 399, pViewport->uViewportTL_Y + 150, pTex_book_button4_on);
dfc9484ed94c GetDayPart and Journal_Draw
Ritor1
parents: 1446
diff changeset
215
dfc9484ed94c GetDayPart and Journal_Draw
Ritor1
parents: 1446
diff changeset
216 if ( Book_PageBtn5_flag )//Button 5
dfc9484ed94c GetDayPart and Journal_Draw
Ritor1
parents: 1446
diff changeset
217 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 188, pTex_book_button5_off);
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
218 else
1453
dfc9484ed94c GetDayPart and Journal_Draw
Ritor1
parents: 1446
diff changeset
219 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 188, pTex_book_button5_on);
dfc9484ed94c GetDayPart and Journal_Draw
Ritor1
parents: 1446
diff changeset
220
dfc9484ed94c GetDayPart and Journal_Draw
Ritor1
parents: 1446
diff changeset
221 if ( Book_PageBtn6_flag )//Button 6
dfc9484ed94c GetDayPart and Journal_Draw
Ritor1
parents: 1446
diff changeset
222 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 408, pViewport->uViewportTL_Y + 226, pTex_book_button6_off);
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
223 else
1453
dfc9484ed94c GetDayPart and Journal_Draw
Ritor1
parents: 1446
diff changeset
224 pRenderer->DrawTextureTransparent(pViewport->uViewportTL_X + 397, pViewport->uViewportTL_Y + 226, pTex_book_button6_on);
dfc9484ed94c GetDayPart and Journal_Draw
Ritor1
parents: 1446
diff changeset
225
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
226 if ( BtnDown_flag )
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
227 viewparams->CenterOnParty2();
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
228 if ( BtnUp_flag )
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
229 viewparams->CenterOnParty();
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
230 if ( Book_PageBtn3_flag )
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
231 viewparams->_443219();
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
232 if ( Book_PageBtn4_flag )
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
233 viewparams->_443231();
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
234 if ( Book_PageBtn5_flag )
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
235 viewparams->_44323D();
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
236 if ( Book_PageBtn6_flag )
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
237 viewparams->_443225();
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
238
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
239 if ( BtnUp_flag | BtnDown_flag | Book_PageBtn3_flag | Book_PageBtn4_flag | Book_PageBtn5_flag | Book_PageBtn6_flag )
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
240 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0);
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
241 BtnUp_flag = 0;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
242 BtnDown_flag = 0;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
243 Book_PageBtn6_flag = 0;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
244 Book_PageBtn5_flag = 0;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
245 Book_PageBtn4_flag = 0;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
246 Book_PageBtn3_flag = 0;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
247 DrawBook_Map_sub(97, 49, 361, 313, 0);
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
248 pRenderer->DrawTextureTransparent(75, 22, pTexture_mapbordr);
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
249 map_window.uFrameWidth = game_viewport_width;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
250 map_window.uFrameHeight = game_viewport_height;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
251 map_window.uFrameX = game_viewport_x;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
252 map_window.uFrameY = game_viewport_y;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
253 map_window.uFrameZ = game_viewport_z;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
254 map_window.uFrameW = game_viewport_w;
1477
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1458
diff changeset
255 map_id = pMapStats->GetMapInfo(pCurrentMapName);
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
256 if ( map_id )
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
257 map_window.DrawTitleText(pBook2Font, -14, 12, ui_book_map_title_color, pMapStats->pInfos[map_id].pName, 3);
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
258
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
259 map_window.uFrameX = 0;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
260 sprintf(party_coord, pGlobalTXT_LocalizationStrings[659], pParty->vPosition.x, pParty->vPosition.y); //"x: %d y: %d"
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
261 map_window.DrawTitleText(pFontComic, 0, 320, ui_book_map_coordinates_color, party_coord, 0);
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
262 }
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
263
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
264 //----- (00442955) --------------------------------------------------------
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
265 void DrawBook_Map_sub( unsigned int tl_x, unsigned int tl_y, unsigned int br_x, int br_y, int _48074 )
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
266 {
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
267 int v20; // eax@16
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
268 int v26; // ecx@21
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
269 unsigned __int16 *v27; // edi@21
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
270 int v28; // edx@21
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
271 int v29; // eax@21
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
272 double v30; // st7@23
2334
ddb803517a48 unused local variables I commented
Ritor1
parents: 2259
diff changeset
273 // signed __int64 v31; // qax@23
ddb803517a48 unused local variables I commented
Ritor1
parents: 2259
diff changeset
274 // unsigned short *v32; // edx@23
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
275 int textr_width; // esi@23
2334
ddb803517a48 unused local variables I commented
Ritor1
parents: 2259
diff changeset
276 // signed int v34; // eax@23
ddb803517a48 unused local variables I commented
Ritor1
parents: 2259
diff changeset
277 // signed int v35; // ecx@23
ddb803517a48 unused local variables I commented
Ritor1
parents: 2259
diff changeset
278 // int v36; // esi@27
ddb803517a48 unused local variables I commented
Ritor1
parents: 2259
diff changeset
279 // int v37; // ecx@27
ddb803517a48 unused local variables I commented
Ritor1
parents: 2259
diff changeset
280 // int v38; // edx@31
ddb803517a48 unused local variables I commented
Ritor1
parents: 2259
diff changeset
281 // unsigned int v39; // eax@33
ddb803517a48 unused local variables I commented
Ritor1
parents: 2259
diff changeset
282 // short *v40; // esi@33
ddb803517a48 unused local variables I commented
Ritor1
parents: 2259
diff changeset
283 // short *v41; // edi@33
ddb803517a48 unused local variables I commented
Ritor1
parents: 2259
diff changeset
284 // unsigned __int8 v42; // cf@33
ddb803517a48 unused local variables I commented
Ritor1
parents: 2259
diff changeset
285 // unsigned int v43; // ecx@33
ddb803517a48 unused local variables I commented
Ritor1
parents: 2259
diff changeset
286 // short *v44; // edi@33
ddb803517a48 unused local variables I commented
Ritor1
parents: 2259
diff changeset
287 // short *v45; // esi@33
ddb803517a48 unused local variables I commented
Ritor1
parents: 2259
diff changeset
288 // int v46; // ecx@33
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
289 signed int v47; // esi@38
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
290 signed int v48; // ecx@38
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
291 int v49; // eax@38
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
292 signed int v50; // edx@55
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
293 unsigned int v51; // ecx@55
2334
ddb803517a48 unused local variables I commented
Ritor1
parents: 2259
diff changeset
294 // int result; // eax@72
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
295 int v54; // esi@75
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
296 int v55; // eax@75
2334
ddb803517a48 unused local variables I commented
Ritor1
parents: 2259
diff changeset
297 // __int16 v56; // si@85
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
298 double v57; // st7@85
2334
ddb803517a48 unused local variables I commented
Ritor1
parents: 2259
diff changeset
299 // int v58; // ebx@85
ddb803517a48 unused local variables I commented
Ritor1
parents: 2259
diff changeset
300 // signed __int64 v59; // qax@85
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
301 signed int v60; // edi@85
2334
ddb803517a48 unused local variables I commented
Ritor1
parents: 2259
diff changeset
302 // signed __int64 v61; // qax@85
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
303 signed int v62; // ebx@85
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
304 signed int v63; // esi@85
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
305 int v64; // eax@87
2334
ddb803517a48 unused local variables I commented
Ritor1
parents: 2259
diff changeset
306 // unsigned int v65; // ebx@95
ddb803517a48 unused local variables I commented
Ritor1
parents: 2259
diff changeset
307 // unsigned short *v66; // edx@95
ddb803517a48 unused local variables I commented
Ritor1
parents: 2259
diff changeset
308 // unsigned __int16 *v67; // esi@96
ddb803517a48 unused local variables I commented
Ritor1
parents: 2259
diff changeset
309 // int v68; // edi@98
ddb803517a48 unused local variables I commented
Ritor1
parents: 2259
diff changeset
310 // unsigned __int16 v69; // cx@99
ddb803517a48 unused local variables I commented
Ritor1
parents: 2259
diff changeset
311 // signed int v73; // [sp-4h] [bp-48068h]@59
ddb803517a48 unused local variables I commented
Ritor1
parents: 2259
diff changeset
312 // unsigned __int16 v74; // [sp-4h] [bp-48068h]@79
2069
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
313 //unsigned short map_texture_16[320 * 460 + 256]; // [sp+Ch] [bp-48058h]@23
2334
ddb803517a48 unused local variables I commented
Ritor1
parents: 2259
diff changeset
314 // int v76; // [sp+4800Ch] [bp-58h]@23
2069
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
315 //unsigned __int16 *v77; // [sp+48010h] [bp-54h]@27
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
316 unsigned __int16 *pPalette_16; // [sp+48014h] [bp-50h]@23
1722
Ritor1
parents: 1720
diff changeset
317 int map_tile_X; // [sp+48020h] [bp-44h]@23
2069
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
318 //unsigned __int16* render16_data;
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
319 unsigned char* texture8_data;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
320 unsigned char* curr_line;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
321 int scale_increment;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
322 int scaled_posX;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
323 int scaled_posY;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
324 int stepX_r;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
325 int stepY_r;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
326 unsigned int teal; // [sp+48028h] [bp-3Ch]@8
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
327 int pCenterY; // [sp+4802Ch] [bp-38h]@1
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
328 int screenCenter_X; // [sp+48030h] [bp-34h]@1
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
329 int pCenterX; // [sp+48034h] [bp-30h]@1
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
330 int v87; // [sp+48038h] [bp-2Ch]@16
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
331 unsigned int v88; // [sp+4803Ch] [bp-28h]@16
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
332 int black; // [sp+48040h] [bp-24h]@8
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
333 int screenCenterY; // [sp+48044h] [bp-20h]@1
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
334 unsigned int screenHeight; // [sp+4804Ch] [bp-18h]@16
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
335 unsigned __int16 *v93; // [sp+48050h] [bp-14h]@16
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
336 signed int screenWidth; // [sp+48054h] [bp-10h]@8
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
337 unsigned int v95; // [sp+48058h] [bp-Ch]@16
1722
Ritor1
parents: 1720
diff changeset
338 int map_tile_Y; // [sp+4805Ch] [bp-8h]@10
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
339 const void *v97; // [sp+48060h] [bp-4h]@16
2334
ddb803517a48 unused local variables I commented
Ritor1
parents: 2259
diff changeset
340 // unsigned short *a4a; // [sp+4806Ch] [bp+8h]@85
2069
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
341 //int a5a; // [sp+48070h] [bp+Ch]@86
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
342
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
343 screenCenter_X = (signed int)(tl_x + br_x) / 2;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
344 screenCenterY = (signed int)(tl_y + br_y) / 2;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
345 pRenderer->SetRasterClipRect(tl_x, tl_y, br_x, br_y);
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
346 pCenterX = viewparams->sViewCenterX;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
347 pCenterY = viewparams->sViewCenterY;
1720
Ritor1
parents: 1583
diff changeset
348 if ( viewparams->uMapBookMapZoom != 384 )
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
349 {
1720
Ritor1
parents: 1583
diff changeset
350 if ( viewparams->uMapBookMapZoom == 768 )
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
351 {
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
352 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor)
1720
Ritor1
parents: 1583
diff changeset
353 viewparams->uMapBookMapZoom = 680;
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
354 }
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
355 }
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
356 else
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
357 {
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
358 viewparams->sViewCenterX = viewparams->indoor_center_x;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
359 pCenterX = viewparams->indoor_center_x;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
360 pCenterY = viewparams->indoor_center_y;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
361 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor)
1720
Ritor1
parents: 1583
diff changeset
362 viewparams->uMapBookMapZoom = viewparams->uMapBookMapZoom - 34;
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
363 }
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
364 if ( uCurrentlyLoadedLevelType != LEVEL_Indoor)
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
365 {
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
366 screenWidth = br_x - tl_x + 1;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
367 screenHeight = br_y - tl_y + 1;
2069
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
368 //render16_data = &pRenderer->pTargetSurface[tl_x + tl_y * pRenderer->uTargetSurfacePitch];
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
369 texture8_data = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].pLevelOfDetail0_prolly_alpha_mask;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
370 pPalette_16 = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].pPalette16;
1720
Ritor1
parents: 1583
diff changeset
371 scale_increment = (1 << (pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].uWidthLn2 + 16)) / viewparams->uMapBookMapZoom;
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
372
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
373 v30 = (double)(1 << (16 - pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].uWidthLn2));
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
374
1720
Ritor1
parents: 1583
diff changeset
375 teal = (unsigned int)(signed __int64)((double)(viewparams->sViewCenterX - 22528 / (viewparams->uMapBookMapZoom / 384) + 32768) / v30) << 16;
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
376
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
377 textr_width = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].uTextureWidth;
1720
Ritor1
parents: 1583
diff changeset
378 stepY_r = (int)(signed __int64)((double)(- pCenterY - 22528 / (viewparams->uMapBookMapZoom / 384)+ 32768) / v30) << 16;
Ritor1
parents: 1583
diff changeset
379 black = (signed __int16)(signed __int64)((double)(viewparams->sViewCenterX - 22528 / (viewparams->uMapBookMapZoom / 384) + 32768) / v30);
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
380
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
381 scaled_posY = stepY_r >> 16;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
382 //nearest neiborhood scaling
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
383 if ( texture8_data)
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
384 {
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
385 for( uint i = 0; i < screenHeight; ++i )
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
386 {
2198
d9caf2b3d8d5 draw FlyAction and WaterWalk icons
Ritor1
parents: 2197
diff changeset
387 curr_line = &texture8_data[scaled_posY*textr_width];
d9caf2b3d8d5 draw FlyAction and WaterWalk icons
Ritor1
parents: 2197
diff changeset
388 stepX_r = teal;
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
389 for( uint j = 0; j < screenWidth; ++j )
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
390 {
2198
d9caf2b3d8d5 draw FlyAction and WaterWalk icons
Ritor1
parents: 2197
diff changeset
391 scaled_posX = stepX_r>>16;
2069
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
392 //map_texture_16[i*screenWidth+j]=pPalette_16[*(curr_line+scaled_posX)];
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
393 pRenderer->WritePixel16(tl_x + j, tl_y + i, pPalette_16[*(curr_line+scaled_posX)]);
2198
d9caf2b3d8d5 draw FlyAction and WaterWalk icons
Ritor1
parents: 2197
diff changeset
394 stepX_r += scale_increment;
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
395 }
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
396 stepY_r+=scale_increment;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
397 scaled_posY=stepY_r>>16;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
398 }
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
399 }
2069
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
400
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
401 /*//move visible square to render
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
402 for( uint i = 0; i < screenHeight; ++i )
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
403 {
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
404 if ( screenWidth > 0 )
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
405 memcpy((void*)&render16_data[pRenderer->uTargetSurfacePitch * i],(void*)&map_texture_16[i*screenWidth], screenWidth*2);
2069
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
406 }*/
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
407 }
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
408 else
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
409 {
2069
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
410 black = Color16(0, 0, 0);
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
411 teal = Color16(0, 0xFFu, 0xFFu);
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
412 uNumBlueFacesInBLVMinimap = 0;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
413 if ( pIndoor->pMapOutlines->uNumOutlines )
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
414 {
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
415 for ( uint i = 0; i < pIndoor->pMapOutlines->uNumOutlines; ++i )
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
416 {
2092
a869b0376b48 enums and BLV_UpdateDoors()
Ritor1
parents: 2069
diff changeset
417 if ( !(pIndoor->pFaces[pIndoor->pMapOutlines->pOutlines[i].uFace1ID].Invisible()
a869b0376b48 enums and BLV_UpdateDoors()
Ritor1
parents: 2069
diff changeset
418 || (pIndoor->pFaces[pIndoor->pMapOutlines->pOutlines[i].uFace2ID].Invisible()) ))
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
419 {
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
420 if ( !(pIndoor->pMapOutlines->pOutlines[i].uFlags & 1) )
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
421 {
2166
00bd098f6435 fixpoint_mul in different functions and others
Ritor1
parents: 2155
diff changeset
422 if ( !(!(pIndoor->pFaces[pIndoor->pMapOutlines->pOutlines[i].uFace1ID].uAttributes & FACE_UNKNOW4)
00bd098f6435 fixpoint_mul in different functions and others
Ritor1
parents: 2155
diff changeset
423 && !(pIndoor->pFaces[pIndoor->pMapOutlines->pOutlines[i].uFace2ID].uAttributes & FACE_UNKNOW4) ))
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
424 {
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
425 pIndoor->pMapOutlines->pOutlines[i].uFlags = pIndoor->pMapOutlines->pOutlines[i].uFlags | 1;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
426 pIndoor->_visible_outlines[i >> 3] |= 1 << (7 - i % 8);
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
427 }
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
428 }
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
429 if ( (!(pIndoor->pMapOutlines->pOutlines[i].uFlags & 1)
2166
00bd098f6435 fixpoint_mul in different functions and others
Ritor1
parents: 2155
diff changeset
430 && !(!(pIndoor->pFaces[pIndoor->pMapOutlines->pOutlines[i].uFace1ID].uAttributes & FACE_UNKNOW4)
00bd098f6435 fixpoint_mul in different functions and others
Ritor1
parents: 2155
diff changeset
431 && !(pIndoor->pFaces[pIndoor->pMapOutlines->pOutlines[i].uFace2ID].uAttributes & FACE_UNKNOW4) ))
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
432 || pIndoor->pMapOutlines->pOutlines[i].uFlags & 1)
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
433 {
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
434 v93 = (unsigned __int16 *)(pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uVertex1ID].x - viewparams->sViewCenterX);
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
435 screenHeight = pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uVertex1ID].y - pCenterY;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
436 v20 = pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uVertex2ID].y - pCenterY;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
437 v95 = pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uVertex2ID].x - viewparams->sViewCenterX;
1722
Ritor1
parents: 1720
diff changeset
438
2169
5b27c035a241 small cleaning
Ritor1
parents: 2166
diff changeset
439 v88 = fixpoint_mul((pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uVertex1ID].x - viewparams->sViewCenterX), viewparams->uMapBookMapZoom);
5b27c035a241 small cleaning
Ritor1
parents: 2166
diff changeset
440 v87 = fixpoint_mul(screenHeight, viewparams->uMapBookMapZoom);
5b27c035a241 small cleaning
Ritor1
parents: 2166
diff changeset
441 v93 = (unsigned __int16 *)(fixpoint_mul((pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uVertex2ID].x - viewparams->sViewCenterX), viewparams->uMapBookMapZoom));
5b27c035a241 small cleaning
Ritor1
parents: 2166
diff changeset
442 screenHeight = fixpoint_mul(v20, viewparams->uMapBookMapZoom);
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
443 pRenderer->RasterLine2D(screenCenter_X + v88, screenCenterY - v87,
2169
5b27c035a241 small cleaning
Ritor1
parents: 2166
diff changeset
444 screenCenter_X + (fixpoint_mul((pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uVertex2ID].x - viewparams->sViewCenterX), viewparams->uMapBookMapZoom)), screenCenterY - screenHeight, black);
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
445 }
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
446 }
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
447 }
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
448 }
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
449 if ( (signed int)uNumBlueFacesInBLVMinimap > 0 )
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
450 {
1722
Ritor1
parents: 1720
diff changeset
451 for ( uint j = 0; j < (signed int)uNumBlueFacesInBLVMinimap; ++j )
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
452 {
1722
Ritor1
parents: 1720
diff changeset
453 v26 = pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[pBlueFacesInBLVMinimapIDs[j]].uVertex2ID].x;
Ritor1
parents: 1720
diff changeset
454 v27 = (unsigned __int16 *)(pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[pBlueFacesInBLVMinimapIDs[j]].uVertex1ID].x - pCenterX);
Ritor1
parents: 1720
diff changeset
455 v28 = pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[pBlueFacesInBLVMinimapIDs[j]].uVertex1ID].y - pCenterY;
Ritor1
parents: 1720
diff changeset
456 v29 = pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[pBlueFacesInBLVMinimapIDs[j]].uVertex2ID].y - pCenterY;
Ritor1
parents: 1720
diff changeset
457
2169
5b27c035a241 small cleaning
Ritor1
parents: 2166
diff changeset
458 v87 = fixpoint_mul((signed int)v27, viewparams->uMapBookMapZoom);
5b27c035a241 small cleaning
Ritor1
parents: 2166
diff changeset
459 v88 = fixpoint_mul(v28, viewparams->uMapBookMapZoom);
5b27c035a241 small cleaning
Ritor1
parents: 2166
diff changeset
460 uint i = fixpoint_mul((v26 - pCenterX), viewparams->uMapBookMapZoom);
5b27c035a241 small cleaning
Ritor1
parents: 2166
diff changeset
461 v95 = fixpoint_mul(v29, viewparams->uMapBookMapZoom);
5b27c035a241 small cleaning
Ritor1
parents: 2166
diff changeset
462 pRenderer->RasterLine2D(screenCenter_X + (fixpoint_mul((signed int)v27, viewparams->uMapBookMapZoom)),
5b27c035a241 small cleaning
Ritor1
parents: 2166
diff changeset
463 screenCenterY - v88, screenCenter_X + (fixpoint_mul((v26 - pCenterX), viewparams->uMapBookMapZoom)), screenCenterY - v95, teal);
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
464 }
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
465 viewparams->sViewCenterX = pCenterX;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
466 }
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
467 }
2169
5b27c035a241 small cleaning
Ritor1
parents: 2166
diff changeset
468 v47 = (fixpoint_mul((pParty->vPosition.x - viewparams->sViewCenterX), viewparams->uMapBookMapZoom)) + screenCenter_X - 3;
5b27c035a241 small cleaning
Ritor1
parents: 2166
diff changeset
469 v97 = (const void *)(fixpoint_mul((pParty->vPosition.y - pCenterY), viewparams->uMapBookMapZoom));
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
470 v48 = 1;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
471 v49 = screenCenterY - (int)v97 - 3;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
472 if ( v47 >= (signed int)tl_x )
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
473 {
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
474 if ( v47 > (signed int)br_x )
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
475 {
2169
5b27c035a241 small cleaning
Ritor1
parents: 2166
diff changeset
476 if ( (signed int)((fixpoint_mul((pParty->vPosition.x - viewparams->sViewCenterX), viewparams->uMapBookMapZoom)) + screenCenter_X - 6) > (signed int)br_x )
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
477 v48 = 0;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
478 v47 = br_x;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
479 }
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
480 }
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
481 else
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
482 {
2169
5b27c035a241 small cleaning
Ritor1
parents: 2166
diff changeset
483 if ( (signed int)((fixpoint_mul((pParty->vPosition.x - viewparams->sViewCenterX), viewparams->uMapBookMapZoom)) + screenCenter_X) < (signed int)tl_x )
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
484 v48 = 0;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
485 v47 = tl_x;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
486 }
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
487 if ( v49 >= (signed int)tl_y )
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
488 {
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
489 if ( v49 > br_y )
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
490 {
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
491 if ( screenCenterY - (signed int)v97 - 6 > br_y )
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
492 v48 = 0;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
493 v49 = br_y;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
494 }
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
495 }
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
496 else
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
497 {
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
498 if ( screenCenterY - (signed int)v97 < (signed int)tl_y )
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
499 v48 = 0;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
500 v49 = tl_y;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
501 }
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
502 if ( v48 == 1 )
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
503 {
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
504 v51 = pParty->sRotationY & stru_5C6E00->uDoublePiMask;
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
505 if ( (signed int)v51 <= 1920 )
1523
53265d238d94 interaction_distance_limit for 3DModel in DrawStatusText
Ritor1
parents: 1489
diff changeset
506 v50 = 6;
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
507 if ( (signed int)v51 < 1664 )
1523
53265d238d94 interaction_distance_limit for 3DModel in DrawStatusText
Ritor1
parents: 1489
diff changeset
508 v50 = 5;
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
509 if ( (signed int)v51 <= 1408 )
1523
53265d238d94 interaction_distance_limit for 3DModel in DrawStatusText
Ritor1
parents: 1489
diff changeset
510 v50 = 4;
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
511 if ( (signed int)v51 < 1152 )
1523
53265d238d94 interaction_distance_limit for 3DModel in DrawStatusText
Ritor1
parents: 1489
diff changeset
512 v50 = 3;
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
513 if ( (signed int)v51 <= 896 )
1523
53265d238d94 interaction_distance_limit for 3DModel in DrawStatusText
Ritor1
parents: 1489
diff changeset
514 v50 = 2;
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
515 if ( (signed int)v51 < 640 )
1523
53265d238d94 interaction_distance_limit for 3DModel in DrawStatusText
Ritor1
parents: 1489
diff changeset
516 v50 = 1;
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
517 if ( (signed int)v51 <= 384 )
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
518 v50 = 0;
1523
53265d238d94 interaction_distance_limit for 3DModel in DrawStatusText
Ritor1
parents: 1489
diff changeset
519 if ( (signed int)v51 < 128 || (signed int)v51 > 1920 )
53265d238d94 interaction_distance_limit for 3DModel in DrawStatusText
Ritor1
parents: 1489
diff changeset
520 v50 = 7;
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
521 pRenderer->DrawTransparentRedShade(v47, v49, pIcons_LOD->GetTexture(pTextureIDs_pMapDirs[v50]));
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
522 }
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
523 if ( (signed int)uNumLevelDecorations > 0 )
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
524 {
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
525 for ( uint i = 0; i < (signed int)uNumLevelDecorations; ++i )
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
526 {
1489
a27cdb3d753e Cleanup of LevelDecoration and related.
yoctozepto
parents: 1477
diff changeset
527 if (pLevelDecorations[i].uFlags & LEVEL_DECORATION_VISIBLE_ON_MAP)
1431
4d13549db029 UIMapBook_sub continue
Ritor1
parents: 1430
diff changeset
528 {
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
529 screenHeight = pLevelDecorations[i].vPosition.y - pCenterY;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
530 v93 = (unsigned __int16 *)(pLevelDecorations[i].vPosition.x - viewparams->sViewCenterX);
2169
5b27c035a241 small cleaning
Ritor1
parents: 2166
diff changeset
531 v54 = (fixpoint_mul((signed int)v93, viewparams->uMapBookMapZoom)) + screenCenter_X;
5b27c035a241 small cleaning
Ritor1
parents: 2166
diff changeset
532 v97 = (const void *)(fixpoint_mul(screenHeight, viewparams->uMapBookMapZoom));
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
533 v55 = screenCenterY - (int)v97;
2155
0a1438c16c2b Render decoupling.
Nomad
parents: 2153
diff changeset
534 //if ( v54 >= pRenderer->raster_clip_x && v54 <= pRenderer->raster_clip_z
0a1438c16c2b Render decoupling.
Nomad
parents: 2153
diff changeset
535 // && v55 >= pRenderer->raster_clip_y && v55 <= pRenderer->raster_clip_w )
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
536 {
1722
Ritor1
parents: 1720
diff changeset
537 if ( viewparams->uMapBookMapZoom > 512 )
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
538 {
2069
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
539 pRenderer->RasterLine2D(v54 - 1, v55 - 1, v54 - 1, v55 + 1, Color16(0xFFu, 0xFFu, 0xFFu));
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
540 pRenderer->RasterLine2D(v54, v55 - 1, v54, v55 + 1, Color16(0xFFu, 0xFFu, 0xFFu));
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
541 pRenderer->RasterLine2D(v54 + 1, v55 - 1, v54 + 1, v55 + 1, Color16(0xFFu, 0xFFu, 0xFFu));
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
542 }
1722
Ritor1
parents: 1720
diff changeset
543 else
Ritor1
parents: 1720
diff changeset
544 pRenderer->RasterLine2D(v54, screenCenterY - (int)v97,
2169
5b27c035a241 small cleaning
Ritor1
parents: 2166
diff changeset
545 (fixpoint_mul((signed int)v93, viewparams->uMapBookMapZoom)) + screenCenter_X,
2069
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
546 screenCenterY - (int)v97, Color16(0xFFu, 0xFFu, 0xFFu));
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
547 }
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
548 }
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
549 }
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
550 }
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
551 if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor)
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
552 {
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
553 screenCenterY = br_x - tl_x + 1;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
554 v95 = br_y - tl_y + 1;
2069
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
555 //v77 = &pRenderer->pTargetSurface[tl_x + tl_y * pRenderer->uTargetSurfacePitch];
1722
Ritor1
parents: 1720
diff changeset
556 black = (1 << (pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].uWidthLn2 + 16)) / viewparams->uMapBookMapZoom;
Ritor1
parents: 1720
diff changeset
557 v57 = (double)(1 << (16 - pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].uWidthLn2));
Ritor1
parents: 1720
diff changeset
558 v60 = (int)((signed __int64)((double)(viewparams->sViewCenterX - (22528 / (viewparams->uMapBookMapZoom / 384)) + 32768) / v57)) << 16;
Ritor1
parents: 1720
diff changeset
559 teal = v60 >> 16;
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
560 pPalette_16 = (unsigned __int16 *)(v60 >> 16);
1722
Ritor1
parents: 1720
diff changeset
561 v97 = (const void *)((int)((signed __int64)((double)(viewparams->sViewCenterX - (22528 / (viewparams->uMapBookMapZoom / 384)) + 32768) / v57)) << 16);
Ritor1
parents: 1720
diff changeset
562 v62 = (int)((signed __int64)((double)(32768 - (22528 / (viewparams->uMapBookMapZoom / 384)) - pCenterY) / v57)) << 16;
Ritor1
parents: 1720
diff changeset
563 v63 = (signed __int16)((signed __int64)((double)(32768 - (22528 / (viewparams->uMapBookMapZoom / 384)) - pCenterY) / v57));
2069
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
564
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
565
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
566 for (int y = 0; y < (signed int)v95; ++y)
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
567 {
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
568 map_tile_Y = (v63 - 80) / 4;
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
569 v64 = teal;
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
570 for (int x = 0; x < screenCenterY; ++x)
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
571 {
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
572 map_tile_X = (v64 - 80) / 4;
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
573 if ( !pOutdoor->_47F04C(map_tile_X, map_tile_Y) )
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
574 {
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
575 if ( pOutdoor->_47F097(map_tile_X, map_tile_Y) )
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
576 {
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
577 if ( !((x + screenCenter_X) % 2) )
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
578 //*a4a = Color16(12, 12, 12);
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
579 pRenderer->WritePixel16(tl_x + x, tl_y + y, Color16(12, 12, 12));
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
580 }
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
581 else
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
582 //*a4a = 0;
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
583 pRenderer->WritePixel16(tl_x + x, tl_y + y, Color16(0, 0, 0));
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
584 }
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
585 v97 = (char *)v97 + black;
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
586 v64 = (signed int)v97 >> 16;
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
587 }
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
588
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
589 v62 += black;
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
590 v97 = (const void *)v60;
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
591 v63 = v62 >> 16;
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
592 teal = (unsigned int)pPalette_16;
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
593 }
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
594 /*a4a = map_texture_16;
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
595 for ( screenCenter_X = 0; screenCenter_X < (signed int)v95; ++screenCenter_X )
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
596 {
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
597 if ( screenCenterY > 0 )
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
598 {
1722
Ritor1
parents: 1720
diff changeset
599 map_tile_Y = (v63 - 80) / 4;
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
600 v64 = teal;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
601 for ( a5a = 0; a5a < screenCenterY; ++a5a )
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
602 {
1722
Ritor1
parents: 1720
diff changeset
603 map_tile_X = (v64 - 80) / 4;
Ritor1
parents: 1720
diff changeset
604 if ( !pOutdoor->_47F04C(map_tile_X, map_tile_Y) )
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
605 {
1722
Ritor1
parents: 1720
diff changeset
606 if ( pOutdoor->_47F097(map_tile_X, map_tile_Y) )
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
607 {
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
608 if ( !((a5a + screenCenter_X) % 2) )
2069
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
609 *a4a = Color16(0xCu, 0xCu, 0xCu);
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
610 }
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
611 else
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
612 *a4a = 0;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
613 }
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
614 ++a4a;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
615 v97 = (char *)v97 + black;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
616 v64 = (signed int)v97 >> 16;
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
617 }
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
618 }
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
619 v62 += black;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
620 v97 = (const void *)v60;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
621 a4a += screenCenterY - a5a;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
622 v63 = v62 >> 16;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
623 teal = (unsigned int)pPalette_16;
1312
ae435824ac4d books code splitted to separate files
Gloval
parents:
diff changeset
624 }
2069
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
625
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
626 v66 = map_texture_16;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
627 if ( (signed int)v95 > 0 )
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
628 {
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
629 v67 = v77;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
630 result = 2 * (pRenderer->uTargetSurfacePitch - screenCenterY);
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
631 for ( v65 = v95; v65; --v65 )
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
632 {
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
633 if ( screenCenterY > 0 )
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
634 {
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
635 for ( v68 = screenCenterY; v68; --v68 )
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
636 {
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
637 v69 = *(short *)v66;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
638 if ( !*(short *)v66 || v69 == (short)result )
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
639 *v67 = v69;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
640 ++v66;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
641 ++v67;
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
642 }
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
643 }
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
644 v67 = (unsigned __int16 *)((char *)v67 + result);
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
645 }
2069
259df09dfb50 32bits almost there
Nomad
parents: 2037
diff changeset
646 }*/
1446
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
647 }
8b4f4c723edd Questbook_Draw
Ritor1
parents: 1445
diff changeset
648 }
1722
Ritor1
parents: 1720
diff changeset
649
Ritor1
parents: 1720
diff changeset
650 //----- (00444564) --------------------------------------------------------
Ritor1
parents: 1720
diff changeset
651 const char * GetMapBookHintText()
Ritor1
parents: 1720
diff changeset
652 {
Ritor1
parents: 1720
diff changeset
653 int v20;
Ritor1
parents: 1720
diff changeset
654 int v21; // [sp+14h] [bp-Ch]@1
Ritor1
parents: 1720
diff changeset
655 double v0; // st7@3
Ritor1
parents: 1720
diff changeset
656 unsigned int pX; // [sp+1Ch] [bp-4h]@3
Ritor1
parents: 1720
diff changeset
657 unsigned int pY; // [sp+8h] [bp-18h]@3
Ritor1
parents: 1720
diff changeset
658 int global_coord_X; // ebx@3
Ritor1
parents: 1720
diff changeset
659 int global_coord_Y;
Ritor1
parents: 1720
diff changeset
660 int map_tile_X; // edi@3
Ritor1
parents: 1720
diff changeset
661 int map_tile_Y; // eax@3
Ritor1
parents: 1720
diff changeset
662 const char *result; // eax@15
Ritor1
parents: 1720
diff changeset
663
Ritor1
parents: 1720
diff changeset
664 v20 = viewparams->sViewCenterX;
Ritor1
parents: 1720
diff changeset
665 v21 = viewparams->sViewCenterY;
Ritor1
parents: 1720
diff changeset
666 if ( viewparams->uMapBookMapZoom == 384 )
Ritor1
parents: 1720
diff changeset
667 {
Ritor1
parents: 1720
diff changeset
668 v20 = viewparams->indoor_center_x;
Ritor1
parents: 1720
diff changeset
669 v21 = viewparams->indoor_center_y;
Ritor1
parents: 1720
diff changeset
670 }
Ritor1
parents: 1720
diff changeset
671 pMouse->GetClickPos(&pX, &pY);
Ritor1
parents: 1720
diff changeset
672 v0 = 1.0 / (float)((signed int)viewparams->uMapBookMapZoom * 0.000015258789);
Ritor1
parents: 1720
diff changeset
673
Ritor1
parents: 1720
diff changeset
674 global_coord_X = (signed __int64)((double)(pX - 229) * v0 + (double)v20);
Ritor1
parents: 1720
diff changeset
675 global_coord_Y = (signed __int64)((double)v21 - (double)(pY - 181) * v0);
Ritor1
parents: 1720
diff changeset
676
Ritor1
parents: 1720
diff changeset
677 result = 0;
1730
Ritor1
parents: 1725
diff changeset
678 map_tile_X = abs(global_coord_X + 22528) / 512;//In the mapbook only lady Margaret dispays for defoult zoom(В книге карты только Леди Маргарита всплывает при дефолтном зуме)
1722
Ritor1
parents: 1720
diff changeset
679 map_tile_Y = abs(global_coord_Y - 22528) / 512;
Ritor1
parents: 1720
diff changeset
680 if ( pOutdoor->_47F04C(map_tile_X, map_tile_Y) && uCurrentlyLoadedLevelType == LEVEL_Outdoor && (signed int)pOutdoor->uNumBModels > 0 )
Ritor1
parents: 1720
diff changeset
681 {
Ritor1
parents: 1720
diff changeset
682 for(int i = 0; i < pOutdoor->uNumBModels && !result; i++)
Ritor1
parents: 1720
diff changeset
683 {
Ritor1
parents: 1720
diff changeset
684 if ( int_get_vector_length(abs((signed)pOutdoor->pBModels[i].vBoundingCenter.x - global_coord_X),
Ritor1
parents: 1720
diff changeset
685 abs((signed)pOutdoor->pBModels[i].vBoundingCenter.y - global_coord_Y), 0) < pOutdoor->pBModels[i].sBoundingRadius )
Ritor1
parents: 1720
diff changeset
686 {
Ritor1
parents: 1720
diff changeset
687 if ( pOutdoor->pBModels[i].uNumFaces > 0 )
Ritor1
parents: 1720
diff changeset
688 {
Ritor1
parents: 1720
diff changeset
689 for( int j = 0; j < pOutdoor->pBModels[i].uNumFaces; j++ )
Ritor1
parents: 1720
diff changeset
690 {
Ritor1
parents: 1720
diff changeset
691 if ( pOutdoor->pBModels[i].pFaces[j].sCogTriggeredID )
Ritor1
parents: 1720
diff changeset
692 {
2166
00bd098f6435 fixpoint_mul in different functions and others
Ritor1
parents: 2155
diff changeset
693 if ( !(pOutdoor->pBModels[i].pFaces[j].uAttributes & FACE_UNKNOW) )
1722
Ritor1
parents: 1720
diff changeset
694 {
Ritor1
parents: 1720
diff changeset
695 if ( GetEventHintString(pOutdoor->pBModels[i].pFaces[j].sCogTriggeredID) )
Ritor1
parents: 1720
diff changeset
696 {
Ritor1
parents: 1720
diff changeset
697 if ( _stricmp(GetEventHintString(pOutdoor->pBModels[i].pFaces[j].sCogTriggeredID), "") )
Ritor1
parents: 1720
diff changeset
698 result = GetEventHintString(pOutdoor->pBModels[i].pFaces[j].sCogTriggeredID);
Ritor1
parents: 1720
diff changeset
699 }
Ritor1
parents: 1720
diff changeset
700 }
Ritor1
parents: 1720
diff changeset
701 }
Ritor1
parents: 1720
diff changeset
702 }
Ritor1
parents: 1720
diff changeset
703 }
Ritor1
parents: 1720
diff changeset
704 }
Ritor1
parents: 1720
diff changeset
705 }
Ritor1
parents: 1720
diff changeset
706 }
Ritor1
parents: 1720
diff changeset
707 return result;
Ritor1
parents: 1720
diff changeset
708 }