feature/test #9

Merged
njohnson merged 318 commits from feature/test into main 2025-09-07 12:35:21 -04:00
2 changed files with 85 additions and 0 deletions
Showing only changes of commit 2a026947c4 - Show all commits

49
libs/xassets/xwater.cpp Normal file
View File

@ -0,0 +1,49 @@
#include "xwater.h"
XWater::XWater()
: XAsset()
, mWritable()
, mH0X(0)
, mH0Y(0)
, mWTerm(0)
, mM(0)
, mN(0)
, mLx(0)
, mLz(0)
, mGravity(0)
, mWindvel(0)
, mWinddir({ 0, 0 })
, mAmplitude(0)
, mCodeConstant({ 0, 0, 0, 0 })
, mImage(new XGfxImage())
{
}
XWater::~XWater()
{
}
void XWater::ParseData(QDataStream *aStream)
{
}
void XWater::Clear()
{
mWritable = XWaterWritable();
mH0X = 0;
mH0Y = 0;
mWTerm = 0;
mM = 0;
mN = 0;
mLx = 0;
mLz = 0;
mGravity = 0;
mWindvel = 0;
mWinddir = { 0, 0 };
mAmplitude = 0;
mCodeConstant = { 0, 0, 0, 0 };
mImage = new XGfxImage();
}

36
libs/xassets/xwater.h Normal file
View File

@ -0,0 +1,36 @@
#ifndef XWATER_H
#define XWATER_H
#include "xasset.h"
#include "xgfximage.h"
#include "xwaterwritable.h"
#include <QVector>
class XWater: public XAsset
{
public:
explicit XWater();
~XWater();
virtual void ParseData(QDataStream* aStream) override;
virtual void Clear() override;
private:
XWaterWritable mWritable;
float *mH0X;
float *mH0Y;
float *mWTerm;
int mM;
int mN;
float mLx;
float mLz;
float mGravity;
float mWindvel;
QVector<float> mWinddir;
float mAmplitude;
QVector<float> mCodeConstant;
XGfxImage *mImage;
};
#endif // XWATER_H