Files
Client/Library/dxx8/samples/Multimedia/Direct3D/Water/CWater.h
LGram16 e067522598 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>
2025-11-29 16:24:34 +09:00

69 lines
1.2 KiB
C++

//
// CWater
// Copyright (c) 2000-2001 Microsoft Corporation. All rights reserved.
//
#pragma once
#ifndef __CWATER_H__
#define __CWATER_H__
typedef struct WATER_REFRACT
{
// Vrefract = (V + refract * N) * norm
float fRefract;
float fRefractNorm;
DWORD dwDiffuse;
} WATER_REFRACT;
typedef struct WATER_SURFACE
{
float fHeight;
float fVelocity;
} WATER_SURFACE;
class CWater
{
FLOAT m_fSize;
FLOAT m_fDepth;
FLOAT m_fScaleTex;
FLOAT m_fAvgHeight;
FLOAT m_fSphereHeight;
FLOAT m_fSphereRadius2;
UINT m_uIndices;
UINT m_uVertices;
WATER_SURFACE *m_pSurface;
WATER_REFRACT *m_pRefract;
IDirect3DDevice8 *m_pDevice;
IDirect3DIndexBuffer8 *m_pibIndices;
IDirect3DVertexBuffer8 *m_pvbVertices;
IDirect3DVertexBuffer8 *m_pvbCaustics;
public:
CWater();
~CWater();
HRESULT Initialize(float fSize, float fDepth);
HRESULT OnCreateDevice(IDirect3DDevice8 *pDevice);
HRESULT OnResetDevice();
HRESULT OnLostDevice();
HRESULT OnDestroyDevice();
HRESULT Drop();
HRESULT Update(D3DXVECTOR3 &vecPos, D3DXVECTOR3 &vecLight, BOOL bCalcCaustics);
HRESULT DrawCaustics();
HRESULT DrawSurface();
};
#endif // __CWATER_H__