2023-06-27 19:35:33 +00:00
|
|
|
#pragma once
|
2024-05-28 17:48:29 +00:00
|
|
|
|
|
|
|
#ifndef BIT_H
|
|
|
|
#define BIT_H
|
2023-06-27 19:35:33 +00:00
|
|
|
|
|
|
|
#include "vector.h"
|
2024-06-03 16:44:54 +00:00
|
|
|
#include "texture.h"
|
2023-06-27 19:35:33 +00:00
|
|
|
|
|
|
|
class CBit
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CBit* mPrevious;
|
|
|
|
CBit* mNext;
|
|
|
|
|
2024-03-11 16:20:46 +00:00
|
|
|
__int16 field_C;
|
|
|
|
__int16 field_E;
|
2023-06-27 19:35:33 +00:00
|
|
|
|
|
|
|
CVector mPos;
|
|
|
|
CVector mVel;
|
|
|
|
CVector mAcc;
|
|
|
|
CFriction mFric;
|
2023-07-04 16:44:55 +00:00
|
|
|
unsigned char mDead;
|
2024-03-03 19:00:31 +00:00
|
|
|
unsigned __int16 mFrigDeltaZ;
|
2023-07-04 16:44:55 +00:00
|
|
|
unsigned char mProtected;
|
2024-07-12 15:06:11 +00:00
|
|
|
unsigned char bitBottomPad;
|
2023-07-04 16:44:55 +00:00
|
|
|
|
2023-06-27 19:35:33 +00:00
|
|
|
EXPORT CBit();
|
2024-05-21 18:09:54 +00:00
|
|
|
EXPORT virtual ~CBit();
|
2024-05-21 18:22:11 +00:00
|
|
|
EXPORT virtual void Move(void);
|
2024-06-07 17:11:21 +00:00
|
|
|
EXPORT void* operator new(size_t size);
|
2024-05-21 18:09:54 +00:00
|
|
|
EXPORT void operator delete(void*);
|
2023-07-04 16:44:55 +00:00
|
|
|
EXPORT void Die();
|
2023-07-05 15:22:05 +00:00
|
|
|
EXPORT CBit* AttachTo(CBit** to);
|
2024-02-25 16:15:05 +00:00
|
|
|
EXPORT void SetPos(const CVector &pos);
|
|
|
|
EXPORT void DeleteFrom(CBit **lst);
|
2023-06-27 19:35:33 +00:00
|
|
|
};
|
2024-02-25 16:15:05 +00:00
|
|
|
|
|
|
|
class CQuadBit : public CBit {
|
|
|
|
|
|
|
|
public:
|
2024-02-25 22:01:11 +00:00
|
|
|
CVector mPosB;
|
|
|
|
CVector mPosC;
|
|
|
|
CVector mPosD;
|
2024-02-25 16:15:05 +00:00
|
|
|
void* mpTexture;
|
|
|
|
unsigned int mCodeBGR;
|
|
|
|
unsigned pad;
|
|
|
|
unsigned int mTint;
|
2024-03-03 19:00:31 +00:00
|
|
|
unsigned char quadPad[0x14];
|
2024-02-25 16:15:05 +00:00
|
|
|
|
|
|
|
EXPORT void SetTint(unsigned char a2, unsigned char a3, unsigned char a4);
|
2024-02-25 22:01:11 +00:00
|
|
|
EXPORT void SetSemiTransparent();
|
|
|
|
EXPORT void SetOpaque();
|
|
|
|
EXPORT void SetSubtractiveTransparency();
|
|
|
|
EXPORT void SetCorners(const CVector &a2, const CVector &a3, const CVector &a4, const CVector &a5);
|
2024-03-03 18:26:01 +00:00
|
|
|
EXPORT void SetTransparency(unsigned char a2);
|
2024-03-03 19:00:31 +00:00
|
|
|
EXPORT void OrientUsing(CVector *a2, SVector *a3, int a4, int a5);
|
|
|
|
EXPORT void SetTexture(int, int);
|
2024-02-25 16:15:05 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
2024-06-03 16:44:54 +00:00
|
|
|
struct SCFT4BitTexture
|
|
|
|
{
|
|
|
|
unsigned char field_0;
|
|
|
|
unsigned char field_1;
|
|
|
|
unsigned char field_2;
|
|
|
|
unsigned char field_3;
|
2024-06-03 16:53:12 +00:00
|
|
|
Texture *field_4;
|
2024-06-03 16:44:54 +00:00
|
|
|
};
|
|
|
|
|
2024-05-27 17:31:10 +00:00
|
|
|
class CFT4Bit : public CBit
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
EXPORT CFT4Bit(void);
|
|
|
|
EXPORT virtual ~CFT4Bit();
|
|
|
|
EXPORT void SetAnimSpeed(short);
|
|
|
|
EXPORT void SetScale(unsigned short);
|
|
|
|
EXPORT void SetSemiTransparent();
|
|
|
|
EXPORT void SetTransparency(unsigned char t);
|
|
|
|
EXPORT void SetAnim(int);
|
2024-05-27 17:38:19 +00:00
|
|
|
EXPORT void IncFrameWithWrap(void);
|
2024-06-03 16:11:57 +00:00
|
|
|
EXPORT void SetFrame(int);
|
2024-06-03 16:44:54 +00:00
|
|
|
EXPORT void SetTint(unsigned char, unsigned char, unsigned char);
|
|
|
|
EXPORT void SetTexture(Texture*);
|
2024-06-03 16:53:12 +00:00
|
|
|
EXPORT void SetTexture(unsigned int);
|
2024-06-03 17:20:37 +00:00
|
|
|
EXPORT int Fade(int);
|
2024-06-03 17:27:23 +00:00
|
|
|
EXPORT void SetTransDecay(int);
|
2024-05-27 17:31:10 +00:00
|
|
|
|
2024-06-03 17:27:23 +00:00
|
|
|
unsigned __int16 mTransDecay;
|
2024-06-03 17:20:37 +00:00
|
|
|
/*
|
2024-05-27 17:31:10 +00:00
|
|
|
unsigned short mTransDecay;
|
|
|
|
unsigned short mScaleDelay;
|
2024-06-03 17:20:37 +00:00
|
|
|
*/
|
2024-05-27 17:31:10 +00:00
|
|
|
unsigned int mCodeBGR;
|
|
|
|
|
|
|
|
unsigned char mDeleteAnimOnDestruction;
|
|
|
|
unsigned char padAfterDeleteAnim[0x3];
|
|
|
|
|
2024-06-03 16:44:54 +00:00
|
|
|
SCFT4BitTexture *mPSXAnim;
|
|
|
|
SCFT4BitTexture *field_4C;
|
2024-05-27 17:31:10 +00:00
|
|
|
unsigned char padAfteranimRelated5[0x1];
|
|
|
|
|
2024-06-03 16:11:57 +00:00
|
|
|
unsigned char field_51;
|
|
|
|
unsigned char field_52;
|
|
|
|
unsigned char field_53;
|
2024-05-27 17:31:10 +00:00
|
|
|
|
|
|
|
short mAnimSpeed;
|
|
|
|
short mScale;
|
2024-02-25 22:24:57 +00:00
|
|
|
};
|
|
|
|
|
2024-02-25 22:38:37 +00:00
|
|
|
class CFlatBit : public CFT4Bit {
|
2024-02-25 22:24:57 +00:00
|
|
|
|
2024-02-25 22:38:37 +00:00
|
|
|
public:
|
|
|
|
|
2024-06-03 17:41:44 +00:00
|
|
|
EXPORT CFlatBit(void);
|
2024-03-11 16:09:59 +00:00
|
|
|
__int16 field_58;
|
|
|
|
__int16 field_5A;
|
|
|
|
unsigned char padAfter5A[0x2];
|
2024-06-03 17:41:44 +00:00
|
|
|
unsigned short field_5E;
|
2024-02-25 22:38:37 +00:00
|
|
|
unsigned int mPostScale;
|
|
|
|
unsigned char pad1;
|
2024-06-03 17:41:44 +00:00
|
|
|
unsigned char field_65;
|
2024-02-25 22:38:37 +00:00
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2024-04-28 15:55:36 +00:00
|
|
|
class CNonRenderedBit : public CBit {
|
2024-07-12 15:06:11 +00:00
|
|
|
public:
|
2024-04-28 15:55:36 +00:00
|
|
|
};
|
|
|
|
|
2024-05-12 16:43:59 +00:00
|
|
|
class CSmokeTrail : public CNonRenderedBit
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
unsigned char pad[28];
|
|
|
|
|
|
|
|
EXPORT CSmokeTrail(CVector*, int, int, int ,int)
|
|
|
|
{}
|
|
|
|
};
|
|
|
|
|
2024-05-22 16:55:46 +00:00
|
|
|
class CSpecialDisplay : public CBit
|
|
|
|
{
|
|
|
|
public:
|
2024-05-26 14:42:52 +00:00
|
|
|
EXPORT CSpecialDisplay(void);
|
2024-05-22 16:55:46 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class CSimpleTexturedRibbon : public CSpecialDisplay
|
|
|
|
{
|
|
|
|
public:
|
2024-05-31 16:52:08 +00:00
|
|
|
EXPORT void SetRGB(unsigned char, unsigned char, unsigned char);
|
2024-05-31 16:43:25 +00:00
|
|
|
|
2024-05-31 16:52:08 +00:00
|
|
|
unsigned __int16 field_3C;
|
2024-05-31 16:43:25 +00:00
|
|
|
unsigned char padAfter3C[0x48-0x3C-2];
|
|
|
|
|
|
|
|
int* field_48;
|
2024-05-22 16:55:46 +00:00
|
|
|
};
|
|
|
|
|
2024-05-27 16:58:37 +00:00
|
|
|
class CGlow : public CBit
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
EXPORT void SetCentreRGB(unsigned char, unsigned char, unsigned char);
|
2024-05-29 16:37:14 +00:00
|
|
|
EXPORT void SetRadius(int);
|
2024-05-31 17:03:35 +00:00
|
|
|
EXPORT void SetRGB(unsigned char, unsigned char, unsigned char);
|
2024-05-29 16:37:14 +00:00
|
|
|
|
|
|
|
int* field_3C;
|
|
|
|
unsigned char padAfter3C[0x44-0x3C-4];
|
|
|
|
|
|
|
|
unsigned int field_44;
|
|
|
|
unsigned char padAfter44[0x4C-0x44-4];
|
2024-05-27 16:58:37 +00:00
|
|
|
|
|
|
|
int field_4C;
|
2024-06-01 16:23:02 +00:00
|
|
|
unsigned char padAfter4C[0x54-0x4C-4];
|
|
|
|
|
|
|
|
unsigned __int16 field_54;
|
|
|
|
|
|
|
|
unsigned char padBottom[0x5C-0x54-2];
|
2024-05-27 16:58:37 +00:00
|
|
|
};
|
|
|
|
|
2024-05-27 17:31:10 +00:00
|
|
|
class CLinked2EndedBit : public CFT4Bit
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
EXPORT CLinked2EndedBit(void);
|
|
|
|
CVector field_58;
|
|
|
|
CVector field_64;
|
|
|
|
};
|
|
|
|
|
2024-05-27 17:38:19 +00:00
|
|
|
class CRibbonBit : public CLinked2EndedBit
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
EXPORT virtual void Move(void);
|
|
|
|
};
|
|
|
|
|
2024-05-28 17:48:29 +00:00
|
|
|
class CTexturedRibbon : public CSpecialDisplay
|
|
|
|
{
|
|
|
|
public:
|
2024-06-07 15:31:27 +00:00
|
|
|
EXPORT void SetOuterRGBi(int, unsigned char, unsigned char, unsigned char);
|
2024-05-28 17:48:29 +00:00
|
|
|
unsigned char topPad[0x60-0x3C];
|
|
|
|
int* field_60;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2024-06-02 14:39:18 +00:00
|
|
|
class CSimpleAnim : public CFlatBit
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
};
|
|
|
|
|
2024-05-14 16:00:36 +00:00
|
|
|
EXPORT int Bit_MakeSpriteRing(CVector*, int, int, int, int, int, int, int);
|
2024-05-21 18:22:11 +00:00
|
|
|
EXPORT void MoveList(CBit *);
|
2024-05-24 15:11:00 +00:00
|
|
|
EXPORT void Bit_SetSparkRGB(unsigned char, unsigned char, unsigned char);
|
|
|
|
EXPORT void Bit_SetSparkFadeRGB(unsigned char, unsigned char, unsigned char);
|
2024-05-27 17:04:40 +00:00
|
|
|
EXPORT void Bit_SetSparkTrajectory(const CSVector *);
|
|
|
|
EXPORT void Bit_SetSparkTrajectoryCone(const CSVector *);
|
2024-06-02 14:39:18 +00:00
|
|
|
EXPORT void Bit_ReduceRGB(unsigned int*, int);
|
2024-02-25 22:38:37 +00:00
|
|
|
|
|
|
|
void validate_CFlatBit(void);
|
2024-02-25 22:24:57 +00:00
|
|
|
void validate_CFT4Bit(void);
|
2024-02-25 16:15:05 +00:00
|
|
|
void validate_CQuadBit(void);
|
2024-03-11 17:44:47 +00:00
|
|
|
void validate_CBit(void);
|
2024-04-28 15:55:36 +00:00
|
|
|
void validate_CNonRenderedBit(void);
|
2024-05-12 16:43:59 +00:00
|
|
|
void validate_CSmokeTrail(void);
|
2024-05-27 16:58:37 +00:00
|
|
|
void validate_CGlow(void);
|
2024-05-27 17:31:10 +00:00
|
|
|
void validate_CLinked2EndedBit(void);
|
2024-05-27 17:38:19 +00:00
|
|
|
void validate_CRibbonBit(void);
|
2024-05-28 17:48:29 +00:00
|
|
|
void validate_CTexturedRibbon(void);
|
2024-05-31 16:43:25 +00:00
|
|
|
void validate_CSimpleTexturedRibbon(void);
|
2024-06-02 14:39:18 +00:00
|
|
|
void validate_CSimpleAnim(void);
|
2024-06-03 16:44:54 +00:00
|
|
|
void validate_SCFT4BitTexture(void);
|
2024-05-28 17:48:29 +00:00
|
|
|
|
|
|
|
#endif
|