Initial commit: ROW Client source code
Game client codebase including: - CharacterActionControl: Character and creature management - GlobalScript: Network, items, skills, quests, utilities - RYLClient: Main client application with GUI and event handlers - Engine: 3D rendering engine (RYLGL) - MemoryManager: Custom memory allocation - Library: Third-party dependencies (DirectX, boost, etc.) - Tools: Development utilities 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
119
Engine/Zalla3D Scene Class/WaterW.h
Normal file
119
Engine/Zalla3D Scene Class/WaterW.h
Normal file
@@ -0,0 +1,119 @@
|
||||
#ifndef __CWATERW_H__
|
||||
#define __CWATERW_H__
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <d3dx8.h>
|
||||
#include <d3d8.h>
|
||||
#include <vector>
|
||||
#include "texture.h"
|
||||
#include "BaseDataDefine.h"
|
||||
|
||||
using namespace std;
|
||||
#define WATERWWIDTH 256
|
||||
#define WATERWHEIGHT 256
|
||||
#define WATERWCHOP 2
|
||||
#define WATEREMPTY -1
|
||||
|
||||
class CWaterW {
|
||||
public:
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ٴϴ<D9B4> <20>͵<EFBFBD><CDB5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ִ<EFBFBD> class
|
||||
class CDriftUnit {
|
||||
public:
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ġ<EFBFBD><C4A1> <20><><EFBFBD><EFBFBD>
|
||||
int m_nUnitRange;
|
||||
int m_nIndex; // water<65><72> add <20><>ų<EFBFBD><C5B3><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ε<EFBFBD><CEB5><EFBFBD> <20><>ȣ
|
||||
D3DXVECTOR3 m_UnitPos;
|
||||
D3DXVECTOR3 m_UnitFwd;
|
||||
|
||||
CDriftUnit(){
|
||||
m_nUnitRange = 4;
|
||||
m_nIndex = WATEREMPTY;
|
||||
m_UnitPos.x = m_UnitPos.y = m_UnitPos.z = 0.0f;
|
||||
m_UnitFwd.x = m_UnitFwd.y = m_UnitFwd.z = 0.0f;
|
||||
|
||||
}
|
||||
~CDriftUnit(){}
|
||||
|
||||
int SetUnitIndex(int n);
|
||||
|
||||
};
|
||||
|
||||
private:
|
||||
// water vertex class
|
||||
class CWaterVertex{
|
||||
public:
|
||||
float x,y,z;
|
||||
//normal
|
||||
float nx,ny,nz;
|
||||
|
||||
/* DWORD color;
|
||||
float s,t;*/
|
||||
CWaterVertex() {
|
||||
x = y = z = 0.0f;
|
||||
// color = D3DCOLOR_ARGB(255,255,255,255);
|
||||
// s = t = 0.0f;
|
||||
}
|
||||
~CWaterVertex() {}
|
||||
};
|
||||
// 0,0 <20><><EFBFBD>ؽ<EFBFBD><D8BD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ġ
|
||||
D3DXVECTOR3 m_ZeroPos;
|
||||
// <20><><EFBFBD><EFBFBD> <20>ϳ<EFBFBD><CFB3><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
float m_QuadSize;
|
||||
|
||||
double **m_pWaterSpace;
|
||||
double **m_pWaterChangeValue;
|
||||
double **m_pWaterCoord;
|
||||
int m_nWidthSize;
|
||||
int m_nHeightSize;
|
||||
|
||||
double m_fLimitHeight;
|
||||
float m_nChopPower;
|
||||
vector<CDriftUnit> m_DriftUnit;
|
||||
int m_nDriftCount;
|
||||
int m_IndexNum;
|
||||
LPDIRECT3DVERTEXBUFFER8 m_WaterVertexBuffer;
|
||||
LPDIRECT3DINDEXBUFFER8 m_WaterIndexBuffer;
|
||||
|
||||
CTexture m_WaterTexture;
|
||||
CTexture m_WaterEnv;
|
||||
LPDIRECT3DDEVICE8 m_Device;
|
||||
|
||||
LPDIRECT3DTEXTURE8 m_pSkyTex[6];
|
||||
LPDIRECT3DCUBETEXTURE8 m_pSkyCubeTex;
|
||||
|
||||
public:
|
||||
|
||||
CWaterW();
|
||||
CWaterW(int size,double limitheight,float choppower,float x,float z,float quadsize,LPDIRECT3DDEVICE8 device);
|
||||
CWaterW(int width,int height,double limitheight,float choppower,float x,float z,float size,LPDIRECT3DDEVICE8 device);
|
||||
bool CreateWaterWSpace();
|
||||
void InitWaterW();
|
||||
|
||||
void ChangeVertexBuffer();
|
||||
void CreateVertexBuffer();
|
||||
void CreateTexture();
|
||||
|
||||
void SetDevice(LPDIRECT3DDEVICE8 device) { m_Device = device;}
|
||||
bool SetTexture(char *filename,char *envfile);
|
||||
void SetZeroPos(float x,float y,float z) {m_ZeroPos.x = x;m_ZeroPos.y = y;m_ZeroPos.z = z;}
|
||||
void SetQuadSize(float size) { m_QuadSize = size;}
|
||||
|
||||
void SetLimitHeight(double h);
|
||||
void SetChopPower(int p) {m_nChopPower = (float)p;}
|
||||
|
||||
void AddDriftUnit(CDriftUnit );
|
||||
void DeleteDriftUnit(CDriftUnit );
|
||||
|
||||
void Render();
|
||||
void Update(float x,float y,float z);
|
||||
|
||||
void UpdateWaterW();
|
||||
void ComputeWaterW();
|
||||
void SetHeight(int x,int y,float height);
|
||||
|
||||
~CWaterW();
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user