Move git root from Client/ to src/ to track all source code: - Client: Game client source (moved to Client/Client/) - Server: Game server source - GameTools: Development tools - CryptoSource: Encryption utilities - database: Database scripts - Script: Game scripts - rylCoder_16.02.2008_src: Legacy coder tools - GMFont, Game: Additional resources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
87 lines
1.9 KiB
C++
87 lines
1.9 KiB
C++
/* *********************************************************************
|
|
|
|
* CSceneStateMgr
|
|
|
|
* 파일 : SceneStateMgr.cpp
|
|
* 기능 : Caldron Engine 안에서 d3d 관련 matrix, State 등을 관리 하는 manager class
|
|
* history :
|
|
2003.12.15 (wizardbug) 작성
|
|
|
|
********************************************************************** */
|
|
|
|
#include "SceneStateMgr.h"
|
|
#include "BaseGraphicsLayer.h"
|
|
#include "SceneManager.h"
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
// Construction/Destruction
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
D3DXMATRIX CSceneStateMgr::ms_matList[D3DMATRIX_NUM];
|
|
DWORD CSceneStateMgr::ms_lstRenderState[D3DRENDERSTATE_NUM];
|
|
DWORD CSceneStateMgr::ms_lstTextureStageState[D3DTEXTURESTAGE_NUM][D3DTEXTURESTAGESTATE_NUM];
|
|
|
|
CSceneStateMgr::CSceneStateMgr()
|
|
{
|
|
|
|
}
|
|
|
|
CSceneStateMgr::~CSceneStateMgr()
|
|
{
|
|
|
|
}
|
|
void CSceneStateMgr::_ApplyD3DMatrix()
|
|
{
|
|
|
|
|
|
}
|
|
void CSceneStateMgr::_Init()
|
|
{
|
|
int i,j;
|
|
for(i = 0; i < D3DRENDERSTATE_NUM; i++ )
|
|
{
|
|
ms_lstRenderState[i] = 0xffffffff;
|
|
}
|
|
for(i = 0; i < D3DTEXTURESTAGE_NUM; i++ )
|
|
{
|
|
for(j = 0; j < D3DTEXTURESTAGESTATE_NUM; j++ )
|
|
{
|
|
ms_lstTextureStageState[i][j] = 0xffffffff;
|
|
}
|
|
}
|
|
|
|
for(i = 0; i < D3DMATRIX_NUM; i++ )
|
|
{
|
|
D3DXMatrixIdentity(&(ms_matList[i]));
|
|
}
|
|
|
|
}
|
|
void CSceneStateMgr::_Release() {
|
|
|
|
}
|
|
|
|
void CSceneStateMgr::_SetD3DRenderState(D3DRENDERSTATETYPE Type,DWORD Value) {
|
|
|
|
if(D3DRENDERSTATE_NUM > Type)//ms_lstRenderState[Type] != Value) //Minotaurs
|
|
{
|
|
ms_lstRenderState[Type] = Value;
|
|
CSceneManager::GetDevice()->SetRenderState(Type,Value);
|
|
|
|
}
|
|
}
|
|
void CSceneStateMgr::_SetD3DTextureStageState(DWORD Stage,D3DTEXTURESTAGESTATETYPE Type,DWORD Value)
|
|
{
|
|
|
|
if(Stage < D3DTEXTURESTAGE_NUM && Type < D3DTEXTURESTAGESTATE_NUM)//ms_lstTextureStageState[Stage][Type] != Value)
|
|
{
|
|
ms_lstTextureStageState[Stage][Type] = Value;
|
|
CSceneManager::GetDevice()->SetTextureStageState(Stage,Type,Value);
|
|
|
|
}
|
|
}
|
|
|
|
|