comparison UI/Books/UIMapBook.cpp @ 1431:4d13549db029

UIMapBook_sub continue
author Ritor1
date Fri, 02 Aug 2013 17:30:23 +0600
parents 71a2cf416478
children 6de9c1316852
comparison
equal deleted inserted replaced
1430:71a2cf416478 1431:4d13549db029
206 if ( byte_506360 ) 206 if ( byte_506360 )
207 pMessageQueue_50CBD0->AddMessage(UIMSG_CloseAfterInstallBeacon, 0, 0); 207 pMessageQueue_50CBD0->AddMessage(UIMSG_CloseAfterInstallBeacon, 0, 0);
208 return BeaconID; 208 return BeaconID;
209 } 209 }
210 210
211
212 //----- (00413980) -------------------------------------------------------- 211 //----- (00413980) --------------------------------------------------------
213 void BookUI_Map_Draw() 212 void BookUI_Map_Draw()
214 { 213 {
215 int v6; // eax@31 214 unsigned int map_id; // eax@35
216 unsigned int map_id; // eax@35 215 Texture *buttnTxtr; // [sp-4h] [bp-DCh]@3
217 Texture *buttnTxtr; // [sp-4h] [bp-DCh]@3 216 char party_coord[120]; // [sp+Ch] [bp-CCh]@37
218 char party_coord[120]; // [sp+Ch] [bp-CCh]@37 217 GUIWindow map_window; // [sp+84h] [bp-54h]@35
219 GUIWindow map_window; // [sp+84h] [bp-54h]@35 218 unsigned int textrX, textrY;
220 unsigned int textrX, textrY; 219
221 220 pRenderer->DrawTextureIndexed(pViewport->uViewportTL_X, pViewport->uViewportTL_Y, pSpellBookPagesTextr_12);
222 pRenderer->DrawTextureIndexed(pViewport->uViewportTL_X, pViewport->uViewportTL_Y, pSpellBookPagesTextr_12); 221 if ( BtnUp_flag || viewparams->field_2C / 128 >= 12 )
223 if ( BtnUp_flag || viewparams->field_2C / 128 >= 12 ) 222 {
224 { 223 buttnTxtr = pTex_tab_an_6a__zoom_off;
225 buttnTxtr = pTex_tab_an_6a__zoom_off; 224 textrY = pViewport->uViewportTL_Y + 2;
226 textrY = pViewport->uViewportTL_Y + 2; 225 textrX = pViewport->uViewportTL_X + 408;
227 textrX = pViewport->uViewportTL_X + 408; 226 }
228 } 227 else
229 else 228 {
230 { 229 buttnTxtr = pTex_tab_an_6b__zoom_on;
231 buttnTxtr = pTex_tab_an_6b__zoom_on; 230 textrY = pViewport->uViewportTL_Y + 1;
232 textrY = pViewport->uViewportTL_Y + 1; 231 textrX = pViewport->uViewportTL_X + 398;
233 textrX = pViewport->uViewportTL_X + 398; 232 }
234 } 233 pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr);
235 pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr); 234 if ( BtnDown_flag || viewparams->field_2C / 128 <= 3 )
236 if ( BtnDown_flag || viewparams->field_2C / 128 <= 3 ) 235 {
237 { 236 buttnTxtr = pTex_tab_an_7a__zoot_off;
238 buttnTxtr = pTex_tab_an_7a__zoot_off; 237 textrY = pViewport->uViewportTL_Y + 38;
239 textrY = pViewport->uViewportTL_Y + 38; 238 textrX = pViewport->uViewportTL_X + 408;
240 textrX = pViewport->uViewportTL_X + 408; 239 }
241 } 240 else
242 else 241 {
243 { 242 buttnTxtr = pTex_tab_an_7b__zoot_on;
244 buttnTxtr = pTex_tab_an_7b__zoot_on; 243 textrY = pViewport->uViewportTL_Y + 38;
245 textrY = pViewport->uViewportTL_Y + 38; 244 textrX = pViewport->uViewportTL_X + 398;
246 textrX = pViewport->uViewportTL_X + 398; 245 }
247 } 246 pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr);
248 pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr); 247 if ( Book_PageBtn3_flag )
249 if ( Book_PageBtn3_flag ) 248 {
250 { 249 buttnTxtr = pTexture_506390;
251 buttnTxtr = pTexture_506390; 250 textrY = pViewport->uViewportTL_Y + 113;
252 textrY = pViewport->uViewportTL_Y + 113; 251 textrX = pViewport->uViewportTL_X + 408;
253 textrX = pViewport->uViewportTL_X + 408; 252 }
254 } 253 else
255 else 254 {
256 { 255 buttnTxtr = pTexture_506394;
257 buttnTxtr = pTexture_506394; 256 textrY = pViewport->uViewportTL_Y + 113;
258 textrY = pViewport->uViewportTL_Y + 113; 257 textrX = pViewport->uViewportTL_X + 398;
259 textrX = pViewport->uViewportTL_X + 398; 258 }
260 } 259 pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr);
261 pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr); 260 if ( Book_PageBtn4_flag )
262 if ( Book_PageBtn4_flag ) 261 {
263 { 262 buttnTxtr = pTexture_506388;
264 buttnTxtr = pTexture_506388; 263 textrY = pViewport->uViewportTL_X + 150;
265 textrY = pViewport->uViewportTL_X + 150; 264 textrX = pViewport->uViewportTL_Y + 408;
266 textrX = pViewport->uViewportTL_Y + 408; 265 }
267 } 266 else
268 else 267 {
269 { 268 buttnTxtr = pTexture_50638C;
270 buttnTxtr = pTexture_50638C; 269 textrY = pViewport->uViewportTL_X + 150;
271 textrY = pViewport->uViewportTL_X + 150; 270 textrX = pViewport->uViewportTL_Y + 399;
272 textrX = pViewport->uViewportTL_Y + 399; 271 }
273 } 272 pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr);
274 pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr); 273 if ( Book_PageBtn5_flag )
275 if ( Book_PageBtn5_flag ) 274 {
276 { 275 buttnTxtr = pTexture_506380;
277 buttnTxtr = pTexture_506380; 276 textrY = pViewport->uViewportTL_Y + 188;
278 textrY = pViewport->uViewportTL_Y + 188; 277 textrX = pViewport->uViewportTL_X + 408;
279 textrX = pViewport->uViewportTL_X + 408; 278 }
280 } 279 else
281 else 280 {
282 { 281 buttnTxtr = pTexture_506384;
283 buttnTxtr = pTexture_506384; 282 textrY = pViewport->uViewportTL_Y + 188;
284 textrY = pViewport->uViewportTL_Y + 188; 283 textrX = pViewport->uViewportTL_X + 397;
285 textrX = pViewport->uViewportTL_X + 397; 284 }
286 } 285 pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr);
287 pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr); 286 if ( Book_PageBtn6_flag )
288 if ( Book_PageBtn6_flag ) 287 {
289 { 288 buttnTxtr = pTexture_506378;
290 buttnTxtr = pTexture_506378; 289 textrY = pViewport->uViewportTL_Y + 226;
291 textrY = pViewport->uViewportTL_Y + 226; 290 textrX = pViewport->uViewportTL_X + 408;
292 textrX = pViewport->uViewportTL_X + 408; 291 }
293 } 292 else
294 else 293 {
295 { 294 buttnTxtr = pTexture_50637C;
296 buttnTxtr = pTexture_50637C; 295 textrY = pViewport->uViewportTL_Y + 226;
297 textrY = pViewport->uViewportTL_Y + 226; 296 textrX = pViewport->uViewportTL_X + 397;
298 textrX = pViewport->uViewportTL_X + 397; 297 }
299 } 298 pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr);
300 pRenderer->DrawTextureTransparent(textrX, textrY, buttnTxtr); 299 if ( BtnDown_flag )
301 if ( BtnDown_flag ) 300 viewparams->CenterOnParty2();
302 viewparams->CenterOnParty2(); 301 if ( BtnUp_flag )
303 if ( BtnUp_flag ) 302 viewparams->CenterOnParty();
304 viewparams->CenterOnParty(); 303 if ( Book_PageBtn3_flag )
305 if ( Book_PageBtn3_flag ) 304 viewparams->_443219();
306 viewparams->_443219(); 305 if ( Book_PageBtn4_flag )
307 if ( Book_PageBtn4_flag ) 306 viewparams->_443231();
308 viewparams->_443231(); 307 if ( Book_PageBtn5_flag )
309 if ( Book_PageBtn5_flag ) 308 viewparams->_44323D();
310 viewparams->_44323D(); 309 if ( Book_PageBtn6_flag )
311 if ( Book_PageBtn6_flag ) 310 viewparams->_443225();
312 viewparams->_443225(); 311
313 312 if ( BtnUp_flag | BtnDown_flag | Book_PageBtn3_flag | Book_PageBtn4_flag | Book_PageBtn5_flag | Book_PageBtn6_flag )
314 if ( BtnUp_flag | BtnDown_flag | Book_PageBtn3_flag | Book_PageBtn4_flag | Book_PageBtn5_flag | Book_PageBtn6_flag ) 313 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0);
315 pAudioPlayer->PlaySound(SOUND_Button2, 0, 0, -1, 0, 0, 0, 0); 314 BtnUp_flag = 0;
316 BtnUp_flag = 0; 315 BtnDown_flag = 0;
317 BtnDown_flag = 0; 316 Book_PageBtn6_flag = 0;
318 Book_PageBtn6_flag = 0; 317 Book_PageBtn5_flag = 0;
319 Book_PageBtn5_flag = 0; 318 Book_PageBtn4_flag = 0;
320 Book_PageBtn4_flag = 0; 319 Book_PageBtn3_flag = 0;
321 Book_PageBtn3_flag = 0; 320 DrawBook_Map_sub(97, 49, 361, 313, 0);
322 DrawBook_Map_sub(97, 49, 361, 313, 0); 321 pRenderer->DrawTextureTransparent(75, 22, pTexture_mapbordr);
323 pRenderer->DrawTextureTransparent(75, 22, pTexture_mapbordr); 322 map_window.uFrameWidth = game_viewport_width;
324 map_window.uFrameWidth = game_viewport_width; 323 map_window.uFrameHeight = game_viewport_height;
325 map_window.uFrameHeight = game_viewport_height; 324 map_window.uFrameX = game_viewport_x;
326 map_window.uFrameX = game_viewport_x; 325 map_window.uFrameY = game_viewport_y;
327 map_window.uFrameY = game_viewport_y; 326 map_window.uFrameZ = game_viewport_z;
328 map_window.uFrameZ = game_viewport_z; 327 map_window.uFrameW = game_viewport_w;
329 map_window.uFrameW = game_viewport_w; 328 map_id = pMapStats->GetMapInfo(pCurrentMapName.data());
330 map_id = pMapStats->GetMapInfo(pCurrentMapName.data()); 329 if ( map_id )
331 if ( map_id ) 330 map_window.DrawTitleText(pBook2Font, -14, 12, ui_book_map_title_color, pMapStats->pInfos[map_id].pName, 3);
332 map_window.DrawTitleText(pBook2Font, -14, 12, ui_book_map_title_color, pMapStats->pInfos[map_id].pName, 3); 331
333 332 map_window.uFrameX = 0;
334 map_window.uFrameX = 0; 333 sprintf(party_coord, pGlobalTXT_LocalizationStrings[659], pParty->vPosition.x, pParty->vPosition.y); //"x: %d y: %d"
335 sprintf(party_coord, pGlobalTXT_LocalizationStrings[659], pParty->vPosition.x, pParty->vPosition.y); //"x: %d y: %d" 334 map_window.DrawTitleText(pFontComic, 0, 320, ui_book_map_coordinates_color, party_coord, 0);
336 map_window.DrawTitleText(pFontComic, 0, 320, ui_book_map_coordinates_color, party_coord, 0); 335 }
337 }
338 336
339 //----- (00442955) -------------------------------------------------------- 337 //----- (00442955) --------------------------------------------------------
340 void DrawBook_Map_sub( unsigned int tl_x, unsigned int tl_y, unsigned int br_x, int br_y, int _48074 ) 338 void DrawBook_Map_sub( unsigned int tl_x, unsigned int tl_y, unsigned int br_x, int br_y, int _48074 )
341 { 339 {
342 int v5; // ebx@1 340 //unsigned int v11; // edx@11
343 int v6; // edi@1 341 //__int16 v12; // cx@12
344 BLVMapOutlines *v7; // eax@8 342 //signed int v13; // eax@15
345 unsigned __int8 v8; // zf@8 343 //int v14; // eax@16
346 unsigned __int8 v9; // sf@8 344 int v20; // eax@16
347 int v10; // esi@10 345 signed int v21; // esi@18
348 unsigned int v11; // edx@11 346 int v22; // ecx@21
349 __int16 v12; // cx@12 347 BLVMapOutline *v23; // ecx@21
350 signed int v13; // eax@15 348 Vec3_short_ *v24; // edx@21
351 int v14; // eax@16 349 Vec3_short_ *v25; // eax@21
352 Vec3_short_ *v15; // ecx@16 350 int v26; // ecx@21
353 int v16; // edx@16 351 unsigned __int16 *v27; // edi@21
354 int v17; // ecx@16 352 int v28; // edx@21
355 Vec3_short_ *v18; // eax@16 353 int v29; // eax@21
356 int v19; // ecx@16 354 double v30; // st7@23
357 int v20; // eax@16 355 signed __int64 v31; // qax@23
358 signed int v21; // esi@18 356 unsigned short *v32; // edx@23
359 int v22; // ecx@21 357 int textr_width; // esi@23
360 BLVMapOutline *v23; // ecx@21 358 signed int v34; // eax@23
361 Vec3_short_ *v24; // edx@21 359 signed int v35; // ecx@23
362 Vec3_short_ *v25; // eax@21 360 int v36; // esi@27
363 int v26; // ecx@21 361 int v37; // ecx@27
364 unsigned __int16 *v27; // edi@21 362 int v38; // edx@31
365 int v28; // edx@21 363 unsigned int v39; // eax@33
366 int v29; // eax@21 364 short *v40; // esi@33
367 double v30; // st7@23 365 short *v41; // edi@33
368 signed __int64 v31; // qax@23 366 unsigned __int8 v42; // cf@33
369 unsigned short *v32; // edx@23 367 unsigned int v43; // ecx@33
370 int textr_width; // esi@23 368 short *v44; // edi@33
371 signed int v34; // eax@23 369 short *v45; // esi@33
372 signed int v35; // ecx@23 370 int v46; // ecx@33
373 int v36; // esi@27 371 signed int v47; // esi@38
374 int v37; // ecx@27 372 signed int v48; // ecx@38
375 int v38; // edx@31 373 int v49; // eax@38
376 unsigned int v39; // eax@33 374 signed int v50; // edx@55
377 short *v40; // esi@33 375 unsigned int v51; // ecx@55
378 short *v41; // edi@33 376 int result; // eax@72
379 unsigned __int8 v42; // cf@33 377 int v53; // eax@75
380 unsigned int v43; // ecx@33 378 int v54; // esi@75
381 short *v44; // edi@33 379 int v55; // eax@75
382 short *v45; // esi@33 380 __int16 v56; // si@85
383 int v46; // ecx@33 381 double v57; // st7@85
384 signed int v47; // esi@38 382 int v58; // ebx@85
385 signed int v48; // ecx@38 383 signed __int64 v59; // qax@85
386 int v49; // eax@38 384 signed int v60; // edi@85
387 signed int v50; // edx@55 385 signed __int64 v61; // qax@85
388 unsigned int v51; // ecx@55 386 signed int v62; // ebx@85
389 int result; // eax@72 387 signed int v63; // esi@85
390 int v53; // eax@75 388 int v64; // eax@87
391 int v54; // esi@75 389 unsigned int v65; // ebx@95
392 int v55; // eax@75 390 unsigned short *v66; // edx@95
393 __int16 v56; // si@85 391 unsigned __int16 *v67; // esi@96
394 double v57; // st7@85 392 int v68; // edi@98
395 int v58; // ebx@85 393 unsigned __int16 v69; // cx@99
396 signed __int64 v59; // qax@85 394 unsigned int v70; // [sp-10h] [bp-48074h]@80
397 signed int v60; // edi@85 395 unsigned int v71; // [sp-Ch] [bp-48070h]@80
398 signed __int64 v61; // qax@85 396 unsigned int v72; // [sp-8h] [bp-4806Ch]@80
399 signed int v62; // ebx@85 397 signed int v73; // [sp-4h] [bp-48068h]@59
400 signed int v63; // esi@85 398 unsigned __int16 v74; // [sp-4h] [bp-48068h]@79
401 int v64; // eax@87 399 unsigned short map_texture_16[147456]; // [sp+Ch] [bp-48058h]@23
402 unsigned int v65; // ebx@95 400 int v76; // [sp+4800Ch] [bp-58h]@23
403 unsigned short *v66; // edx@95 401 unsigned __int16 *v77; // [sp+48010h] [bp-54h]@27
404 unsigned __int16 *v67; // esi@96 402 unsigned __int16 *pPalette_16; // [sp+48014h] [bp-50h]@23
405 int v68; // edi@98 403 int v81; // [sp+48020h] [bp-44h]@23
406 unsigned __int16 v69; // cx@99 404 unsigned __int16* render16_data;
407 unsigned int v70; // [sp-10h] [bp-48074h]@80 405 unsigned char* texture8_data;
408 unsigned int v71; // [sp-Ch] [bp-48070h]@80 406 unsigned char* curr_line;
409 unsigned int v72; // [sp-8h] [bp-4806Ch]@80 407 int scale_increment;
410 signed int v73; // [sp-4h] [bp-48068h]@59 408 int scaled_posX;
411 unsigned __int16 v74; // [sp-4h] [bp-48068h]@79 409 int scaled_posY;
412 unsigned short map_texture_16[147456]; // [sp+Ch] [bp-48058h]@23 410 int stepX_r;
413 int v76; // [sp+4800Ch] [bp-58h]@23 411 int stepY_r;
414 unsigned __int16 *v77; // [sp+48010h] [bp-54h]@27 412 unsigned int teal; // [sp+48028h] [bp-3Ch]@8
415 unsigned __int16 *pPalette_16; // [sp+48014h] [bp-50h]@23 413 int pCenterY; // [sp+4802Ch] [bp-38h]@1
416 unsigned int surfPitch; // [sp+48018h] [bp-4Ch]@1 414 int screenCenter_X; // [sp+48030h] [bp-34h]@1
417 415 int pCenterX; // [sp+48034h] [bp-30h]@1
418 int v81; // [sp+48020h] [bp-44h]@23 416 int v87; // [sp+48038h] [bp-2Ch]@16
419 unsigned __int16* render16_data; 417 unsigned int v88; // [sp+4803Ch] [bp-28h]@16
420 unsigned char* texture8_data; 418 int black; // [sp+48040h] [bp-24h]@8
421 unsigned char* curr_line; 419 int screenCenterY; // [sp+48044h] [bp-20h]@1
422 int scale_increment; 420 unsigned int i; // [sp+48048h] [bp-1Ch]@9
423 int scaled_posX; 421 unsigned int screenHeight; // [sp+4804Ch] [bp-18h]@16
424 int scaled_posY; 422 unsigned __int16 *v93; // [sp+48050h] [bp-14h]@16
425 int stepX_r; 423 signed int screenWidth; // [sp+48054h] [bp-10h]@8
426 int stepY_r; 424 unsigned int v95; // [sp+48058h] [bp-Ch]@16
427 425 int v96; // [sp+4805Ch] [bp-8h]@10
428 426 const void *v97; // [sp+48060h] [bp-4h]@16
429 unsigned int teal; // [sp+48028h] [bp-3Ch]@8 427 unsigned short *a4a; // [sp+4806Ch] [bp+8h]@85
430 int v84; // [sp+4802Ch] [bp-38h]@1 428 int a5a; // [sp+48070h] [bp+Ch]@86
431 int screenCenter_X; // [sp+48030h] [bp-34h]@1 429
432 int v86; // [sp+48034h] [bp-30h]@1 430 screenCenter_X = (signed int)(tl_x + br_x) / 2;
433 int v87; // [sp+48038h] [bp-2Ch]@16 431 screenCenterY = (signed int)(tl_y + br_y) / 2;
434 unsigned int v88; // [sp+4803Ch] [bp-28h]@16 432 pRenderer->SetRasterClipRect(tl_x, tl_y, br_x, br_y);
435 int black; // [sp+48040h] [bp-24h]@8 433 pCenterX = viewparams->sViewCenterX;
436 int screenCenterY; // [sp+48044h] [bp-20h]@1 434 pCenterY = viewparams->sViewCenterY;
437 unsigned int i; // [sp+48048h] [bp-1Ch]@9 435 if ( viewparams->field_2C != 384 )
438 unsigned int screenHeight; // [sp+4804Ch] [bp-18h]@16 436 {
439 unsigned __int16 *v93; // [sp+48050h] [bp-14h]@16 437 if ( viewparams->field_2C == 768 )
440 signed int screenWidth; // [sp+48054h] [bp-10h]@8 438 {
441 unsigned int v95; // [sp+48058h] [bp-Ch]@16 439 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor)
442 int v96; // [sp+4805Ch] [bp-8h]@10 440 viewparams->field_2C = 680;
443 const void *v97; // [sp+48060h] [bp-4h]@16 441 }
444 unsigned short *a4a; // [sp+4806Ch] [bp+8h]@85 442 }
445 int a5a; // [sp+48070h] [bp+Ch]@86 443 else
446 444 {
447 tl_x = tl_x; 445 viewparams->sViewCenterX = viewparams->indoor_center_x;
448 tl_y = tl_y; 446 pCenterX = viewparams->indoor_center_x;
449 screenCenter_X = (signed int)(tl_x + br_x) >> 1; 447 pCenterY = viewparams->indoor_center_y;
450 screenCenterY = (signed int)(tl_y + br_y) >> 1; 448 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor)
451 surfPitch = pRenderer->uTargetSurfacePitch; 449 viewparams->field_2C = viewparams->field_2C - 34;
452 pRenderer->SetRasterClipRect(tl_x, tl_y, br_x, br_y); 450 }
453 v5 = viewparams->field_2C; 451 if ( uCurrentlyLoadedLevelType != LEVEL_Indoor)
454 v6 = viewparams->sViewCenterX; 452 {
455 v86 = viewparams->sViewCenterX; 453 screenWidth = br_x - tl_x + 1;
456 v84 = viewparams->sViewCenterY; 454 screenHeight = br_y - tl_y + 1;
457 if ( viewparams->field_2C != 384 ) 455 render16_data = &pRenderer->pTargetSurface[tl_x + tl_y * pRenderer->uTargetSurfacePitch];
456 texture8_data = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].pLevelOfDetail0_prolly_alpha_mask;
457 pPalette_16 = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].pPalette16;
458 scale_increment = (1 << (pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].uWidthLn2 + 16)) / viewparams->field_2C;
459
460 v30 = (double)(1 << (16 - pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].uWidthLn2));
461
462 teal = (unsigned int)(signed __int64)((double)(viewparams->sViewCenterX - 22528 / (viewparams->field_2C / 384) + 32768) / v30) << 16;
463 // v97 = (const void *)((unsigned int)(signed __int64)((double)(v6 - 22528 / (v5 / 384) + 32768) / v30) << 16);
464
465 // v32 = map_texture_16;
466 textr_width = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].uTextureWidth;
467 stepY_r = (int)(signed __int64)((double)(- pCenterY - 22528 / (viewparams->field_2C / 384)+ 32768) / v30) << 16;
468 // v81 = (signed __int16)(signed __int64)((double)(v6 - 22528 / (v5 / 384) + 32768) / v30);
469 black = (signed __int16)(signed __int64)((double)(viewparams->sViewCenterX - 22528 / (viewparams->field_2C / 384) + 32768) / v30);
470
471 // v76 = textr_width;
472 scaled_posY = stepY_r >> 16;
473 //nearest neiborhood scaling
474 if ( texture8_data)
475 {
476 for( uint i = 0; i < screenHeight; ++i )
477 {
478 curr_line=&texture8_data[scaled_posY*textr_width];
479 stepX_r=teal;
480 for( uint j = 0; j < screenWidth; ++j )
458 { 481 {
459 if ( viewparams->field_2C == 768 ) 482 scaled_posX=stepX_r>>16;
483 map_texture_16[i*screenWidth+j]=pPalette_16[*(curr_line+scaled_posX)];
484 stepX_r+=scale_increment;
485 }
486 stepY_r+=scale_increment;
487 scaled_posY=stepY_r>>16;
488 }
489 }
490 //move visible square to render
491 for( uint i = 0; i < screenHeight; ++i )
492 {
493 if ( screenWidth > 0 )
494 memcpy((void*)&render16_data[pRenderer->uTargetSurfacePitch * i],(void*)&map_texture_16[i*screenWidth], screenWidth*2);
495 }
496 }
497 else
498 {
499 black = TargetColor(0, 0, 0);
500 teal = TargetColor(0, 0xFFu, 0xFFu);
501 uNumBlueFacesInBLVMinimap = 0;
502 if ( pIndoor->pMapOutlines->uNumOutlines )
503 {
504 for ( uint i = 0; i < pIndoor->pMapOutlines->uNumOutlines; ++i )
505 {
506 if ( !(BYTE1(pIndoor->pFaces[pIndoor->pMapOutlines->pOutlines[i].uFace1ID].uAttributes) & 0x20
507 || (BYTE1(pIndoor->pFaces[pIndoor->pMapOutlines->pOutlines[i].uFace2ID].uAttributes) & 0x20) ))
508 {
509 if ( !(pIndoor->pMapOutlines->pOutlines[i].uFlags & 1) )
510 {
511 if ( !(!(pIndoor->pFaces[pIndoor->pMapOutlines->pOutlines[i].uFace1ID].uAttributes & 0x80)
512 && !(pIndoor->pFaces[pIndoor->pMapOutlines->pOutlines[i].uFace2ID].uAttributes & 0x80u) ))
460 { 513 {
461 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor) 514 pIndoor->pMapOutlines->pOutlines[i].uFlags = pIndoor->pMapOutlines->pOutlines[i].uFlags | 1;
462 v5 = 680; 515 pIndoor->_visible_outlines[i >> 3] |= 1 << (7 - i % 8);
463 } 516 }
517 }
518 if ( (!(pIndoor->pMapOutlines->pOutlines[i].uFlags & 1)
519 && !(!(pIndoor->pFaces[pIndoor->pMapOutlines->pOutlines[i].uFace1ID].uAttributes & 0x80)
520 && !(pIndoor->pFaces[pIndoor->pMapOutlines->pOutlines[i].uFace2ID].uAttributes & 0x80u) ))
521 || pIndoor->pMapOutlines->pOutlines[i].uFlags & 1)
522 {
523 v93 = (unsigned __int16 *)(pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uVertex1ID].x - viewparams->sViewCenterX);
524 screenHeight = pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uVertex1ID].y - pCenterY;
525 v20 = pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uVertex2ID].y - pCenterY;
526 v95 = pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uVertex2ID].x - viewparams->sViewCenterX;
527 v97 = (const void *)v20;
528 v88 = (unsigned __int64)((pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uVertex1ID].x - viewparams->sViewCenterX) * (signed __int64)viewparams->field_2C) >> 16;
529 v87 = (unsigned __int64)((signed int)screenHeight * (signed __int64)viewparams->field_2C) >> 16;
530 v93 = (unsigned __int16 *)((unsigned __int64)((pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uVertex2ID].x - viewparams->sViewCenterX) * (signed __int64)viewparams->field_2C) >> 16);
531 screenHeight = (unsigned __int64)(v20 * (signed __int64)viewparams->field_2C) >> 16;
532 pRenderer->RasterLine2D(screenCenter_X + v88, screenCenterY - v87,
533 screenCenter_X + ((unsigned __int64)((pIndoor->pVertices[pIndoor->pMapOutlines->pOutlines[i].uVertex2ID].x - viewparams->sViewCenterX) * (signed __int64)viewparams->field_2C) >> 16), screenCenterY - screenHeight, black);
534 }
464 } 535 }
465 else 536 }
466 { 537 }
467 v6 = viewparams->indoor_center_x; 538 v21 = 0;
468 v86 = viewparams->indoor_center_x; 539 if ( (signed int)uNumBlueFacesInBLVMinimap > 0 )
469 v84 = viewparams->indoor_center_y; 540 {
470 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor) 541 while ( 1 )
471 v5 = viewparams->field_2C - 34; 542 {
472 } 543 v22 = pBlueFacesInBLVMinimapIDs[v21];
473 if ( uCurrentlyLoadedLevelType != LEVEL_Indoor) 544 v87 = viewparams->field_2C;
474 { 545 v23 = &pIndoor->pMapOutlines->pOutlines[v22];
475 screenWidth = br_x - tl_x + 1; 546 v24 = &pIndoor->pVertices[v23->uVertex1ID];
476 screenHeight = br_y - tl_y + 1; 547 v25 = &pIndoor->pVertices[v23->uVertex2ID];
477 render16_data = &pRenderer->pTargetSurface[tl_x + tl_y * surfPitch]; 548 v26 = v25->x;
478 texture8_data = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].pLevelOfDetail0_prolly_alpha_mask; 549 v27 = (unsigned __int16 *)(v24->x - pCenterX);
479 pPalette_16 = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].pPalette16; 550 v28 = v24->y - pCenterY;
480 scale_increment = (1 << (pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].uWidthLn2 + 16)) / v5; 551 v29 = v25->y - pCenterY;
481 552 v93 = v27;
482 v30 = (double)(1 << (16 - pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].uWidthLn2)); 553 screenHeight = v28;
483 554 v97 = (const void *)v29;
484 555 v87 = (unsigned __int64)((signed int)v27 * (signed __int64)viewparams->field_2C) >> 16;
485 teal = (unsigned int)(signed __int64)((double)(v6 - 22528 / (v5 / 384) + 32768) / v30) << 16; 556 v88 = (unsigned __int64)(v28 * (signed __int64)viewparams->field_2C) >> 16;
486 // v97 = (const void *)((unsigned int)(signed __int64)((double)(v6 - 22528 / (v5 / 384) + 32768) / v30) << 16); 557 uint i = (unsigned __int64)((v26 - pCenterX) * (signed __int64)viewparams->field_2C) >> 16;
487 558 v95 = (unsigned __int64)(v29 * (signed __int64)viewparams->field_2C) >> 16;
488 // v32 = map_texture_16; 559 pRenderer->RasterLine2D(screenCenter_X + ((unsigned __int64)((signed int)v27 * (signed __int64)viewparams->field_2C) >> 16),
489 textr_width = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].uTextureWidth; 560 screenCenterY - v88, screenCenter_X + ((unsigned __int64)((v26 - pCenterX) * (signed __int64)viewparams->field_2C) >> 16), screenCenterY - v95, teal);
490 stepY_r = (int)(signed __int64)((double)(- v84 - 22528 / (v5 / 384)+ 32768) / v30) << 16; 561 ++v21;
491 // v81 = (signed __int16)(signed __int64)((double)(v6 - 22528 / (v5 / 384) + 32768) / v30); 562 if ( v21 >= (signed int)uNumBlueFacesInBLVMinimap )
492 black = (signed __int16)(signed __int64)((double)(v6 - 22528 / (v5 / 384) + 32768) / v30); 563 break;
493 564 }
494 // v76 = textr_width; 565 viewparams->sViewCenterX = pCenterX;
495 scaled_posY = stepY_r >> 16; 566 }
496 //nearest neiborhood scaling 567 }
497 if ( texture8_data) 568 v47 = ((unsigned __int64)((pParty->vPosition.x - viewparams->sViewCenterX) * (signed __int64)viewparams->field_2C) >> 16) + screenCenter_X - 3;
498 { 569 v81 = pParty->vPosition.y - pCenterY;
499 for(uint i=0; i<screenHeight;++i) 570 v97 = (const void *)((unsigned __int64)((pParty->vPosition.y - pCenterY) * (signed __int64)viewparams->field_2C) >> 16);
571 v48 = 1;
572 v49 = screenCenterY - (int)v97 - 3;
573 if ( v47 >= (signed int)tl_x )
574 {
575 if ( v47 > (signed int)br_x )
576 {
577 if ( (signed int)(((unsigned __int64)((pParty->vPosition.x - viewparams->sViewCenterX) * (signed __int64)viewparams->field_2C) >> 16) + screenCenter_X - 6) > (signed int)br_x )
578 v48 = 0;
579 v47 = br_x;
580 }
581 }
582 else
583 {
584 if ( (signed int)(((unsigned __int64)((pParty->vPosition.x - viewparams->sViewCenterX) * (signed __int64)viewparams->field_2C) >> 16) + screenCenter_X) < (signed int)tl_x )
585 v48 = 0;
586 v47 = tl_x;
587 }
588 if ( v49 >= (signed int)tl_y )
589 {
590 if ( v49 > br_y )
591 {
592 if ( screenCenterY - (signed int)v97 - 6 > br_y )
593 v48 = 0;
594 v49 = br_y;
595 }
596 }
597 else
598 {
599 if ( screenCenterY - (signed int)v97 < (signed int)tl_y )
600 v48 = 0;
601 v49 = tl_y;
602 }
603 if ( v48 == 1 )
604 {
605 v51 = pParty->sRotationY & stru_5C6E00->uDoublePiMask;
606 if ( (signed int)v51 <= 1920 )
607 v50 = 7;
608 if ( (signed int)v51 < 1664 )
609 v50 = 6;
610 if ( (signed int)v51 <= 1408 )
611 v50 = 5;
612 if ( (signed int)v51 < 1152 )
613 v50 = 4;
614 if ( (signed int)v51 <= 896 )
615 v50 = 3;
616 if ( (signed int)v51 < 640 )
617 v50 = 2;
618 if ( (signed int)v51 <= 384 )
619 v50 = 1;
620 if ( (signed int)v51 < 128 )
621 v50 = 0;
622 pRenderer->DrawTransparentRedShade(v47, v49, pIcons_LOD->GetTexture(pTextureIDs_pMapDirs[v50]));
623 }
624 result = TargetColor(0xFFu, 0xFFu, 0xFFu);
625 v95 = 0;
626 pCenterX = result;
627 if ( (signed int)uNumLevelDecorations > 0 )
628 {
629 screenWidth = (unsigned int)&pLevelDecorations[0].vPosition;
630 do
631 {
632 if ( *(char *)(screenWidth - 2) & 8 )
633 {
634 v53 = *(int *)(screenWidth + 4) - pCenterY;
635 v93 = (unsigned __int16 *)(*(int *)screenWidth - viewparams->sViewCenterX);
636 screenHeight = v53;
637 v54 = ((unsigned __int64)((signed int)v93 * (signed __int64)viewparams->field_2C) >> 16) + screenCenter_X;
638 v97 = (const void *)((unsigned __int64)(v53 * (signed __int64)viewparams->field_2C) >> 16);
639 v55 = screenCenterY - (int)v97;
640 if ( v54 >= pRenderer->raster_clip_x )
641 {
642 if ( v54 <= pRenderer->raster_clip_z && v55 >= pRenderer->raster_clip_y && v55 <= pRenderer->raster_clip_w )
500 { 643 {
501 curr_line=&texture8_data[scaled_posY*textr_width]; 644 if ( viewparams->field_2C > 512 )
502 stepX_r=teal; 645 {
503 for(uint j=0; j<screenWidth;++j) 646 v96 = v55 + 1;
504 { 647 black = v55 - 1;
505 scaled_posX=stepX_r>>16; 648 pRenderer->RasterLine2D(v54 - 1, v55 - 1, v54 - 1, v55 + 1, pCenterX);
506 map_texture_16[i*screenWidth+j]=pPalette_16[*(curr_line+scaled_posX)]; 649 pRenderer->RasterLine2D(v54, black, v54, v96, pCenterX);
507 stepX_r+=scale_increment; 650 ++v54;
508 } 651 v72 = v96;
509 stepY_r+=scale_increment; 652 v71 = v54;
510 scaled_posY=stepY_r>>16; 653 v70 = black;
654 }
655 else
656 {
657 v72 = screenCenterY - (int)v97;
658 v71 = ((unsigned __int64)((signed int)v93 * (signed __int64)viewparams->field_2C) >> 16) + screenCenter_X;
659 v70 = screenCenterY - (int)v97;
660 }
661 pRenderer->RasterLine2D(v54, v70, v71, v72, pCenterX);
511 } 662 }
663 }
512 } 664 }
513 //move visible square to render
514 for(uint i=0; i<screenHeight;++i)
515 {
516 if ( screenWidth > 0 )
517 {
518 memcpy((void*)&render16_data[surfPitch*i],(void*)&map_texture_16[i*screenWidth], screenWidth*2);
519 }
520 }
521 }
522 else
523 {
524 black = TargetColor(0, 0, 0);
525 teal = TargetColor(0, 0xFFu, 0xFFu);
526 v7 = pIndoor->pMapOutlines;
527 uNumBlueFacesInBLVMinimap = 0;
528 v8 = pIndoor->pMapOutlines->uNumOutlines == 0;
529 v9 = pIndoor->pMapOutlines->uNumOutlines < 0;
530 screenWidth = 0;
531 if ( !(v9 | v8) )
532 {
533 i = 0;
534 do
535 {
536 v10 = (int)((char *)v7 + i + 4);
537 v96 = pIndoor->pFaces[*(short *)((char *)v7 + i + 8)].uAttributes;
538 if ( !(BYTE1(v96) & 0x20 || (v11 = pIndoor->pFaces[*(short *)((char *)v7 + i + 10)].uAttributes, BYTE1(v11) & 0x20) ))
539 {
540 v12 = *(short *)((char *)v7 + i + 14);
541 if ( !(v12 & 1) )
542 {
543 if ( !(!(v96 & 0x80) && (v11 & 0x80u) == 0 ))
544 {
545 v96 = (signed int)screenWidth >> 3;
546 v13 = screenWidth;
547 *(short *)(v10 + 10) = v12 | 1;
548 pIndoor->_visible_outlines[v96] |= 1 << (7 - v13 % 8);
549 }
550 }
551 if ( (!(v12 & 1) && !(!(v96 & 0x80) && (v11 & 0x80u) == 0 )) || v12 & 1)
552 {
553 v14 = *(short *)v10;
554 v88 = v5;
555 v15 = &pIndoor->pVertices[v14];
556 v16 = v15->x;
557 v17 = v15->y - v84;
558 v93 = (unsigned __int16 *)(v16 - v6);
559 screenHeight = v17;
560 v18 = &pIndoor->pVertices[*(short *)(v10 + 2)];
561 v19 = v18->x;
562 v20 = v18->y - v84;
563 v95 = v19 - v6;
564 v97 = (const void *)v20;
565 v88 = (unsigned __int64)((v16 - v6) * (signed __int64)v5) >> 16;
566 v87 = (unsigned __int64)((signed int)screenHeight * (signed __int64)v5) >> 16;
567 v93 = (unsigned __int16 *)((unsigned __int64)((v19 - v6) * (signed __int64)v5) >> 16);
568 screenHeight = (unsigned __int64)(v20 * (signed __int64)v5) >> 16;
569 pRenderer->RasterLine2D(
570 screenCenter_X + v88,
571 screenCenterY - v87,
572 screenCenter_X + ((unsigned __int64)((v19 - v6) * (signed __int64)v5) >> 16),
573 screenCenterY - screenHeight,
574 black);
575 v7 = pIndoor->pMapOutlines;
576 }
577 }
578 ++screenWidth;
579 i += 12;
580 }
581 while ( screenWidth < (signed int)v7->uNumOutlines );
582 }
583 v21 = 0;
584 if ( (signed int)uNumBlueFacesInBLVMinimap > 0 )
585 {
586 while ( 1 )
587 {
588 v22 = pBlueFacesInBLVMinimapIDs[v21];
589 v87 = v5;
590 v23 = &v7->pOutlines[v22];
591 v24 = &pIndoor->pVertices[v23->uVertex1ID];
592 v25 = &pIndoor->pVertices[v23->uVertex2ID];
593 v26 = v25->x;
594 v27 = (unsigned __int16 *)(v24->x - v86);
595 v28 = v24->y - v84;
596 v29 = v25->y - v84;
597 v93 = v27;
598 screenHeight = v28;
599 v97 = (const void *)v29;
600 v87 = (unsigned __int64)((signed int)v27 * (signed __int64)v5) >> 16;
601 v88 = (unsigned __int64)(v28 * (signed __int64)v5) >> 16;
602 i = (unsigned __int64)((v26 - v86) * (signed __int64)v5) >> 16;
603 v95 = (unsigned __int64)(v29 * (signed __int64)v5) >> 16;
604 pRenderer->RasterLine2D(
605 screenCenter_X + ((unsigned __int64)((signed int)v27 * (signed __int64)v5) >> 16),
606 screenCenterY - v88,
607 screenCenter_X + ((unsigned __int64)((v26 - v86) * (signed __int64)v5) >> 16),
608 screenCenterY - v95,
609 teal);
610 ++v21;
611 if ( v21 >= (signed int)uNumBlueFacesInBLVMinimap )
612 break;
613 v7 = pIndoor->pMapOutlines;
614 }
615 v6 = v86;
616 }
617 }
618 v47 = ((unsigned __int64)((pParty->vPosition.x - v6) * (signed __int64)v5) >> 16) + screenCenter_X - 3;
619 v81 = pParty->vPosition.y - v84;
620 v97 = (const void *)((unsigned __int64)((pParty->vPosition.y - v84) * (signed __int64)v5) >> 16);
621 v48 = 1;
622 v49 = screenCenterY - (int)v97 - 3;
623 if ( v47 >= (signed int)tl_x )
624 {
625 if ( v47 > (signed int)br_x )
626 {
627 if ( (signed int)(((unsigned __int64)((pParty->vPosition.x - v6) * (signed __int64)v5) >> 16) + screenCenter_X - 6) > (signed int)br_x )
628 v48 = 0;
629 v47 = br_x;
630 }
631 }
632 else
633 {
634 if ( (signed int)(((unsigned __int64)((pParty->vPosition.x - v6) * (signed __int64)v5) >> 16) + screenCenter_X) < (signed int)tl_x )
635 v48 = 0;
636 v47 = tl_x;
637 }
638 if ( v49 >= (signed int)tl_y )
639 {
640 if ( v49 > br_y )
641 {
642 if ( screenCenterY - (signed int)v97 - 6 > br_y )
643 v48 = 0;
644 v49 = br_y;
645 }
646 }
647 else
648 {
649 if ( screenCenterY - (signed int)v97 < (signed int)tl_y )
650 v48 = 0;
651 v49 = tl_y;
652 }
653 if ( v48 == 1 )
654 {
655 v50 = 0;
656 v51 = pParty->sRotationY & stru_5C6E00->uDoublePiMask;
657 if ( (signed int)(pParty->sRotationY & stru_5C6E00->uDoublePiMask) >= 128 )
658 {
659 if ( (signed int)v51 > 384 )
660 {
661 if ( (signed int)v51 >= 640 )
662 {
663 if ( (signed int)v51 > 896 )
664 {
665 if ( (signed int)v51 >= 1152 )
666 {
667 if ( (signed int)v51 > 1408 )
668 {
669 if ( (signed int)v51 >= 1664 )
670 {
671 if ( (signed int)v51 <= 1920 )
672 v73 = 7;
673 }
674 else
675 {
676 v73 = 6;
677 }
678 }
679 else
680 {
681 v73 = 5;
682 }
683 }
684 else
685 {
686 v73 = 4;
687 }
688 }
689 else
690 {
691 v73 = 3;
692 }
693 }
694 else
695 {
696 v73 = 2;
697 }
698 if( (signed int)v51 <=1920)
699 v50 = v73;
700 }
701 else
702 v50 = 1;
703 }
704 pRenderer->DrawTransparentRedShade(v47, v49, pIcons_LOD->GetTexture(pTextureIDs_pMapDirs[v50]));
705 }
706 result = TargetColor(0xFFu, 0xFFu, 0xFFu);
707 v95 = 0;
708 v86 = result;
709 if ( (signed int)uNumLevelDecorations > 0 )
710 {
711 screenWidth = (unsigned int)&pLevelDecorations[0].vPosition;
712 do
713 {
714 if ( *(char *)(screenWidth - 2) & 8 )
715 {
716 v53 = *(int *)(screenWidth + 4) - v84;
717 v93 = (unsigned __int16 *)(*(int *)screenWidth - v6);
718 screenHeight = v53;
719 v54 = ((unsigned __int64)((signed int)v93 * (signed __int64)v5) >> 16) + screenCenter_X;
720 v97 = (const void *)((unsigned __int64)(v53 * (signed __int64)v5) >> 16);
721 v55 = screenCenterY - (int)v97;
722 if ( v54 >= pRenderer->raster_clip_x )
723 {
724 if ( v54 <= pRenderer->raster_clip_z && v55 >= pRenderer->raster_clip_y && v55 <= pRenderer->raster_clip_w )
725 {
726 v74 = v86;
727 if ( v5 > 512 )
728 {
729 v96 = v55 + 1;
730 black = v55 - 1;
731 pRenderer->RasterLine2D(v54 - 1, v55 - 1, v54 - 1, v55 + 1, v86);
732 pRenderer->RasterLine2D(v54, black, v54, v96, v86);
733 ++v54;
734 v74 = v86;
735 v72 = v96;
736 v71 = v54;
737 v70 = black;
738 }
739 else
740 {
741 v72 = screenCenterY - (int)v97;
742 v71 = ((unsigned __int64)((signed int)v93 * (signed __int64)v5) >> 16) + screenCenter_X;
743 v70 = screenCenterY - (int)v97;
744 }
745 pRenderer->RasterLine2D(v54, v70, v71, v72, v74);
746 }
747 }
748 }
749 ++v95; 665 ++v95;
750 result = v95; 666 result = v95;
751 screenWidth += 32; 667 screenWidth += 32;
752 } 668 }
753 while ( (signed int)v95 < (signed int)uNumLevelDecorations ); 669 while ( (signed int)v95 < (signed int)uNumLevelDecorations );
754 } 670 }
755 if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor) 671 if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor)
756 { 672 {
757 screenCenterY = br_x - tl_x + 1; 673 screenCenterY = br_x - tl_x + 1;
758 v95 = br_y - tl_y + 1; 674 v95 = br_y - tl_y + 1;
759 v77 = &pRenderer->pTargetSurface[tl_x + tl_y * surfPitch]; 675 v77 = &pRenderer->pTargetSurface[tl_x + tl_y * pRenderer->uTargetSurfacePitch];
760 v56 = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].uWidthLn2; 676 v56 = pIcons_LOD->pTextures[viewparams->uTextureID_LocationMap].uWidthLn2;
761 black = (1 << (v56 + 16)) / v5; 677 black = (1 << (v56 + 16)) / viewparams->field_2C;
762 v57 = (double)(1 << (16 - v56)); 678 v57 = (double)(1 << (16 - v56));
763 v58 = 22528 / (v5 / 384); 679 v58 = 22528 / (viewparams->field_2C / 384);
764 v59 = (signed __int64)((double)(v6 - v58 + 32768) / v57); 680 v59 = (signed __int64)((double)(viewparams->sViewCenterX - v58 + 32768) / v57);
765 v60 = (int)v59 << 16; 681 v60 = (int)v59 << 16;
766 v97 = (const void *)((int)v59 << 16); 682 v97 = (const void *)((int)v59 << 16);
767 v61 = (signed __int64)((double)(32768 - v58 - v84) / v57); 683 v61 = (signed __int64)((double)(32768 - v58 - pCenterY) / v57);
768 pPalette_16 = (unsigned __int16 *)(v60 >> 16); 684 pPalette_16 = (unsigned __int16 *)(v60 >> 16);
769 v62 = (int)v61 << 16; 685 v62 = (int)v61 << 16;
770 teal = v60 >> 16; 686 teal = v60 >> 16;
771 v63 = (signed __int16)v61; 687 v63 = (signed __int16)v61;
772 a4a = map_texture_16; 688 a4a = map_texture_16;
811 v65 = v95; 727 v65 = v95;
812 v66 = map_texture_16; 728 v66 = map_texture_16;
813 if ( (signed int)v95 > 0 ) 729 if ( (signed int)v95 > 0 )
814 { 730 {
815 v67 = v77; 731 v67 = v77;
816 result = 2 * (surfPitch - screenCenterY); 732 result = 2 * (pRenderer->uTargetSurfacePitch - screenCenterY);
817 do 733 do
818 { 734 {
819 if ( screenCenterY > 0 ) 735 if ( screenCenterY > 0 )
820 { 736 {
821 v68 = screenCenterY; 737 v68 = screenCenterY;
835 } 751 }
836 while ( v65 ); 752 while ( v65 );
837 } 753 }
838 } 754 }
839 } 755 }
840
841