Skip to content

Commit

Permalink
member prefix naming cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
EpochFlame committed Jan 2, 2024
1 parent acfdff1 commit 8668792
Show file tree
Hide file tree
Showing 14 changed files with 69 additions and 109 deletions.
6 changes: 3 additions & 3 deletions include/Dolphin/os.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ extern void TRKAccessFile(void);
extern void TRKCloseFile(void);

typedef struct OSFstEntry {
int m_entryNum;
int m_nextEntryNum;
char* m_fileNameMaybe;
int mEntryNum;
int mNextEntryNum;
char* mFileName;
} OSFstEntry;

void DCInvalidateRange(void* addr, u32 nBytes);
Expand Down
2 changes: 1 addition & 1 deletion include/Matrix3f.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "types.h"

struct Matrix3f {
float m_matrix[3][3];
float mMatrix[3][3];
};

#endif
2 changes: 1 addition & 1 deletion include/Matrix4f.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
struct Matrix4f {
void makeIdentity();

float m_matrix[4][4];
float mMatrix[4][4];
};

#endif
2 changes: 1 addition & 1 deletion include/odoMeter.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ struct OdoMeter { // TODO: figure out what these actually are
inline void unknown1()
{
if (_04 > 0.0f) {
_04 -= gsys->m_28C;
_04 -= gsys->_28C;
}
}

Expand Down
4 changes: 2 additions & 2 deletions include/string.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ char* strncpy(char* dst, const char* src, size_t n);
#endif // ifdef __cplusplus

struct String {
u32 m_length; // _00
u8* m_str; // _04
u32 mLength; // _00
u8* mStr; // _04

int getLength();
};
Expand Down
2 changes: 1 addition & 1 deletion include/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ struct System {
char filler0[0x24C - 0x0];
Graphics* mGfx;
char filler2[0x28C - 0x250];
float m_28C;
float _28C;
char filler1[0x334 - 0x290];
void Initialise();
static void* alloc(size_t);
Expand Down
16 changes: 8 additions & 8 deletions include/teki.h
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#ifndef _TEKI_H
#define _TEKI_H
#include "types.h"
class Creature {
s32 m_int;
struct Creature {
s32 mInt;
};

class Teki {
s32 m_int;
struct Teki {
s32 mInt;
};

class TekiEvent {
s32 m_int; // _00
Teki* m_tekiptr; // _04
Creature* m_creatureptr; // _08
struct TekiEvent {
s32 mInt; // _00
Teki* mTekiptr; // _04
Creature* mCreatureptr; // _08

TekiEvent(int, Teki*);
TekiEvent(int, Teki*, Creature*);
Expand Down
8 changes: 4 additions & 4 deletions include/timers.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ struct Graphics;
struct Font;

struct Timers {
/*TimerInf* m_timers <-- instead of m_word0*/
u32 m_word0;
u32 m_frameCount;
u32 m_word8;
/*TimerInf* mTimers <-- instead of mWord0*/
u32 mWord0;
u32 mFrameCount;
u32 mWord8;

void reset();
void newFrame();
Expand Down
46 changes: 3 additions & 43 deletions src/plugPikiNakata/tekievent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,6 @@
TekiEvent::TekiEvent(int int_arg, Teki* teki_arg)
{
init(int_arg, teki_arg, nullptr);
/*
.loc_0x0:
mflr r0
li r6, 0
stw r0, 0x4(r1)
stwu r1, -0x20(r1)
stw r31, 0x1C(r1)
addi r31, r3, 0
bl 0x4C
mr r3, r31
lwz r0, 0x24(r1)
lwz r31, 0x1C(r1)
addi r1, r1, 0x20
mtlr r0
blr
*/
}

/*
Expand All @@ -35,23 +19,6 @@ TekiEvent::TekiEvent(int int_arg, Teki* teki_arg)
TekiEvent::TekiEvent(int int_arg, Teki* teki_arg, Creature* creature_arg)
{
init(int_arg, teki_arg, creature_arg);
/*
.loc_0x0:
mflr r0
stw r0, 0x4(r1)
stwu r1, -0x20(r1)
stw r31, 0x1C(r1)
mr r31, r3
bl .loc_0x30
mr r3, r31
lwz r0, 0x24(r1)
lwz r31, 0x1C(r1)
addi r1, r1, 0x20
mtlr r0
blr
.loc_0x30:
*/
}

/*
Expand All @@ -61,14 +28,7 @@ TekiEvent::TekiEvent(int int_arg, Teki* teki_arg, Creature* creature_arg)
*/
void TekiEvent::init(int int_arg, Teki* teki_arg, Creature* creature_arg)
{
m_int = int_arg;
m_tekiptr = teki_arg;
m_creatureptr = creature_arg;
/*
.loc_0x0:
stw r4, 0x0(r3)
stw r5, 0x4(r3)
stw r6, 0x8(r3)
blr
*/
mInt = int_arg;
mTekiptr = teki_arg;
mCreatureptr = creature_arg;
}
46 changes: 23 additions & 23 deletions src/plugPikiYamashita/ptclGenPack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ namespace zen {
struct particleGenerator {
u32 _00;
u8 filler[20];
Vector3f* m_vector_ptr; // _18
Vector3f* mVector_ptr; // _18
u8 filler2[100];
u32 m_pgen_flags; // _80
u32 mPgen_flags; // _80

void forceFinish();
};
class PtclGenPack {
u32 m_limit; // _00
particleGenerator** m_ptcl_gen_list; // _04
u32 mLimit; // _00
particleGenerator** mPtcl_gen_list; // _04

void setPtclGenPtr(u32, particleGenerator*);
void getPtclGenPtr(u32);
Expand Down Expand Up @@ -41,10 +41,10 @@ class PtclGenPack {
namespace zen {
void PtclGenPack::setPtclGenPtr(u32 param_1, particleGenerator* param_2)
{ // matching
if (param_1 >= m_limit) {
if (param_1 >= mLimit) {
return;
}
m_ptcl_gen_list[param_1] = param_2;
mPtcl_gen_list[param_1] = param_2;
return;
};

Expand Down Expand Up @@ -78,10 +78,10 @@ void PtclGenPack::setEmitPosPtr(Vector3f* param_1) // matching
u32 i;
particleGenerator** particle_gen_list;

particle_gen_list = m_ptcl_gen_list;
for (i = 0; i < m_limit; i++, particle_gen_list++) {
particle_gen_list = mPtcl_gen_list;
for (i = 0; i < mLimit; i++, particle_gen_list++) {
if (particle_gen_list[0] != nullptr) {
(*particle_gen_list)->m_vector_ptr = param_1;
(*particle_gen_list)->mVector_ptr = param_1;
}
}
return;
Expand Down Expand Up @@ -118,11 +118,11 @@ void PtclGenPack::startGen() // matching
u32 i;
particleGenerator** particle_gen_list;

particle_gen_list = m_ptcl_gen_list;
for (i = 0; i < m_limit; i++, particle_gen_list++) {
particle_gen_list = mPtcl_gen_list;
for (i = 0; i < mLimit; i++, particle_gen_list++) {
pgen_ptr = particle_gen_list[0];
if (pgen_ptr != nullptr) {
pgen_ptr->m_pgen_flags &= 0xFFFFFFF7;
pgen_ptr->mPgen_flags &= 0xFFFFFFF7;
}
}
return;
Expand All @@ -139,11 +139,11 @@ void PtclGenPack::stopGen() // matching
u32 i;
particleGenerator** particle_gen_list;

particle_gen_list = m_ptcl_gen_list;
for (i = 0; i < m_limit; i++, particle_gen_list++) {
particle_gen_list = mPtcl_gen_list;
for (i = 0; i < mLimit; i++, particle_gen_list++) {
pgen_ptr = particle_gen_list[0];
if (pgen_ptr != nullptr) {
pgen_ptr->m_pgen_flags |= 8;
pgen_ptr->mPgen_flags |= 8;
}
}
return;
Expand Down Expand Up @@ -180,11 +180,11 @@ void PtclGenPack::finish() // matching
u32 i;
particleGenerator** particle_gen_list;

particle_gen_list = m_ptcl_gen_list;
for (i = 0; i < m_limit; i++, particle_gen_list++) {
particle_gen_list = mPtcl_gen_list;
for (i = 0; i < mLimit; i++, particle_gen_list++) {
pgen_ptr = particle_gen_list[0];
if (pgen_ptr != nullptr) {
pgen_ptr->m_pgen_flags |= 2;
pgen_ptr->mPgen_flags |= 2;
particle_gen_list[0] = nullptr;
}
}
Expand All @@ -199,9 +199,9 @@ void PtclGenPack::finish() // matching
void PtclGenPack::forceFinish() // matches
{
u32 i;
particleGenerator** ptcl_list = &m_ptcl_gen_list[0];
particleGenerator** ptcl_list = &mPtcl_gen_list[0];

for (i = 0; i < m_limit; i++, ptcl_list++) {
for (i = 0; i < mLimit; i++, ptcl_list++) {
if (!ptcl_list[0])
continue;

Expand All @@ -221,10 +221,10 @@ bool PtclGenPack::checkStopGen() // matching
u32 i;
particleGenerator** particle_gen_list;

particle_gen_list = m_ptcl_gen_list;
for (i = 0; i < m_limit; i++, particle_gen_list++) {
particle_gen_list = mPtcl_gen_list;
for (i = 0; i < mLimit; i++, particle_gen_list++) {
pgen_ptr = particle_gen_list[0];
if ((particle_gen_list[0] != nullptr) && (((*particle_gen_list)->m_pgen_flags & 8) == 0))
if ((particle_gen_list[0] != nullptr) && (((*particle_gen_list)->mPgen_flags & 8) == 0))
return false;
}
return true;
Expand Down
4 changes: 2 additions & 2 deletions src/sysCommon/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@ struct ControllerManager {

struct System {
u8 data[0x27C];
ControllerManager* m_contManager;
ControllerManager* mContManager;
};

extern System* gsys;

void Controller::update() { gsys->m_contManager->updateController(this); }
void Controller::update() { gsys->mContManager->updateController(this); }

/*
* --INFO--
Expand Down
32 changes: 16 additions & 16 deletions src/sysCommon/matMath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,22 @@ Matrix4f::Matrix4f(float (*) [4])
*/
void Matrix4f::makeIdentity()
{
m_matrix[0][0] = lbl_803E85E0;
m_matrix[0][1] = lbl_803E85E4;
m_matrix[0][2] = lbl_803E85E4;
m_matrix[0][3] = lbl_803E85E4;
m_matrix[1][0] = lbl_803E85E4;
m_matrix[1][1] = lbl_803E85E0;
m_matrix[1][2] = lbl_803E85E4;
m_matrix[1][3] = lbl_803E85E4;
m_matrix[2][0] = lbl_803E85E4;
m_matrix[2][1] = lbl_803E85E4;
m_matrix[2][2] = lbl_803E85E0;
m_matrix[2][3] = lbl_803E85E4;
m_matrix[3][0] = lbl_803E85E4;
m_matrix[3][1] = lbl_803E85E4;
m_matrix[3][2] = lbl_803E85E4;
m_matrix[3][3] = lbl_803E85E0;
mMatrix[0][0] = lbl_803E85E0;
mMatrix[0][1] = lbl_803E85E4;
mMatrix[0][2] = lbl_803E85E4;
mMatrix[0][3] = lbl_803E85E4;
mMatrix[1][0] = lbl_803E85E4;
mMatrix[1][1] = lbl_803E85E0;
mMatrix[1][2] = lbl_803E85E4;
mMatrix[1][3] = lbl_803E85E4;
mMatrix[2][0] = lbl_803E85E4;
mMatrix[2][1] = lbl_803E85E4;
mMatrix[2][2] = lbl_803E85E0;
mMatrix[2][3] = lbl_803E85E4;
mMatrix[3][0] = lbl_803E85E4;
mMatrix[3][1] = lbl_803E85E4;
mMatrix[3][2] = lbl_803E85E4;
mMatrix[3][3] = lbl_803E85E0;
return;

/*
Expand Down
2 changes: 1 addition & 1 deletion src/sysCommon/string.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
int String::getLength()
{
u8* str = this->m_str;
u8* str = this->mStr;
int len = 0;
while (*(str++))
len++;
Expand Down
6 changes: 3 additions & 3 deletions src/sysCommon/timers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@
*/
void Timers::reset()
{
m_word0 = 0;
m_word8 = 0;
mWord0 = 0;
mWord8 = 0;
}

/*
* --INFO--
* Address: 80040994
* Size: 000010
*/
void Timers::newFrame() { m_frameCount++; }
void Timers::newFrame() { mFrameCount++; }

/*
* --INFO--
Expand Down

0 comments on commit 8668792

Please sign in to comment.