forked from multitheftauto/mtasa-blue
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into 050824_Async-dbConnect
- Loading branch information
Showing
124 changed files
with
1,944 additions
and
1,147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/***************************************************************************** | ||
* | ||
* PROJECT: Multi Theft Auto v1.0 | ||
* LICENSE: See LICENSE in the top level directory | ||
* FILE: game_sa/CRendererSA.cpp | ||
* PURPOSE: Game renderer class | ||
* | ||
* Multi Theft Auto is available from http://www.multitheftauto.com/ | ||
* | ||
*****************************************************************************/ | ||
|
||
#include "StdInc.h" | ||
#include "CRendererSA.h" | ||
#include "CModelInfoSA.h" | ||
#include "CMatrix.h" | ||
#include "gamesa_renderware.h" | ||
|
||
CRendererSA::CRendererSA() | ||
{ | ||
} | ||
|
||
CRendererSA::~CRendererSA() | ||
{ | ||
} | ||
|
||
void CRendererSA::RenderModel(CModelInfo* pModelInfo, const CMatrix& matrix) | ||
{ | ||
CBaseModelInfoSAInterface* pModelInfoSAInterface = pModelInfo->GetInterface(); | ||
if (!pModelInfoSAInterface) | ||
return; | ||
|
||
RwObject* pRwObject = pModelInfoSAInterface->pRwObject; | ||
if (!pRwObject) | ||
return; | ||
|
||
RwFrame* pFrame = RpGetFrame(pRwObject); | ||
|
||
static RwMatrix rwMatrix; | ||
rwMatrix.right = (RwV3d&)matrix.vRight; | ||
rwMatrix.up = (RwV3d&)matrix.vFront; | ||
rwMatrix.at = (RwV3d&)matrix.vUp; | ||
rwMatrix.pos = (RwV3d&)matrix.vPos; | ||
RwFrameTransform(pFrame, &rwMatrix, rwCOMBINEREPLACE); | ||
|
||
if (pRwObject->type == RP_TYPE_ATOMIC) | ||
{ | ||
RpAtomic* pRpAtomic = reinterpret_cast<RpAtomic*>(pRwObject); | ||
pRpAtomic->renderCallback(reinterpret_cast<RpAtomic*>(pRwObject)); | ||
} | ||
else | ||
{ | ||
RpClump* pClump = reinterpret_cast<RpClump*>(pRwObject); | ||
RpClumpRender(pClump); | ||
} | ||
} |
Oops, something went wrong.