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:
158
GameTools/Zallad3D SceneClass/Z3DAttachment.h
Normal file
158
GameTools/Zallad3D SceneClass/Z3DAttachment.h
Normal file
@@ -0,0 +1,158 @@
|
||||
// Z3DAttachment.h: interface for the CZ3DAttachment class.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined(AFX_Z3DATTACHMENT_H__51ABB6E1_1ECB_11D5_A643_0000E8EB4C69__INCLUDED_)
|
||||
#define AFX_Z3DATTACHMENT_H__51ABB6E1_1ECB_11D5_A643_0000E8EB4C69__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
|
||||
#include "Z3DObject.h"
|
||||
#include "Z3DRenderable.h"
|
||||
#include "Z3DTypes.h"
|
||||
#include "Z3DTexture.h"
|
||||
#include "Z3D_Globals.h"
|
||||
|
||||
class CTexture;
|
||||
|
||||
struct STVectorStorageA
|
||||
{
|
||||
vector3 s;
|
||||
vector3 t;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
class CZ3DAttachment :
|
||||
public CZ3DRenderable,
|
||||
public CZ3DObject
|
||||
{
|
||||
public:
|
||||
CZ3DAttachment()
|
||||
: CZ3DRenderable(true)
|
||||
{
|
||||
m_pSTVectors = NULL;
|
||||
|
||||
m_pSTVertexBuffer = NULL;
|
||||
m_bSTVertexMode = false;
|
||||
|
||||
|
||||
m_pTexture = NULL; // CZ3DRenderable member
|
||||
m_fScaleFactor = 1.0f;
|
||||
|
||||
m_pVertexBuffer = NULL;
|
||||
m_lVertexCount = 0;
|
||||
|
||||
m_pIndexBuffer = NULL;
|
||||
m_lIndexCount = 0;
|
||||
m_pEnvMap = NULL;
|
||||
m_lpDiffuse = NULL;
|
||||
m_lpBump = NULL;
|
||||
|
||||
|
||||
}
|
||||
|
||||
CZ3DAttachment( const vector3 tm_pos, const quaternion tm_dir )
|
||||
: CZ3DRenderable(true)
|
||||
{
|
||||
m_pSTVectors = NULL;
|
||||
|
||||
m_pSTVertexBuffer = NULL;
|
||||
m_bSTVertexMode = false;
|
||||
|
||||
|
||||
m_pVertexBuffer = NULL;
|
||||
m_lVertexCount = 0;
|
||||
|
||||
m_pIndexBuffer = NULL;
|
||||
m_lIndexCount = 0;
|
||||
|
||||
m_pTexture = NULL; // CZ3DRenderable member
|
||||
m_Pos = tm_pos;
|
||||
m_Dir = tm_dir;
|
||||
m_vPivotPos.Identity();
|
||||
m_fScaleFactor = 1.0f;
|
||||
m_pEnvMap = NULL;
|
||||
m_lpDiffuse = NULL;
|
||||
m_lpBump = NULL;
|
||||
|
||||
}
|
||||
//CZ3DAttachment( const char* szMesh, const char* szTex, const vector3 tm_pos, const quaternion tm_dir );
|
||||
virtual ~CZ3DAttachment();
|
||||
|
||||
bool Set( const char* szMesh, const char* szTex, const char* szTex2, const char* szSpecTex );
|
||||
|
||||
void ApplySTMode();
|
||||
void ComputeST( BumpVertex &rv0, BumpVertex &rv1, BumpVertex &rv2,
|
||||
STVectorStorageA st0, STVectorStorageA st1, STVectorStorageA st2 );
|
||||
|
||||
|
||||
|
||||
|
||||
void ApplyTransform();
|
||||
|
||||
void Render();
|
||||
|
||||
void SecondRender() {}
|
||||
|
||||
void RenderShadow( DWORD vertexShader = 0xFFFFFFFF );
|
||||
void RenderSpecular( DWORD vertexShader = 0xFFFFFFFF );
|
||||
|
||||
void SetScale( float s )
|
||||
{
|
||||
m_fScaleFactor = s;
|
||||
}
|
||||
|
||||
float GetScale()
|
||||
{
|
||||
return m_fScaleFactor;
|
||||
}
|
||||
|
||||
void GetMarker( vector3& v1, vector3& v2 )
|
||||
{
|
||||
_ASSERT( m_tagAMesh.GetObject() );
|
||||
BumpVertex* pV;
|
||||
|
||||
pV = &(m_tagAMesh.GetObject()->m_pVertices[m_tagAMesh.GetObject()->m_wMarker1]);
|
||||
v1.x = pV->v.x*m_TM._11 + pV->v.y*m_TM._21 + pV->v.z*m_TM._31 + m_TM._41;
|
||||
v1.y = pV->v.x*m_TM._12 + pV->v.y*m_TM._22 + pV->v.z*m_TM._32 + m_TM._42;
|
||||
v1.z = pV->v.x*m_TM._13 + pV->v.y*m_TM._23 + pV->v.z*m_TM._33 + m_TM._43;
|
||||
|
||||
pV = &(m_tagAMesh.GetObject()->m_pVertices[m_tagAMesh.GetObject()->m_wMarker2]);
|
||||
v2.x = pV->v.x*m_TM._11 + pV->v.y*m_TM._21 + pV->v.z*m_TM._31 + m_TM._41;
|
||||
v2.y = pV->v.x*m_TM._12 + pV->v.y*m_TM._22 + pV->v.z*m_TM._32 + m_TM._42;
|
||||
v2.z = pV->v.x*m_TM._13 + pV->v.y*m_TM._23 + pV->v.z*m_TM._33 + m_TM._43;
|
||||
}
|
||||
|
||||
|
||||
//static bool _Init( const char* szAMeshHandleFile, const char* szTextureHandleFile );
|
||||
|
||||
protected:
|
||||
STVectorStorageA* m_pSTVectors;
|
||||
|
||||
bool m_bSTVertexMode;
|
||||
|
||||
IDirect3DVertexBuffer8* m_pSTVertexBuffer;
|
||||
CTexture *m_pEnvMap;
|
||||
//BumpVertex* m_pVertices;
|
||||
IDirect3DVertexBuffer8* m_pVertexBuffer;
|
||||
long m_lVertexCount;
|
||||
|
||||
IDirect3DIndexBuffer8* m_pIndexBuffer;
|
||||
long m_lIndexCount;
|
||||
|
||||
float m_fScaleFactor;
|
||||
H3DAMeshTag m_tagAMesh;
|
||||
H3DTextureTag m_tagTexture;
|
||||
H3DTextureTag m_tagTexture2;
|
||||
H3DTextureTag m_tagSpecTexture;
|
||||
|
||||
LPDIRECT3DTEXTURE8 m_lpDiffuse;
|
||||
LPDIRECT3DTEXTURE8 m_lpBump;
|
||||
|
||||
};
|
||||
|
||||
#endif // !defined(AFX_Z3DATTACHMENT_H__51ABB6E1_1ECB_11D5_A643_0000E8EB4C69__INCLUDED_)
|
||||
Reference in New Issue
Block a user