CBit partially matches, doesnt affect anything

This commit is contained in:
Jose Silva 2023-06-27 21:35:33 +02:00
parent c841bd1ad7
commit 50ede8b9de
8 changed files with 56 additions and 15 deletions

31
bit.cpp Normal file
View File

@ -0,0 +1,31 @@
#include "export.h"
#include "bit.h"
#include <cstring>
#include <cstdlib>
CBit::CBit() {
this->mPos.vx = 0;
this->mPos.vy = 0;
this->mPos.vz = 0;
this->mVel.vx = 0;
this->mVel.vy = 0;
this->mVel.vz = 0;
this->mAcc.vx = 0;
this->mAcc.vy = 0;
this->mAcc.vz = 0;
//mFric is inited to 0 here but removed
this->mFric.vx = 1;
this->mFric.vy = 1;
this->mFric.vz = 1;
}
CBit::~CBit(){
this->mNext = NULL;
}

21
bit.h Normal file
View File

@ -0,0 +1,21 @@
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "vector.h"
class CBit
{
public:
CBit* mPrevious;
CBit* mNext;
int unk;
CVector mPos;
CVector mVel;
CVector mAcc;
CFriction mFric;
EXPORT CBit();
virtual ~CBit();
};

View File

@ -7,9 +7,3 @@
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CFriction::CFriction()
{
}

View File

@ -6,12 +6,11 @@
#pragma once
#endif // _MSC_VER > 1000
struct CFriction
class CFriction
{
public:
unsigned char vx;
unsigned char vy;
unsigned char vz;
CFriction();
};

0
mem.cpp Normal file
View File

File diff suppressed because one or more lines are too long

View File

@ -9,10 +9,6 @@
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CVector::CVector()
{
}
void CVector::KillSmall(){
if (this->vx >= -2048 && this->vx <= 2048)

View File

@ -10,12 +10,12 @@
#include "export.h"
#include "friction.h"
struct CVector
class CVector
{
public:
int vx;
int vy;
int vz;
CVector();
EXPORT void KillSmall();
EXPORT CVector* operator-=(const CVector& other);
EXPORT CVector* operator>>=(const int& other);