mirror of
https://gitlab.com/GaryOderNichts/re3-wiiu.git
synced 2024-11-26 02:54:14 +01:00
Add some TODO stubs for unused code to be reversed
This commit is contained in:
parent
b6da31cfaa
commit
833bf4a619
12
README.md
12
README.md
@ -40,7 +40,15 @@ Please read the [Coding Style](https://github.com/GTAmodding/re3/blob/master/COD
|
|||||||
### Unreversed / incomplete classes (at least the ones we know)
|
### Unreversed / incomplete classes (at least the ones we know)
|
||||||
The following classes have only unused or practically unused code left:
|
The following classes have only unused or practically unused code left:
|
||||||
```
|
```
|
||||||
CCullZone - only mobile stuff
|
CMemoryHeap - only on PS2
|
||||||
CCullZones - only mobile stuff
|
NameGrid.cpp - only on mobile (a player name grid, either a very early player name code ala GTA1 or a multiplayer leftover)
|
||||||
|
PedDebug.cpp - only on mobile (debug code)
|
||||||
|
HandlingMgr.cpp - debug functions from mobile
|
||||||
|
CVehicle::ProcessBikeWheel - early bike code (only on mobile)
|
||||||
|
CAutomobile::DebugCode - debug function from mobile
|
||||||
|
CBoat::DebugCode - debug function from mobile
|
||||||
|
CBoat::ModifyHandlingValue - debug function from mobile
|
||||||
|
CBoat::DisplayHandlingData - debug function from mobile
|
||||||
|
TexturePools - only on PC (slight RW modification that we don't actually need)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
87
src/control/NameGrid.cpp
Normal file
87
src/control/NameGrid.cpp
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
#include "common.h"
|
||||||
|
#include "NameGrid.h"
|
||||||
|
|
||||||
|
// TODO: reverse mobile code
|
||||||
|
|
||||||
|
CPlayerName::CPlayerName()
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CPlayerName::DisplayName(int)
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
CRow::CRow()
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CRow::SetLetter(int, wchar *)
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
CGrid::CGrid()
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CGrid::ProcessAnyLeftJustDown()
|
||||||
|
{
|
||||||
|
unk_int2--;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CGrid::ProcessAnyRightJustDown()
|
||||||
|
{
|
||||||
|
unk_int2++;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CGrid::ProcessAnyUpJustDown()
|
||||||
|
{
|
||||||
|
unk_int1--;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CGrid::ProcessAnyDownJustDown()
|
||||||
|
{
|
||||||
|
unk_int1++;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CGrid::AllDoneMakePlayerName()
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CGrid::ProcessDPadCrossJustDown()
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CGrid::DisplayGrid()
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CGrid::ProcessControllerInput()
|
||||||
|
{
|
||||||
|
// TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CGrid::Process()
|
||||||
|
{
|
||||||
|
ProcessControllerInput();
|
||||||
|
DisplayGrid();
|
||||||
|
playerName.DisplayName(2 * playerName.unk_4c);
|
||||||
|
}
|
53
src/control/NameGrid.h
Normal file
53
src/control/NameGrid.h
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
// TODO: reverse mobile code
|
||||||
|
|
||||||
|
class CPlayerName
|
||||||
|
{
|
||||||
|
friend class CGrid;
|
||||||
|
|
||||||
|
float x;
|
||||||
|
float y;
|
||||||
|
wchar unk_8[34];
|
||||||
|
int unk_4c;
|
||||||
|
public:
|
||||||
|
CPlayerName();
|
||||||
|
void DisplayName(int);
|
||||||
|
};
|
||||||
|
|
||||||
|
class CRow
|
||||||
|
{
|
||||||
|
friend class CGrid;
|
||||||
|
|
||||||
|
int unk_0;
|
||||||
|
int unk_4;
|
||||||
|
wchar unk_8[20];
|
||||||
|
int unk_30;
|
||||||
|
public:
|
||||||
|
CRow();
|
||||||
|
void SetLetter(int, wchar *);
|
||||||
|
};
|
||||||
|
|
||||||
|
class CGrid
|
||||||
|
{
|
||||||
|
CRow rows[5];
|
||||||
|
int unk_int1;
|
||||||
|
int unk_int2;
|
||||||
|
int unk_int3;
|
||||||
|
float unk_float1;
|
||||||
|
float unk_float2;
|
||||||
|
CPlayerName playerName;
|
||||||
|
char unk2[4];
|
||||||
|
char unk3[4];
|
||||||
|
public:
|
||||||
|
CGrid();
|
||||||
|
void ProcessAnyLeftJustDown();
|
||||||
|
void ProcessAnyRightJustDown();
|
||||||
|
void ProcessAnyUpJustDown();
|
||||||
|
void ProcessAnyDownJustDown();
|
||||||
|
void AllDoneMakePlayerName();
|
||||||
|
void ProcessDPadCrossJustDown();
|
||||||
|
void DisplayGrid();
|
||||||
|
void ProcessControllerInput();
|
||||||
|
void Process();
|
||||||
|
};
|
@ -536,7 +536,7 @@ CVehicleModelInfo::SetVehicleComponentFlags(RwFrame *frame, uint32 flags)
|
|||||||
{
|
{
|
||||||
tHandlingData *handling;
|
tHandlingData *handling;
|
||||||
|
|
||||||
handling = mod_HandlingManager.GetHandlingData((eHandlingId)m_handlingId);
|
handling = mod_HandlingManager.GetHandlingData((tVehicleType)m_handlingId);
|
||||||
|
|
||||||
#define SETFLAGS(f) RwFrameForAllObjects(frame, SetAtomicFlagCB, (void*)(f))
|
#define SETFLAGS(f) RwFrameForAllObjects(frame, SetAtomicFlagCB, (void*)(f))
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ CAutomobile::CAutomobile(int32 id, uint8 CreatedBy)
|
|||||||
|
|
||||||
SetModelIndex(id);
|
SetModelIndex(id);
|
||||||
|
|
||||||
pHandling = mod_HandlingManager.GetHandlingData((eHandlingId)mi->m_handlingId);
|
pHandling = mod_HandlingManager.GetHandlingData((tVehicleType)mi->m_handlingId);
|
||||||
|
|
||||||
m_auto_unused1 = 20.0f;
|
m_auto_unused1 = 20.0f;
|
||||||
m_auto_unused2 = 0;
|
m_auto_unused2 = 0;
|
||||||
|
@ -50,7 +50,7 @@ CBoat::CBoat(int mi, uint8 owner) : CVehicle(owner)
|
|||||||
m_fMovingRotation = 0.0f;
|
m_fMovingRotation = 0.0f;
|
||||||
SetModelIndex(mi);
|
SetModelIndex(mi);
|
||||||
|
|
||||||
pHandling = mod_HandlingManager.GetHandlingData((eHandlingId)minfo->m_handlingId);
|
pHandling = mod_HandlingManager.GetHandlingData((tVehicleType)minfo->m_handlingId);
|
||||||
minfo->ChooseVehicleColour(m_currentColour1, m_currentColour2);
|
minfo->ChooseVehicleColour(m_currentColour1, m_currentColour2);
|
||||||
|
|
||||||
m_fMass = pHandling->fMass;
|
m_fMass = pHandling->fMass;
|
||||||
|
@ -127,7 +127,7 @@ cHandlingDataMgr::LoadHandlingData(void)
|
|||||||
handlingId = FindExactWord(word, (const char*)VehicleNames, 14, NUMHANDLINGS);
|
handlingId = FindExactWord(word, (const char*)VehicleNames, 14, NUMHANDLINGS);
|
||||||
assert(handlingId >= 0 && handlingId < NUMHANDLINGS);
|
assert(handlingId >= 0 && handlingId < NUMHANDLINGS);
|
||||||
handling = &HandlingData[handlingId];
|
handling = &HandlingData[handlingId];
|
||||||
handling->nIdentifier = (eHandlingId)handlingId;
|
handling->nIdentifier = (tVehicleType)handlingId;
|
||||||
break;
|
break;
|
||||||
case 1: handling->fMass = strtod(word, nil); break;
|
case 1: handling->fMass = strtod(word, nil); break;
|
||||||
case 2: handling->Dimension.x = strtod(word, nil); break;
|
case 2: handling->Dimension.x = strtod(word, nil); break;
|
||||||
@ -237,3 +237,27 @@ cHandlingDataMgr::GetHandlingId(const char *name)
|
|||||||
break;
|
break;
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
cHandlingDataMgr::ConvertDataToWorldUnits(tHandlingData *handling)
|
||||||
|
{
|
||||||
|
// TODO: mobile code
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
cHandlingDataMgr::RangeCheck(tHandlingData *handling)
|
||||||
|
{
|
||||||
|
// TODO: mobile code
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
cHandlingDataMgr::ModifyHandlingValue(CVehicle *, const tVehicleType &, const tField &, const bool &)
|
||||||
|
{
|
||||||
|
// TODO: mobile code
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
cHandlingDataMgr::DisplayHandlingData(CVehicle *, tHandlingData *, uint8, bool)
|
||||||
|
{
|
||||||
|
// TODO: mobile code
|
||||||
|
}
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "Transmission.h"
|
#include "Transmission.h"
|
||||||
|
|
||||||
enum eHandlingId
|
enum tVehicleType
|
||||||
{
|
{
|
||||||
HANDLING_LANDSTAL,
|
HANDLING_LANDSTAL,
|
||||||
HANDLING_IDAHO,
|
HANDLING_IDAHO,
|
||||||
@ -65,6 +65,11 @@ enum eHandlingId
|
|||||||
NUMHANDLINGS
|
NUMHANDLINGS
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum tField : uint32 // most likely a handling field enum, never used so :shrug:
|
||||||
|
{
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
HANDLING_1G_BOOST = 1,
|
HANDLING_1G_BOOST = 1,
|
||||||
@ -87,7 +92,7 @@ enum
|
|||||||
|
|
||||||
struct tHandlingData
|
struct tHandlingData
|
||||||
{
|
{
|
||||||
eHandlingId nIdentifier;
|
tVehicleType nIdentifier;
|
||||||
float fMass;
|
float fMass;
|
||||||
float fInvMass;
|
float fInvMass;
|
||||||
float fTurnMass;
|
float fTurnMass;
|
||||||
@ -118,6 +123,8 @@ struct tHandlingData
|
|||||||
};
|
};
|
||||||
VALIDATE_SIZE(tHandlingData, 0xD8);
|
VALIDATE_SIZE(tHandlingData, 0xD8);
|
||||||
|
|
||||||
|
class CVehicle;
|
||||||
|
|
||||||
class cHandlingDataMgr
|
class cHandlingDataMgr
|
||||||
{
|
{
|
||||||
float field_0; // unused it seems
|
float field_0; // unused it seems
|
||||||
@ -135,11 +142,15 @@ public:
|
|||||||
void Initialise(void);
|
void Initialise(void);
|
||||||
void LoadHandlingData(void);
|
void LoadHandlingData(void);
|
||||||
int FindExactWord(const char *word, const char *words, int wordLen, int numWords);
|
int FindExactWord(const char *word, const char *words, int wordLen, int numWords);
|
||||||
|
void ConvertDataToWorldUnits(tHandlingData *handling);
|
||||||
void ConvertDataToGameUnits(tHandlingData *handling);
|
void ConvertDataToGameUnits(tHandlingData *handling);
|
||||||
|
void RangeCheck(tHandlingData *handling);
|
||||||
|
void ModifyHandlingValue(CVehicle *, const tVehicleType &, const tField &, const bool &);
|
||||||
|
void DisplayHandlingData(CVehicle *, tHandlingData *, uint8, bool);
|
||||||
int32 GetHandlingId(const char *name);
|
int32 GetHandlingId(const char *name);
|
||||||
tHandlingData *GetHandlingData(eHandlingId id) { return &HandlingData[id]; }
|
tHandlingData *GetHandlingData(tVehicleType id) { return &HandlingData[id]; }
|
||||||
bool HasRearWheelDrive(eHandlingId id) { return HandlingData[id].Transmission.nDriveType == 'R'; }
|
bool HasRearWheelDrive(tVehicleType id) { return HandlingData[id].Transmission.nDriveType == 'R'; }
|
||||||
bool HasFrontWheelDrive(eHandlingId id) { return HandlingData[id].Transmission.nDriveType == 'F'; }
|
bool HasFrontWheelDrive(tVehicleType id) { return HandlingData[id].Transmission.nDriveType == 'F'; }
|
||||||
};
|
};
|
||||||
VALIDATE_SIZE(cHandlingDataMgr, 0x3030);
|
VALIDATE_SIZE(cHandlingDataMgr, 0x3030);
|
||||||
extern cHandlingDataMgr mod_HandlingManager;
|
extern cHandlingDataMgr mod_HandlingManager;
|
||||||
|
@ -52,7 +52,7 @@ CHeli::CHeli(int32 id, uint8 CreatedBy)
|
|||||||
|
|
||||||
CVehicleModelInfo *mi = (CVehicleModelInfo*)CModelInfo::GetModelInfo(id);
|
CVehicleModelInfo *mi = (CVehicleModelInfo*)CModelInfo::GetModelInfo(id);
|
||||||
m_vehType = VEHICLE_TYPE_HELI;
|
m_vehType = VEHICLE_TYPE_HELI;
|
||||||
pHandling = mod_HandlingManager.GetHandlingData((eHandlingId)mi->m_handlingId);
|
pHandling = mod_HandlingManager.GetHandlingData((tVehicleType)mi->m_handlingId);
|
||||||
SetModelIndex(id);
|
SetModelIndex(id);
|
||||||
m_heliStatus = HELI_STATUS_HOVER;
|
m_heliStatus = HELI_STATUS_HOVER;
|
||||||
m_pathState = 0;
|
m_pathState = 0;
|
||||||
|
@ -68,7 +68,7 @@ CPlane::CPlane(int32 id, uint8 CreatedBy)
|
|||||||
{
|
{
|
||||||
CVehicleModelInfo *mi = (CVehicleModelInfo*)CModelInfo::GetModelInfo(id);
|
CVehicleModelInfo *mi = (CVehicleModelInfo*)CModelInfo::GetModelInfo(id);
|
||||||
m_vehType = VEHICLE_TYPE_PLANE;
|
m_vehType = VEHICLE_TYPE_PLANE;
|
||||||
pHandling = mod_HandlingManager.GetHandlingData((eHandlingId)mi->m_handlingId);
|
pHandling = mod_HandlingManager.GetHandlingData((tVehicleType)mi->m_handlingId);
|
||||||
SetModelIndex(id);
|
SetModelIndex(id);
|
||||||
|
|
||||||
m_fMass = 100000000.0f;
|
m_fMass = 100000000.0f;
|
||||||
|
@ -43,7 +43,7 @@ CTrain::CTrain(int32 id, uint8 CreatedBy)
|
|||||||
{
|
{
|
||||||
CVehicleModelInfo *mi = (CVehicleModelInfo*)CModelInfo::GetModelInfo(id);
|
CVehicleModelInfo *mi = (CVehicleModelInfo*)CModelInfo::GetModelInfo(id);
|
||||||
m_vehType = VEHICLE_TYPE_TRAIN;
|
m_vehType = VEHICLE_TYPE_TRAIN;
|
||||||
pHandling = mod_HandlingManager.GetHandlingData((eHandlingId)mi->m_handlingId);
|
pHandling = mod_HandlingManager.GetHandlingData((tVehicleType)mi->m_handlingId);
|
||||||
SetModelIndex(id);
|
SetModelIndex(id);
|
||||||
|
|
||||||
Doors[0].Init(0.8f, 0.0f, 1, 0);
|
Doors[0].Init(0.8f, 0.0f, 1, 0);
|
||||||
|
@ -582,6 +582,13 @@ CVehicle::ProcessWheel(CVector &wheelFwd, CVector &wheelRight, CVector &wheelCon
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
CVehicle::ProcessBikeWheel(CVector &wheelFwd, CVector &wheelRight, CVector &wheelContactSpeed, CVector &wheelContactPoint, int32 wheelsOnGround, float thrust,
|
||||||
|
float brake, float adhesion, int8 wheelId, float *wheelSpeed, tWheelState *wheelState, eBikeWheelSpecial special, uint16 wheelStatus)
|
||||||
|
{
|
||||||
|
// TODO: mobile code
|
||||||
|
}
|
||||||
|
|
||||||
float
|
float
|
||||||
CVehicle::ProcessWheelRotation(tWheelState state, const CVector &fwd, const CVector &speed, float radius)
|
CVehicle::ProcessWheelRotation(tWheelState state, const CVector &fwd, const CVector &speed, float radius)
|
||||||
{
|
{
|
||||||
|
@ -103,6 +103,15 @@ enum eFlightModel
|
|||||||
FLIGHT_MODEL_SEAPLANE
|
FLIGHT_MODEL_SEAPLANE
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// TODO: what is this even?
|
||||||
|
enum eBikeWheelSpecial {
|
||||||
|
BIKE_WHEELSPEC_0, // both wheels on ground
|
||||||
|
BIKE_WHEELSPEC_1, // rear wheel on ground
|
||||||
|
BIKE_WHEELSPEC_2, // only front wheel on ground
|
||||||
|
BIKE_WHEELSPEC_3, // can't happen
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
class CVehicle : public CPhysical
|
class CVehicle : public CPhysical
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -237,6 +246,8 @@ public:
|
|||||||
void FlyingControl(eFlightModel flightModel);
|
void FlyingControl(eFlightModel flightModel);
|
||||||
void ProcessWheel(CVector &wheelFwd, CVector &wheelRight, CVector &wheelContactSpeed, CVector &wheelContactPoint,
|
void ProcessWheel(CVector &wheelFwd, CVector &wheelRight, CVector &wheelContactSpeed, CVector &wheelContactPoint,
|
||||||
int32 wheelsOnGround, float thrust, float brake, float adhesion, int8 wheelId, float *wheelSpeed, tWheelState *wheelState, uint16 wheelStatus);
|
int32 wheelsOnGround, float thrust, float brake, float adhesion, int8 wheelId, float *wheelSpeed, tWheelState *wheelState, uint16 wheelStatus);
|
||||||
|
void ProcessBikeWheel(CVector &wheelFwd, CVector &wheelRight, CVector &wheelContactSpeed, CVector &wheelContactPoint, int32 wheelsOnGround, float thrust,
|
||||||
|
float brake, float adhesion, int8 wheelId, float *wheelSpeed, tWheelState *wheelState, eBikeWheelSpecial special, uint16 wheelStatus);
|
||||||
void ExtinguishCarFire(void);
|
void ExtinguishCarFire(void);
|
||||||
void ProcessDelayedExplosion(void);
|
void ProcessDelayedExplosion(void);
|
||||||
float ProcessWheelRotation(tWheelState state, const CVector &fwd, const CVector &speed, float radius);
|
float ProcessWheelRotation(tWheelState state, const CVector &fwd, const CVector &speed, float radius);
|
||||||
|
Loading…
Reference in New Issue
Block a user