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>
64 lines
1.4 KiB
C++
64 lines
1.4 KiB
C++
// GrassScene.h: interface for the CGrassScene class.
|
|
//
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
#if !defined(AFX_GRASSSCENE_H__9CB57CBD_783D_427E_95F8_EB4C27501B03__INCLUDED_)
|
|
#define AFX_GRASSSCENE_H__9CB57CBD_783D_427E_95F8_EB4C27501B03__INCLUDED_
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif // _MSC_VER > 1000
|
|
|
|
#include "MeshObject.h"
|
|
|
|
#include "SectorDefine.h"
|
|
#include "SceneNode.h"
|
|
#include "Vertex.h"
|
|
#include "RenderTexture.h"
|
|
|
|
class GrassExtVertex
|
|
{
|
|
public:
|
|
vector3 v;
|
|
float fw0,fw1;
|
|
float index0,index1;
|
|
float tu,tv;
|
|
float fColorRate;
|
|
};
|
|
|
|
class CGrassScene : public CSceneNode
|
|
{
|
|
vector3 *m_vecGrassPos;
|
|
unsigned char *m_GrassShadow;
|
|
unsigned char *m_GrassKind;
|
|
static CMeshObject *m_NormalGrass[5];
|
|
int m_cGrassElement;
|
|
vector3 m_MinBox,m_MaxBox;
|
|
|
|
float m_fGrassRot;
|
|
|
|
LPDIRECT3DVERTEXBUFFER8 m_pGrassVertexBuffer;
|
|
LPDIRECT3DINDEXBUFFER8 m_pGrassIndicesBuffer;
|
|
|
|
static DWORD m_dwGrassVertexShader;
|
|
|
|
DWORD m_dwAlphaFactor;
|
|
DWORD m_dwAlphaUnit;
|
|
DWORD m_dwLimit;
|
|
|
|
|
|
public:
|
|
void RenderShadow(LPDIRECT3DDEVICE8 pd3dDevice,CRenderTexture &pShadowTexture);
|
|
static CTexture *m_NormalTexture;
|
|
void Update(float fUpdate);
|
|
int m_GrassPosX,m_GrassPosY;
|
|
void Generate(float fx,float fz,int cGrassElement);
|
|
void Render(LPDIRECT3DDEVICE8 pd3dDevice);
|
|
void Create();
|
|
void UpdateRange();
|
|
CGrassScene();
|
|
virtual ~CGrassScene();
|
|
};
|
|
|
|
#endif // !defined(AFX_GRASSSCENE_H__9CB57CBD_783D_427E_95F8_EB4C27501B03__INCLUDED_)
|