Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1078,8 +1078,8 @@ def MatchingFor(*versions):
"Kameda",
[],
[
Object(NonMatching, "Kameda/Motor.cpp"),
Object(NonMatching, "Kameda/MotorManager.cpp"),
Object(Matching, "Kameda/Motor.cpp"),
Object(Matching, "Kameda/MotorManager.cpp"),
Object(Matching, "Kameda/J2DManager.cpp"),
Object(Matching, "Kameda/Task.cpp"),
Object(NonMatching, "Kameda/Goal2D.cpp"),
Expand Down
83 changes: 62 additions & 21 deletions include/Kameda/Motor.h
Original file line number Diff line number Diff line change
@@ -1,41 +1,82 @@
#ifndef MOTOR_H
#define MOTOR_H

#include "types.h"
#include "JSystem/JKernel/JKRHeap.h"
#include "JSystem/JORReflexible.h"
#include "Kaneshige/HioMgr.h"
#include "Osako/kartPad.h"
#include "types.h"

class MotorParam : public JORReflexible {
class MotorParam : public JORReflexible
{
public:
// Inline/Unused
MotorParam();
virtual ~MotorParam() {}

struct
{
bool flag; // 0x48
u8 _49[0x100 - 1]; // 0x49
} mUnknownContainer[4];

f32 mUnknownFloat; // 0x448
u8 mUnknownValue; // 0x44c
bool mUnknownFlag; // 0x44d
};

class MotorHioNode : public HioNode {
class MotorHioNode : public HioNode
{
public:
MotorHioNode();
MotorHioNode() : HioNode("モーター", &mParam, 0, 0) {}
virtual ~MotorHioNode() {}

MotorParam mParam;
};

class Motor { // Autogenerated
class Motor
{
public:
Motor(JKRHeap *); // 0x801304d8
void init(); // 0x801305c4
~Motor(); // 0x80130668
void exec(); // 0x8013073c
void triggerWave(KartGamePad *, int); // 0x80130ad8
void powerWave(KartGamePad *, f32, u8, u8); // 0x80130b50
void stop(); // 0x80130cbc
static const char *mPatternWave[26]; // 0x803942e8
// Inline/Unused
void loopWave(KartGamePad *, int);
void loopWave(KartGamePad *, char *);
void checkLoop(int, const char *);
void triggerWave(KartGamePad *, char *);
}; // class Motor
#endif // MOTOR_H
Motor(JKRHeap *heap); // 0x801304d8
void init(); // 0x801305c4
~Motor(); // 0x80130668
void exec(); // 0x8013073c
void loopWave(KartGamePad *, int); // Unused
void loopWave(KartGamePad *, char *); // Unused
void checkLoop(int, const char *); // Unused
void triggerWave(KartGamePad *kartGamePad, int index); // 0x80130ad8
void triggerWave(KartGamePad *, char *); // Unused
void powerWave(KartGamePad *kartGamePad,
f32 strength,
u8 phase1Duration,
u8 phase2Duration); // 0x80130b50
void stop(); // 0x80130cbc

private:
static const char *mPatternWave[26]; // 0x803942e8

struct
{
KartGamePad *mKartGamePad; // 0x0

struct
{
const char *pattern; // 0x4
s32 pos; // 0x8
} mDriverMotor[4];

struct
{
const char *pattern; // 0x24
s32 pos; // 0x28
} mPartnerMotor[4];

s32 mUnknown[4]; // 0x44
} mMotorData[4];

s32 mUnknown; // 0x150
s32 mSomeCount; // 0x154

MotorHioNode *mHioNode; // 0x158 (344)
};

#endif // MOTOR_H
41 changes: 25 additions & 16 deletions include/Kameda/MotorManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
#define MOTORMANAGER_H

#include "JSystem/JKernel/JKRDisposer.h"

#include "Kameda/Motor.h"
#include "types.h"

class MotorManager : JKRDisposer
{ // Autogenerated
{
public:
// Global
enum MotorType
{
MotorType_0,
Expand All @@ -33,24 +32,34 @@ class MotorManager : JKRDisposer
MotorType_19,
MotorType_20,
MotorType_21,
MotorType_22
MotorType_22,
MotorType_23,
MotorType_24,
MotorType_MAX,
};

MotorManager(JKRHeap *); // 0x80130e58
virtual ~MotorManager(); // 0x80130ee0
void reset(); // 0x80130f48
void exec(); // 0x80130fc0
void setMotor(MotorType, int); // 0x8013103c
void setAwardMotor(MotorType); // 0x80131218
void setPowerMotor(int, f32, u8, u8); // 0x801312e8
MotorManager(JKRHeap *heap); // 0x80130e58
virtual ~MotorManager(); // 0x80130ee0

static MotorManager *getManager() { return mThis; };
void reset(); // 0x80130f48
void exec(); // 0x80130fc0

static void setMotor(MotorType motorType, int kart); // 0x8013103c
static void setAwardMotor(MotorType motorType); // 0x80131218
static void setPowerMotor(int kart,
f32 strength,
u8 phase1Duration,
u8 phase2Duration); // 0x801312e8

static int mCountFrame[0x19]; // 0x803fb640
static MotorManager *mThis; // 0x80416280
static MotorManager *getManager() { return mThis; };

private:
u8 _0[8];
static int mCountFrame[8][MotorType_MAX]; // 0x803fb640

static MotorManager *mThis; // 0x80416280

Motor *mMotor; // 0x18
int mKartNumber; // 0x1c
};

#endif
#endif // MOTORMANAGER_H
6 changes: 5 additions & 1 deletion include/Kameda/SequenceInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,11 @@ class SequenceInfo
KartGamePad *_18; // 18
// Size: 0x1c
} _318[2]; // 318
int _350; //

public:
int _350; // 350 (number of [human] players?)

private:
int _354; //
ERaceLevel mLevel; //
u8 _35c; //
Expand Down
1 change: 1 addition & 0 deletions include/Osako/kartPad.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class KartGamePad : public JUTGamePad
PORT_2 = 1,
PORT_3 = 2,
PORT_4 = 3,
PORT_COUNT = 4,
};

enum PadType
Expand Down
Loading
Loading