Restructure repository to include all source folders
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>
This commit is contained in:
955
GameTools/CHARACTERACTIONCONTROL/CCameraScript.cpp
Normal file
955
GameTools/CHARACTERACTIONCONTROL/CCameraScript.cpp
Normal file
@@ -0,0 +1,955 @@
|
||||
#include "CCameraScript.h"
|
||||
#include "SceneManager.h"
|
||||
#include "SceneStateMgr.h"
|
||||
|
||||
|
||||
extern D3DXVECTOR3 g_vecCube[8];
|
||||
extern WORD g_vecCubeIndex[36];
|
||||
|
||||
|
||||
CCameraScript::CCameraScript() {
|
||||
|
||||
m_pDevice = CSceneManager::GetDevice();
|
||||
m_pDevice->GetTransform(D3DTS_VIEW, &m_matBeforeView);
|
||||
InitCameraScript();
|
||||
m_iFixCount = 0;
|
||||
m_bBackWord = false;
|
||||
m_bInitPos = false;
|
||||
|
||||
|
||||
|
||||
}
|
||||
CCameraScript::~CCameraScript() {
|
||||
|
||||
m_lstEvent.clear();
|
||||
m_lstPosSpline.clear();
|
||||
m_lstLookSpline.clear();
|
||||
|
||||
m_pDevice->SetTransform(D3DTS_VIEW, &m_matBeforeView);
|
||||
|
||||
}
|
||||
void CCameraScript::ReWindFix() {
|
||||
if(m_iFixCount > 0)
|
||||
m_iFixCount--;
|
||||
else
|
||||
m_iFixCount = (m_iEventNum - 1);
|
||||
}
|
||||
|
||||
void CCameraScript::Rewind() {
|
||||
if(m_iBeforeEvent > 0)
|
||||
m_iBeforeEvent--;
|
||||
else
|
||||
m_iBeforeEvent = (m_iEventNum - 1);
|
||||
m_fRunFrame = m_lstEvent[m_iBeforeEvent].m_fFrame;
|
||||
|
||||
}
|
||||
|
||||
void CCameraScript::FoWindFix() {
|
||||
if(m_iFixCount < (m_iEventNum - 1))
|
||||
m_iFixCount++;
|
||||
else
|
||||
m_iFixCount = 0;
|
||||
|
||||
}
|
||||
|
||||
void CCameraScript::Fowind() {
|
||||
if(m_iBeforeEvent < (m_iEventNum-1))
|
||||
m_iBeforeEvent++;
|
||||
else
|
||||
m_iBeforeEvent = 0;
|
||||
m_fRunFrame = m_lstEvent[m_iBeforeEvent].m_fFrame;
|
||||
}
|
||||
void CCameraScript::Jump(int iEvent) {
|
||||
|
||||
if((iEvent >= 0) && (iEvent < m_iEventNum)) {
|
||||
m_iBeforeEvent = iEvent;
|
||||
m_fRunFrame = m_lstEvent[m_iBeforeEvent].m_fFrame;
|
||||
}
|
||||
}
|
||||
void CCameraScript::InitFrame() {
|
||||
// m_bStart = false;
|
||||
m_dwBeforeTick = 0;
|
||||
m_fRunFrame = 0.0f;
|
||||
m_iBeforeEvent = 0;
|
||||
|
||||
|
||||
}
|
||||
|
||||
void CCameraScript::PlayScript(int iRoll,int iLoop,bool bFixPos) {
|
||||
|
||||
int i;
|
||||
if(m_bStart == false)
|
||||
return;
|
||||
|
||||
if(m_lstEvent.empty())
|
||||
return;
|
||||
|
||||
m_dwCurrentTick = timeGetTime();
|
||||
float fSkipFrame = 0.0f;
|
||||
|
||||
if(m_dwBeforeTick == 0) { // ù <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
fSkipFrame = 0;
|
||||
m_matBeforePos = *(CSceneManager::m_ViewCamera->GetMatPosition());
|
||||
m_matBeforeView2 = CSceneManager::m_ViewCamera->m_matView;
|
||||
}
|
||||
else {
|
||||
fSkipFrame = ((int)m_dwCurrentTick - (int)m_dwBeforeTick) / (float)CAMERAFRAMESTEP;
|
||||
}
|
||||
|
||||
//m_fRunFrame += fSkipFrame;
|
||||
m_fRunFrame += 0.6f;
|
||||
|
||||
if(iRoll == 0) { // Play
|
||||
|
||||
if(m_fRunFrame < m_lstEvent[m_iBeforeEvent].m_fFrame )
|
||||
{
|
||||
m_fRunFrame = m_lstEvent[m_iBeforeEvent].m_fFrame;
|
||||
}
|
||||
|
||||
i = m_iBeforeEvent + 1;
|
||||
|
||||
for( i; i < m_iEventNum; i++ ) {
|
||||
if(m_fRunFrame >= m_lstEvent[i].m_fFrame) {
|
||||
m_iBeforeEvent = i;
|
||||
}
|
||||
}
|
||||
|
||||
if((m_iEventNum - 1) == m_iBeforeEvent) { // Looping ó<><C3B3>
|
||||
if(iLoop == 1) {
|
||||
m_iBeforeEvent = 0;
|
||||
m_dwBeforeTick = 0;
|
||||
m_fRunFrame = 0.0f;
|
||||
|
||||
}
|
||||
else { // Looping X
|
||||
m_iBeforeEvent = m_iEventNum - 1;
|
||||
m_fRunFrame = m_lstEvent[m_iBeforeEvent].m_fFrame;
|
||||
m_bStart = false;
|
||||
InitFrame();
|
||||
if(bFixPos)
|
||||
{
|
||||
CSceneManager::m_ViewCamera->SetMatView(m_matBeforeView2);
|
||||
CSceneManager::m_ViewCamera->SetMatPosition(m_matBeforePos);
|
||||
CSceneManager::m_ViewCamera->MoveFrustum();
|
||||
CSceneManager::m_ViewCamera->SetVecPosition(vector3(m_matBeforePos._41,m_matBeforePos._42,m_matBeforePos._43));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
float fInterpol;
|
||||
if(m_iBeforeEvent == (m_iEventNum - 1))
|
||||
fInterpol = 1.0f;
|
||||
else {
|
||||
fInterpol = (float)(m_fRunFrame - m_lstEvent[m_iBeforeEvent].m_fFrame) / (m_lstEvent[m_iBeforeEvent + 1].m_fFrame - m_lstEvent[m_iBeforeEvent].m_fFrame);
|
||||
}
|
||||
m_CurrentEvent.m_fFrame = m_fRunFrame;
|
||||
|
||||
|
||||
// Interpolation<6F><6E> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
D3DXVECTOR3 vecInterpol;
|
||||
|
||||
D3DXVECTOR3 vecInterPos;
|
||||
D3DXVECTOR3 vecInterLook;
|
||||
D3DXVECTOR3 vecInterUp;
|
||||
|
||||
switch(m_lstEvent[m_iBeforeEvent].m_iInterpolation) {
|
||||
case C_LINE:
|
||||
|
||||
if(fInterpol < 0.000001f) {
|
||||
vecInterPos = m_lstEvent[m_iBeforeEvent].m_vecCameraPos;
|
||||
vecInterLook = m_lstEvent[m_iBeforeEvent].m_vecCameraLook;
|
||||
vecInterUp = m_lstEvent[m_iBeforeEvent].m_vecCameraUp;
|
||||
}
|
||||
else {
|
||||
|
||||
int PosStart = m_lstEvent[m_iBeforeEvent].m_iPosStart;
|
||||
int iInterpolNum = m_lstEvent[m_iBeforeEvent].m_iPosEnd - m_lstEvent[m_iBeforeEvent].m_iPosStart;
|
||||
iInterpolNum *= fInterpol;
|
||||
vecInterPos = m_lstPosSpline[ PosStart + iInterpolNum];
|
||||
|
||||
PosStart = m_lstEvent[m_iBeforeEvent].m_iLookStart;
|
||||
iInterpolNum = m_lstEvent[m_iBeforeEvent].m_iLookEnd - m_lstEvent[m_iBeforeEvent].m_iLookStart;
|
||||
iInterpolNum *= fInterpol;
|
||||
vecInterLook = m_lstLookSpline[ PosStart + iInterpolNum];
|
||||
|
||||
/* vecInterpol = m_lstEvent[m_iBeforeEvent + 1].m_vecCameraPos - m_lstEvent[m_iBeforeEvent].m_vecCameraPos;
|
||||
vecInterPos = m_lstEvent[m_iBeforeEvent].m_vecCameraPos + (vecInterpol * fInterpol);
|
||||
|
||||
vecInterpol = m_lstEvent[m_iBeforeEvent + 1].m_vecCameraLook - m_lstEvent[m_iBeforeEvent].m_vecCameraLook;
|
||||
vecInterLook = m_lstEvent[m_iBeforeEvent].m_vecCameraLook + (vecInterpol * fInterpol);
|
||||
*/
|
||||
vecInterpol = m_lstEvent[m_iBeforeEvent + 1].m_vecCameraUp - m_lstEvent[m_iBeforeEvent].m_vecCameraUp;
|
||||
vecInterUp = m_lstEvent[m_iBeforeEvent].m_vecCameraUp + (vecInterpol * fInterpol);
|
||||
|
||||
}
|
||||
|
||||
break;
|
||||
case C_BEZIER1: // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 3
|
||||
if(fInterpol < 0.000001f) {
|
||||
vecInterPos = m_lstEvent[m_iBeforeEvent].m_vecCameraPos;
|
||||
vecInterLook = m_lstEvent[m_iBeforeEvent].m_vecCameraLook;
|
||||
vecInterUp = m_lstEvent[m_iBeforeEvent].m_vecCameraUp;
|
||||
}
|
||||
else {
|
||||
|
||||
int PosStart = m_lstEvent[m_iBeforeEvent].m_iPosStart;
|
||||
int iInterpolNum = m_lstEvent[m_iBeforeEvent].m_iPosEnd - m_lstEvent[m_iBeforeEvent].m_iPosStart;
|
||||
iInterpolNum *= fInterpol;
|
||||
vecInterPos = m_lstPosSpline[ PosStart + iInterpolNum];
|
||||
|
||||
PosStart = m_lstEvent[m_iBeforeEvent].m_iLookStart;
|
||||
iInterpolNum = m_lstEvent[m_iBeforeEvent].m_iLookEnd - m_lstEvent[m_iBeforeEvent].m_iLookStart;
|
||||
iInterpolNum *= fInterpol;
|
||||
vecInterLook = m_lstLookSpline[ PosStart + iInterpolNum];
|
||||
|
||||
|
||||
float fInterpol2 = fInterpol * fInterpol;
|
||||
/* vecInterPos = m_lstEvent[m_iBeforeEvent].m_vecCameraPos * ((1.0f - fInterpol) * (1.0f - fInterpol))
|
||||
+ (m_lstEvent[m_iBeforeEvent].m_vecControlPoint[0] * 2 * (1.0f - fInterpol) * fInterpol ) + (m_lstEvent[m_iBeforeEvent + 1].m_vecCameraPos * fInterpol2);
|
||||
vecInterLook = m_lstEvent[m_iBeforeEvent].m_vecCameraLook * ((1.0f - fInterpol) * (1.0f - fInterpol))
|
||||
+ (m_lstEvent[m_iBeforeEvent].m_vecControlPoint[0] * 2 * (1.0f - fInterpol) * fInterpol ) + (m_lstEvent[m_iBeforeEvent + 1].m_vecCameraLook * fInterpol2);*/
|
||||
vecInterUp = m_lstEvent[m_iBeforeEvent].m_vecCameraUp * ((1.0f - fInterpol) * (1.0f - fInterpol))
|
||||
+ (m_lstEvent[m_iBeforeEvent].m_vecControlPoint[0] * 2 * (1.0f - fInterpol) * fInterpol ) + (m_lstEvent[m_iBeforeEvent + 1].m_vecCameraUp * fInterpol2);
|
||||
|
||||
|
||||
}
|
||||
break;
|
||||
/*case C_BEZIER2: // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 4
|
||||
if(fInterpol < 0.000001f) {
|
||||
vecInterPos = m_lstEvent[m_iBeforeEvent].m_vecCameraPos;
|
||||
vecInterLook = m_lstEvent[m_iBeforeEvent].m_vecCameraLook;
|
||||
vecInterUp = m_lstEvent[m_iBeforeEvent].m_vecCameraUp;
|
||||
}
|
||||
else {
|
||||
|
||||
|
||||
}
|
||||
break;*/
|
||||
default:
|
||||
break;
|
||||
|
||||
};
|
||||
|
||||
m_CurrentEvent.m_vecCameraPos = vecInterPos;
|
||||
m_CurrentEvent.m_vecCameraLook = vecInterLook;
|
||||
m_CurrentEvent.m_vecCameraUp = D3DXVECTOR3(0.0f,1.0f,0.0f);
|
||||
|
||||
|
||||
}
|
||||
|
||||
D3DXMatrixLookAtLH(&m_matCurrentFrame,
|
||||
&(m_CurrentEvent.m_vecCameraPos),&(m_CurrentEvent.m_vecCameraLook),&(m_CurrentEvent.m_vecCameraUp));
|
||||
|
||||
m_dwBeforeTick = m_dwCurrentTick = timeGetTime();
|
||||
|
||||
}
|
||||
|
||||
bool CCameraScript::SaveScript(char *strFileName) {
|
||||
|
||||
if((strFileName != NULL) && strlen(strFileName) > 1) {
|
||||
FILE *fp = fopen(strFileName,"wb");
|
||||
if(fp != NULL) {
|
||||
float fVersion = CAMERASCRIPTVERSION;
|
||||
fwrite((float *)&fVersion,sizeof(float),1,fp);
|
||||
fwrite((int *)&m_iEventNum,sizeof(int),1,fp);
|
||||
fwrite((CCameraEvent *)&(m_lstEvent[0]),sizeof(CCameraEvent),m_iEventNum,fp);
|
||||
fclose(fp);
|
||||
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
bool CCameraScript::LoadScript(char *strFileName) {
|
||||
|
||||
if((strFileName != NULL) && strlen(strFileName) > 1) {
|
||||
float fVersion = 0.0f;
|
||||
|
||||
char strPath[256] = {0};
|
||||
|
||||
strcpy(strPath,EFFECTSCRIPTPATH);
|
||||
strcat(strPath,strFileName);
|
||||
|
||||
|
||||
FILE *fp = fopen(strPath,"rb");
|
||||
if(fp != NULL) {
|
||||
fread((float *)&fVersion,sizeof(float),1,fp);
|
||||
if((fVersion >= 0.9f) && (fVersion <= 1.1f)) {
|
||||
int i;
|
||||
|
||||
fread((int *)&m_iEventNum,sizeof(int),1,fp);
|
||||
|
||||
for( i = 0; i < m_iEventNum; i++ ) {
|
||||
CCameraEvent EmptyNode;
|
||||
m_lstEvent.push_back(EmptyNode);
|
||||
}
|
||||
|
||||
fread((CCameraEvent *)&(m_lstEvent[0]),sizeof(CCameraEvent),m_iEventNum,fp);
|
||||
}
|
||||
fclose(fp);
|
||||
m_iInsertLook = 1;
|
||||
CreateSpline();
|
||||
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
void CCameraScript::InitCameraScript(bool bInitPos,D3DXVECTOR3 vecInitPos,D3DXVECTOR3 vecInitLook) {
|
||||
m_lstEvent.clear();
|
||||
m_iEventNum = 0;
|
||||
m_iBeforeEvent = 0;
|
||||
m_fRunFrame = 0.0f;
|
||||
|
||||
m_dwBeforeTick = 0;
|
||||
m_bStart = false;
|
||||
|
||||
m_lstPosSpline.clear();
|
||||
m_bCreateSpline = false;
|
||||
|
||||
m_lstLookSpline.clear();
|
||||
m_bCreateLookSpline = false;
|
||||
m_iInsertLook = 0;
|
||||
m_iFixCount = 0;
|
||||
|
||||
m_bInitPos = bInitPos;
|
||||
m_vecCameraInitPos = vecInitPos;
|
||||
m_vecCameraInitLook = vecInitLook;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
int CCameraScript::GetFixCount(int &iIndex,float &fFrame) {
|
||||
if(m_lstEvent.size() > m_iFixCount)
|
||||
{
|
||||
iIndex = m_lstEvent[m_iFixCount].m_iIndex;
|
||||
fFrame = m_lstEvent[m_iFixCount].m_fFrame;
|
||||
}
|
||||
else
|
||||
{
|
||||
iIndex = 0;
|
||||
fFrame = 0;
|
||||
}
|
||||
|
||||
return m_iFixCount;
|
||||
|
||||
}
|
||||
void CCameraScript::FixLook(int iEvent,D3DXVECTOR3 vecLook) {
|
||||
m_lstEvent[iEvent].m_vecCameraLook = vecLook;
|
||||
|
||||
}
|
||||
void CCameraScript::InsertLookPos(D3DXVECTOR3 vecLook) {
|
||||
|
||||
if(m_iInsertLook >= m_lstEvent.size()) {
|
||||
MessageBox(NULL,"Look Pos <20>ʰ<EFBFBD> ","error",MB_OK);
|
||||
|
||||
return;
|
||||
}
|
||||
m_lstEvent[m_iInsertLook].m_vecCameraLook = vecLook;
|
||||
m_iInsertLook++;
|
||||
|
||||
char tmp[256]= {0};
|
||||
|
||||
int iNum = m_iInsertLook - m_lstEvent.size();
|
||||
sprintf(tmp,"%d <20><><EFBFBD><EFBFBD> Target Point <20><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.",iNum);
|
||||
MessageBox(NULL,tmp,"msg",MB_OK);
|
||||
|
||||
}
|
||||
int CCameraScript::InsertEvent( D3DXVECTOR3 vecPos,D3DXVECTOR3 vecLook,D3DXVECTOR3 vecUp,float fFrame,int iInterpol ) {
|
||||
|
||||
CCameraEvent Node;
|
||||
|
||||
Node.m_iIndex = m_iEventNum;
|
||||
Node.m_iInterpolation = iInterpol;
|
||||
Node.m_vecCameraPos = vecPos;
|
||||
Node.m_vecCameraLook = vecLook;
|
||||
Node.m_vecCameraUp = vecUp;
|
||||
Node.m_fFrame = fFrame;
|
||||
|
||||
m_lstEvent.push_back(Node);
|
||||
|
||||
return m_iEventNum++;
|
||||
}
|
||||
void CCameraScript::FixEvent(int iEvent,D3DXVECTOR3 vecPos,D3DXVECTOR3 vecLook,D3DXVECTOR3 vecUp)
|
||||
{
|
||||
if((iEvent< 0) || (iEvent >= m_iEventNum) )
|
||||
return;
|
||||
m_lstEvent[iEvent].m_vecCameraPos = vecPos;
|
||||
m_lstEvent[iEvent].m_vecCameraLook = vecLook;
|
||||
m_lstEvent[iEvent].m_vecCameraUp = vecUp;
|
||||
|
||||
}
|
||||
void CCameraScript::FixEvent( int iEvent,D3DXVECTOR3 vecPos,D3DXVECTOR3 vecLook,D3DXVECTOR3 vecUp,float fFrame,int iInterpol ) {
|
||||
if((iEvent< 0) || (iEvent >= m_iEventNum) )
|
||||
return;
|
||||
m_lstEvent[iEvent].m_vecCameraPos = vecPos;
|
||||
m_lstEvent[iEvent].m_vecCameraLook = vecLook;
|
||||
m_lstEvent[iEvent].m_vecCameraUp = vecUp;
|
||||
m_lstEvent[iEvent].m_fFrame = fFrame;
|
||||
m_lstEvent[iEvent].m_iInterpolation = iInterpol;
|
||||
}
|
||||
void CCameraScript::DeleteEvent(float fFrame,int iInterpol) {
|
||||
|
||||
if(m_iEventNum <= 0)
|
||||
return;
|
||||
int i;
|
||||
|
||||
for( i = 0 ; i < m_iEventNum; i++ )
|
||||
{
|
||||
if(((m_lstEvent[i].m_fFrame - fFrame) + (float)(m_lstEvent[i].m_iInterpolation - iInterpol)) <= 0.001f) {
|
||||
m_lstEvent.erase(&(m_lstEvent[i]));
|
||||
m_iEventNum--;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
void CCameraScript::DeleteEvent(int iIndex) {
|
||||
|
||||
if((iIndex <= 0) || (iIndex >= m_iEventNum))
|
||||
return;
|
||||
int i;
|
||||
|
||||
for( i = 0 ; i < m_iEventNum; i++ )
|
||||
{
|
||||
if(i == iIndex) {
|
||||
m_lstEvent.erase(&(m_lstEvent[i]));
|
||||
m_iEventNum--;
|
||||
|
||||
InitFrame();
|
||||
m_iFixCount = 0;
|
||||
if(m_iInsertLook >= m_iEventNum)
|
||||
m_iInsertLook = (m_iEventNum - 1);
|
||||
m_bCreateLookSpline = false;
|
||||
m_bCreateSpline = false;
|
||||
m_bStart = false;
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
void CCameraScript::BackWordEvent() // Event<6E><74> <20>ǵ<EFBFBD><C7B5><EFBFBD><EFBFBD><EFBFBD>.
|
||||
{
|
||||
int iCurrent;
|
||||
int iBackCurrent;
|
||||
|
||||
m_bBackWord = !m_bBackWord;
|
||||
|
||||
D3DXVECTOR3 vecTmpSwap;
|
||||
|
||||
|
||||
for(int i = 0; i < floor((float)m_iEventNum / 2.0f); i++ )
|
||||
{
|
||||
iCurrent = i;
|
||||
iBackCurrent = (m_iEventNum - 1) - i;
|
||||
|
||||
if(iCurrent != iBackCurrent)
|
||||
{
|
||||
vecTmpSwap = m_lstEvent[iCurrent].m_vecCameraLook;
|
||||
m_lstEvent[iCurrent].m_vecCameraLook = m_lstEvent[iBackCurrent].m_vecCameraLook;
|
||||
m_lstEvent[iBackCurrent].m_vecCameraLook = vecTmpSwap;
|
||||
|
||||
|
||||
vecTmpSwap = m_lstEvent[iCurrent].m_vecCameraPos;
|
||||
m_lstEvent[iCurrent].m_vecCameraPos = m_lstEvent[iBackCurrent].m_vecCameraPos;
|
||||
m_lstEvent[iBackCurrent].m_vecCameraPos = vecTmpSwap;
|
||||
|
||||
vecTmpSwap = m_lstEvent[iCurrent].m_vecCameraUp;
|
||||
m_lstEvent[iCurrent].m_vecCameraUp = m_lstEvent[iBackCurrent].m_vecCameraUp;
|
||||
m_lstEvent[iBackCurrent].m_vecCameraUp = vecTmpSwap;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if(m_bInitPos)
|
||||
{
|
||||
D3DXVECTOR3 vecUp = D3DXVECTOR3(0.0f,1.0f,0.0f);
|
||||
FixEvent(m_iEventNum -1,m_vecCameraInitPos,m_vecCameraInitLook,vecUp);
|
||||
FixEvent(m_iEventNum -2,m_vecCameraInitPos,m_vecCameraInitLook,vecUp);
|
||||
}
|
||||
|
||||
}
|
||||
void CCameraScript::SetPlay(bool bFlag,bool bBack,bool bStartPos) {
|
||||
m_bStart = bFlag;
|
||||
if(bBack && bFlag)
|
||||
{
|
||||
if(!m_bBackWord)
|
||||
{
|
||||
BackWordEvent();
|
||||
m_iInsertLook = 1;
|
||||
CreateSpline();
|
||||
}
|
||||
}
|
||||
else if(bFlag)
|
||||
{
|
||||
if(m_bBackWord)
|
||||
{
|
||||
BackWordEvent();
|
||||
m_iInsertLook = 1;
|
||||
CreateSpline();
|
||||
}
|
||||
}
|
||||
if(bStartPos && bFlag && !bBack) // Start pos <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>(0 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>̺<EFBFBD>Ʈ <20><><EFBFBD><EFBFBD>)
|
||||
{
|
||||
|
||||
matrix *matPos= CSceneManager::GetCamera()->GetMatPosition();
|
||||
vector3 vecCameraToward = CSceneManager::GetCamera()->GetViewTowardVector();
|
||||
//vector3 vecCameraUp = CSceneManager::GetCamera()->GetViewUpVector();
|
||||
|
||||
D3DXVECTOR3 vecCameraSPos = D3DXVECTOR3(matPos->_41,matPos->_42,matPos->_43);
|
||||
D3DXVECTOR3 vecCameraSLook = D3DXVECTOR3(vecCameraSPos.x + vecCameraToward.x * 50.0f,vecCameraSPos.y + vecCameraToward.y* 50.0f,vecCameraSPos.z + vecCameraToward.z* 50.0f);
|
||||
//D3DXVECTOR3 vecCameraSUp = D3DXVECTOR3(vecCameraUp.x,vecCameraUp.y,vecCameraUp.z);
|
||||
|
||||
D3DXVECTOR3 vecCameraSUp = D3DXVECTOR3(0.0f,1.0f,0.0f);
|
||||
FixEvent(0,vecCameraSPos,vecCameraSLook,vecCameraSUp);
|
||||
m_iInsertLook = 1;
|
||||
CreateSpline();
|
||||
|
||||
}
|
||||
|
||||
InitFrame();
|
||||
if(bFlag == false) {
|
||||
CSceneManager::m_ViewCamera->SetMatView(m_matBeforeView2);
|
||||
CSceneManager::m_ViewCamera->SetMatPosition(m_matBeforePos);
|
||||
CSceneManager::m_ViewCamera->MoveFrustum();
|
||||
CSceneManager::m_ViewCamera->SetVecPosition(vector3(m_matBeforePos._41,m_matBeforePos._42,m_matBeforePos._43));
|
||||
|
||||
}
|
||||
}
|
||||
void CCameraScript::RenderPos_Up() {
|
||||
|
||||
int i;
|
||||
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_LIGHTING,FALSE);
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_ALPHABLENDENABLE,FALSE);
|
||||
|
||||
CSceneStateMgr::_SetD3DTextureStageState(0, D3DTSS_COLOROP, D3DTOP_SELECTARG1);
|
||||
CSceneStateMgr::_SetD3DTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE);
|
||||
CSceneStateMgr::_SetD3DTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TFACTOR);
|
||||
|
||||
CSceneStateMgr::_SetD3DTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1);
|
||||
CSceneStateMgr::_SetD3DTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_TFACTOR );
|
||||
CSceneStateMgr::_SetD3DTextureStageState(1, D3DTSS_ALPHAOP, D3DTOP_DISABLE);
|
||||
|
||||
m_pDevice->SetVertexShader(D3DFVF_XYZ);
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_ZENABLE,TRUE);
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_FILLMODE,D3DFILL_SOLID);
|
||||
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_CULLMODE,D3DCULL_CCW);
|
||||
|
||||
D3DXMATRIX identity;
|
||||
D3DXMATRIX worldTm;
|
||||
|
||||
m_pDevice->GetTransform(D3DTS_WORLD,&worldTm);
|
||||
for( i = 0; i < m_iEventNum; i++ ) {
|
||||
D3DXMatrixIdentity(&identity);
|
||||
m_pDevice->SetTransform(D3DTS_WORLD,&identity);
|
||||
|
||||
identity._41 = m_lstEvent[i].m_vecCameraPos.x + m_lstEvent[i].m_vecCameraUp.x * 50.0f;
|
||||
identity._42 = m_lstEvent[i].m_vecCameraPos.y + m_lstEvent[i].m_vecCameraUp.y * 50.0f;
|
||||
identity._43 = m_lstEvent[i].m_vecCameraPos.z + m_lstEvent[i].m_vecCameraUp.z * 50.0f;
|
||||
|
||||
identity._11 = 1.0f;
|
||||
identity._22 = 1.0f;
|
||||
identity._33 = 1.0f;
|
||||
|
||||
if(i == m_iFixCount) {
|
||||
identity._11 = 9.0f;
|
||||
identity._22 = 9.0f;
|
||||
identity._33 = 9.0f;
|
||||
|
||||
}
|
||||
|
||||
m_pDevice->SetTransform(D3DTS_WORLD,&identity);
|
||||
|
||||
if((i != 0) && ( i != (m_iEventNum -1)))
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_TEXTUREFACTOR,0xffff4444);
|
||||
else
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_TEXTUREFACTOR,0xffffffff);
|
||||
|
||||
|
||||
if(i == m_iFixCount) {
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_TEXTUREFACTOR,0xff0000ff);
|
||||
}
|
||||
|
||||
m_pDevice->DrawIndexedPrimitiveUP(D3DPT_TRIANGLELIST,
|
||||
0,8,12,g_vecCubeIndex,D3DFMT_INDEX16,g_vecCube,sizeof(D3DXVECTOR3));
|
||||
|
||||
identity._41 = m_lstEvent[i].m_vecCameraPos.x;
|
||||
identity._42 = m_lstEvent[i].m_vecCameraPos.y;
|
||||
identity._43 = m_lstEvent[i].m_vecCameraPos.z;
|
||||
|
||||
identity._11 = 1.0f;
|
||||
identity._22 = 1.0f;
|
||||
identity._33 = 1.0f;
|
||||
|
||||
if(i == m_iFixCount) {
|
||||
identity._11 = 9.0f;
|
||||
identity._22 = 9.0f;
|
||||
identity._33 = 9.0f;
|
||||
|
||||
}
|
||||
|
||||
|
||||
m_pDevice->SetTransform(D3DTS_WORLD,&identity);
|
||||
|
||||
if((i != 0) && ( i != (m_iEventNum -1)))
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_TEXTUREFACTOR,0xffff0000);
|
||||
else
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_TEXTUREFACTOR,0xffffffff);
|
||||
|
||||
if(i == m_iFixCount) {
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_TEXTUREFACTOR,0xff0000ff);
|
||||
}
|
||||
|
||||
m_pDevice->DrawIndexedPrimitiveUP(D3DPT_TRIANGLELIST,
|
||||
0,8,12,g_vecCubeIndex,D3DFMT_INDEX16,g_vecCube,sizeof(D3DXVECTOR3));
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_FOGENABLE,FALSE);
|
||||
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_FOGENABLE,TRUE);
|
||||
|
||||
}
|
||||
|
||||
m_pDevice->SetTransform(D3DTS_WORLD,&worldTm);
|
||||
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_CULLMODE,D3DCULL_CCW);
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_ALPHABLENDENABLE,TRUE);
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_ZENABLE,TRUE);
|
||||
|
||||
}
|
||||
void CCameraScript::RenderLook() {
|
||||
|
||||
int i;
|
||||
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_LIGHTING,FALSE);
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_ALPHABLENDENABLE,FALSE);
|
||||
|
||||
CSceneStateMgr::_SetD3DTextureStageState(0, D3DTSS_COLOROP, D3DTOP_SELECTARG1);
|
||||
CSceneStateMgr::_SetD3DTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE);
|
||||
CSceneStateMgr::_SetD3DTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TFACTOR);
|
||||
|
||||
CSceneStateMgr::_SetD3DTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1);
|
||||
CSceneStateMgr::_SetD3DTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_TFACTOR );
|
||||
CSceneStateMgr::_SetD3DTextureStageState(1, D3DTSS_ALPHAOP, D3DTOP_DISABLE);
|
||||
|
||||
m_pDevice->SetVertexShader(D3DFVF_XYZ);
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_ZENABLE,TRUE);
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_FILLMODE,D3DFILL_SOLID);
|
||||
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_CULLMODE,D3DCULL_CCW);
|
||||
|
||||
D3DXMATRIX identity;
|
||||
D3DXMATRIX worldTm;
|
||||
|
||||
m_pDevice->GetTransform(D3DTS_WORLD,&worldTm);
|
||||
for( i = 0; i < m_iEventNum; i++ ) {
|
||||
|
||||
D3DXMatrixIdentity(&identity);
|
||||
|
||||
identity._41 = m_lstEvent[i].m_vecCameraLook.x;
|
||||
identity._42 = m_lstEvent[i].m_vecCameraLook.y;
|
||||
identity._43 = m_lstEvent[i].m_vecCameraLook.z;
|
||||
|
||||
identity._11 = 10.0f;
|
||||
identity._22 = 10.0f;
|
||||
identity._33 = 10.0f;
|
||||
if(i == m_iFixCount) {
|
||||
identity._11 = 15.0f;
|
||||
identity._22 = 15.0f;
|
||||
identity._33 = 15.0f;
|
||||
|
||||
|
||||
}
|
||||
|
||||
m_pDevice->SetTransform(D3DTS_WORLD,&identity);
|
||||
|
||||
if((i != 0) && ( i != (m_iEventNum -1)))
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_TEXTUREFACTOR,0xffffff00);
|
||||
else
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_TEXTUREFACTOR,0xffffffff);
|
||||
|
||||
if(i == m_iFixCount) {
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_TEXTUREFACTOR,0xff0000ff);
|
||||
}
|
||||
|
||||
m_pDevice->DrawIndexedPrimitiveUP(D3DPT_TRIANGLELIST,
|
||||
0,8,12,g_vecCubeIndex,D3DFMT_INDEX16,g_vecCube,sizeof(D3DXVECTOR3));
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_FOGENABLE,FALSE);
|
||||
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_FOGENABLE,TRUE);
|
||||
|
||||
}
|
||||
|
||||
m_pDevice->SetTransform(D3DTS_WORLD,&worldTm);
|
||||
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_CULLMODE,D3DCULL_CCW);
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_ALPHABLENDENABLE,TRUE);
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_ZENABLE,TRUE);
|
||||
|
||||
}
|
||||
void CCameraScript::RenderLookSpline() {
|
||||
|
||||
if((m_lstLookSpline.size() <= 0) || (m_bCreateLookSpline == false))
|
||||
return;
|
||||
|
||||
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_LIGHTING,FALSE);
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_ALPHABLENDENABLE,FALSE);
|
||||
|
||||
CSceneStateMgr::_SetD3DTextureStageState(0, D3DTSS_COLOROP, D3DTOP_SELECTARG1);
|
||||
CSceneStateMgr::_SetD3DTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE);
|
||||
CSceneStateMgr::_SetD3DTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TFACTOR);
|
||||
|
||||
CSceneStateMgr::_SetD3DTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1);
|
||||
CSceneStateMgr::_SetD3DTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_TFACTOR );
|
||||
CSceneStateMgr::_SetD3DTextureStageState(1, D3DTSS_ALPHAOP, D3DTOP_DISABLE);
|
||||
|
||||
m_pDevice->SetVertexShader(D3DFVF_XYZ);
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_ZENABLE,TRUE);
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_FILLMODE,D3DFILL_SOLID);
|
||||
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_CULLMODE,D3DCULL_CCW);
|
||||
|
||||
D3DXMATRIX identity;
|
||||
D3DXMATRIX worldTm;
|
||||
|
||||
m_pDevice->GetTransform(D3DTS_WORLD,&worldTm);
|
||||
int iSplineNum = m_lstLookSpline.size();
|
||||
|
||||
|
||||
D3DXMatrixIdentity(&identity);
|
||||
m_pDevice->SetTransform(D3DTS_WORLD,&identity);
|
||||
|
||||
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_TEXTUREFACTOR,0xffffff00);
|
||||
|
||||
m_pDevice->DrawPrimitiveUP(D3DPT_LINESTRIP,(iSplineNum - 1),&(m_lstLookSpline[0]),sizeof(D3DXVECTOR3));
|
||||
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_FOGENABLE,TRUE);
|
||||
|
||||
|
||||
m_pDevice->SetTransform(D3DTS_WORLD,&worldTm);
|
||||
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_CULLMODE,D3DCULL_CCW);
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_ALPHABLENDENABLE,TRUE);
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_ZENABLE,TRUE);
|
||||
|
||||
}
|
||||
|
||||
void CCameraScript::RenderPosSpline() {
|
||||
|
||||
if((m_lstPosSpline.size() <= 0) || (m_bCreateSpline == false))
|
||||
return;
|
||||
|
||||
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_LIGHTING,FALSE);
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_ALPHABLENDENABLE,FALSE);
|
||||
|
||||
CSceneStateMgr::_SetD3DTextureStageState(0, D3DTSS_COLOROP, D3DTOP_SELECTARG1);
|
||||
CSceneStateMgr::_SetD3DTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE);
|
||||
CSceneStateMgr::_SetD3DTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TFACTOR);
|
||||
|
||||
CSceneStateMgr::_SetD3DTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1);
|
||||
CSceneStateMgr::_SetD3DTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_TFACTOR );
|
||||
CSceneStateMgr::_SetD3DTextureStageState(1, D3DTSS_ALPHAOP, D3DTOP_DISABLE);
|
||||
|
||||
m_pDevice->SetVertexShader(D3DFVF_XYZ);
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_ZENABLE,TRUE);
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_FILLMODE,D3DFILL_SOLID);
|
||||
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_CULLMODE,D3DCULL_CCW);
|
||||
|
||||
D3DXMATRIX identity;
|
||||
D3DXMATRIX worldTm;
|
||||
|
||||
m_pDevice->GetTransform(D3DTS_WORLD,&worldTm);
|
||||
int iSplineNum = m_lstPosSpline.size();
|
||||
|
||||
|
||||
D3DXMatrixIdentity(&identity);
|
||||
m_pDevice->SetTransform(D3DTS_WORLD,&identity);
|
||||
|
||||
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_TEXTUREFACTOR,0xff00ffff);
|
||||
|
||||
m_pDevice->DrawPrimitiveUP(D3DPT_LINESTRIP,(iSplineNum - 1),&(m_lstPosSpline[0]),sizeof(D3DXVECTOR3));
|
||||
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_FOGENABLE,TRUE);
|
||||
|
||||
|
||||
m_pDevice->SetTransform(D3DTS_WORLD,&worldTm);
|
||||
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_CULLMODE,D3DCULL_CCW);
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_ALPHABLENDENABLE,TRUE);
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_ZENABLE,TRUE);
|
||||
|
||||
}
|
||||
void CCameraScript::RenderLine() {
|
||||
|
||||
int i;
|
||||
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_LIGHTING,FALSE);
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_ALPHABLENDENABLE,FALSE);
|
||||
|
||||
CSceneStateMgr::_SetD3DTextureStageState(0, D3DTSS_COLOROP, D3DTOP_SELECTARG1);
|
||||
CSceneStateMgr::_SetD3DTextureStageState(1, D3DTSS_COLOROP, D3DTOP_DISABLE);
|
||||
CSceneStateMgr::_SetD3DTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TFACTOR);
|
||||
|
||||
CSceneStateMgr::_SetD3DTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1);
|
||||
CSceneStateMgr::_SetD3DTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_TFACTOR );
|
||||
CSceneStateMgr::_SetD3DTextureStageState(1, D3DTSS_ALPHAOP, D3DTOP_DISABLE);
|
||||
|
||||
m_pDevice->SetVertexShader(D3DFVF_XYZ);
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_ZENABLE,TRUE);
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_FILLMODE,D3DFILL_SOLID);
|
||||
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_CULLMODE,D3DCULL_CCW);
|
||||
|
||||
D3DXMATRIX identity;
|
||||
D3DXMATRIX worldTm;
|
||||
|
||||
m_pDevice->GetTransform(D3DTS_WORLD,&worldTm);
|
||||
for( i = 0; i < m_iEventNum; i++ ) {
|
||||
|
||||
D3DXVECTOR3 vecUp = D3DXVECTOR3(m_lstEvent[i].m_vecCameraPos.x + m_lstEvent[i].m_vecCameraUp.x * 50.0f,
|
||||
m_lstEvent[i].m_vecCameraPos.y + m_lstEvent[i].m_vecCameraUp.y * 50.0f,
|
||||
m_lstEvent[i].m_vecCameraPos.z + m_lstEvent[i].m_vecCameraUp.z * 50.0f);
|
||||
D3DXVECTOR3 vecPos = D3DXVECTOR3(m_lstEvent[i].m_vecCameraPos.x,
|
||||
m_lstEvent[i].m_vecCameraPos.y,
|
||||
m_lstEvent[i].m_vecCameraPos.z);
|
||||
|
||||
D3DXVECTOR3 vecLook = D3DXVECTOR3(m_lstEvent[i].m_vecCameraLook.x,
|
||||
m_lstEvent[i].m_vecCameraLook.y,
|
||||
m_lstEvent[i].m_vecCameraLook.z);
|
||||
|
||||
|
||||
D3DXVECTOR3 vecLinePos[2];
|
||||
vecLinePos[0] = vecUp;
|
||||
vecLinePos[1] = vecPos;
|
||||
/* vecLinePos[2] = vecPos;
|
||||
vecLinePos[3] = vecLook;
|
||||
*/
|
||||
|
||||
D3DXMatrixIdentity(&identity);
|
||||
m_pDevice->SetTransform(D3DTS_WORLD,&identity);
|
||||
|
||||
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_TEXTUREFACTOR,0xff000000);
|
||||
m_pDevice->DrawPrimitiveUP(D3DPT_LINELIST,1,vecLinePos,sizeof(D3DXVECTOR3));
|
||||
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_FOGENABLE,TRUE);
|
||||
|
||||
}
|
||||
|
||||
m_pDevice->SetTransform(D3DTS_WORLD,&worldTm);
|
||||
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_CULLMODE,D3DCULL_CCW);
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_ALPHABLENDENABLE,TRUE);
|
||||
CSceneStateMgr::_SetD3DRenderState(D3DRS_ZENABLE,TRUE);
|
||||
|
||||
}
|
||||
void CCameraScript::CreateSpline() {
|
||||
|
||||
m_lstPosSpline.clear();
|
||||
m_lstLookSpline.clear();
|
||||
|
||||
|
||||
float fU,fU2,fU3;
|
||||
float i,j;
|
||||
|
||||
for( i = 0; i < (m_iEventNum); i++ ) {
|
||||
m_lstEvent[i].m_iPosStart = m_lstPosSpline.size();
|
||||
|
||||
for(j = 0;j < CAMERASPLINEUNIT;j++) {
|
||||
fU = (float)j / (float)CAMERASPLINEUNIT;
|
||||
fU2 = fU * fU;
|
||||
fU3 = fU2 * fU;
|
||||
D3DXVECTOR3 vecNode;
|
||||
|
||||
vecNode.x = ( (-1 * fU3 + 3 * fU2 - 3*fU + 1) *
|
||||
m_lstEvent[(i == 0) ? 0 : (i - 1)].m_vecCameraPos.x +
|
||||
(3* fU3 - 6 * fU2 + 0 * fU + 4) *
|
||||
m_lstEvent[i + 0].m_vecCameraPos.x +
|
||||
(-3* fU3 + 3 * fU2 + 3 * fU + 1) *
|
||||
m_lstEvent[(i <= (m_iEventNum - 2)) ? i + 1 : i].m_vecCameraPos.x +
|
||||
(1* fU3 + 0 * fU2 + 0 * fU + 0) *
|
||||
m_lstEvent[(i <= (m_iEventNum - 3)) ? i + 2 : i].m_vecCameraPos.x) / 6.0f;
|
||||
vecNode.y = ( (-1 * fU3 + 3 * fU2 - 3*fU + 1) *
|
||||
m_lstEvent[(i == 0) ? 0 : (i - 1)].m_vecCameraPos.y +
|
||||
(3* fU3 - 6 * fU2 + 0 * fU + 4) *
|
||||
m_lstEvent[i + 0].m_vecCameraPos.y +
|
||||
(-3* fU3 + 3 * fU2 + 3 * fU + 1) *
|
||||
m_lstEvent[(i <= (m_iEventNum - 2)) ? i + 1 : i].m_vecCameraPos.y +
|
||||
(1* fU3 + 0 * fU2 + 0 * fU + 0) *
|
||||
m_lstEvent[(i <= (m_iEventNum - 3)) ? i + 2 : i].m_vecCameraPos.y) / 6.0f;
|
||||
vecNode.z = ( (-1 * fU3 + 3 * fU2 - 3*fU + 1) *
|
||||
m_lstEvent[(i == 0) ? 0 : (i - 1)].m_vecCameraPos.z +
|
||||
(3* fU3 - 6 * fU2 + 0 * fU + 4) *
|
||||
m_lstEvent[i + 0].m_vecCameraPos.z +
|
||||
(-3* fU3 + 3 * fU2 + 3 * fU + 1) *
|
||||
m_lstEvent[(i <= (m_iEventNum - 2)) ? i + 1 : i].m_vecCameraPos.z +
|
||||
(1* fU3 + 0 * fU2 + 0 * fU + 0) *
|
||||
m_lstEvent[(i <= (m_iEventNum - 3)) ? i + 2 : i].m_vecCameraPos.z) / 6.0f;
|
||||
|
||||
m_lstPosSpline.push_back(vecNode);
|
||||
|
||||
}
|
||||
m_lstEvent[i].m_iPosEnd = m_lstPosSpline.size();
|
||||
}
|
||||
m_bCreateSpline = true;
|
||||
if(m_iInsertLook <= 0)
|
||||
{
|
||||
m_bCreateLookSpline = false;
|
||||
return;
|
||||
}
|
||||
else {
|
||||
|
||||
for( i = 0; i < (m_iEventNum); i++ ) {
|
||||
m_lstEvent[i].m_iLookStart = m_lstLookSpline.size();
|
||||
for(j = 0;j < CAMERASPLINEUNIT;j++) {
|
||||
fU = (float)j / (float)CAMERASPLINEUNIT;
|
||||
fU2 = fU * fU;
|
||||
fU3 = fU2 * fU;
|
||||
D3DXVECTOR3 vecNode;
|
||||
|
||||
vecNode.x = ( (-1 * fU3 + 3 * fU2 - 3*fU + 1) *
|
||||
m_lstEvent[(i == 0) ? 0 : (i - 1)].m_vecCameraLook.x +
|
||||
(3* fU3 - 6 * fU2 + 0 * fU + 4) *
|
||||
m_lstEvent[i + 0].m_vecCameraLook.x +
|
||||
(-3* fU3 + 3 * fU2 + 3 * fU + 1) *
|
||||
m_lstEvent[(i <= (m_iEventNum - 2)) ? i + 1 : i].m_vecCameraLook.x +
|
||||
(1* fU3 + 0 * fU2 + 0 * fU + 0) *
|
||||
m_lstEvent[(i <= (m_iEventNum - 3)) ? i + 2 : i].m_vecCameraLook.x) / 6.0f;
|
||||
vecNode.y = ( (-1 * fU3 + 3 * fU2 - 3*fU + 1) *
|
||||
m_lstEvent[(i == 0) ? 0 : (i - 1)].m_vecCameraLook.y +
|
||||
(3* fU3 - 6 * fU2 + 0 * fU + 4) *
|
||||
m_lstEvent[i + 0].m_vecCameraLook.y +
|
||||
(-3* fU3 + 3 * fU2 + 3 * fU + 1) *
|
||||
m_lstEvent[(i <= (m_iEventNum - 2)) ? i + 1 : i].m_vecCameraLook.y +
|
||||
(1* fU3 + 0 * fU2 + 0 * fU + 0) *
|
||||
m_lstEvent[(i <= (m_iEventNum - 3)) ? i + 2 : i].m_vecCameraLook.y) / 6.0f;
|
||||
vecNode.z = ( (-1 * fU3 + 3 * fU2 - 3*fU + 1) *
|
||||
m_lstEvent[(i == 0) ? 0 : (i - 1)].m_vecCameraLook.z +
|
||||
(3* fU3 - 6 * fU2 + 0 * fU + 4) *
|
||||
m_lstEvent[i + 0].m_vecCameraLook.z +
|
||||
(-3* fU3 + 3 * fU2 + 3 * fU + 1) *
|
||||
m_lstEvent[(i <= (m_iEventNum - 2)) ? i + 1 : i].m_vecCameraLook.z +
|
||||
(1* fU3 + 0 * fU2 + 0 * fU + 0) *
|
||||
m_lstEvent[(i <= (m_iEventNum - 3)) ? i + 2 : i].m_vecCameraLook.z) / 6.0f;
|
||||
|
||||
m_lstLookSpline.push_back(vecNode);
|
||||
|
||||
}
|
||||
m_lstEvent[i].m_iLookEnd = m_lstLookSpline.size();
|
||||
}
|
||||
}
|
||||
m_bCreateLookSpline = true;
|
||||
|
||||
}
|
||||
147
GameTools/CHARACTERACTIONCONTROL/CCameraScript.h
Normal file
147
GameTools/CHARACTERACTIONCONTROL/CCameraScript.h
Normal file
@@ -0,0 +1,147 @@
|
||||
#ifndef __CCAMERASCRIPT_H__
|
||||
#define __CCAMERASCRIPT_H__
|
||||
|
||||
#include <d3d8.h>
|
||||
#include <d3dx8.h>
|
||||
|
||||
#include <vector>
|
||||
#include <windows.h>
|
||||
#include <string.h>
|
||||
#include "matrix.h"
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
||||
enum C_INTERPOLATION {
|
||||
C_LINE, // Linear
|
||||
C_BEZIER1, // Bezier (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 3)
|
||||
C_BEZIER2, // Bezier (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 4)
|
||||
C_NOTINTERPOLATION, // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
};
|
||||
|
||||
#define CAMERAEVENTEMPTY -1
|
||||
#define CAMERAZEROFRAME 0.0f
|
||||
#define CAMERASCRIPTVERSION 1.0f
|
||||
#define CAMERAFRAMESTEP 30.0f
|
||||
#define CAMERASPLINEUNIT 100
|
||||
class CCameraScript {
|
||||
private:
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> unit
|
||||
class CCameraEvent {
|
||||
public:
|
||||
int m_iIndex; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ε<EFBFBD><CEB5><EFBFBD>
|
||||
int m_iInterpolation; // <20><> Event<6E><74><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
float m_fFrame; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
D3DXVECTOR3 m_vecControlPoint[2]; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> Control Point
|
||||
D3DXVECTOR3 m_vecCameraPos;
|
||||
D3DXVECTOR3 m_vecCameraLook;
|
||||
D3DXVECTOR3 m_vecCameraUp;
|
||||
|
||||
int m_iPosStart; // Pos Spline <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> index
|
||||
int m_iPosEnd; // Pos Spline <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> index
|
||||
|
||||
int m_iLookStart; // Look Spline <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> index
|
||||
int m_iLookEnd; // Look Spline <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> index
|
||||
|
||||
CCameraEvent() {
|
||||
m_iIndex = CAMERAEVENTEMPTY;
|
||||
m_iInterpolation = C_LINE;
|
||||
m_fFrame = CAMERAZEROFRAME;
|
||||
m_vecCameraPos = D3DXVECTOR3(0.0f,0.0f,0.0f);
|
||||
m_vecCameraUp = D3DXVECTOR3(0.0f,0.0f,0.0f);
|
||||
m_vecCameraLook = D3DXVECTOR3(0.0f,0.0f,0.0f);
|
||||
m_iPosStart = CAMERAEVENTEMPTY;
|
||||
m_iPosEnd = CAMERAEVENTEMPTY;
|
||||
m_iLookStart = CAMERAEVENTEMPTY;
|
||||
m_iLookEnd = CAMERAEVENTEMPTY;
|
||||
|
||||
}
|
||||
~CCameraEvent() {}
|
||||
};
|
||||
vector<CCameraEvent> m_lstEvent;
|
||||
|
||||
|
||||
vector<D3DXVECTOR3> m_lstPosSpline;
|
||||
bool m_bCreateSpline;
|
||||
|
||||
vector<D3DXVECTOR3> m_lstLookSpline;
|
||||
bool m_bCreateLookSpline;
|
||||
int m_iInsertLook;
|
||||
|
||||
int m_iEventNum;
|
||||
int m_iBeforeEvent;
|
||||
float m_fRunFrame; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ð<EFBFBD> frame
|
||||
D3DXMATRIX m_matBeforeView;
|
||||
|
||||
|
||||
CCameraEvent m_CurrentEvent; // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ӿ<EFBFBD> <20>´<EFBFBD>, Event Unit
|
||||
D3DXMATRIX m_matCurrentFrame; // <20><><EFBFBD><EFBFBD> Frame View Matrix
|
||||
LPDIRECT3DDEVICE8 m_pDevice; // Direct3D Device
|
||||
|
||||
DWORD m_dwBeforeTick;
|
||||
DWORD m_dwCurrentTick;
|
||||
bool m_bStart;
|
||||
|
||||
|
||||
matrix m_matBeforePos;
|
||||
matrix m_matBeforeView2;
|
||||
|
||||
int m_iFixCount;
|
||||
bool m_bBackWord;
|
||||
|
||||
D3DXVECTOR3 m_vecCameraInitPos;
|
||||
D3DXVECTOR3 m_vecCameraInitLook;
|
||||
bool m_bInitPos;
|
||||
|
||||
|
||||
public:
|
||||
CCameraScript();
|
||||
~CCameraScript();
|
||||
|
||||
void InitCameraScript(bool bInitPos = false,D3DXVECTOR3 vecInitPos = D3DXVECTOR3(0.0f,0.0f,0.0f),D3DXVECTOR3 vecInitLook = D3DXVECTOR3(0.0f,0.0f,0.0f));
|
||||
void InitFrame();
|
||||
|
||||
int InsertEvent(D3DXVECTOR3 vecPos,D3DXVECTOR3 vecLook,D3DXVECTOR3 vecUp,float fFrame,int iInterpol);
|
||||
void InsertLookPos(D3DXVECTOR3 vecLook);
|
||||
|
||||
void FixEvent(int iEvent,D3DXVECTOR3 vecPos,D3DXVECTOR3 vecLook,D3DXVECTOR3 vecUp);
|
||||
|
||||
void FixEvent(int iEvent,D3DXVECTOR3 vecPos,D3DXVECTOR3 vecLook,D3DXVECTOR3 vecUp,float fFrame,int iInterpol);
|
||||
void FixLook(int iEvent,D3DXVECTOR3 vecLook);
|
||||
|
||||
void DeleteEvent(float fFrame,int iInterpol);
|
||||
void DeleteEvent(int iIndex);
|
||||
|
||||
bool SaveScript(char *strFileName);
|
||||
bool LoadScript(char *strFileName);
|
||||
|
||||
void CreateSpline();
|
||||
|
||||
void PlayScript(int iRoll,int iLoop,bool bFixPos);
|
||||
void Rewind();
|
||||
void Fowind();
|
||||
void Jump(int iEvent); //iEvent<6E><74> jump
|
||||
void SetPlay(bool bFlag,bool bBack = false,bool bStartPos = false);
|
||||
|
||||
D3DXVECTOR3 GetVecPos() { return m_CurrentEvent.m_vecCameraPos; }
|
||||
D3DXVECTOR3 GetVecLook() { return m_CurrentEvent.m_vecCameraLook; }
|
||||
D3DXVECTOR3 GetVecUp() { return m_CurrentEvent.m_vecCameraUp; }
|
||||
D3DXMATRIX GetCurrentViewMat() { return m_matCurrentFrame; }
|
||||
|
||||
int GetCameraEventCnt() { return m_lstEvent.size(); }
|
||||
|
||||
void RenderPos_Up();
|
||||
void RenderLook();
|
||||
void RenderLine();
|
||||
void RenderPosSpline();
|
||||
void RenderLookSpline();
|
||||
bool ISPlay() { return m_bStart;}
|
||||
int GetExistEventNum() { return m_iEventNum;}
|
||||
int GetFixCount(int &iIndex,float &fFrame);
|
||||
void ReWindFix();
|
||||
void FoWindFix();
|
||||
void BackWordEvent();
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
BIN
GameTools/CHARACTERACTIONCONTROL/CHARACTERACTIONCONTROL.zip
Normal file
BIN
GameTools/CHARACTERACTIONCONTROL/CHARACTERACTIONCONTROL.zip
Normal file
Binary file not shown.
572
GameTools/CHARACTERACTIONCONTROL/CameraControl.cpp
Normal file
572
GameTools/CHARACTERACTIONCONTROL/CameraControl.cpp
Normal file
@@ -0,0 +1,572 @@
|
||||
// CameraControl.cpp: implementation of the CCameraControl class.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "CameraControl.h"
|
||||
#include "SceneManager.h"
|
||||
#include "FrameTimer.h"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Construction/Destruction
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
float CCameraControl::m_fJumpRate=0.0f;
|
||||
float CCameraControl::m_fCameraShakeRateTime=-1.0f;
|
||||
float CCameraControl::m_fCameraShakeNowTime=0.0f;
|
||||
vector3 CCameraControl::m_vecCameraShakeLength=vector3(0.0f,0.0f,0.0f);
|
||||
|
||||
float CCameraControl::m_fFadeOutStart=0.0f;
|
||||
float CCameraControl::m_fFadeOutMaintenance=0.0f;
|
||||
float CCameraControl::m_fFadeOutEnd=0.0f;
|
||||
float CCameraControl::m_fFadeOutNowTime=0.0f;
|
||||
|
||||
float CCameraControl::m_fFadeInStart=0.0f;
|
||||
float CCameraControl::m_fFadeInMaintenance=0.0f;
|
||||
float CCameraControl::m_fFadeInEnd=0.0f;
|
||||
float CCameraControl::m_fFadeInNowTime=0.0f;
|
||||
|
||||
color CCameraControl::m_FadeInColor;
|
||||
|
||||
DWORD CCameraControl::m_nCameraAnimationTimer=0xffffffff;
|
||||
|
||||
|
||||
CCameraControl::CCameraControl()
|
||||
{
|
||||
m_fCameraRotX = 3.14159f / 2.0f;
|
||||
m_fCameraRotY = 0.4f;
|
||||
|
||||
m_fBattleCameraRotY = 0.3f;
|
||||
m_fBattleInterCharacterCamera = 300.0f;
|
||||
m_fMouseClickInterCharacterCamera=1000.0f;
|
||||
|
||||
m_nCameraMode=1;
|
||||
|
||||
m_FadeInColor.c=0xffffffff;
|
||||
}
|
||||
|
||||
CCameraControl::~CCameraControl()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CCameraControl::UpdateBattleCharacter(vector3 vecChrPos, float fDirection)
|
||||
{
|
||||
if(m_nCameraMode>=2)
|
||||
{
|
||||
UpdateControlCamera();
|
||||
return;
|
||||
}
|
||||
|
||||
vecChrPos += vector3(0.0f, 150.0f, 0.0f);
|
||||
|
||||
if(m_fBattleCameraRotY > 3.14159f/2.0f-0.3f)
|
||||
m_fBattleCameraRotY=3.14159f/2.0f-0.3f;
|
||||
if(m_fBattleCameraRotY< -3.14159f/2.0f+0.7f)
|
||||
m_fBattleCameraRotY=-3.14159f/2.0f+0.7f;
|
||||
|
||||
vector3 vecCameraInterPos;
|
||||
|
||||
if(m_fJumpRate>0.0f)
|
||||
{
|
||||
vector3 vecJumpRate=sinf(m_fJumpRate)*vector3(0.0f,10.0f,0.0f);
|
||||
vecChrPos-=vecJumpRate;
|
||||
|
||||
float fCameraUpdate=CFrameTimer::GetUpdateTimer(m_nCameraAnimationTimer);
|
||||
m_fJumpRate+=((int)fCameraUpdate)*0.08f;
|
||||
|
||||
if(m_fJumpRate>3.14159f)
|
||||
{
|
||||
m_fJumpRate=0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
m_fCameraShakeRateTime;
|
||||
static vector3 m_vecCameraShakeLength;
|
||||
|
||||
vector3 vecCameraShake=vector3(0.0f,0.0f,0.0f);
|
||||
|
||||
if(m_fCameraShakeRateTime>0.0f)
|
||||
{
|
||||
float fCameraUpdate=CFrameTimer::GetUpdateTimer(m_nCameraAnimationTimer);
|
||||
m_fCameraShakeNowTime+=(int)fCameraUpdate;
|
||||
if(m_fCameraShakeNowTime>m_fCameraShakeRateTime)
|
||||
{
|
||||
m_fCameraShakeRateTime=-1.0f;
|
||||
}
|
||||
|
||||
vecCameraShake=vector3( (rand()%1000)-500 , (rand()%1000)-500 , (rand()%1000)-500 );
|
||||
vecCameraShake.Normalize();
|
||||
vecCameraShake.x=vecCameraShake.x*CCameraControl::m_vecCameraShakeLength.x;
|
||||
vecCameraShake.y=vecCameraShake.y*CCameraControl::m_vecCameraShakeLength.y;
|
||||
vecCameraShake.z=vecCameraShake.z*CCameraControl::m_vecCameraShakeLength.z;
|
||||
}
|
||||
|
||||
//vecCameraInterPos+=vecCameraShake;
|
||||
|
||||
CalcCameraPosition(vecChrPos,fDirection,m_fBattleCameraRotY,m_fBattleInterCharacterCamera,vecCameraInterPos);
|
||||
|
||||
SetCamera(vecCameraInterPos, vecCameraShake, vecChrPos);
|
||||
/* matrix matView;
|
||||
matView.CameraLookAt(vecCameraInterPos+vecCameraShake, vecChrPos+vecCameraShake, vector3(0.0f, 1.0f, 0.0f));
|
||||
matrix matInv;
|
||||
matInv.Inverse(matView);
|
||||
|
||||
m_vecCameraPos=vecCameraInterPos;
|
||||
|
||||
CSceneManager::GetCamera()->SetMatPosition(matInv);
|
||||
CSceneManager::GetCamera()->SetMatView(matView);
|
||||
CSceneManager::GetCamera()->SetVecPosition(vecChrPos);
|
||||
CSceneManager::GetCamera()->MoveFrustum();
|
||||
|
||||
if(m_fFadeOutStart> 0.0f)
|
||||
{
|
||||
float fCameraUpdate=CFrameTimer::GetUpdateTimer(m_nCameraAnimationTimer);
|
||||
|
||||
m_fFadeOutNowTime+=(int)fCameraUpdate;
|
||||
|
||||
float fSetTime;
|
||||
|
||||
if(m_fFadeOutNowTime <= m_fFadeOutStart)
|
||||
{
|
||||
fSetTime=m_fFadeOutNowTime/m_fFadeOutStart;
|
||||
}
|
||||
if( m_fFadeOutNowTime > m_fFadeOutStart &&
|
||||
m_fFadeOutNowTime < m_fFadeOutStart+m_fFadeOutMaintenance)
|
||||
{
|
||||
fSetTime=1.0f;
|
||||
}
|
||||
if( m_fFadeOutNowTime >= m_fFadeOutStart+m_fFadeOutMaintenance)
|
||||
{
|
||||
fSetTime=m_fFadeOutNowTime-(m_fFadeOutStart+m_fFadeOutMaintenance);
|
||||
fSetTime=1.0f-(fSetTime/m_fFadeOutEnd);
|
||||
}
|
||||
CSceneManager::m_WeatherManager.m_CustomWaterColor=true;
|
||||
CSceneManager::m_WeatherManager.m_CustomWaterRate=fSetTime;
|
||||
|
||||
if( m_fFadeOutNowTime >= m_fFadeOutStart+m_fFadeOutMaintenance+m_fFadeOutEnd)
|
||||
{
|
||||
CSceneManager::m_WeatherManager.m_CustomWaterColor=false;
|
||||
|
||||
m_fFadeOutStart=0.0f;
|
||||
m_fFadeOutMaintenance=0.0f;
|
||||
m_fFadeOutEnd=0.0f;
|
||||
m_fFadeOutNowTime=0.0f;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if(m_fFadeInStart> 0.0f)
|
||||
{
|
||||
float fCameraUpdate=CFrameTimer::GetUpdateTimer(m_nCameraAnimationTimer);
|
||||
|
||||
m_fFadeInNowTime+=(int)fCameraUpdate;
|
||||
|
||||
float fSetTime;
|
||||
|
||||
if(m_fFadeInNowTime <= m_fFadeInStart)
|
||||
{
|
||||
fSetTime=m_fFadeInNowTime/m_fFadeInStart;
|
||||
}
|
||||
if( m_fFadeInNowTime > m_fFadeInStart &&
|
||||
m_fFadeInNowTime < m_fFadeInStart+m_fFadeInMaintenance)
|
||||
{
|
||||
fSetTime=1.0f;
|
||||
}
|
||||
if( m_fFadeInNowTime >= m_fFadeInStart+m_fFadeInMaintenance)
|
||||
{
|
||||
fSetTime=m_fFadeInNowTime-(m_fFadeInStart+m_fFadeInMaintenance);
|
||||
fSetTime=1.0f-(fSetTime/m_fFadeInEnd);
|
||||
}
|
||||
if(fSetTime<1.0f && fSetTime>0.0f)
|
||||
{
|
||||
int a=0;
|
||||
}
|
||||
color InterColor;
|
||||
color ZeroColor;
|
||||
ZeroColor.c=0x00000000;
|
||||
InterColor=color::Interpolation(ZeroColor,m_FadeInColor,fSetTime);
|
||||
CSceneManager::m_FullSceneFade=InterColor;
|
||||
//CSceneManager::m_FullSceneFade.c=0x00ff0000;
|
||||
|
||||
if( m_fFadeInNowTime >= m_fFadeInStart+m_fFadeInMaintenance+m_fFadeInEnd)
|
||||
{
|
||||
m_fFadeInStart=0.0f;
|
||||
m_fFadeInMaintenance=0.0f;
|
||||
m_fFadeInEnd=0.0f;
|
||||
m_fFadeInNowTime=0.0f;
|
||||
|
||||
CSceneManager::m_FullSceneFade.c=0x0;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
void CCameraControl::UpdateClickMode(vector3 vecChrPos)
|
||||
{
|
||||
if(m_nCameraMode>=2)
|
||||
{
|
||||
UpdateControlCamera();
|
||||
return;
|
||||
}
|
||||
vecChrPos += vector3(0.0f, 150.0f, 0.0f);
|
||||
|
||||
if(m_fCameraRotY > 3.14159f/2.0f-0.3f)
|
||||
m_fCameraRotY=3.14159f/2.0f-0.3f;
|
||||
if(m_fCameraRotY< -3.14159f/2.0f+0.7f)
|
||||
m_fCameraRotY=-3.14159f/2.0f+0.7f;
|
||||
|
||||
|
||||
//CalcCameraPosition(vecChrPos,-m_fCameraRotX,vecCameraInterPos);
|
||||
|
||||
m_fCameraShakeRateTime;
|
||||
static vector3 m_vecCameraShakeLength;
|
||||
|
||||
vector3 vecCameraShake=vector3(0.0f,0.0f,0.0f);
|
||||
|
||||
if(m_fCameraShakeRateTime>0.0f)
|
||||
{
|
||||
float fCameraUpdate=CFrameTimer::GetUpdateTimer(m_nCameraAnimationTimer);
|
||||
m_fCameraShakeNowTime+=(int)fCameraUpdate;
|
||||
if(m_fCameraShakeNowTime>m_fCameraShakeRateTime)
|
||||
{
|
||||
m_fCameraShakeRateTime=-1.0f;
|
||||
}
|
||||
|
||||
vecCameraShake=vector3( (rand()%1000)-500 , (rand()%1000)-500 , (rand()%1000)-500 );
|
||||
vecCameraShake.Normalize();
|
||||
vecCameraShake.x=vecCameraShake.x*CCameraControl::m_vecCameraShakeLength.x;
|
||||
vecCameraShake.y=vecCameraShake.y*CCameraControl::m_vecCameraShakeLength.y;
|
||||
vecCameraShake.z=vecCameraShake.z*CCameraControl::m_vecCameraShakeLength.z;
|
||||
}
|
||||
|
||||
|
||||
vector3 vecCameraInterPos;
|
||||
|
||||
CalcCameraPosition(vecChrPos,-m_fCameraRotX,m_fCameraRotY,m_fMouseClickInterCharacterCamera,vecCameraInterPos);
|
||||
|
||||
SetCamera(vecCameraInterPos, vecCameraShake, vecChrPos);
|
||||
/*
|
||||
matrix matRotation,matResult;
|
||||
|
||||
matResult.Translation(vector3(1.0f,0.0f,0.0f));
|
||||
D3DXQUATERNION qR;
|
||||
D3DXQuaternionRotationYawPitchRoll(&qR,-m_fCameraRotX,0.0f,m_fCameraRotY);
|
||||
D3DXMatrixRotationQuaternion(matRotation,&qR);
|
||||
|
||||
matResult=matResult*matRotation;
|
||||
//vector3 vecCameraPosition=matResult.GetLoc();
|
||||
vector3 vecCameraInterPos=matResult.GetLoc();
|
||||
vector3 vecResultCameraPos = (vecCameraInterPos * m_fMouseClickInterCharacterCamera) + vecChrPos;
|
||||
|
||||
|
||||
/////////////////////Terrain//////////////////
|
||||
|
||||
List<vector3> PolyList;
|
||||
CSceneManager::m_HeightField.GetLineIntersectPoly(vecChrPos,vecResultCameraPos,PolyList);
|
||||
|
||||
float fCollisionLens=m_fMouseClickInterCharacterCamera;
|
||||
|
||||
float fLens;
|
||||
vector3 vecPoly[3];
|
||||
if(PolyList.num>0)
|
||||
{
|
||||
for(int cIndices=0;cIndices<PolyList.num/3;cIndices++)
|
||||
{
|
||||
vecPoly[0]=PolyList[cIndices*3+0];
|
||||
vecPoly[1]=PolyList[cIndices*3+1];
|
||||
vecPoly[2]=PolyList[cIndices*3+2];
|
||||
|
||||
if(CIntersection::PolygonRay(vecChrPos,vecResultCameraPos,vecPoly,fLens) && fCollisionLens > fLens && fLens > 0.0f)
|
||||
{
|
||||
fCollisionLens=fLens;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
float fChrInter=fCollisionLens;
|
||||
vecCameraInterPos=vecCameraInterPos*fChrInter+vecChrPos;
|
||||
|
||||
float fCameraHeight=CSceneManager::m_HeightField.GetHeight(vecCameraInterPos);
|
||||
if(vecCameraInterPos.y < fCameraHeight +30.0f)
|
||||
{
|
||||
vecCameraInterPos.y=fCameraHeight +30.0f;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
void CCameraControl::ModeConvertAnimation()
|
||||
{
|
||||
float fCameraUpdate=CFrameTimer::GetUpdateTimer(m_nCameraAnimationTimer);
|
||||
//fCameraUpdate=
|
||||
}
|
||||
|
||||
void CCameraControl::UpdateControlCamera()
|
||||
{
|
||||
if(m_nCameraMode==100)
|
||||
return;
|
||||
|
||||
float fCameraUpdate=CFrameTimer::GetUpdateTimer(m_nCameraAnimationTimer);
|
||||
m_fTime+=fCameraUpdate;
|
||||
|
||||
vector3 vecAdder=m_vecVelocity*fCameraUpdate;
|
||||
m_vecNowPosition=m_vecNowPosition+vecAdder;
|
||||
|
||||
vector3 vecForLens=m_vecEndPosition-m_vecStartPosition;
|
||||
vector3 vecNowLens=m_vecNowPosition-m_vecStartPosition;
|
||||
|
||||
static float fVelScalar=0.0f;
|
||||
|
||||
m_vecVelocity+=m_vecAccelate*fCameraUpdate;
|
||||
|
||||
if(vecForLens.GetLens() < vecNowLens.GetLens())
|
||||
{
|
||||
m_nCameraMode=m_nPrepareCameraMode;
|
||||
}
|
||||
|
||||
matrix matView;
|
||||
matView.CameraLookAt(m_vecNowPosition, m_vecTargetCameraPosition, vector3(0.0f, 1.0f, 0.0f));
|
||||
matrix matInv;
|
||||
matInv.Inverse(matView);
|
||||
|
||||
m_vecCameraPos=m_vecNowPosition;
|
||||
|
||||
CSceneManager::GetCamera()->SetMatPosition(matInv);
|
||||
CSceneManager::GetCamera()->SetMatView(matView);
|
||||
CSceneManager::GetCamera()->SetVecPosition(m_vecNowPosition);
|
||||
CSceneManager::GetCamera()->MoveFrustum();
|
||||
}
|
||||
|
||||
void CCameraControl::CalcCameraPosition(vector3 vecChrPos,float fCameraDirection,float fCameraYDirection,float fInterCamera,vector3 &vecCameraInterPos)
|
||||
{
|
||||
matrix matRotation,matResult;
|
||||
|
||||
matResult.Translation(vector3(1.0f,0.0f,0.0f));
|
||||
D3DXQUATERNION qR;
|
||||
D3DXQuaternionRotationYawPitchRoll(&qR,fCameraDirection,0.0f,fCameraYDirection);
|
||||
D3DXMatrixRotationQuaternion(matRotation,&qR);
|
||||
|
||||
matResult=matResult*matRotation;
|
||||
//vector3 vecCameraPosition=matResult.GetLoc();
|
||||
vecCameraInterPos=matResult.GetLoc();
|
||||
vector3 vecResultCameraPos = (vecCameraInterPos * fInterCamera) + vecChrPos;
|
||||
|
||||
if(CSceneManager::m_RBspSceneManager.m_pCurrentBspScene != NULL) // RBsp <20>߰<EFBFBD>
|
||||
{
|
||||
D3DXVECTOR3 vecBefore = D3DXVECTOR3(vecChrPos.x,vecChrPos.y,vecChrPos.z);
|
||||
D3DXVECTOR3 vecNew = D3DXVECTOR3(vecResultCameraPos.x,vecResultCameraPos.y,vecResultCameraPos.z);
|
||||
D3DXVECTOR3 vecInter;
|
||||
///
|
||||
D3DXVECTOR3 vecPos = vecBefore;
|
||||
D3DXMATRIX matTmp;
|
||||
D3DXMATRIX matInv;
|
||||
|
||||
D3DXMatrixIdentity(&matTmp);
|
||||
|
||||
matTmp._41 = CSceneManager::m_RBspSceneManager.m_pCurrentBspScene->m_vecZeroPos.x;
|
||||
matTmp._42 = CSceneManager::m_RBspSceneManager.m_pCurrentBspScene->m_vecZeroPos.y;
|
||||
matTmp._43 = CSceneManager::m_RBspSceneManager.m_pCurrentBspScene->m_vecZeroPos.z;
|
||||
D3DXMatrixInverse(&matInv,NULL,&matTmp);
|
||||
D3DXMatrixIdentity(&matTmp);
|
||||
matTmp._41 = vecPos.x;
|
||||
matTmp._42 = vecPos.y;
|
||||
matTmp._43 = vecPos.z;
|
||||
D3DXMatrixMultiply(&matTmp,&matTmp,&matInv);
|
||||
vecPos.x = matTmp._41;
|
||||
vecPos.y = matTmp._42;
|
||||
vecPos.z = matTmp._43;
|
||||
vecBefore = vecPos;
|
||||
///
|
||||
vecPos = vecNew;
|
||||
D3DXMatrixIdentity(&matTmp);
|
||||
matTmp._41 = CSceneManager::m_RBspSceneManager.m_pCurrentBspScene->m_vecZeroPos.x;
|
||||
matTmp._42 = CSceneManager::m_RBspSceneManager.m_pCurrentBspScene->m_vecZeroPos.y;
|
||||
matTmp._43 = CSceneManager::m_RBspSceneManager.m_pCurrentBspScene->m_vecZeroPos.z;
|
||||
|
||||
D3DXMatrixInverse(&matInv,NULL,&matTmp);
|
||||
D3DXMatrixIdentity(&matTmp);
|
||||
matTmp._41 = vecPos.x;
|
||||
matTmp._42 = vecPos.y;
|
||||
matTmp._43 = vecPos.z;
|
||||
D3DXMatrixMultiply(&matTmp,&matTmp,&matInv);
|
||||
vecPos.x = matTmp._41;
|
||||
vecPos.y = matTmp._42;
|
||||
vecPos.z = matTmp._43;
|
||||
vecNew = vecPos;
|
||||
////
|
||||
vecInter = CSceneManager::m_RBspSceneManager.m_pCurrentBspScene->CollisionPoint(vecBefore,vecNew,50.0f);
|
||||
vecPos = vecInter;
|
||||
D3DXMatrixIdentity(&matTmp);
|
||||
matTmp._41 = CSceneManager::m_RBspSceneManager.m_pCurrentBspScene->m_vecZeroPos.x;
|
||||
matTmp._42 = CSceneManager::m_RBspSceneManager.m_pCurrentBspScene->m_vecZeroPos.y;
|
||||
matTmp._43 = CSceneManager::m_RBspSceneManager.m_pCurrentBspScene->m_vecZeroPos.z;
|
||||
matInv = matTmp;
|
||||
D3DXMatrixIdentity(&matTmp);
|
||||
matTmp._41 = vecPos.x;
|
||||
matTmp._42 = vecPos.y;
|
||||
matTmp._43 = vecPos.z;
|
||||
D3DXMatrixMultiply(&matTmp,&matTmp,&matInv);
|
||||
vecPos.x = matTmp._41;
|
||||
vecPos.y = matTmp._42;
|
||||
vecPos.z = matTmp._43;
|
||||
vecInter = vecPos;
|
||||
vecCameraInterPos = vector3(vecInter.x,vecInter.y,vecInter.z);
|
||||
}
|
||||
else
|
||||
{
|
||||
/////////////////////Terrain//////////////////
|
||||
|
||||
List<vector3> PolyList;
|
||||
CSceneManager::m_HeightField.GetLineIntersectPoly(vecChrPos,vecResultCameraPos,PolyList);
|
||||
|
||||
float fCollisionLens=fInterCamera;
|
||||
|
||||
float fLens;
|
||||
vector3 vecPoly[3];
|
||||
if(PolyList.num>0)
|
||||
{
|
||||
for(int cIndices=0;cIndices<PolyList.num/3;cIndices++)
|
||||
{
|
||||
vecPoly[0]=PolyList[cIndices*3+0];
|
||||
vecPoly[1]=PolyList[cIndices*3+1];
|
||||
vecPoly[2]=PolyList[cIndices*3+2];
|
||||
|
||||
if(CIntersection::PolygonRay(vecChrPos,vecResultCameraPos,vecPoly,fLens) && fCollisionLens > fLens && fLens > 0.0f)
|
||||
{
|
||||
fCollisionLens=fLens;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
float fChrInter=fCollisionLens;
|
||||
vecCameraInterPos=vecCameraInterPos*fChrInter+vecChrPos;
|
||||
|
||||
float fCameraHeight=CSceneManager::m_HeightField.GetHeight(vecCameraInterPos);
|
||||
if(vecCameraInterPos.y < fCameraHeight +40.0f)
|
||||
{
|
||||
vecCameraInterPos.y=fCameraHeight +40.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CCameraControl::SetFadeOut(float fStart, float fMaintenance, float fEnd)
|
||||
{
|
||||
m_fFadeOutStart=fStart;
|
||||
m_fFadeOutMaintenance=fMaintenance;
|
||||
m_fFadeOutEnd=fEnd;
|
||||
m_fFadeOutNowTime=0.0f;
|
||||
}
|
||||
|
||||
void CCameraControl::SetFadeIn(float fStart, float fMaintenance, float fEnd,color FadeColor)
|
||||
{
|
||||
m_fFadeInStart=fStart;
|
||||
m_fFadeInMaintenance=fMaintenance;
|
||||
m_fFadeInEnd=fEnd;
|
||||
m_fFadeInNowTime=0.0f;
|
||||
m_FadeInColor=FadeColor;
|
||||
}
|
||||
|
||||
void CCameraControl::SetCamera(vector3 &vecCameraInterPos, vector3 &vecCameraShake, vector3 &vecChrPos)
|
||||
{
|
||||
vector3 viewDir = vecChrPos - vecCameraInterPos+vecCameraShake;
|
||||
viewDir.Normalize();
|
||||
matrix matView;
|
||||
matView.CameraLookAt(vecCameraInterPos+vecCameraShake, vecChrPos, vector3(0.0f, 1.0f, 0.0f));
|
||||
// <20><><EFBFBD><EFBFBD> 04.07.08
|
||||
//matView.CameraLookAt(vecCameraInterPos+vecCameraShake, vecCameraInterPos+vecCameraShake + viewDir, vector3(0.0f, 1.0f, 0.0f));
|
||||
matrix matInv;
|
||||
matInv.Inverse(matView);
|
||||
|
||||
m_vecCameraPos=vecCameraInterPos;
|
||||
|
||||
CSceneManager::GetCamera()->SetMatPosition(matInv);
|
||||
CSceneManager::GetCamera()->SetMatView(matView);
|
||||
CSceneManager::GetCamera()->SetVecPosition(vecChrPos);
|
||||
//<2F><><EFBFBD><EFBFBD> 04.07.08
|
||||
//CSceneManager::GetCamera()->SetVecPosition(vecCameraInterPos+vecCameraShake + viewDir);
|
||||
CSceneManager::GetCamera()->MoveFrustum();
|
||||
|
||||
if(m_fFadeOutStart> 0.0f)
|
||||
{
|
||||
float fCameraUpdate=CFrameTimer::GetUpdateTimer(m_nCameraAnimationTimer);
|
||||
|
||||
m_fFadeOutNowTime+=(int)fCameraUpdate;
|
||||
|
||||
float fSetTime;
|
||||
|
||||
if(m_fFadeOutNowTime <= m_fFadeOutStart)
|
||||
{
|
||||
fSetTime=m_fFadeOutNowTime/m_fFadeOutStart;
|
||||
}
|
||||
if( m_fFadeOutNowTime > m_fFadeOutStart &&
|
||||
m_fFadeOutNowTime < m_fFadeOutStart+m_fFadeOutMaintenance)
|
||||
{
|
||||
fSetTime=1.0f;
|
||||
}
|
||||
if( m_fFadeOutNowTime >= m_fFadeOutStart+m_fFadeOutMaintenance)
|
||||
{
|
||||
fSetTime=m_fFadeOutNowTime-(m_fFadeOutStart+m_fFadeOutMaintenance);
|
||||
fSetTime=1.0f-(fSetTime/m_fFadeOutEnd);
|
||||
//if(fSetTime<0.0f)
|
||||
// fSetTime=0.0f;
|
||||
}
|
||||
if(fSetTime>=0.0f)
|
||||
{
|
||||
CSceneManager::m_WeatherManager.m_CustomWaterColor=true;
|
||||
CSceneManager::m_WeatherManager.m_CustomWaterRate=fSetTime;
|
||||
}
|
||||
|
||||
if( m_fFadeOutNowTime >= m_fFadeOutStart+m_fFadeOutMaintenance+m_fFadeOutEnd)
|
||||
{
|
||||
CSceneManager::m_WeatherManager.m_CustomWaterColor=false;
|
||||
|
||||
m_fFadeOutStart=0.0f;
|
||||
m_fFadeOutMaintenance=0.0f;
|
||||
m_fFadeOutEnd=0.0f;
|
||||
m_fFadeOutNowTime=0.0f;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if(m_fFadeInStart> 0.0f)
|
||||
{
|
||||
float fCameraUpdate=CFrameTimer::GetUpdateTimer(m_nCameraAnimationTimer);
|
||||
|
||||
m_fFadeInNowTime+=(int)fCameraUpdate;
|
||||
|
||||
float fSetTime;
|
||||
|
||||
if(m_fFadeInNowTime <= m_fFadeInStart)
|
||||
{
|
||||
fSetTime=m_fFadeInNowTime/m_fFadeInStart;
|
||||
}
|
||||
if( m_fFadeInNowTime > m_fFadeInStart &&
|
||||
m_fFadeInNowTime < m_fFadeInStart+m_fFadeInMaintenance)
|
||||
{
|
||||
fSetTime=1.0f;
|
||||
}
|
||||
if( m_fFadeInNowTime >= m_fFadeInStart+m_fFadeInMaintenance)
|
||||
{
|
||||
fSetTime=m_fFadeInNowTime-(m_fFadeInStart+m_fFadeInMaintenance);
|
||||
fSetTime=1.0f-(fSetTime/m_fFadeInEnd);
|
||||
}
|
||||
if(fSetTime<1.0f && fSetTime>0.0f)
|
||||
{
|
||||
int a=0;
|
||||
}
|
||||
color InterColor;
|
||||
color ZeroColor;
|
||||
ZeroColor.c=0x00000000;
|
||||
InterColor=color::Interpolation(ZeroColor,m_FadeInColor,fSetTime);
|
||||
CSceneManager::m_FullSceneFade=InterColor;
|
||||
//CSceneManager::m_FullSceneFade.c=0x00ff0000;
|
||||
|
||||
if( m_fFadeInNowTime >= m_fFadeInStart+m_fFadeInMaintenance+m_fFadeInEnd)
|
||||
{
|
||||
m_fFadeInStart=0.0f;
|
||||
m_fFadeInMaintenance=0.0f;
|
||||
m_fFadeInEnd=0.0f;
|
||||
m_fFadeInNowTime=0.0f;
|
||||
|
||||
CSceneManager::m_FullSceneFade.c=0x0;
|
||||
}
|
||||
}
|
||||
}
|
||||
69
GameTools/CHARACTERACTIONCONTROL/CameraControl.h
Normal file
69
GameTools/CHARACTERACTIONCONTROL/CameraControl.h
Normal file
@@ -0,0 +1,69 @@
|
||||
// CameraControl.h: interface for the CCameraControl class.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined(AFX_CAMERACONTROL_H__4E002D9F_8CCD_44AF_8371_3BA39A220DC0__INCLUDED_)
|
||||
#define AFX_CAMERACONTROL_H__4E002D9F_8CCD_44AF_8371_3BA39A220DC0__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#include "3DMath.h"
|
||||
#include <d3d8.h>
|
||||
|
||||
class CCameraControl
|
||||
{
|
||||
public:
|
||||
void SetCamera(vector3 &vecCameraInterPos, vector3 &vecCameraShake, vector3 &vecChrPos);
|
||||
static void SetFadeIn(float fStart,float fMaintenance,float fEnd,color FadeColor);
|
||||
static void SetFadeOut(float fStart,float fMaintenance,float fEnd);
|
||||
void CalcCameraPosition(vector3 vecChrPos,float fCameraDirection,float fCameraYDirection,float fInterCamera,vector3 &vecCameraInterPos);
|
||||
void UpdateControlCamera();
|
||||
void ModeConvertAnimation();
|
||||
void UpdateClickMode(vector3 vecChrPos);
|
||||
void UpdateBattleCharacter(vector3 vecChrPos,float fDirection);
|
||||
int m_nCameraMode;//0 <20><><EFBFBD>콺 Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,1 <20><>Ʋ,2 <20><><EFBFBD>α<CEB1><D7B7><EFBFBD><EFBFBD><EFBFBD> ī<><EFBFBD> (<28><><EFBFBD><EFBFBD>ũ,<2C><>ũ<EFBFBD><C5A9>Ʈ...)
|
||||
int m_nPrepareCameraMode;
|
||||
|
||||
static float m_fJumpRate;
|
||||
static float m_fCameraShakeRateTime;
|
||||
static float m_fCameraShakeNowTime;
|
||||
static vector3 m_vecCameraShakeLength;
|
||||
|
||||
static float m_fFadeOutStart;
|
||||
static float m_fFadeOutMaintenance;
|
||||
static float m_fFadeOutEnd;
|
||||
static float m_fFadeOutNowTime;
|
||||
|
||||
static float m_fFadeInStart;
|
||||
static float m_fFadeInMaintenance;
|
||||
static float m_fFadeInEnd;
|
||||
static float m_fFadeInNowTime;
|
||||
static color m_FadeInColor;
|
||||
|
||||
|
||||
|
||||
//
|
||||
vector3 m_vecStartPosition,m_vecEndPosition;
|
||||
vector3 m_vecVelocity,m_vecAccelate;
|
||||
vector3 m_vecNowPosition;
|
||||
float m_fTotalTimeInterval;
|
||||
float m_fTime;
|
||||
//
|
||||
float m_fCameraRotX,m_fCameraRotY;//Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
float m_fBattleCameraRotY;
|
||||
float m_fMouseClickInterCharacterCamera,m_fBattleInterCharacterCamera;
|
||||
vector3 m_vecTargetCameraPosition;
|
||||
vector3 m_vecCameraPos;
|
||||
//
|
||||
|
||||
|
||||
|
||||
static DWORD m_nCameraAnimationTimer;
|
||||
CCameraControl();
|
||||
virtual ~CCameraControl();
|
||||
|
||||
};
|
||||
|
||||
#endif // !defined(AFX_CAMERACONTROL_H__4E002D9F_8CCD_44AF_8371_3BA39A220DC0__INCLUDED_)
|
||||
124
GameTools/CHARACTERACTIONCONTROL/CharacterActionControl.dsp
Normal file
124
GameTools/CHARACTERACTIONCONTROL/CharacterActionControl.dsp
Normal file
@@ -0,0 +1,124 @@
|
||||
# Microsoft Developer Studio Project File - Name="CharacterActionControl" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
||||
|
||||
CFG=CharacterActionControl - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "CharacterActionControl.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "CharacterActionControl.mak" CFG="CharacterActionControl - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "CharacterActionControl - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "CharacterActionControl - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""$/CharacterActionControl", HAEAAAAA"
|
||||
# PROP Scc_LocalPath "."
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "CharacterActionControl - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FAcs /YX /FD /c
|
||||
# ADD BASE RSC /l 0x412 /d "NDEBUG"
|
||||
# ADD RSC /l 0x412 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ELSEIF "$(CFG)" == "CharacterActionControl - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x412 /d "_DEBUG"
|
||||
# ADD RSC /l 0x412 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "CharacterActionControl - Win32 Release"
|
||||
# Name "CharacterActionControl - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\CameraControl.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\CCameraScript.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\CharacterControl.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Creature.cpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\CameraControl.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\CCameraScript.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\CharacterControl.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Creature.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
29
GameTools/CHARACTERACTIONCONTROL/CharacterActionControl.dsw
Normal file
29
GameTools/CHARACTERACTIONCONTROL/CharacterActionControl.dsw
Normal file
@@ -0,0 +1,29 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "CharacterActionControl"=.\CharacterActionControl.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
BIN
GameTools/CHARACTERACTIONCONTROL/CharacterActionControl.opt
Normal file
BIN
GameTools/CHARACTERACTIONCONTROL/CharacterActionControl.opt
Normal file
Binary file not shown.
25
GameTools/CHARACTERACTIONCONTROL/CharacterActionControl.plg
Normal file
25
GameTools/CHARACTERACTIONCONTROL/CharacterActionControl.plg
Normal file
@@ -0,0 +1,25 @@
|
||||
<html>
|
||||
<body>
|
||||
<pre>
|
||||
<h1>Build Log</h1>
|
||||
<h3>
|
||||
--------------------Configuration: CharacterActionControl - Win32 Release--------------------
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP221.tmp" with contents
|
||||
[
|
||||
/nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /FAcs /Fa"Release/" /Fp"Release/CharacterActionControl.pch" /YX /Fo"Release/" /Fd"Release/" /FD /c
|
||||
"C:\ryl\CharacterActionControl\CCameraScript.cpp"
|
||||
]
|
||||
Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSP221.tmp"
|
||||
<h3>Output Window</h3>
|
||||
Compiling...
|
||||
CCameraScript.cpp
|
||||
|
||||
|
||||
|
||||
<h3>Results</h3>
|
||||
CCameraScript.obj - 0 error(s), 0 warning(s)
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
BIN
GameTools/CHARACTERACTIONCONTROL/CharacterActionControl.rar
Normal file
BIN
GameTools/CHARACTERACTIONCONTROL/CharacterActionControl.rar
Normal file
Binary file not shown.
215
GameTools/CHARACTERACTIONCONTROL/CharacterActionControl.vcproj
Normal file
215
GameTools/CHARACTERACTIONCONTROL/CharacterActionControl.vcproj
Normal file
@@ -0,0 +1,215 @@
|
||||
<?xml version="1.0" encoding="ks_c_5601-1987"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="CharacterActionControl"
|
||||
ProjectGUID="{EB71F1DE-B4FD-4B48-959B-8FC828C73BBF}"
|
||||
SccProjectName=""$/CharacterActionControl", HAEAAAAA"
|
||||
SccLocalPath=".">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory=".\Release"
|
||||
IntermediateDirectory=".\Release"
|
||||
ConfigurationType="4"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories="..\ZALLA3D BASECLASS;..\Effect;..\CHARACTERACTIONCONTROL;..\SoundLib;..\CaldronBase;..\Zallad3D SceneClass"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="0"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderFile=".\Release/CharacterActionControl.pch"
|
||||
AssemblerOutput="2"
|
||||
AssemblerListingLocation=".\Release/"
|
||||
ObjectFile=".\Release/"
|
||||
ProgramDataBaseFileName=".\Release/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile=".\Release\CharacterActionControl.lib"
|
||||
SuppressStartupBanner="TRUE"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1042"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory=".\Debug"
|
||||
IntermediateDirectory=".\Debug"
|
||||
ConfigurationType="4"
|
||||
UseOfMFC="0"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\ZALLA3D BASECLASS;..\Effect;..\CHARACTERACTIONCONTROL;..\SoundLib;..\CaldronBase;..\Zallad3D SceneClass"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="2"
|
||||
PrecompiledHeaderFile=".\Debug/CharacterActionControl.pch"
|
||||
AssemblerListingLocation=".\Debug/"
|
||||
ObjectFile=".\Debug/"
|
||||
ProgramDataBaseFileName=".\Debug/"
|
||||
WarningLevel="3"
|
||||
SuppressStartupBanner="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile=".\Debug\CharacterActionControl.lib"
|
||||
SuppressStartupBanner="TRUE"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1042"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
|
||||
<File
|
||||
RelativePath="CameraControl.cpp">
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="CCameraScript.cpp">
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="CharacterControl.cpp">
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="Creature.cpp">
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
PreprocessorDefinitions=""/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions=""
|
||||
BasicRuntimeChecks="3"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl">
|
||||
<File
|
||||
RelativePath="CameraControl.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="CCameraScript.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="CharacterControl.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="Creature.h">
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
6387
GameTools/CHARACTERACTIONCONTROL/CharacterControl.cpp
Normal file
6387
GameTools/CHARACTERACTIONCONTROL/CharacterControl.cpp
Normal file
File diff suppressed because it is too large
Load Diff
210
GameTools/CHARACTERACTIONCONTROL/CharacterControl.h
Normal file
210
GameTools/CHARACTERACTIONCONTROL/CharacterControl.h
Normal file
@@ -0,0 +1,210 @@
|
||||
// CharacterControl.h: interface for the CCharacterControl class.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined(AFX_CHARACTERCONTROL_H__E5DF7481_5D2B_4E51_B47A_951185AFB01D__INCLUDED_)
|
||||
#define AFX_CHARACTERCONTROL_H__E5DF7481_5D2B_4E51_B47A_951185AFB01D__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#define CT_PC 0
|
||||
#define CT_NPC 1
|
||||
#define CT_MONSTER 2
|
||||
|
||||
#define TARGET_SELF 10001
|
||||
#define TARGET_SELECTCHAR 10000
|
||||
|
||||
#include "Creature.h"
|
||||
#include "CreatureSize.h"
|
||||
#include "List.h"
|
||||
#include "CameraControl.h"
|
||||
#include "..\\Effect\\CEffscript.h"
|
||||
#include "CCameraScript.h"
|
||||
|
||||
|
||||
extern CCameraScript *g_CameraScript;
|
||||
extern int MAXCHRLOAD;
|
||||
|
||||
class CCharacterControl
|
||||
{
|
||||
class CAttackedNode
|
||||
{
|
||||
public:
|
||||
DWORD m_dwSrcChrID, m_dwTarChrID;
|
||||
unsigned long m_dwWeaponType;
|
||||
};
|
||||
public:
|
||||
bool CheckCharacterListIn(CZ3DGeneralChrModel *pChr) { return true;}
|
||||
|
||||
char * GetCreatureName(unsigned long dwChrID);
|
||||
void InitGlobalAction(void);
|
||||
BOOL GetAttacking(void);
|
||||
BOOL CheckMonsterForward(void);
|
||||
void MakeVisualAttackInfo();
|
||||
CTexture *m_SimpleHumanTexture[4];
|
||||
void UnloadCash(CZ3DGeneralChrModel *pChrmodel);
|
||||
void GetSendCharacterChatList(List<DWORD> &SendCharacterList);
|
||||
void GetSendCharacterList(List<DWORD> &SendCharacterList);
|
||||
void MakeAttackInfo(DWORD dwEnemyChrID);
|
||||
void PlaySound(int nMethod,vector3 vecPos);
|
||||
BOOL m_bCharacterTargetNear;
|
||||
DWORD m_nSelectItem;
|
||||
void PlayerProcessOperation(BOOL bKeyAble);
|
||||
void SetDirectionforMouse(vector3 &vecDirection);
|
||||
// CEffScript *m_pCharacterSelectEff;
|
||||
// CEffScript *m_pEnemyCharacterSelectEff;
|
||||
// CEffScript *m_pEnemyAttackEff;
|
||||
bool m_bSkillAttack;
|
||||
|
||||
long m_lAutoRunCounter;
|
||||
unsigned long m_dwAutoTargetID;
|
||||
bool m_bAutoTargetAttack;
|
||||
CCreature * GetCreature(CZ3DGeneralChrModel *pChrmodel);
|
||||
void MouseClickModeSelfCharacterUpdate(BOOL bKeyAble, BOOL bEdge, int MouseX, int MouseY);
|
||||
vector3 m_vecClickPos;
|
||||
bool m_bClickMove;
|
||||
bool m_bClickAttack;
|
||||
DWORD m_dwClickModeAttackTargetID;
|
||||
void CheckCameraShakeTiming();
|
||||
void CheckAttackedTiming();
|
||||
List<CAttackedNode> m_AttackedList;
|
||||
void RegistAttacked(DWORD dwSrcChrID,DWORD dwTarChrID, unsigned long dwWeaponType = 0);
|
||||
void MakeAttacked(DWORD dwChrID, unsigned long dwWeaponType);
|
||||
bool MakeSkillAttackInfo(unsigned long dwTargetID, unsigned short wSkill = 0, unsigned char cSkillLock = 0, unsigned char cSkillLevel = 0, unsigned char cAtCount = 1);
|
||||
vector3 *GetFindChrPos(unsigned long dwChrID);
|
||||
bool m_bClientUsed;
|
||||
CCameraControl m_Camera;
|
||||
void MouseModeChange();
|
||||
////////////// Network Bind Function ///////////////
|
||||
static vector3 (*GetMonsterMinBox)(unsigned long dwChrID);
|
||||
static vector3 (*GetMonsterMaxBox)(unsigned long dwChrID);
|
||||
static bool (*IsExistToList)(unsigned short List_In, DWORD CharID_In);
|
||||
static bool (*CharAddressRequireInfo)(DWORD SenderID_In, DWORD CharID_In);
|
||||
static BOOL (*SendMovingPacket)(unsigned long dwUpperAni, unsigned long dwLowerAni, float fDir, vector3 &vecMove);
|
||||
static BOOL (*SendCharRespawn)(unsigned long dwChrID);
|
||||
static BOOL (*SendMoveUpdatePacket)(float fDir, vector3 &vecPosition);
|
||||
static BOOL (*SendCharAttack)(vector3 &vecPos, float fDir, unsigned short wType, unsigned char cSkillLock, unsigned char cSkillLevel, unsigned char cAtCount, unsigned short wDefenserNum, unsigned long dwDefenser[10]);
|
||||
static void (*PickItem)(DWORD nItemID);
|
||||
////////////////////////////////////////////////////
|
||||
//static void SetSlideValue(CEffScript *,CEffScript::CEffExt6 );
|
||||
static void (*SetChangeWeapon)(BOOL bChangeWeapon);
|
||||
static void (*SetAutoRun)(BOOL bAutoRun);
|
||||
static BOOL (*GetAutoRun)(void);
|
||||
static char *(*GetMotionSheet)(char *strWeaponName, char *strShieldName, unsigned short wClass);
|
||||
static unsigned long (*GetWeaponType)(char *strWeaponName);
|
||||
static void (*CheckTargetforSkill)(unsigned long &dwTargetID, BOOL bCheckLength);
|
||||
static BOOL (*CheckSkillStart)(BOOL bDown);
|
||||
static BOOL (*CheckStillCasting)(unsigned long &dwFunction);
|
||||
static void (*ChangeWeapon)(void);
|
||||
static void (*SetKillCounter)(long lKillCounter);
|
||||
void WrapSendCharAttack(vector3 &vecPos, float fDir, unsigned short wAtType, unsigned char cSkillLock, unsigned char cSkillLevel, unsigned char cAtCount, unsigned short wDefenserNum,unsigned long lpAtNode[10]);
|
||||
void WrapSendMoveUpdatePacket(float fDir,vector3 vecPos);
|
||||
void WrapSendCharRespawn(DWORD dwChrID);
|
||||
void WrapSendMovingPacket(DWORD dwUpperAction,DWORD dwLowerAction,float fDir,vector3 vecPos);
|
||||
CCreatureSize m_CreatureSize; // ij<><C4B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
CCreature * GetCreature(unsigned long dwChrID);
|
||||
unsigned long GetClientType(unsigned long dwChrID, BOOL bNation = FALSE);
|
||||
void UpdateMonster(unsigned long cChr, float fUpdateTime);
|
||||
void UpdatePlayer(unsigned long cChr, float fUpdateTime);
|
||||
BOOL GetIsExistChar(unsigned long dwChrID);
|
||||
void AddActionData(unsigned long dwChrID, unsigned long dwUpperAni, unsigned long dwLowerAni, float fDirection, vector3 &vecNextPosition, float fVec = 0.0f, unsigned short wAniNum = 0, unsigned long dwFrame = 0);
|
||||
void Create(void);
|
||||
class ChrCashNode
|
||||
{
|
||||
public:
|
||||
CZ3DGeneralChrModel *m_lpChrModel;
|
||||
char m_strGCMDSName[MAX_PATH];
|
||||
int m_nUsedChrID;
|
||||
};
|
||||
BOOL m_bSkillExecuted;
|
||||
unsigned long m_dwStartSkillTick;
|
||||
unsigned long m_dwCastingSkillTick;
|
||||
unsigned long m_dwCastingSkillGrade;
|
||||
bool m_bAttackMode;
|
||||
List<CCreature *> m_lstCharData; // ij<><C4B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ
|
||||
List<ChrCashNode> m_ChrCashList; // ij<><C4B3> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ
|
||||
int m_nFocusCharacter; // <20>ڽ<EFBFBD><DABD><EFBFBD> ij<><C4B3><EFBFBD><EFBFBD>
|
||||
int m_nChrAction;
|
||||
//float m_fCameraRotY, m_fCameraRotX;
|
||||
//float m_fInterCharacterCamera;
|
||||
int m_nChrCounter;
|
||||
vector3 m_vecPrePosition; // <20>ڽ<EFBFBD><DABD><EFBFBD> ij<><C4B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ġ(NPC <20>Ÿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
|
||||
unsigned long m_dwMaxCombo; // <20>ڽ<EFBFBD><DABD><EFBFBD> <20><> <20><EFBFBD><DEBA><EFBFBD>
|
||||
BOOL m_bAttackable;
|
||||
|
||||
CEffScript *m_lpDuelReady;
|
||||
CEffScript *m_lpButtonNormal;
|
||||
BOOL m_bComboSuccess;
|
||||
|
||||
unsigned long m_dwPreDuelTargetID;
|
||||
unsigned long m_dwDuelTargetID;
|
||||
|
||||
unsigned long m_dwRunFactorTimer;
|
||||
unsigned long m_dwNormalTargetMonsterID;
|
||||
unsigned long m_dwNormalTargetID;
|
||||
unsigned long m_dwSpecialTargetID;
|
||||
BOOL m_bAttackResult;
|
||||
|
||||
float m_fRunSpeed;
|
||||
float m_fWalkSpeed;
|
||||
|
||||
float m_fSkillLength;
|
||||
|
||||
int m_nCharMovingPacketTimerID;
|
||||
int m_nCharMoveUpdatePacketTimerID;
|
||||
int m_SkillAttackValue; //Skill <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ÿ<><C5B8> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20>ٲ<EFBFBD><D9B2><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20>÷<EFBFBD><C3B7><EFBFBD>
|
||||
|
||||
//static bool m_bSlide;
|
||||
//static CEffScript::CEffExt6 m_SlideValue;
|
||||
unsigned long m_dwSlideTick;
|
||||
//static CEffScript *m_SlideEffect;
|
||||
|
||||
static char m_WCharMotion[50];
|
||||
CEffScript *m_Effect;
|
||||
char m_TextEsf[256];
|
||||
char m_TextEsfInterface[256];
|
||||
|
||||
CCharacterControl();
|
||||
~CCharacterControl();
|
||||
|
||||
void DeleteAllCharacter(void);
|
||||
|
||||
void SetCamera(int dx = 0, int dy = 0, int dz = 0);
|
||||
void MakeShake(int nChrID);
|
||||
bool MakeAttackInfo(unsigned short wSkill = 0, unsigned char cSkillLock = 0, unsigned char cSkillLevel = 0, unsigned char cAtCount = 1, float fAttackAngle=0.0f,float fAttackRate=0.0f, BOOL bAngle = TRUE);
|
||||
|
||||
// void SetAction(int nActionType, int nAction);
|
||||
void SetShape(CZ3DGeneralChrModel* pChrmodel, char strShape[15][256]);
|
||||
|
||||
int AddCharacter(unsigned long dwChrID, const char *strName, char *strGCMDSName, vector3 vecChrPos, float fDirection);
|
||||
int AddCharacter(unsigned long dwChrID, unsigned char cNation, const char *strName, char *strGCMDSName, char *strFaceType, char *strHairStyle, vector3 vecChrPos, float fDirection, char strShape[15][256]);
|
||||
int AddCharacter(unsigned long dwChrID, vector3 vecChrPos);
|
||||
CZ3DGeneralChrModel* AllocCharacter(char *strGCMDSName, char *strFaceType, char *strHairStyle, int nChrID, char strShape[15][256]);
|
||||
void UnLoadChr(unsigned long dwUID);
|
||||
|
||||
void MouseMove(int MouseX, int MouseY);
|
||||
|
||||
unsigned long GetScreenPosChr(POINT &Point, int nMode = 0, float fLength = 0);
|
||||
|
||||
int m_MouseClickMode;
|
||||
|
||||
int m_nCameraAnimation;
|
||||
|
||||
void Update(float fUpdateTime);
|
||||
void UpdateSelfCharacter(BOOL bKeyAble = TRUE, BOOL bEdge = FALSE, int MouseX=0,int MouseY=0);
|
||||
void SelfCharacterUpdate();
|
||||
void Render(LPDIRECT3DDEVICE8 pd3dDevice);
|
||||
|
||||
/////////// Monster
|
||||
void MonsterEffectProcess(int iChracter,char *strFilename,int iEffectValue = 1);
|
||||
////////////
|
||||
|
||||
//void PlaySlide();
|
||||
//void RenderSlide(float beforex,float beforey,float beforez,float nowx,float nowy,float nowz,float unitsize);
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif // !defined(AFX_CHARACTERCONTROL_H__E5DF7481_5D2B_4E51_B47A_951185AFB01D__INCLUDED_)
|
||||
2966
GameTools/CHARACTERACTIONCONTROL/Creature.cpp
Normal file
2966
GameTools/CHARACTERACTIONCONTROL/Creature.cpp
Normal file
File diff suppressed because it is too large
Load Diff
415
GameTools/CHARACTERACTIONCONTROL/Creature.h
Normal file
415
GameTools/CHARACTERACTIONCONTROL/Creature.h
Normal file
@@ -0,0 +1,415 @@
|
||||
// Creature.h: interface for the CCreature class.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined(AFX_CREATURE_H__0C16A3E3_6308_4E72_AFF8_1CFE85324B6D__INCLUDED_)
|
||||
#define AFX_CREATURE_H__0C16A3E3_6308_4E72_AFF8_1CFE85324B6D__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#include "Z3DGeneralChrModel.h"
|
||||
#include "List.h"
|
||||
#include "SceneManager.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
const unsigned long CA_WAIT = 0;
|
||||
const unsigned long CA_RUN = 1;
|
||||
const unsigned long CA_ATTACK = 2;
|
||||
const unsigned long CA_MOVEATTACK = 3;
|
||||
const unsigned long CA_WALKBACK = 4;
|
||||
const unsigned long CA_WALKLEFT = 5;
|
||||
const unsigned long CA_WALKRIGHT = 6;
|
||||
const unsigned long CA_BASH = 7;
|
||||
const unsigned long CA_WALK = 8;
|
||||
const unsigned long CA_FALLDOWN = 9;
|
||||
const unsigned long CA_REST = 10;
|
||||
const unsigned long CA_SITDOWN = 11;
|
||||
const unsigned long CA_STANDUP = 12;
|
||||
const unsigned long CA_ATTACKADVANCE = 13;
|
||||
const unsigned long CA_ATTACKLEFT = 14;
|
||||
const unsigned long CA_ATTACKRIGHT = 15;
|
||||
const unsigned long CA_ATTACKRETREAT = 16;
|
||||
const unsigned long CA_ATTACK2 = 17;
|
||||
const unsigned long CA_ATTACK3 = 18;
|
||||
const unsigned long CA_ATTACK4 = 19;
|
||||
const unsigned long CA_RESPAWN = 20;
|
||||
const unsigned long CA_JUMP = 21;
|
||||
const unsigned long CA_LEFTDASH = 22;
|
||||
const unsigned long CA_RIGHTDASH = 23;
|
||||
const unsigned long CA_CASTING = 24;
|
||||
const unsigned long CA_FIRE1 = 25;
|
||||
const unsigned long CA_FIRE2 = 26;
|
||||
const unsigned long CA_COMBINATIONBLOW = 27;
|
||||
const unsigned long CA_BACKSTAB = 28;
|
||||
const unsigned long CA_AIMEDSHOT2 = 29;
|
||||
const unsigned long CA_ATTACK5 = 30;
|
||||
const unsigned long CA_ATTACK6 = 31;
|
||||
const unsigned long CA_BACKDASH = 32;
|
||||
const unsigned long CA_AIMEDSHOT1 = 33;
|
||||
const unsigned long CA_JUMPATTACK = 34;
|
||||
const unsigned long CA_JUMPATTACK2 = 35;
|
||||
const unsigned long CA_FRONTDASH = 36;
|
||||
const unsigned long CA_LAND = 37;
|
||||
const unsigned long CA_FORWARDJUMP = 38;
|
||||
const unsigned long CA_BACKJUMP = 40;
|
||||
const unsigned long CA_SHOT = 41;
|
||||
const unsigned long CA_JUMPSHOT = 42;
|
||||
const unsigned long CA_OVERBASH1 = 43;
|
||||
const unsigned long CA_OVERBASH2 = 44;
|
||||
const unsigned long CA_OVERBASH3 = 45;
|
||||
const unsigned long CA_OVERBASH4 = 46;
|
||||
const unsigned long CA_OVERBASH5 = 47;
|
||||
const unsigned long CA_POWERDRAIN = 48;
|
||||
const unsigned long CA_TURNPUNCH1 = 49;
|
||||
const unsigned long CA_TURNPUNCH2 = 50;
|
||||
const unsigned long CA_TURNPUNCH3 = 51;
|
||||
const unsigned long CA_JUMPATTACK3 = 52;
|
||||
const unsigned long CA_AIMEDSHOT3 = 53;
|
||||
const unsigned long CA_STUN = 54;
|
||||
const unsigned long CA_ROUNDSWING = 55;
|
||||
const unsigned long CA_SWIM = 100;
|
||||
|
||||
const float RUN_INTERVAL = 255.0f;
|
||||
|
||||
const long PACKET_LIFETIME = 10000;
|
||||
|
||||
typedef struct ChrActionNode
|
||||
{
|
||||
unsigned long m_dwLowerChrAction;
|
||||
unsigned long m_dwUpperChrAction;
|
||||
float m_fDirection;
|
||||
vector3 m_vecNextPosition;
|
||||
float m_fVec;
|
||||
unsigned short m_wAniNum;
|
||||
unsigned short m_wAniNumCount;
|
||||
unsigned long m_dwFrame;
|
||||
} ChrActionNode;
|
||||
|
||||
typedef struct stDamage
|
||||
{
|
||||
short sLifeTime;
|
||||
long lValue;
|
||||
unsigned short wMode;
|
||||
float fScale;
|
||||
} stDamage;
|
||||
|
||||
class CCreature
|
||||
{
|
||||
public:
|
||||
int GetChrTitle( int nClass, int nMerits );
|
||||
void SetChantEffect(unsigned long dwChant, BOOL bToggle, BOOL bSelf);
|
||||
void SetChantEffect(unsigned long dwChant, BOOL bSelf);
|
||||
BOOL GetSkillMotion(void);
|
||||
class CCreatureArrow {
|
||||
public:
|
||||
CEffScript *m_ArrowEsf;
|
||||
char m_PivotName[256];
|
||||
CCreatureArrow() {
|
||||
m_ArrowEsf = NULL;
|
||||
memset(m_PivotName,0,sizeof(char) * 256);
|
||||
}
|
||||
~CCreatureArrow() {
|
||||
if(m_ArrowEsf != NULL) {
|
||||
if(!CSceneManager::m_EffectManager.CheckNullScript(m_ArrowEsf)) {
|
||||
CSceneManager::m_EffectManager.DeleteEndScript(m_ArrowEsf);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
class CCreatureEffect { //creature <20><><EFBFBD><EFBFBD> <20>ٴ<EFBFBD> effect class
|
||||
public:
|
||||
CEffScript *m_Effect; // esf
|
||||
bool m_bPivotRot;
|
||||
int m_PivotIndex;
|
||||
char m_PivotName[50];
|
||||
char m_EffName[50];
|
||||
bool m_EffValue;
|
||||
unsigned long m_EffId;
|
||||
|
||||
D3DXVECTOR3 m_EffPos;
|
||||
|
||||
CCreatureEffect() {
|
||||
m_Effect = NULL;
|
||||
m_bPivotRot = false;
|
||||
m_PivotIndex= -1;
|
||||
memset(m_PivotName,0,sizeof(char) * 50);
|
||||
memset(m_EffName,0,sizeof(char) * 50);
|
||||
m_EffValue = false;
|
||||
m_EffPos.x = m_EffPos.y = m_EffPos.z = 0.0f;
|
||||
m_EffId = 0;
|
||||
|
||||
}
|
||||
~CCreatureEffect() {
|
||||
if(m_Effect != NULL) {
|
||||
|
||||
if(!CSceneManager::m_EffectManager.CheckNullScript(m_Effect)) {
|
||||
m_Effect->SetAllLoopOff();
|
||||
m_Effect->SetVisibility(false);
|
||||
//CSceneManager::m_EffectManager.DeleteEndScript(m_Effect);
|
||||
m_Effect = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
class CWeaponEffect { //Weapon<6F><6E> <20>ٴ<EFBFBD> effect
|
||||
|
||||
public:
|
||||
int m_nWeaponEffectNum; //effect<63><74> <20><><EFBFBD><EFBFBD>
|
||||
int m_nWeaponPosNum; //effect<63><74> <20><><EFBFBD><EFBFBD><EFBFBD>߿<EFBFBD> <20><> effect <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ġ
|
||||
|
||||
char m_strEffect[50];
|
||||
CEffScript *m_pEffect;
|
||||
|
||||
CWeaponEffect()
|
||||
{
|
||||
m_nWeaponEffectNum = 0;
|
||||
m_nWeaponPosNum = 0;
|
||||
|
||||
memset(m_strEffect,sizeof(int),50);
|
||||
m_pEffect = NULL;
|
||||
}
|
||||
~CWeaponEffect()
|
||||
{
|
||||
if(m_pEffect != NULL) {
|
||||
if(!CSceneManager::m_EffectManager.CheckNullScript(m_pEffect)) {
|
||||
//CSceneManager::m_EffectManager.DeleteEndScript(m_pEffect);
|
||||
m_pEffect->SetAllLoopOff();
|
||||
m_pEffect->SetVisibility(false);
|
||||
|
||||
m_pEffect = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
class CWeaponLine { // Weapon Line Setting Class
|
||||
public:
|
||||
LPDIRECT3DTEXTURE8 m_lpLineTexture; // Texture
|
||||
int m_iColor[3]; // Color
|
||||
int m_iBlend; // Blend Mode
|
||||
|
||||
CWeaponLine() {
|
||||
m_lpLineTexture = NULL;
|
||||
m_iColor[0] = m_iColor[1] = m_iColor[2] = 255;
|
||||
m_iBlend = 0;
|
||||
}
|
||||
~CWeaponLine() {
|
||||
if(m_lpLineTexture != NULL) {
|
||||
m_lpLineTexture->Release();
|
||||
m_lpLineTexture = NULL;
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
BOOL Casting(unsigned long dwUpperAni = 0xFFFFFFFF, unsigned long dwLowerAni = 0xFFFFFFFF);
|
||||
void CancelSkill(void);
|
||||
void InitWeapon(unsigned long dwEquip);
|
||||
DWORD m_dwLastUpdateActionTimer;
|
||||
/* char m_strWeaponType[256];
|
||||
static void LoadMotionSheet(char *strFilename);
|
||||
static char m_strWeaponMotionSheet[MAX_WEAPONTABLE][256];
|
||||
static char m_strWeapon[MAX_WEAPONTABLE][256];*/
|
||||
float m_fScale;
|
||||
void EndSkill(char *strMotion);
|
||||
void BeginCast(char *strMotion);
|
||||
BOOL Dash(int nDir);
|
||||
BOOL Jump();
|
||||
void SkillAttack(unsigned long dwUpperAni, unsigned int dwLowerAni);
|
||||
void SetShape(char strShape[15][256]);
|
||||
void Respawn(void);
|
||||
void InitChrAction(void);
|
||||
BOOL IsCancelAction(unsigned long dwPart);
|
||||
void SetMotionString(unsigned long *dwAction, char *strAction);
|
||||
void SetMotionString(unsigned long dwAction, char *strAction);
|
||||
BOOL Attack(unsigned long dwUpperAni = 0xFFFFFFFF, unsigned long dwLowerAni = 0xFFFFFFFF);
|
||||
void Dead(void);
|
||||
void Wait(void);
|
||||
BOOL SetAction(char *strUpperAction, char *strLowerAction);
|
||||
BOOL SetAction(unsigned long dwUpperAni, unsigned long dwLowerAni);
|
||||
void CrouchAndStandup(void);
|
||||
void WalkBack(void);
|
||||
void WalkRight(void);
|
||||
void WalkLeft(void);
|
||||
void Run(float fRunFactor);
|
||||
CZ3DGeneralChrModel *m_lpChrModel;
|
||||
char m_strGCMDSName[MAX_PATH];
|
||||
char m_strFaceType[MAX_PATH];
|
||||
char m_strHairStyle[MAX_PATH];
|
||||
unsigned short m_wShape[15];
|
||||
char m_strShape[15][256]; // <20><><EFBFBD>߿<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
unsigned char m_cSex;
|
||||
unsigned char m_cNation;
|
||||
unsigned char m_cLevel;
|
||||
unsigned short m_wClass;
|
||||
unsigned long m_dwPartyID;
|
||||
unsigned long m_dwWeaponPos;
|
||||
short m_sDamage;
|
||||
long m_sCurrHP;
|
||||
long m_sCurrMP;
|
||||
unsigned short m_wMaxHP;
|
||||
unsigned short m_wMaxMP;
|
||||
float m_fDeadTimer;
|
||||
unsigned long m_dwAttackCombo;
|
||||
unsigned long m_dwSkillComboCount;
|
||||
BOOL m_bSkillCombo;
|
||||
vector3 m_vecPos;
|
||||
float m_fDirection;
|
||||
unsigned long m_dwChrID;
|
||||
float m_fSelfChrLens;
|
||||
int m_ChrNodeID;
|
||||
float m_fRunFactor;
|
||||
char m_strName[MAX_PATH];
|
||||
BOOL m_bSitMode;
|
||||
BOOL m_bUsed;
|
||||
BOOL m_bFlying;
|
||||
BOOL m_bFlyFirstCheck;
|
||||
BOOL m_bStillCasting;
|
||||
BOOL m_bNoneComboAttackMode;
|
||||
BOOL m_bFirstPositionSend;
|
||||
vector3 m_vecJumpAttackVector;
|
||||
unsigned long m_dwChant;
|
||||
char m_strStreetStallName[32];
|
||||
bool m_bPeaceMode;
|
||||
|
||||
unsigned long m_dwSpendTime[6];
|
||||
|
||||
ChrActionNode m_ChrAction;
|
||||
|
||||
float m_fFixAngle;
|
||||
|
||||
List<ChrActionNode> m_lstActionData;
|
||||
List<stDamage> m_lstDamageNumber;
|
||||
char m_strChatMessage[MAX_PATH];
|
||||
float m_fChatTimer;
|
||||
|
||||
BOOL m_bCharDead;
|
||||
|
||||
BOOL m_bUpperAble;
|
||||
BOOL m_bLowerAble;
|
||||
unsigned long m_dwLowerChrAction;
|
||||
unsigned long m_dwUpperChrAction;
|
||||
BOOL m_bUpperAnimating;
|
||||
BOOL m_bLowerAnimating;
|
||||
|
||||
//arrow
|
||||
vector<CCreatureArrow *> m_Arrow;
|
||||
bool m_bArrowExist;
|
||||
//body effect
|
||||
vector<CCreatureEffect *> m_BodyEffect;
|
||||
bool m_bBodyEffect;
|
||||
//Weapon effect
|
||||
vector<CWeaponEffect *> m_WeaponEffect;
|
||||
bool m_bWeaponEffect;
|
||||
|
||||
// slide character <20><><EFBFBD><EFBFBD>
|
||||
CEffScript::CEffExt6 m_SlideValue;
|
||||
bool m_bSlide;
|
||||
|
||||
CWeaponLine *m_pWeaponLine;
|
||||
bool m_bWeaponLine;
|
||||
|
||||
DWORD m_dwTargetId; // Target Id (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD> ó<><C3B3>)
|
||||
|
||||
|
||||
void SetSlideValue(CEffScript::CEffExt6 );
|
||||
void PlaySlide();
|
||||
void RenderSlide(float bx,float by,float bz,float nx,float ny,float nz,float unitsize);
|
||||
//
|
||||
CCreature();
|
||||
virtual ~CCreature();
|
||||
|
||||
void ArrowUpdate();
|
||||
void ArrowUpdate(int );
|
||||
void AddArrow(char *pivot_name,D3DXQUATERNION rot,int div = 0);
|
||||
void DeleteArrow(int );
|
||||
// WeaponLine
|
||||
void SetWeaponLine(LPDIRECT3DTEXTURE8 lpTexture,int iColor[3],int iBlend);
|
||||
void DeleteWeaponLine();
|
||||
void WeaponLineUpdate();
|
||||
|
||||
///////////body effect///////////
|
||||
// ij<><C4B3> pos <20><> effect <20><><EFBFBD>ϰ<EFBFBD><CFB0><EFBFBD>
|
||||
void AddBodyEffect(char *esfname,unsigned long effid = 0,bool mine = true,bool bVisibility = true);
|
||||
// pivot <20>߿<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ϰ<EFBFBD> num <20><><EFBFBD><EFBFBD> <20><>ŭ effect <20><><EFBFBD><EFBFBD> (num <20><><EFBFBD><EFBFBD> -1<≯<EFBFBD> <20><> pivot <20><> <20><> <20><><EFBFBD><EFBFBD>)
|
||||
void AddBodyEffect(char *file = NULL,bool rot = false,unsigned long effid = 0,int num = -1);
|
||||
// pivot <20>ϳ<EFBFBD><CFB3><EFBFBD> effect <20><><EFBFBD><EFBFBD>
|
||||
void AddBodyEffect(char *file = NULL,char *pivot = NULL,bool rot = false,unsigned long effid = 0);
|
||||
void AddBodyEffect(char *file = NULL,int pivotindex = -1,bool rot = false,unsigned long effid = 0);
|
||||
//<2F><><EFBFBD><EFBFBD> body effect list<73>ȿ<EFBFBD> <20><> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD> <20>ϴ<EFBFBD><CFB4><EFBFBD> <20>˻<EFBFBD>
|
||||
bool CheckInBodyEffect(char *file);
|
||||
|
||||
void RenderSnap(float bx,float by,float bz,float nx,float ny,float nz,float unitsize,char *effname);
|
||||
|
||||
|
||||
void DeleteBodyEffect(); // <20><> effect delete
|
||||
void DeleteBodyEffect(char *pivot); // <20><> pivot<6F><74> <20><><EFBFBD><EFBFBD> effect delete
|
||||
void DeleteBodyEffectName(char *effectname); //effect script <20≯<EFBFBD><CCB8><EFBFBD> <20><><EFBFBD><EFBFBD> delete
|
||||
void DeleteBodyEffect(unsigned long id); //effect id<69><64> delete
|
||||
|
||||
void BodyEffectUpdate(int index);
|
||||
void BodyEffectUpdate();
|
||||
void SetEffect(); // monster <20><><EFBFBD><EFBFBD> GCMDS<44><53><EFBFBD><EFBFBD> effect <20>ҷ<EFBFBD> <20><><EFBFBD>̴<EFBFBD> <20>ڵ<EFBFBD>
|
||||
|
||||
//////////Weapon Effect////////
|
||||
|
||||
void AddWeaponEffect(char *esfname,int effectnum);
|
||||
|
||||
void DeleteWeaponEffect(); //<2F><> weapon effect delete
|
||||
void DeleteWeaponEffect(char *esfname,int iEffNum); //esfname<6D><65> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> effect delete
|
||||
|
||||
void WeaponEffectUpdate();
|
||||
|
||||
////////////////////////////////
|
||||
// Visibility <20><><EFBFBD><EFBFBD> //
|
||||
////////////////////////////////
|
||||
void SetEffectVisibility(bool vis);
|
||||
|
||||
|
||||
void SetPosition(float fPosX, float fPosY, float fPosZ)
|
||||
{
|
||||
m_vecPos.x = fPosX; m_vecPos.y = fPosY; m_vecPos.z = fPosZ;
|
||||
if(m_lpChrModel)
|
||||
m_lpChrModel->SetPosition(m_vecPos.x, m_vecPos.y, m_vecPos.z);
|
||||
}
|
||||
void SetPosition(vector3 &vecPos)
|
||||
{
|
||||
m_vecPos = vecPos;
|
||||
if(m_lpChrModel)
|
||||
m_lpChrModel->SetPosition(m_vecPos.x, m_vecPos.y, m_vecPos.z);
|
||||
}
|
||||
vector3 *GetPosition(void)
|
||||
{
|
||||
if(m_lpChrModel)
|
||||
m_lpChrModel->GetPosition(m_vecPos);
|
||||
return &m_vecPos;
|
||||
}
|
||||
void SetDirection(float fDirection)
|
||||
{
|
||||
m_fDirection=fDirection;
|
||||
if(m_lpChrModel)
|
||||
m_lpChrModel->SetDirection(fDirection);
|
||||
}
|
||||
float GetDirection(void)
|
||||
{
|
||||
if(m_lpChrModel)
|
||||
m_fDirection=m_lpChrModel->GetDirection();
|
||||
return m_fDirection;
|
||||
}
|
||||
void SetAlphaLevel(float fAlphaFactor) { m_lpChrModel->SetAlphaLevel(fAlphaFactor); }
|
||||
BOOL GetChantFlag(unsigned long dwChantKind)
|
||||
{
|
||||
if(0 < dwChantKind && dwChantKind < 33)
|
||||
{
|
||||
if(m_dwChant & (0x00000001 << (dwChantKind - 1))) return TRUE; else return FALSE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
};
|
||||
|
||||
#endif // !defined(AFX_CREATURE_H__0C16A3E3_6308_4E72_AFF8_1CFE85324B6D__INCLUDED_)
|
||||
19
GameTools/CHARACTERACTIONCONTROL/CreatureSize.cpp
Normal file
19
GameTools/CHARACTERACTIONCONTROL/CreatureSize.cpp
Normal file
@@ -0,0 +1,19 @@
|
||||
// CreatureSize.cpp: implementation of the CCreatureSize class.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "CreatureSize.h"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Construction/Destruction
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
CCreatureSize::CCreatureSize()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
CCreatureSize::~CCreatureSize()
|
||||
{
|
||||
|
||||
}
|
||||
503
GameTools/CHARACTERACTIONCONTROL/CreatureSize.h
Normal file
503
GameTools/CHARACTERACTIONCONTROL/CreatureSize.h
Normal file
@@ -0,0 +1,503 @@
|
||||
// CreatureSize.h: interface for the CCreatureSize class.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined(AFX_CREATURESIZE_H__BBEA8409_2ADF_4341_B6EB_3D7628A334F9__INCLUDED_)
|
||||
#define AFX_CREATURESIZE_H__BBEA8409_2ADF_4341_B6EB_3D7628A334F9__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
class CCreatureSize
|
||||
{
|
||||
public:
|
||||
vector3 vecMonsterMinBox[200];
|
||||
vector3 vecMonsterMaxBox[200];
|
||||
|
||||
CCreatureSize()
|
||||
{
|
||||
|
||||
vecMonsterMinBox[1]=vector3(-35.0f, 0.0f, -55.0f);
|
||||
vecMonsterMaxBox[1]=vector3(35.0f, 0.0f, 65.0f);
|
||||
|
||||
vecMonsterMinBox[2]=vector3(-42.0f, 0.0f, -66.0f);
|
||||
vecMonsterMaxBox[2]=vector3(42.0f, 0.0f, 78.0f);
|
||||
|
||||
vecMonsterMinBox[3]=vector3(-49.0f, 0.0f, -77.0f);
|
||||
vecMonsterMaxBox[3]=vector3(49.0f, 0.0f, 91.0f);
|
||||
|
||||
vecMonsterMinBox[4]=vector3(-49.0f, 0.0f, -77.0f);
|
||||
vecMonsterMaxBox[4]=vector3(49.0f, 0.0f, 91.0f);
|
||||
|
||||
vecMonsterMinBox[5]=vector3(-49.0f, 0.0f, -77.0f);
|
||||
vecMonsterMaxBox[5]=vector3(49.0f, 0.0f, 91.0f);
|
||||
|
||||
vecMonsterMinBox[6]=vector3(-49.0f, 0.0f, -77.0f);
|
||||
vecMonsterMaxBox[6]=vector3(49.0f, 0.0f, 91.0f);
|
||||
|
||||
vecMonsterMinBox[7]=vector3(-56.0f, 0.0f, -88.0f);
|
||||
vecMonsterMaxBox[7]=vector3(56.0f, 0.0f, 104.0f);
|
||||
|
||||
vecMonsterMinBox[8]=vector3(-56.0f, 0.0f, -88.0f);
|
||||
vecMonsterMaxBox[8]=vector3(56.0f, 0.0f, 104.0f);
|
||||
|
||||
vecMonsterMinBox[9]=vector3(-32.0f, 0.0f, -40.0f);
|
||||
vecMonsterMaxBox[9]=vector3(32.0f, 0.0f, 40.0f);
|
||||
|
||||
vecMonsterMinBox[10]=vector3(-45.0f, 0.0f, -35.0f);
|
||||
vecMonsterMaxBox[10]=vector3(35.0f, 0.0f, 55.0f);
|
||||
|
||||
vecMonsterMinBox[11]=vector3(-40.0f, 0.0f, -25.0f);
|
||||
vecMonsterMaxBox[11]=vector3(40.0f, 0.0f, 25.0f);
|
||||
|
||||
vecMonsterMinBox[12]=vector3(-40.0f, 0.0f, -55.0f);
|
||||
vecMonsterMaxBox[12]=vector3(30.0f, 0.0f, 20.0f);
|
||||
|
||||
vecMonsterMinBox[13]=vector3(-40.0f, 0.0f, -55.0f);
|
||||
vecMonsterMaxBox[13]=vector3(30.0f, 0.0f, 20.0f);
|
||||
|
||||
vecMonsterMinBox[14]=vector3(-49.5f, 0.0f, -38.5f);
|
||||
vecMonsterMaxBox[14]=vector3(38.5f, 0.0f, 60.5f);
|
||||
|
||||
vecMonsterMinBox[15]=vector3(-44.0f, 0.0f, -27.5f);
|
||||
vecMonsterMaxBox[15]=vector3(44.0f, 0.0f, 27.5f);
|
||||
|
||||
vecMonsterMinBox[16]=vector3(-44.0f, 0.0f, -60.5f);
|
||||
vecMonsterMaxBox[16]=vector3(33.0f, 0.0f, 22.0f);
|
||||
|
||||
vecMonsterMinBox[17]=vector3(-44.0f, 0.0f, -60.5f);
|
||||
vecMonsterMaxBox[17]=vector3(33.0f, 0.0f, 22.0f);
|
||||
|
||||
vecMonsterMinBox[18]=vector3(-54.0f, 0.0f, -42.0f);
|
||||
vecMonsterMaxBox[18]=vector3(42.0f, 0.0f, 66.0f);
|
||||
|
||||
vecMonsterMinBox[19]=vector3(-48.0f, 0.0f, -30.0f);
|
||||
vecMonsterMaxBox[19]=vector3(48.0f, 0.0f, 30.0f);
|
||||
|
||||
vecMonsterMinBox[20]=vector3(-50.0f, 0.0f, -25.0f);
|
||||
vecMonsterMaxBox[20]=vector3(65.0f, 0.0f, 155.0f);
|
||||
|
||||
vecMonsterMinBox[21]=vector3(-48.0f, 0.0f, -66.0f);
|
||||
vecMonsterMaxBox[21]=vector3(36.0f, 0.0f, 24.0f);
|
||||
|
||||
vecMonsterMinBox[22]=vector3(-48.0f, 0.0f, -66.0f);
|
||||
vecMonsterMaxBox[22]=vector3(36.0f, 0.0f, 24.0f);
|
||||
|
||||
vecMonsterMinBox[23]=vector3(-30.0f, 0.0f, -15.0f);
|
||||
vecMonsterMaxBox[23]=vector3(35.0f, 0.0f, 150.0f);
|
||||
|
||||
vecMonsterMinBox[24]=vector3(-25.0f, 0.0f, -20.0f);
|
||||
vecMonsterMaxBox[24]=vector3(25.0f, 0.0f, 35.0f);
|
||||
|
||||
vecMonsterMinBox[25]=vector3(-20.0f, 0.0f, -70.0f);
|
||||
vecMonsterMaxBox[25]=vector3(15.0f, 0.0f, 55.0f);
|
||||
|
||||
vecMonsterMinBox[26]=vector3(-95.0f, 0.0f, -80.0f);
|
||||
vecMonsterMaxBox[26]=vector3(95.0f, 0.0f, 100.0f);
|
||||
|
||||
vecMonsterMinBox[27]=vector3(-36.0f, 0.0f, -18.0f);
|
||||
vecMonsterMaxBox[27]=vector3(42.0f, 0.0f, 180.0f);
|
||||
|
||||
vecMonsterMinBox[28]=vector3(-35.0f, 0.0f, -17.5f);
|
||||
vecMonsterMaxBox[28]=vector3(24.5f, 0.0f, 45.5f);
|
||||
|
||||
vecMonsterMinBox[29]=vector3(-30.0f, 0.0f, -24.0f);
|
||||
vecMonsterMaxBox[29]=vector3(30.0f, 0.0f, 42.0f);
|
||||
|
||||
vecMonsterMinBox[30]=vector3(-24.0f, 0.0f, -84.0f);
|
||||
vecMonsterMaxBox[30]=vector3(18.0f, 0.0f, 66.0f);
|
||||
|
||||
vecMonsterMinBox[31]=vector3(-142.5f, 0.0f, -120.0f);
|
||||
vecMonsterMaxBox[31]=vector3(142.5f, 0.0f, 150.0f);
|
||||
|
||||
vecMonsterMinBox[32]=vector3(-50.0f, 0.0f, -25.0f);
|
||||
vecMonsterMaxBox[32]=vector3(35.0f, 0.0f, 65.0f);
|
||||
|
||||
vecMonsterMinBox[33]=vector3(-190.0f, 0.0f, -160.0f);
|
||||
vecMonsterMaxBox[33]=vector3(190.0f, 0.0f, 200.0f);
|
||||
|
||||
vecMonsterMinBox[34]=vector3(-60.0f, 0.0f, -30.0f);
|
||||
vecMonsterMaxBox[34]=vector3(42.0f, 0.0f, 78.0f);
|
||||
|
||||
vecMonsterMinBox[35]=vector3(-120.0f, 0.0f, -115.0f);
|
||||
vecMonsterMaxBox[35]=vector3(95.0f, 0.0f, 120.0f);
|
||||
|
||||
vecMonsterMinBox[36]=vector3(-90.0f, 0.0f, -120.0f);
|
||||
vecMonsterMaxBox[36]=vector3(90.0f, 0.0f, 80.0f);
|
||||
|
||||
vecMonsterMinBox[37]=vector3(-45.0f, 0.0f, -165.0f);
|
||||
vecMonsterMaxBox[37]=vector3(55.0f, 0.0f, 80.0f);
|
||||
|
||||
vecMonsterMinBox[38]=vector3(-45.0f, 0.0f, -180.0f);
|
||||
vecMonsterMaxBox[38]=vector3(50.0f, 0.0f, 90.0f);
|
||||
|
||||
vecMonsterMinBox[39]=vector3(-45.0f, 0.0f, -180.0f);
|
||||
vecMonsterMaxBox[39]=vector3(50.0f, 0.0f, 90.0f);
|
||||
|
||||
vecMonsterMinBox[40]=vector3(-35.0f, 0.0f, -28.0f);
|
||||
vecMonsterMaxBox[40]=vector3(35.0f, 0.0f, 49.0f);
|
||||
|
||||
vecMonsterMinBox[41]=vector3(-60.0f, 0.0f, -30.0f);
|
||||
vecMonsterMaxBox[41]=vector3(42.0f, 0.0f, 78.0f);
|
||||
|
||||
vecMonsterMinBox[42]=vector3(-44.0f, 0.0f, -55.0f);
|
||||
vecMonsterMaxBox[42]=vector3(44.0f, 0.0f, 55.0f);
|
||||
|
||||
vecMonsterMinBox[43]=vector3(-78.0f, 0.0f, -72.0f);
|
||||
vecMonsterMaxBox[43]=vector3(60.0f, 0.0f, 78.0f);
|
||||
|
||||
vecMonsterMinBox[44]=vector3(-108.0f, 0.0f, -144.0f);
|
||||
vecMonsterMaxBox[44]=vector3(108.0f, 0.0f, 96.0f);
|
||||
|
||||
vecMonsterMinBox[45]=vector3(-54.0f, 0.0f, -198.0f);
|
||||
vecMonsterMaxBox[45]=vector3(66.0f, 0.0f, 96.0f);
|
||||
|
||||
vecMonsterMinBox[46]=vector3(-54.0f, 0.0f, -216.0f);
|
||||
vecMonsterMaxBox[46]=vector3(60.0f, 0.0f, 108.0f);
|
||||
|
||||
vecMonsterMinBox[47]=vector3(-54.0f, 0.0f, -216.0f);
|
||||
vecMonsterMaxBox[47]=vector3(60.0f, 0.0f, 108.0f);
|
||||
|
||||
vecMonsterMinBox[48]=vector3(-70.0f, 0.0f, -35.0f);
|
||||
vecMonsterMaxBox[48]=vector3(49.0f, 0.0f, 91.0f);
|
||||
|
||||
vecMonsterMinBox[49]=vector3(-168.0f, 0.0f, -161.0f);
|
||||
vecMonsterMaxBox[49]=vector3(133.0f, 0.0f, 168.0f);
|
||||
|
||||
vecMonsterMinBox[50]=vector3(-20.0f, 0.0f, -45.0f);
|
||||
vecMonsterMaxBox[50]=vector3(20.0f, 0.0f, 140.0f);
|
||||
|
||||
vecMonsterMinBox[51]=vector3(-55.0f, 0.0f, -200.0f);
|
||||
vecMonsterMaxBox[51]=vector3(45.0f, 0.0f, 60.0f);
|
||||
|
||||
vecMonsterMinBox[52]=vector3(-55.0f, 0.0f, -200.0f);
|
||||
vecMonsterMaxBox[52]=vector3(45.0f, 0.0f, 60.0f);
|
||||
|
||||
vecMonsterMinBox[53]=vector3(-55.0f, 0.0f, -200.0f);
|
||||
vecMonsterMaxBox[53]=vector3(45.0f, 0.0f, 60.0f);
|
||||
|
||||
vecMonsterMinBox[54]=vector3(-20.0f, 0.0f, -45.0f);
|
||||
vecMonsterMaxBox[54]=vector3(20.0f, 0.0f, 140.0f);
|
||||
|
||||
vecMonsterMinBox[55]=vector3(-96.0f, 0.0f, -90.0f);
|
||||
vecMonsterMaxBox[55]=vector3(96.0f, 0.0f, 108.0f);
|
||||
|
||||
vecMonsterMinBox[56]=vector3(-55.0f, 0.0f, -200.0f);
|
||||
vecMonsterMaxBox[56]=vector3(45.0f, 0.0f, 60.0f);
|
||||
|
||||
vecMonsterMinBox[57]=vector3(-55.0f, 0.0f, -200.0f);
|
||||
vecMonsterMaxBox[57]=vector3(45.0f, 0.0f, 60.0f);
|
||||
|
||||
vecMonsterMinBox[58]=vector3(-55.0f, 0.0f, -200.0f);
|
||||
vecMonsterMaxBox[58]=vector3(45.0f, 0.0f, 60.0f);
|
||||
|
||||
vecMonsterMinBox[59]=vector3(-20.0f, 0.0f, -45.0f);
|
||||
vecMonsterMaxBox[59]=vector3(20.0f, 0.0f, 145.0f);
|
||||
|
||||
vecMonsterMinBox[60]=vector3(-28.0f, 0.0f, -63.0f);
|
||||
vecMonsterMaxBox[60]=vector3(28.0f, 0.0f, 203.0f);
|
||||
|
||||
vecMonsterMinBox[61]=vector3(-60.0f, 0.0f, -75.0f);
|
||||
vecMonsterMaxBox[61]=vector3(60.0f, 0.0f, 75.0f);
|
||||
|
||||
vecMonsterMinBox[62]=vector3(-126.0f, 0.0f, -168.0f);
|
||||
vecMonsterMaxBox[62]=vector3(126.0f, 0.0f, 112.0f);
|
||||
|
||||
vecMonsterMinBox[63]=vector3(-63.0f, 0.0f, -231.0f);
|
||||
vecMonsterMaxBox[63]=vector3(77.0f, 0.0f, 112.0f);
|
||||
|
||||
vecMonsterMinBox[64]=vector3(-63.0f, 0.0f, -252.0f);
|
||||
vecMonsterMaxBox[64]=vector3(70.0f, 0.0f, 126.0f);
|
||||
|
||||
vecMonsterMinBox[65]=vector3(-63.0f,0.0f, -252.0f);
|
||||
vecMonsterMaxBox[65]=vector3(70.0f, 0.0f, 126.0f);
|
||||
|
||||
vecMonsterMinBox[66]=vector3(-70.0f,0.0f, -20.0f);
|
||||
vecMonsterMaxBox[66]=vector3(70.0f, 0.0f, 70.0f);
|
||||
|
||||
vecMonsterMinBox[67]=vector3(-70.0f,0.0f, -20.0f);
|
||||
vecMonsterMaxBox[67]=vector3(70.0f, 0.0f, 70.0f);
|
||||
|
||||
vecMonsterMinBox[68]=vector3(-112.0f,0.0f, -105.0f);
|
||||
vecMonsterMaxBox[68]=vector3(112.0f, 0.0f, 126.0f);
|
||||
|
||||
vecMonsterMinBox[69]=vector3(-70.0f,0.0f, -20.0f);
|
||||
vecMonsterMaxBox[69]=vector3(70.0f, 0.0f, 70.0f);
|
||||
|
||||
vecMonsterMinBox[70]=vector3(-70.0f,0.0f, -20.0f);
|
||||
vecMonsterMaxBox[70]=vector3(70.0f, 0.0f, 70.0f);
|
||||
|
||||
vecMonsterMinBox[71]=vector3(-119.0f,0.0f, -49.0f);
|
||||
vecMonsterMaxBox[71]=vector3(119.0f, 0.0f, 189.0f);
|
||||
|
||||
vecMonsterMinBox[72]=vector3(-168.0f,0.0f, -184.0f);
|
||||
vecMonsterMaxBox[72]=vector3(88.0f, 0.0f, 192.0f);
|
||||
|
||||
vecMonsterMinBox[73]=vector3(-25.0f,0.0f, -20.0f);
|
||||
vecMonsterMaxBox[73]=vector3(20.0f, 0.0f, 40.0f);
|
||||
|
||||
vecMonsterMinBox[74]=vector3(-75.0f,0.0f, -110.0f);
|
||||
vecMonsterMaxBox[74]=vector3(60.0f, 0.0f, 90.0f);
|
||||
|
||||
vecMonsterMinBox[75]=vector3(-75.0f,0.0f, -110.0f);
|
||||
vecMonsterMaxBox[75]=vector3(60.0f, 0.0f, 90.0f);
|
||||
|
||||
vecMonsterMinBox[76]=vector3(-25.0f,0.0f, -20.0f);
|
||||
vecMonsterMaxBox[76]=vector3(20.0f, 0.0f, 40.0f);
|
||||
|
||||
vecMonsterMinBox[77]=vector3(-65.0f,0.0f, -50.0f);
|
||||
vecMonsterMaxBox[77]=vector3(75.0f, 0.0f, 75.0f);
|
||||
|
||||
vecMonsterMinBox[78]=vector3(-70.0f,0.0f, -90.0f);
|
||||
vecMonsterMaxBox[78]=vector3(30.0f, 0.0f, 45.0f);
|
||||
|
||||
vecMonsterMinBox[79]=vector3(-65.0f,0.0f, -50.0f);
|
||||
vecMonsterMaxBox[79]=vector3(75.0f, 0.0f, 75.0f);
|
||||
|
||||
vecMonsterMinBox[80]=vector3(-65.0f,0.0f, -50.0f);
|
||||
vecMonsterMaxBox[80]=vector3(75.0f, 0.0f, 75.0f);
|
||||
|
||||
vecMonsterMinBox[81]=vector3(-80.0f,0.0f, -65.0f);
|
||||
vecMonsterMaxBox[81]=vector3(100.0f, 0.0f, 85.0f);
|
||||
|
||||
vecMonsterMinBox[82]=vector3(-55.0f,0.0f, -45.0f);
|
||||
vecMonsterMaxBox[82]=vector3(55.0f, 0.0f, 70.0f);
|
||||
|
||||
vecMonsterMinBox[83]=vector3(-55.0f,0.0f, -45.0f);
|
||||
vecMonsterMaxBox[83]=vector3(55.0f, 0.0f, 70.0f);
|
||||
|
||||
vecMonsterMinBox[84]=vector3(-20.0f,0.0f, -70.0f);
|
||||
vecMonsterMaxBox[84]=vector3(15.0f, 0.0f, 55.0f);
|
||||
|
||||
vecMonsterMinBox[85]=vector3(-58.5f,0.0f, -36.0f);
|
||||
vecMonsterMaxBox[85]=vector3(108.0f, 0.0f, 144.0f);
|
||||
|
||||
vecMonsterMinBox[86]=vector3(-71.5f,0.0f, -44.0f);
|
||||
vecMonsterMaxBox[86]=vector3(132.0f, 0.0f, 176.0f);
|
||||
|
||||
vecMonsterMinBox[87]=vector3(-24.0f,0.0f, -84.0f);
|
||||
vecMonsterMaxBox[87]=vector3(18.0f, 0.0f, 66.0f);
|
||||
|
||||
vecMonsterMinBox[88]=vector3(-240.0f,0.0f, -230.0f);
|
||||
vecMonsterMaxBox[88]=vector3(190.0f, 0.0f, 240.0f);
|
||||
|
||||
vecMonsterMinBox[89]=vector3(-22.5f,0.0f, -52.5f);
|
||||
vecMonsterMaxBox[89]=vector3(22.5f, 0.0f, 127.5f);
|
||||
|
||||
vecMonsterMinBox[90]=vector3(-66.0f,0.0f, -11.0f);
|
||||
vecMonsterMaxBox[90]=vector3(82.5f, 0.0f, 66.0f);
|
||||
|
||||
vecMonsterMinBox[91]=vector3(-78.0f,0.0f, -72.0f);
|
||||
vecMonsterMaxBox[91]=vector3(60.0f, 0.0f, 78.0f);
|
||||
|
||||
vecMonsterMinBox[92]=vector3(-98.0f,0.0f, -91.0f);
|
||||
vecMonsterMaxBox[92]=vector3(147.0f, 0.0f, 140.0f);
|
||||
|
||||
vecMonsterMinBox[93]=vector3(-55.0f,0.0f, -45.0f);
|
||||
vecMonsterMaxBox[93]=vector3(55.0f, 0.0f, 70.0f);
|
||||
|
||||
vecMonsterMinBox[94]=vector3(-91.0f,0.0f, -56.0f);
|
||||
vecMonsterMaxBox[94]=vector3(168.0f, 0.0f, 224.0f);
|
||||
|
||||
vecMonsterMinBox[95]=vector3(-150.0f,0.0f, -65.0f);
|
||||
vecMonsterMaxBox[95]=vector3(105.0f, 0.0f, 160.0f);
|
||||
|
||||
vecMonsterMinBox[96]=vector3(-130.0f,0.0f, -80.0f);
|
||||
vecMonsterMaxBox[96]=vector3(240.0f, 0.0f, 320.0f);
|
||||
|
||||
vecMonsterMinBox[97]=vector3(-45.0f,0.0f, -105.0f);
|
||||
vecMonsterMaxBox[97]=vector3(45.0f, 0.0f, 255.0f);
|
||||
|
||||
vecMonsterMinBox[98]=vector3(-150.0f,0.0f, -65.0f);
|
||||
vecMonsterMaxBox[98]=vector3(105.0f, 0.0f, 160.0f);
|
||||
|
||||
vecMonsterMinBox[99]=vector3(-130.0f,0.0f, -55.0f);
|
||||
vecMonsterMaxBox[99]=vector3(80.0f, 0.0f, 130.0f);
|
||||
|
||||
vecMonsterMinBox[100]=vector3(-115.0f,0.0f, -55.0f);
|
||||
vecMonsterMaxBox[100]=vector3(80.0f, 0.0f, 75.0f);
|
||||
|
||||
vecMonsterMinBox[101]=vector3(-180.0f,0.0f, -78.0f);
|
||||
vecMonsterMaxBox[101]=vector3(126.0f, 0.0f, 192.0f);
|
||||
|
||||
vecMonsterMinBox[102]=vector3(-156.0f,0.0f, -66.0f);
|
||||
vecMonsterMaxBox[102]=vector3(96.0f, 0.0f, 156.0f);
|
||||
|
||||
vecMonsterMinBox[103]=vector3(-96.0f,0.0f, -16.0f);
|
||||
vecMonsterMaxBox[103]=vector3(120.0f, 0.0f, 96.0f);
|
||||
|
||||
vecMonsterMinBox[104]=vector3(-138.0f,0.0f, -66.0f);
|
||||
vecMonsterMaxBox[104]=vector3(96.0f, 0.0f, 90.0f);
|
||||
|
||||
vecMonsterMinBox[105]=vector3(-50.0f,0.0f, -25.0f);
|
||||
vecMonsterMaxBox[105]=vector3(60.0f, 0.0f, 130.0f);
|
||||
|
||||
vecMonsterMinBox[106]=vector3(-50.0f,0.0f, -20.0f);
|
||||
vecMonsterMaxBox[106]=vector3(45.0f, 0.0f, 40.0f);
|
||||
|
||||
vecMonsterMinBox[107]=vector3(-25.0f,0.0f, -35.0f);
|
||||
vecMonsterMaxBox[107]=vector3(25.0f, 0.0f, 150.0f);
|
||||
|
||||
vecMonsterMinBox[108]=vector3(-25.0f,0.0f, -35.0f);
|
||||
vecMonsterMaxBox[108]=vector3(25.0f, 0.0f, 150.0f);
|
||||
|
||||
vecMonsterMinBox[109]=vector3(-30.0f,0.0f, -35.0f);
|
||||
vecMonsterMaxBox[109]=vector3(40.0f, 0.0f, 60.0f);
|
||||
|
||||
vecMonsterMinBox[110]=vector3(-30.0f,0.0f, -35.0f);
|
||||
vecMonsterMaxBox[110]=vector3(40.0f, 0.0f, 60.0f);
|
||||
|
||||
vecMonsterMinBox[111]=vector3(-60.0f,0.0f, -30.0f);
|
||||
vecMonsterMaxBox[111]=vector3(72.0f, 0.0f, 156.0f);
|
||||
|
||||
vecMonsterMinBox[112]=vector3(-60.0f,0.0f, -24.0f);
|
||||
vecMonsterMaxBox[112]=vector3(54.0f, 0.0f, 48.0f);
|
||||
|
||||
vecMonsterMinBox[113]=vector3(-210.0f,0.0f, -91.0f);
|
||||
vecMonsterMaxBox[113]=vector3(147.0f, 0.0f, 224.0f);
|
||||
|
||||
vecMonsterMinBox[114]=vector3(-182.0f,0.0f, -77.0f);
|
||||
vecMonsterMaxBox[114]=vector3(112.0f, 0.0f, 182.0f);
|
||||
|
||||
vecMonsterMinBox[115]=vector3(-161.0f,0.0f, -77.0f);
|
||||
vecMonsterMaxBox[115]=vector3(112.0f, 0.0f, 105.0f);
|
||||
|
||||
vecMonsterMinBox[116]=vector3(-85.0f,0.0f, -110.0f);
|
||||
vecMonsterMaxBox[116]=vector3(85.0f, 0.0f, 230.0f);
|
||||
|
||||
vecMonsterMinBox[117]=vector3(-36.0f,0.0f, -42.0f);
|
||||
vecMonsterMaxBox[117]=vector3(48.0f, 0.0f, 72.0f);
|
||||
|
||||
vecMonsterMinBox[118]=vector3(-36.0f,0.0f, -42.0f);
|
||||
vecMonsterMaxBox[118]=vector3(48.0f, 0.0f, 72.0f);
|
||||
|
||||
vecMonsterMinBox[119]=vector3(-25.0f,0.0f, -35.0f);
|
||||
vecMonsterMaxBox[119]=vector3(25.0f, 0.0f, 150.0f);
|
||||
|
||||
vecMonsterMinBox[120]=vector3(-95.0f,0.0f, 0.0f);
|
||||
vecMonsterMaxBox[120]=vector3(95.0f, 0.0f, 165.0f);
|
||||
|
||||
vecMonsterMinBox[121]=vector3(-114.0f,0.0f, 0.0f);
|
||||
vecMonsterMaxBox[121]=vector3(114.0f, 0.0f, 198.0f);
|
||||
|
||||
vecMonsterMinBox[122]=vector3(-25.0f,0.0f, -20.0f);
|
||||
vecMonsterMaxBox[122]=vector3(20.0f, 0.0f, 40.0f);
|
||||
|
||||
vecMonsterMinBox[123]=vector3(-25.0f,0.0f, -20.0f);
|
||||
vecMonsterMaxBox[123]=vector3(20.0f, 0.0f, 40.0f);
|
||||
|
||||
vecMonsterMinBox[124]=vector3(-65.0f,0.0f, -50.0f);
|
||||
vecMonsterMaxBox[124]=vector3(75.0f, 0.0f, 75.0f);
|
||||
|
||||
vecMonsterMinBox[125]=vector3(-85.0f,0.0f, -110.0f);
|
||||
vecMonsterMaxBox[125]=vector3(85.0f, 0.0f, 230.0f);
|
||||
|
||||
vecMonsterMinBox[126]=vector3(-133.0f,0.0f, 0.0f);
|
||||
vecMonsterMaxBox[126]=vector3(133.0f, 0.0f, 231.0f);
|
||||
|
||||
vecMonsterMinBox[127]=vector3(-70.0f,0.0f, -35.0f);
|
||||
vecMonsterMaxBox[127]=vector3(84.0f, 0.0f, 182.0f);
|
||||
|
||||
vecMonsterMinBox[128]=vector3(-70.0f,0.0f, -28.0f);
|
||||
vecMonsterMaxBox[128]=vector3(63.0f, 0.0f, 56.0f);
|
||||
|
||||
vecMonsterMinBox[129]=vector3(-42.0f,0.0f, -49.0f);
|
||||
vecMonsterMaxBox[129]=vector3(56.0f, 0.0f, 84.0f);
|
||||
|
||||
vecMonsterMinBox[130]=vector3(-42.0f,0.0f, -49.0f);
|
||||
vecMonsterMaxBox[130]=vector3(56.0f, 0.0f, 84.0f);
|
||||
|
||||
vecMonsterMinBox[131]=vector3(-80.0f,0.0f, -40.0f);
|
||||
vecMonsterMaxBox[131]=vector3(96.0f, 0.0f, 208.0f);
|
||||
|
||||
vecMonsterMinBox[132]=vector3(-84.5f,0.0f, -78.0f);
|
||||
vecMonsterMaxBox[132]=vector3(65.0f, 0.0f, 84.5f);
|
||||
|
||||
vecMonsterMinBox[133]=vector3(-104.0f,0.0f, -96.0f);
|
||||
vecMonsterMaxBox[133]=vector3(80.0f, 0.0f, 104.0f);
|
||||
|
||||
vecMonsterMinBox[134]=vector3(-104.0f,0.0f, -96.0f);
|
||||
vecMonsterMaxBox[134]=vector3(80.0f, 0.0f, 104.0f);
|
||||
|
||||
vecMonsterMinBox[135]=vector3(-104.0f,0.0f, -96.0f);
|
||||
vecMonsterMaxBox[135]=vector3(80.0f, 0.0f, 104.0f);
|
||||
|
||||
vecMonsterMinBox[136]=vector3(-80.0f,0.0f, -70.0f);
|
||||
vecMonsterMaxBox[136]=vector3(70.0f, 0.0f, 145.0f);
|
||||
|
||||
vecMonsterMinBox[137]=vector3(-80.0f,0.0f, -55.0f);
|
||||
vecMonsterMaxBox[137]=vector3(60.0f, 0.0f, 115.0f);
|
||||
|
||||
vecMonsterMinBox[138]=vector3(-240.0f,0.0f, -262.5f);
|
||||
vecMonsterMaxBox[138]=vector3(405.0f, 0.0f, 225.0f);
|
||||
|
||||
vecMonsterMinBox[139]=vector3(-250.0f,0.0f, -205.0f);
|
||||
vecMonsterMaxBox[139]=vector3(195.0f, 0.0f, 135.0f);
|
||||
|
||||
vecMonsterMinBox[140]=vector3(-25.0f,0.0f, -25.0f);
|
||||
vecMonsterMaxBox[140]=vector3(25.0f, 0.0f, 25.0f);
|
||||
|
||||
vecMonsterMinBox[141]=vector3(-145.0f,0.0f, -280.0f);
|
||||
vecMonsterMaxBox[141]=vector3(135.0f, 0.0f, 230.0f);
|
||||
|
||||
vecMonsterMinBox[142]=vector3(-40.0f,0.0f, -90.0f);
|
||||
vecMonsterMaxBox[142]=vector3(40.0f, 0.0f, 280.0f);
|
||||
|
||||
vecMonsterMinBox[143]=vector3(-40.0f,0.0f, -90.0f);
|
||||
vecMonsterMaxBox[143]=vector3(40.0f, 0.0f, 290.0f);
|
||||
|
||||
vecMonsterMinBox[144]=vector3(-50.0f,0.0f, -70.0f);
|
||||
vecMonsterMaxBox[144]=vector3(50.0f, 0.0f, 300.0f);
|
||||
|
||||
vecMonsterMinBox[145]=vector3(-50.0f,0.0f, -70.0f);
|
||||
vecMonsterMaxBox[145]=vector3(50.0f, 0.0f, 300.0f);
|
||||
|
||||
vecMonsterMinBox[146]=vector3(-81.0f,0.0f, -108.0f);
|
||||
vecMonsterMaxBox[146]=vector3(81.0f, 0.0f, 72.0f);
|
||||
|
||||
vecMonsterMinBox[147]=vector3(-40.5f,0.0f, -148.5f);
|
||||
vecMonsterMaxBox[147]=vector3(49.5f, 0.0f, 72.0f);
|
||||
|
||||
vecMonsterMinBox[148]=vector3(-30.0f,0.0f, -37.5f);
|
||||
vecMonsterMaxBox[148]=vector3(30.0f, 0.0f, 37.5f);
|
||||
|
||||
vecMonsterMinBox[149]=vector3(-45.0f,0.0f, -22.5f);
|
||||
vecMonsterMaxBox[149]=vector3(58.5f, 0.0f, 139.5f);
|
||||
|
||||
vecMonsterMinBox[150]=vector3(-72.0f,0.0f, -67.5f);
|
||||
vecMonsterMaxBox[150]=vector3(72.0f, 0.0f, 81.0f);
|
||||
|
||||
vecMonsterMinBox[151]=vector3(-49.5f,0.0f, -180.0f);
|
||||
vecMonsterMaxBox[151]=vector3(40.5f, 0.0f, 54.0f);
|
||||
|
||||
vecMonsterMinBox[152]=vector3(-54.0f,0.0f, -9.0f);
|
||||
vecMonsterMaxBox[152]=vector3(67.5f, 0.0f, 54.0f);
|
||||
|
||||
vecMonsterMinBox[153]=vector3(-84.0f,0.0f, -78.0f);
|
||||
vecMonsterMaxBox[153]=vector3(126.0f, 0.0f, 120.0f);
|
||||
|
||||
vecMonsterMinBox[154]=vector3(-96.0f,0.0f, -84.0f);
|
||||
vecMonsterMaxBox[154]=vector3(84.0f, 0.0f, 174.0f);
|
||||
|
||||
vecMonsterMinBox[155]=vector3(-96.0f,0.0f, -66.0f);
|
||||
vecMonsterMaxBox[155]=vector3(72.0f, 0.0f, 138.0f);
|
||||
|
||||
vecMonsterMinBox[156]=vector3(-95.0f,0.0f, 0.0f);
|
||||
vecMonsterMaxBox[156]=vector3(95.0f, 0.0f, 165.0f);
|
||||
|
||||
vecMonsterMinBox[157]=vector3(-90.0f,0.0f, -120.0f);
|
||||
vecMonsterMaxBox[157]=vector3(90.0f, 0.0f, 80.0f);
|
||||
|
||||
vecMonsterMinBox[158]=vector3(-45.0f,0.0f, -165.0f);
|
||||
vecMonsterMaxBox[158]=vector3(55.0f, 0.0f, 80.0f);
|
||||
|
||||
vecMonsterMinBox[159]=vector3(-45.0f,0.0f, -22.5f);
|
||||
vecMonsterMaxBox[159]=vector3(58.5f, 0.0f, 139.5f);
|
||||
|
||||
}
|
||||
|
||||
~CCreatureSize() { }
|
||||
};
|
||||
|
||||
#endif // !defined(AFX_CREATURESIZE_H__BBEA8409_2ADF_4341_B6EB_3D7628A334F9__INCLUDED_)
|
||||
Reference in New Issue
Block a user