comparison Indoor.cpp @ 1638:ccde94f02b75

class IndoorCamera split into BLVRenderParams and ODMRenderParams
author Nomad
date Tue, 17 Sep 2013 15:40:09 +0200
parents 75fafd8ced59
children afc1c3514dd5
comparison
equal deleted inserted replaced
1637:2c71fa8913d2 1638:ccde94f02b75
27 #include "AudioPlayer.h" 27 #include "AudioPlayer.h"
28 #include "Log.h" 28 #include "Log.h"
29 #include "TurnEngine.h" 29 #include "TurnEngine.h"
30 #include "PaletteManager.h" 30 #include "PaletteManager.h"
31 #include "MapInfo.h" 31 #include "MapInfo.h"
32 #include "IndoorCamera.h"
33 #include "Lights.h" 32 #include "Lights.h"
34 33
35 #include "mm7_data.h" 34 #include "mm7_data.h"
36 #include "MM7.h" 35 #include "MM7.h"
37 #include "Sprites.h" 36 #include "Sprites.h"
331 PrepareDrawLists_BLV(_this); 330 PrepareDrawLists_BLV(_this);
332 if (pBLVRenderParams->uPartySectorID) 331 if (pBLVRenderParams->uPartySectorID)
333 IndoorLocation::ExecDraw(pRenderer->pRenderD3D != 0); 332 IndoorLocation::ExecDraw(pRenderer->pRenderD3D != 0);
334 pRenderer->DrawBillboardList_BLV(); 333 pRenderer->DrawBillboardList_BLV();
335 334
336 if ( !pRenderer->pRenderD3D ) 335 /* if ( !pRenderer->pRenderD3D )
337 { 336 {
338 if (pBLVRenderParams->uFlags & INDOOR_CAMERA_DRAW_D3D_OUTLINES) 337 if (pBLVRenderParams->uFlags & INDOOR_CAMERA_DRAW_D3D_OUTLINES)
339 pBspRenderer->DrawFaceOutlines(); 338 pBspRenderer->DrawFaceOutlines();
340 if (pBLVRenderParams->uFlags & INDOOR_CAMERA_DRAW_SW_OUTLINES) 339 if (pBLVRenderParams->uFlags & INDOOR_CAMERA_DRAW_SW_OUTLINES)
341 { 340 {
361 } 360 }
362 while ( pNode->PortalScreenData._viewport_space_y <= pNode->PortalScreenData._viewport_space_w ); 361 while ( pNode->PortalScreenData._viewport_space_y <= pNode->PortalScreenData._viewport_space_w );
363 } 362 }
364 } 363 }
365 } 364 }
366 } 365 }*/
367 } 366 }
368 367
369 368
370 369
371 370
378 int v2; // [sp+44h] [bp-8h]@5 377 int v2; // [sp+44h] [bp-8h]@5
379 int v3; // [sp+48h] [bp-4h]@5 378 int v3; // [sp+48h] [bp-4h]@5
380 379
381 _this.uFlags = 0; 380 _this.uFlags = 0;
382 if (viewparams->draw_sw_outlines) 381 if (viewparams->draw_sw_outlines)
383 _this.uFlags |= INDOOR_CAMERA_DRAW_SW_OUTLINES; 382 _this.uFlags |= BLV_RENDER_DRAW_SW_OUTLINES;
384 if (viewparams->draw_d3d_outlines) 383 if (viewparams->draw_d3d_outlines)
385 _this.uFlags |= INDOOR_CAMERA_DRAW_D3D_OUTLINES; 384 _this.uFlags |= BLV_RENDER_DRAW_D3D_OUTLINES;
386 385
387 _this.uFlags |= INDOOR_CAMERA_DRAW_D3D_OUTLINES; 386 _this.uFlags |= BLV_RENDER_DRAW_SW_OUTLINES;
388 _this.uFlags |= INDOOR_CAMERA_DRAW_SW_OUTLINES; 387 _this.uFlags |= BLV_RENDER_DRAW_D3D_OUTLINES;
389 //INDOOR_CAMERA_DRAW_TERRAIN_OUTLINES
390 388
391 _this.field_0_timer = pEventTimer->uTotalGameTimeElapsed; 389 _this.field_0_timer = pEventTimer->uTotalGameTimeElapsed;
392 _this.field_1C_mb_fov = 65; 390 _this.field_1C_mb_fov = 65;
393 _this.vPosition.x = pParty->vPosition.x - fixpoint_sub0(stru_5C6E00->Cos(pParty->sRotationY), pParty->y_rotation_granularity); 391 _this.vPosition.x = pParty->vPosition.x - fixpoint_sub0(stru_5C6E00->Cos(pParty->sRotationY), pParty->y_rotation_granularity);
394 _this.vPosition.y = pParty->vPosition.y - fixpoint_sub0(stru_5C6E00->Sin(pParty->sRotationY), pParty->y_rotation_granularity); 392 _this.vPosition.y = pParty->vPosition.y - fixpoint_sub0(stru_5C6E00->Sin(pParty->sRotationY), pParty->y_rotation_granularity);
801 assert(num_nodes < 150); 799 assert(num_nodes < 150);
802 800
803 nodes[num_nodes].viewing_portal_id = uFaceID; 801 nodes[num_nodes].viewing_portal_id = uFaceID;
804 AddBspNodeToRenderList(++num_nodes - 1); 802 AddBspNodeToRenderList(++num_nodes - 1);
805 } 803 }
806 if (pBLVRenderParams->uFlags & INDOOR_CAMERA_DRAW_SW_OUTLINES) 804 if (pBLVRenderParams->uFlags & BLV_RENDER_DRAW_SW_OUTLINES)
807 pGame->pIndoorCameraD3D->PrepareAndDrawDebugOutline(pFace, 0x1E1EFF); 805 pGame->pIndoorCameraD3D->PrepareAndDrawDebugOutline(pFace, 0x1E1EFF);
808 //pGame->pIndoorCameraD3D->DebugDrawPortal(pFace); 806 //pGame->pIndoorCameraD3D->DebugDrawPortal(pFace);
809 } 807 }
810 } 808 }
811 809