Skip to content

Commit

Permalink
more Kando, Yamashita diffable, link 2 small files
Browse files Browse the repository at this point in the history
  • Loading branch information
HeartPiece44 committed Sep 16, 2024
1 parent 810801f commit 0640134
Show file tree
Hide file tree
Showing 137 changed files with 1,874 additions and 5,067 deletions.
4 changes: 2 additions & 2 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -678,8 +678,8 @@ def DolphinLib(lib_name: str, objects: List[Object]) -> Dict[str, Any]:
"mw_version": "GC/1.2.5n",
"objects": [
Object(NonMatching, "plugPikiYamashita/gameCourseClear.cpp"),
Object(NonMatching, "plugPikiYamashita/gameStageClear.cpp"),
Object(NonMatching, "plugPikiYamashita/gameCredits.cpp"),
Object(Matching, "plugPikiYamashita/gameStageClear.cpp"),
Object(Matching, "plugPikiYamashita/gameCredits.cpp"),
Object(NonMatching, "plugPikiYamashita/zenMath.cpp"),
Object(NonMatching, "plugPikiYamashita/effectMgr.cpp"),
Object(NonMatching, "plugPikiYamashita/particleGenerator.cpp"),
Expand Down
48 changes: 48 additions & 0 deletions include/AIPerf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#ifndef _AIPERF_H
#define _AIPERF_H

#include "types.h"

struct Menu;

/*
* @brief TODO
*/
struct AIPerf {
void clearCounts();
void addMenu(Menu*);
void toggleMoveType(Menu&);
void toggleGeneratorMode(Menu&);
void toggleBridge(Menu&);
void toggleShowRoute(Menu&);
void toggleKando(Menu&);
void toggleLOD(Menu&);
void toggleColls(Menu&);
void toggleASync(Menu&);
void toggleInsQuick(Menu&);
void toggleSoundDebug(Menu&);
void toggleCollSort(Menu&);
void incOptLevel(Menu&);
void decOptLevel(Menu&);
void incUfoLevel(Menu&);
void decUfoLevel(Menu&);
void collectPikis(Menu&);
void fullfillPiki(Menu&);
void flowerPiki(Menu&);
void breakSluice(Menu&);

// unused/inlined:
void toggleAIGrid(Menu&);
void toggleUpdateMgr(Menu&);
void togglePikiMabiki(Menu&);
void togglePsOptimise(Menu&);
void toggleIteratorCull(Menu&);
void toggleUseGrid(Menu&);
void incGridShift(Menu&);
void decGridShift(Menu&);
void toggleUpdateSearchBuffer(Menu&);

// TODO: members
};

#endif
52 changes: 52 additions & 0 deletions include/BuildingItem.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#ifndef _BUILDINGITEM_H
#define _BUILDINGITEM_H

#include "types.h"
#include "ItemMgr.h"
#include "CreatureProp.h"

struct ItemShapeObject;
struct SimpleAI;

/**
* @brief TODO
*/
struct BuildingItemProp : public CreatureProp {

// _54 = VTBL
// _00-_58 = CreatureProp
// TODO: members
};

/**
* @brief TODO.
*/
struct BuildingItem : public ItemCreature {
BuildingItem(int, CreatureProp*, ItemShapeObject*, SimpleAI*);

virtual bool insideSafeArea(Vector3f&); // _10
virtual void startAI(int); // _34
virtual f32 getiMass(); // _38 (weak)
virtual void doStore(CreatureInf*); // _48
virtual void doRestore(CreatureInf*); // _4C
virtual void doSave(RandomAccessStream&); // _50
virtual void doLoad(RandomAccessStream&); // _54
virtual void getBoundingSphereRadius(); // _64
virtual bool isAlive(); // _88
virtual bool needShadow(); // _90 (weak)
virtual void update(); // _E0
virtual void refresh(Graphics&); // _EC
virtual void refresh2d(Graphics&); // _F0
virtual void doKill(); // _10C
virtual void playEffect(int); // _12C
virtual void isCompleted(); // _15C

void startBreakEffect();
void stopBreakEffect();

// _00 = VTBL
// _00-_304 = ItemCreature?
// TODO: members
};

#endif
2 changes: 1 addition & 1 deletion include/Collision.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ struct ObjCollInfo : public CoreNode {
Vector3f mCentrePosition; // _34
f32 mRadius; // _40
BaseShape* mParentShape; // _44
s32 _48; // _48
u32 _48; // _48
char* mPlatformName; // _4C
ObjCollFlags mFlags; // _50
};
Expand Down
15 changes: 15 additions & 0 deletions include/CourseDebug.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#ifndef _COURSEDEBUG_H
#define _COURSEDEBUG_H

#include "types.h"

namespace CourseDebug {
// Global debug objects - these are all size 0x4, maybe BOOL? or u32?
extern int collision;
extern int pikiNoAttack;
extern int noCarryover;
extern int pelletDebug;

} // namespace CourseDebug

#endif
19 changes: 16 additions & 3 deletions include/Creature.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,15 @@
struct CollInfo;
struct CollTriInfo;
struct CollPart;
struct Colour;
struct Condition;
struct CreatureInf;
struct CreatureProp;
struct DynCollObject;
struct Matrix4f;
struct MoveTrace;
struct Msg;
struct Pellet;
struct RopeCreature;
struct RouteTracer;
struct SeContext;
Expand Down Expand Up @@ -155,7 +158,7 @@ struct Creature : public RefCountable, public EventTalker {
void endStickMouth();
void startStickObjectSphere(Creature*, CollPart*, f32);
void startStickObjectTube(Creature*, CollPart*);
void startStickObject(Creature*, CollPart*, f32);
void startStickObject(Creature*, CollPart*, int, f32);
void endStickObject();
void startStick(Creature*, CollPart*);
void endStick();
Expand All @@ -173,6 +176,13 @@ struct Creature : public RefCountable, public EventTalker {
void insideSphere(struct Sphere&);
void adjustDistance(Vector3f&, f32);
void getAtariType();
void checkForward(Vector3f&, f32, f32&);
void getNextTri(CollTriInfo*, Vector3f&, int&);
void renderCollTriInfo(Graphics&, CollTriInfo*, Colour&);
void isStickToSphere();
void adjustStickObject(Vector3f&);
void startStickObjectPellet(Pellet*, int, f32);
void isStickLeader();

inline void setCreatureFlag(u32 flag) { mCreatureFlags |= flag; }
inline void resetCreatureFlag(u32 flag) { mCreatureFlags &= ~flag; }
Expand All @@ -187,14 +197,17 @@ struct Creature : public RefCountable, public EventTalker {
FastGrid mGrid; // _40
u8 _58[0x6C - 0x58]; // _58, TODO: work out members
EObjType mObjType; // _6C, object type
u8 _70[0x94 - 0x70]; // _70, TODO: work out members
Vector3f _70; // _70
u8 _7C[0x94 - 0x7C]; // _7C, TODO: work out members
Vector3f mPosition; // _94
f32 mDirection; // _A0
u8 _A4[0xC8 - 0xA4]; // _A4, TODO: work out members
u32 mCreatureFlags; // _C8, bitflag
u32 _CC; // _CC
f32 _D0; // _D0
u8 _D4[0x184 - 0xD4]; // _CC, TODO: work out members
u8 _D4[0xE0 - 0xD4]; // _D4, TODO: work out members
Quat _E0; // _E0
u8 _F0[0x184 - 0xF0]; // _F0, TODO: work out members
Creature* mStickTarget; // _184, creature/object this creature is stuck to
u8 _188[0x220 - 0x188]; // _188, TODO: work out members
CollInfo* mCollInfo; // _220
Expand Down
7 changes: 7 additions & 0 deletions include/CreatureCollPart.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#include "types.h"
#include "DynColl.h"

struct CollPart;

/**
* @brief TODO
*/
Expand All @@ -29,6 +31,11 @@ struct CreaturePlatMgr {
void init(Creature*, MapMgr*, Shape*);
void release();
void update(Graphics&);

// TODO: members
Shape* _00; // _00
CollPart* _04[16]; // _04
u32 _44; // _44, count of something?
};

#endif
2 changes: 2 additions & 0 deletions include/CreatureProp.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

/**
* @brief TODO
*
* @note Size: 0x58.
*/
struct CreatureProp {

Expand Down
53 changes: 53 additions & 0 deletions include/DualCreature.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#ifndef _DUALCREATURE_H
#define _DUALCREATURE_H

#include "types.h"
#include "DynCreature.h"

struct ItemShapeObject;
struct MapMgr;

/**
* @brief TODO
*/
struct DualCreature : public DynCreature {
DualCreature();

virtual void update(); // _E0
virtual void refresh(Graphics&); // _EC
virtual void doKill(); // _10C
virtual void onGround(); // _114

void isFrontFace();
void getY();
void useRealDynamics();
void useSimpleDynamics();
void rotateY(f32);

// unused/inlined:
void createCollisions(Graphics&);

// _00 = VTBL
// _00-_43C = DynCreature?
// TODO: members
};

/**
* @brief TODO
*/
struct PelCreature : public DualCreature {
PelCreature(int, ItemShapeObject*, CreatureProp*, MapMgr*);

virtual void init(Vector3f&); // _28
virtual void startAI(int); // _34
virtual f32 getiMass(); // _38
virtual bool isAlive(); // _88
virtual void doRender(Graphics&, Matrix4f&); // _118
virtual void doCreateColls(Graphics&); // _11C

// _00 = VTBL
// _00-_43C = DualCreature?
// TODO: members
};

#endif
2 changes: 2 additions & 0 deletions include/DynColl.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@

#include "types.h"
#include "Node.h"
#include "BoundBox.h"

struct Creature;
struct MapAnimShapeObject;
struct MapMgr;
struct Shape;

/**
* @brief TODO
Expand Down
16 changes: 15 additions & 1 deletion include/DynCreature.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include "types.h"
#include "Creature.h"
#include "Matrix4f.h"

/**
* @brief TODO
Expand All @@ -27,8 +28,21 @@ struct DynCreature : public Creature {

// _00 = VTBL
// _00-_2B8 = Creature
u8 _2B8[0x2D0 - 0x2B8]; // _2B8
Vector3f _2B8; // _2B8
Vector3f _2C4; // _2C4
f32 _2D0; // _2D0
u16 _2D4; // _2D4, might be s16
u32 _2D8; // _2D8, unknown
Vector3f _2DC; // _2DC
Vector3f _2E8; // _2E8
f32 _2F4; // _2F4
Matrix4f _2F8; // _2F8
Matrix4f _338; // _338
Matrix4f _378; // _378
Matrix4f _3B8; // _3B8
u8 _3F8[0x438 - 0x3F8]; // _3F8, unknown
u8 _438; // _438, flag of some kind?
u8 _439; // _439
};

#endif
20 changes: 20 additions & 0 deletions include/GameCreditsSection.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#ifndef _GAMECREDITSSECTION_H
#define _GAMECREDITSSECTION_H

#include "types.h"
#include "Section.h"

/*
* @brief TODO
*/
struct GameCreditsSection : public Section {
GameCreditsSection();

virtual void init() { } // _30 (weak)

// _00 = VTBL
// _00-_20 = Section?
// TODO: members
};

#endif
20 changes: 20 additions & 0 deletions include/GameStageClearSection.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#ifndef _GAMESTAGECLEARSECTION_H
#define _GAMESTAGECLEARSECTION_H

#include "types.h"
#include "Section.h"

/*
* @brief TODO
*/
struct GameStageClearSection : public Section {
GameStageClearSection();

virtual void init() { } // _30 (weak)

// _00 = VTBL
// _00-_20 = Section?
// TODO: members
};

#endif
Loading

0 comments on commit 0640134

Please sign in to comment.