mirror of
https://github.com/SMGCommunity/Petari.git
synced 2025-02-25 00:21:25 +00:00
start on some collider classes
This commit is contained in:
parent
b93c3397d4
commit
8a54230fb9
12
csv/Map.csv
12
csv/Map.csv
@ -96,10 +96,10 @@ __mi__Q29JGeometry8TVec2<f>CFRCQ29JGeometry8TVec2<f>,Butterfly.o,Map.a,false
|
|||||||
converge<f>__2MRFfff_f,Butterfly.o,Map.a,false
|
converge<f>__2MRFfff_f,Butterfly.o,Map.a,false
|
||||||
__ct__26CollisionCategorizedKeeperFl,CollisionCategorizedKeeper.o,Map.a,false
|
__ct__26CollisionCategorizedKeeperFl,CollisionCategorizedKeeper.o,Map.a,false
|
||||||
movement__26CollisionCategorizedKeeperFv,CollisionCategorizedKeeper.o,Map.a,false
|
movement__26CollisionCategorizedKeeperFv,CollisionCategorizedKeeper.o,Map.a,false
|
||||||
addToZone__26CollisionCategorizedKeeperFP14CollisionPartsl,CollisionCategorizedKeeper.o,Map.a,false
|
addToZone__26CollisionCategorizedKeeperFP14CollisionPartsl,CollisionCategorizedKeeper.o,Map.a,true
|
||||||
removeFromZone__26CollisionCategorizedKeeperFP14CollisionPartsl,CollisionCategorizedKeeper.o,Map.a,false
|
removeFromZone__26CollisionCategorizedKeeperFP14CollisionPartsl,CollisionCategorizedKeeper.o,Map.a,true
|
||||||
addToGlobal__26CollisionCategorizedKeeperFP14CollisionParts,CollisionCategorizedKeeper.o,Map.a,false
|
addToGlobal__26CollisionCategorizedKeeperFP14CollisionParts,CollisionCategorizedKeeper.o,Map.a,true
|
||||||
removeFromGlobal__26CollisionCategorizedKeeperFP14CollisionParts,CollisionCategorizedKeeper.o,Map.a,false
|
removeFromGlobal__26CollisionCategorizedKeeperFP14CollisionParts,CollisionCategorizedKeeper.o,Map.a,true
|
||||||
checkStrikePoint__26CollisionCategorizedKeeperFRCQ29JGeometry8TVec3<f>P7HitInfo,CollisionCategorizedKeeper.o,Map.a,false
|
checkStrikePoint__26CollisionCategorizedKeeperFRCQ29JGeometry8TVec3<f>P7HitInfo,CollisionCategorizedKeeper.o,Map.a,false
|
||||||
checkStrikeBall__26CollisionCategorizedKeeperFRCQ29JGeometry8TVec3<f>fbPC24CollisionPartsFilterBasePC18TriangleFilterBase,CollisionCategorizedKeeper.o,Map.a,false
|
checkStrikeBall__26CollisionCategorizedKeeperFRCQ29JGeometry8TVec3<f>fbPC24CollisionPartsFilterBasePC18TriangleFilterBase,CollisionCategorizedKeeper.o,Map.a,false
|
||||||
checkStrikeBallWithThickness__26CollisionCategorizedKeeperFRCQ29JGeometry8TVec3<f>ffPC24CollisionPartsFilterBasePC18TriangleFilterBase,CollisionCategorizedKeeper.o,Map.a,false
|
checkStrikeBallWithThickness__26CollisionCategorizedKeeperFRCQ29JGeometry8TVec3<f>ffPC24CollisionPartsFilterBasePC18TriangleFilterBase,CollisionCategorizedKeeper.o,Map.a,false
|
||||||
@ -110,8 +110,8 @@ isSphereOverlappingWithBox__26CollisionCategorizedKeeperFRCQ29JGeometry8TVec3<f>
|
|||||||
searchSameHostParts__26CollisionCategorizedKeeperCFPP14CollisionPartsP14CollisionParts,CollisionCategorizedKeeper.o,Map.a,false
|
searchSameHostParts__26CollisionCategorizedKeeperCFPP14CollisionPartsP14CollisionParts,CollisionCategorizedKeeper.o,Map.a,false
|
||||||
getStrikeInfo__26CollisionCategorizedKeeperFUl,CollisionCategorizedKeeper.o,Map.a,false
|
getStrikeInfo__26CollisionCategorizedKeeperFUl,CollisionCategorizedKeeper.o,Map.a,false
|
||||||
getZone__26CollisionCategorizedKeeperFi,CollisionCategorizedKeeper.o,Map.a,false
|
getZone__26CollisionCategorizedKeeperFi,CollisionCategorizedKeeper.o,Map.a,false
|
||||||
__ct__13CollisionZoneFl,CollisionCategorizedKeeper.o,Map.a,false
|
__ct__13CollisionZoneFl,CollisionCategorizedKeeper.o,Map.a,true
|
||||||
addParts__13CollisionZoneFP14CollisionParts,CollisionCategorizedKeeper.o,Map.a,false
|
addParts__13CollisionZoneFP14CollisionParts,CollisionCategorizedKeeper.o,Map.a,true
|
||||||
calcMinMaxAndRadius__13CollisionZoneFv,CollisionCategorizedKeeper.o,Map.a,false
|
calcMinMaxAndRadius__13CollisionZoneFv,CollisionCategorizedKeeper.o,Map.a,false
|
||||||
calcMinMaxAndRadiusIfMoveOuter__13CollisionZoneFP14CollisionParts,CollisionCategorizedKeeper.o,Map.a,false
|
calcMinMaxAndRadiusIfMoveOuter__13CollisionZoneFP14CollisionParts,CollisionCategorizedKeeper.o,Map.a,false
|
||||||
addAndUpdateMinMax__13CollisionZoneFQ29JGeometry8TVec3<f>Q29JGeometry8TVec3<f>,CollisionCategorizedKeeper.o,Map.a,false
|
addAndUpdateMinMax__13CollisionZoneFQ29JGeometry8TVec3<f>Q29JGeometry8TVec3<f>,CollisionCategorizedKeeper.o,Map.a,false
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"schemaVersion": 1,
|
"schemaVersion": 1,
|
||||||
"label": "decompiled",
|
"label": "decompiled",
|
||||||
"message": "2.1786826%",
|
"message": "2.1890373%",
|
||||||
"color": "blue"
|
"color": "blue"
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# Library Progress Chart
|
# Library Progress Chart
|
||||||
Progress (Full Game): 1.7214646% [91664 / 5324768]
|
Progress (Full Game): 1.7294275% [92088 / 5324768]
|
||||||
|
|
||||||
Progress (Only Game): 2.1786826% [89212 / 4094768]
|
Progress (Only Game): 2.1890373% [89636 / 4094768]
|
||||||
|
|
||||||
You have 2 / 120 stars.
|
You have 2 / 120 stars.
|
||||||
|
|
||||||
@ -20,7 +20,7 @@ You have 2 / 120 stars.
|
|||||||
| GameAudio.a | 0% |
|
| GameAudio.a | 0% |
|
||||||
| Gravity.a | 0% |
|
| Gravity.a | 0% |
|
||||||
| LiveActor.a | 14.216034% |
|
| LiveActor.a | 14.216034% |
|
||||||
| Map.a | 4.1980643% |
|
| Map.a | 4.3972564% |
|
||||||
| MapObj.a | 0% |
|
| MapObj.a | 0% |
|
||||||
| NameObj.a | 18.462334% |
|
| NameObj.a | 18.462334% |
|
||||||
| NPC.a | 0.19521274% |
|
| NPC.a | 0.19521274% |
|
||||||
|
6
include/Game/LiveActor/Binder.h
Normal file
6
include/Game/LiveActor/Binder.h
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
class Binder {
|
||||||
|
public:
|
||||||
|
|
||||||
|
};
|
51
include/Game/Map/CollisionCategorizedKeeper.h
Normal file
51
include/Game/Map/CollisionCategorizedKeeper.h
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <revolution.h>
|
||||||
|
#include "Game/Map/CollisionParts.h"
|
||||||
|
#include "Game/Map/HitInfo.h"
|
||||||
|
#include "Game/NameObj/NameObj.h"
|
||||||
|
|
||||||
|
class CollisionZone;
|
||||||
|
|
||||||
|
class CollisionCategorizedKeeper : public NameObj {
|
||||||
|
public:
|
||||||
|
CollisionCategorizedKeeper(s32);
|
||||||
|
|
||||||
|
virtual ~CollisionCategorizedKeeper();
|
||||||
|
virtual void movement();
|
||||||
|
|
||||||
|
void addToZone(CollisionParts *, s32);
|
||||||
|
void removeFromZone(CollisionParts *, s32);
|
||||||
|
void addToGlobal(CollisionParts *);
|
||||||
|
void removeFromGlobal(CollisionParts *);
|
||||||
|
|
||||||
|
HitInfo* mHitInfoArray; // _C
|
||||||
|
s32 _10;
|
||||||
|
s32 mZoneCount; // _14
|
||||||
|
CollisionZone* mZones[0x20]; // _18
|
||||||
|
s32 mZoneNum; // _98
|
||||||
|
u32 _9C;
|
||||||
|
u8 _A0;
|
||||||
|
u8 _A1;
|
||||||
|
u8 _A2;
|
||||||
|
u8 _A3;
|
||||||
|
};
|
||||||
|
|
||||||
|
class CollisionZone {
|
||||||
|
public:
|
||||||
|
CollisionZone(s32);
|
||||||
|
|
||||||
|
void addParts(CollisionParts *);
|
||||||
|
void calcMinMaxAndRadius();
|
||||||
|
void calcMinMaxAndRadiusIfMoveOuter(CollisionParts *);
|
||||||
|
void addAndUpdateMinMax(TVec3f, TVec3f);
|
||||||
|
void eraseParts(CollisionParts *);
|
||||||
|
|
||||||
|
s32 mZoneID; // _0
|
||||||
|
CollisionParts* mPartsArray[0x200]; // _4
|
||||||
|
s32 mNumParts; // _804
|
||||||
|
TVec3f _808;
|
||||||
|
f32 mRadius; // _814
|
||||||
|
TVec3f _818;
|
||||||
|
TVec3f _824;
|
||||||
|
};
|
32
include/Game/Map/CollisionParts.h
Normal file
32
include/Game/Map/CollisionParts.h
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <revolution.h>
|
||||||
|
#include "JSystem/JGeometry/TMatrix.h"
|
||||||
|
#include "JSystem/JGeometry/TPosition3.h"
|
||||||
|
|
||||||
|
class KCollisionServer;
|
||||||
|
|
||||||
|
class CollisionParts {
|
||||||
|
public:
|
||||||
|
CollisionParts();
|
||||||
|
|
||||||
|
u32 _0;
|
||||||
|
TMtx34f _4;
|
||||||
|
TMtx34f _34;
|
||||||
|
TMtx34f _64;
|
||||||
|
TMtx34f _94;
|
||||||
|
KCollisionServer* mKCL; // _C4
|
||||||
|
u32 _C8;
|
||||||
|
u8 _CC;
|
||||||
|
u8 _CD;
|
||||||
|
u8 _CE;
|
||||||
|
u8 _CF;
|
||||||
|
u8 _D0;
|
||||||
|
u32 _D4;
|
||||||
|
f32 _D8;
|
||||||
|
f32 _DC;
|
||||||
|
u32 _E0;
|
||||||
|
u32 _E4;
|
||||||
|
u32 _E8;
|
||||||
|
u32 _EC;
|
||||||
|
};
|
@ -5,6 +5,7 @@
|
|||||||
#include "Game/Util.h"
|
#include "Game/Util.h"
|
||||||
|
|
||||||
class CollisionParts;
|
class CollisionParts;
|
||||||
|
class HitSensor;
|
||||||
|
|
||||||
class Triangle {
|
class Triangle {
|
||||||
public:
|
public:
|
||||||
@ -12,13 +13,23 @@ public:
|
|||||||
JMapInfoIter getAttributes() const;
|
JMapInfoIter getAttributes() const;
|
||||||
|
|
||||||
CollisionParts* _0;
|
CollisionParts* _0;
|
||||||
u32 _4;
|
u32 mIdx; // _4
|
||||||
u32 _8;
|
HitSensor* mSensor; // _8
|
||||||
TVec3f mFaceNormal; // _C
|
TVec3f mNormals[0x4]; // _C
|
||||||
TVec3f _18;
|
TVec3f mPos0; // _3C
|
||||||
TVec3f _24;
|
TVec3f mPos1; // _48
|
||||||
TVec3f _30;
|
TVec3f mPos2; // _54
|
||||||
TVec3f _3C;
|
};
|
||||||
TVec3f _48;
|
|
||||||
TVec3f _54;
|
class HitInfo {
|
||||||
|
public:
|
||||||
|
Triangle mParentTriangle; // _0
|
||||||
|
f32 _60;
|
||||||
|
TVec3f _64;
|
||||||
|
TVec3f _70;
|
||||||
|
TVec3f _7C;
|
||||||
|
u8 _88;
|
||||||
|
u8 _89;
|
||||||
|
u8 _8A;
|
||||||
|
u8 _8B;
|
||||||
};
|
};
|
@ -29,6 +29,7 @@ namespace JGeometry {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TVec3(T _x, T _y, T _z);
|
TVec3(T _x, T _y, T _z);
|
||||||
|
TVec3(int, int, int);
|
||||||
|
|
||||||
inline TVec3(T val) {
|
inline TVec3(T val) {
|
||||||
x = val;
|
x = val;
|
||||||
|
35
source/Game/Map/CollisionCategorizedKeeper.cpp
Normal file
35
source/Game/Map/CollisionCategorizedKeeper.cpp
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#include "Game/Map/CollisionCategorizedKeeper.h"
|
||||||
|
|
||||||
|
void CollisionCategorizedKeeper::addToZone(CollisionParts *pParts, s32 zone) {
|
||||||
|
mZones[zone]->addParts(pParts);
|
||||||
|
mZoneCount++;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CollisionCategorizedKeeper::removeFromZone(CollisionParts *pParts, s32 zone) {
|
||||||
|
mZones[zone]->eraseParts(pParts);
|
||||||
|
mZoneCount--;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CollisionCategorizedKeeper::addToGlobal(CollisionParts *pParts) {
|
||||||
|
mZones[0]->addParts(pParts);
|
||||||
|
mZoneCount++;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CollisionCategorizedKeeper::removeFromGlobal(CollisionParts *pParts) {
|
||||||
|
mZones[0]->eraseParts(pParts);
|
||||||
|
mZoneCount--;
|
||||||
|
}
|
||||||
|
|
||||||
|
CollisionZone::CollisionZone(s32 zoneID)
|
||||||
|
: mZoneID(zoneID), mNumParts(0), _808(0, 0, 0), mRadius(0.0f), _818(0, 0, 0), _824(0, 0, 0) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void CollisionZone::addParts(CollisionParts* pParts) {
|
||||||
|
s32 cnt = mNumParts;
|
||||||
|
mNumParts++;
|
||||||
|
mPartsArray[cnt] = pParts;
|
||||||
|
|
||||||
|
if (mZoneID) {
|
||||||
|
calcMinMaxAndRadius();
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user