mirror of
https://github.com/SMGCommunity/Petari.git
synced 2025-02-18 21:17:50 +00:00
Some sensor changes
This commit is contained in:
parent
e9b092cc8e
commit
3d591e25ba
3
.gitignore
vendored
3
.gitignore
vendored
@ -14,4 +14,5 @@
|
||||
*.dol
|
||||
*.a
|
||||
*.d
|
||||
*.map
|
||||
*.map
|
||||
build
|
@ -2,6 +2,7 @@
|
||||
#define HITSENSOR_H
|
||||
|
||||
#include <revolution.h>
|
||||
#include "JGeometry/TVec3.h"
|
||||
|
||||
class LiveActor;
|
||||
class SensorGroup;
|
||||
@ -39,9 +40,7 @@ public:
|
||||
void addHitSensor(HitSensor *);
|
||||
|
||||
u32 mSensorType; // _0
|
||||
f32 _4;
|
||||
f32 _8;
|
||||
f32 _C;
|
||||
JGeometry::TVec3<f32> _4;
|
||||
f32 _10;
|
||||
u16 mNumSensors; // _14
|
||||
u16 _16;
|
||||
|
26
include/Actor/Sensor/HitSensorInfo.h
Normal file
26
include/Actor/Sensor/HitSensorInfo.h
Normal file
@ -0,0 +1,26 @@
|
||||
#ifndef HITSENSORINFO_H
|
||||
#define HITSENSORINFO_H
|
||||
|
||||
#include "JGeometry/TVec3.h"
|
||||
#include <revolution.h>
|
||||
|
||||
class HitSensor;
|
||||
|
||||
class HitSensorInfo
|
||||
{
|
||||
public:
|
||||
HitSensorInfo(const char *, HitSensor *, const JGeometry::TVec3<f32> *, Mtx *, const JGeometry::TVec3<f32> &, bool);
|
||||
|
||||
void update();
|
||||
void doObjCol();
|
||||
|
||||
const char* mName; // _0
|
||||
s32 mHashCode; // _4
|
||||
HitSensor* mSensor; // _8
|
||||
JGeometry::TVec3<f32> _C;
|
||||
JGeometry::TVec3<f32>* _18;
|
||||
Mtx* _1C;
|
||||
bool _20;
|
||||
};
|
||||
|
||||
#endif // HITSENSORINFO_H
|
@ -8,6 +8,7 @@ class HitSensorKeeper
|
||||
public:
|
||||
HitSensorKeeper(s32);
|
||||
|
||||
void add(const char *, u32, u16, f32, LiveActor *, const JGeometry::TVec3<f32> &);
|
||||
HitSensor* getSensor(const char *) const;
|
||||
void update();
|
||||
void doObjCol();
|
||||
|
@ -9,29 +9,231 @@ class HitSensor;
|
||||
|
||||
namespace MR
|
||||
{
|
||||
u8 tryUpdateHitSensorsAll(LiveActor *);
|
||||
void addHitSensor(LiveActor *, const char *, u32, u16, f32, const JGeometry::TVec3<f32> &);
|
||||
void addHitSensorBinder(LiveActor *, const char *, u16, f32, const JGeometry::TVec3<f32> &);
|
||||
void addHitSensorTransferableBinder(LiveActor *, const char *, u16, f32, const JGeometry::TVec3<f32> &);
|
||||
void addHitSensorPriorBinder(LiveActor *, const char *, u16, f32, const JGeometry::TVec3<f32> &);
|
||||
void addHitSensorRide(LiveActor *, const char *, u16, f32, const JGeometry::TVec3<f32> &);
|
||||
void addHitSensorMapObj(LiveActor *, const char *, u16, f32, const JGeometry::TVec3<f32> &);
|
||||
void addHitSensorMapObjPress(LiveActor *, const char *, u16, f32, const JGeometry::TVec3<f32> &);
|
||||
void addHitSensorMapObjSimple(LiveActor *, const char *, u16, f32, const JGeometry::TVec3<f32> &);
|
||||
void addHitSensorMapObjMoveCollision(LiveActor *, const char *, u16, f32, const JGeometry::TVec3<f32> &);
|
||||
void addHitSensorEnemy(LiveActor *, const char *, u16, f32, const JGeometry::TVec3<f32> &);
|
||||
void addHitSensorEnemySimple(LiveActor *, const char *, u16, f32, const JGeometry::TVec3<f32> &);
|
||||
void addHitSensorEnemyAttack(LiveActor *, const char *, u16, f32, const JGeometry::TVec3<f32> &);
|
||||
void addHitSensorNpc(LiveActor *, const char *, u16, f32, const JGeometry::TVec3<f32> &);
|
||||
void addHitSensorEye(LiveActor *, const char *, u16, f32, const JGeometry::TVec3<f32> &);
|
||||
void addHitSensorPush(LiveActor *, const char *, u16, f32, const JGeometry::TVec3<f32> &);
|
||||
|
||||
void addHitSensorPosBinder(LiveActor *, const char *, u16, f32, const JGeometry::TVec3<f32> *, const JGeometry::TVec3<f32> &);
|
||||
void addHitSensorPosRide(LiveActor *, const char *, u16, f32, const JGeometry::TVec3<f32> *, const JGeometry::TVec3<f32> &);
|
||||
void addHitSensorPosMapObj(LiveActor *, const char *, u16, f32, const JGeometry::TVec3<f32> *, const JGeometry::TVec3<f32> &);
|
||||
void addHitSensorPosEye(LiveActor *, const char *, u16, f32, const JGeometry::TVec3<f32> *, const JGeometry::TVec3<f32> &);
|
||||
|
||||
void addHitSensorMtx(LiveActor *, const char *, u32, u16, Mtx *, const JGeometry::TVec3<f32> &);
|
||||
void addHitSensorMtxRide(LiveActor *, const char *, u16, Mtx *, const JGeometry::TVec3<f32> &);
|
||||
void addHitSensorMtxMapObj(LiveActor *, const char *, u16, Mtx *, const JGeometry::TVec3<f32> &);
|
||||
void addHitSensorMtxEnemy(LiveActor *, const char *, u16, Mtx *, const JGeometry::TVec3<f32> &);
|
||||
void addHitSensorMtxEnemyAttack(LiveActor *, const char *, u16, Mtx *, const JGeometry::TVec3<f32> &);
|
||||
void addHitSensorMtxNpc(LiveActor *, const char *, u16, Mtx *, const JGeometry::TVec3<f32> &);
|
||||
void addHitSensorMtxAnimal(LiveActor *, const char *, u16, Mtx *, const JGeometry::TVec3<f32> &);
|
||||
|
||||
void addHitSensorAtJoint(LiveActor *, const char *, const char *, u32, u16, f32, const JGeometry::TVec3<f32> &);
|
||||
void addHitSensorAtJointRide(LiveActor *, const char *, const char *, u16, f32, const JGeometry::TVec3<f32> &);
|
||||
void addHitSensorAtJointMapObj(LiveActor *, const char *, const char *, u16, f32, const JGeometry::TVec3<f32> &);
|
||||
void addHitSensorAtJointMapObjSimple(LiveActor *, const char *, const char *, u16, f32, const JGeometry::TVec3<f32> &);
|
||||
void addHitSensorAtJointEnemy(LiveActor *, const char *, const char *, u16, f32, const JGeometry::TVec3<f32> &);
|
||||
void addHitSensorAtJointEnemySimple(LiveActor *, const char *, const char *, u16, f32, const JGeometry::TVec3<f32> &);
|
||||
void addHitSensorAtJointEnemyAttack(LiveActor *, const char *, const char *, u16, f32, const JGeometry::TVec3<f32> &);
|
||||
void addHitSensorAtJointNpc(LiveActor *, const char *, const char *, u16, f32, const JGeometry::TVec3<f32> &);
|
||||
void addHitSensorAtJointEye(LiveActor *, const char *, const char *, u16, f32, const JGeometry::TVec3<f32> &);
|
||||
|
||||
void addHitSensorCallback(LiveActor *, const char *, const char *, u32, u16, f32);
|
||||
void addHitSensorCallbackBinder(LiveActor *, const char *, const char *, u16, f32);
|
||||
void addHitSensorCallbackPriorBinder(LiveActor *, const char *, const char *, u16, f32);
|
||||
void addHitSensorCallbackRide(LiveActor *, const char *, u16, f32);
|
||||
void addHitSensorCallbackMapObj(LiveActor *, const char *, u16, f32);
|
||||
void addHitSensorCallbackMapObjSimple(LiveActor *, const char *, u16, f32);
|
||||
void addHitSensorCallbackEnemy(LiveActor *, const char *, u16, f32);
|
||||
void addHitSensorCallbackEnemyAttack(LiveActor *, const char *, u16, f32);
|
||||
void addHitSensorCallbackEye(LiveActor *, const char *, u16, f32);
|
||||
|
||||
void addBodyMessageSensorReciever(LiveActor *);
|
||||
void addBodyMessageSensorMapObj(LiveActor *);
|
||||
void addBodyMessageSensorMapObjPress(LiveActor *);
|
||||
void addBodyMessageSensorMapObjMoveCollision(LiveActor *);
|
||||
void addBodyMessageSensorEnemy(LiveActor *);
|
||||
|
||||
void addMessageSensorReciever(LiveActor *, const char *);
|
||||
void addMessageSensorMapObj(LiveActor *, const char *);
|
||||
void addMessageSensorMapObjMoveCollision(LiveActor *, const char *);
|
||||
void addMessageSensorEnemy(LiveActor *, const char *);
|
||||
|
||||
bool tryUpdateHitSensorsAll(LiveActor *);
|
||||
void updateHitSensorsAll(LiveActor *);
|
||||
void clearHitSensors(LiveActor *);
|
||||
HitSensor* getTaken(const LiveActor *);
|
||||
bool isSensorType(const HitSensor *, u32);
|
||||
HitSensor* getSensorWithIndex(LiveActor *, s32);
|
||||
HitSensor* getTaking(const LiveActor *);
|
||||
HitSensor* getTaken(const LiveActor *);
|
||||
|
||||
void setSensorPos(HitSensor *, const JGeometry::TVec3<f32> &);
|
||||
void setSensorOffset(LiveActor *, const char *, JGeometry::TVec3<f32> &);
|
||||
void setSensorRadius(LiveActor *, const char *, f32);
|
||||
void setHitSensorApart(HitSensor *, HitSensor *);
|
||||
|
||||
void validateHitSensors(LiveActor *);
|
||||
void invalidateHitSensors(LiveActor *);
|
||||
u8 isSensor(const HitSensor *, const char *);
|
||||
u8 isSensorPlayer(const HitSensor *);
|
||||
void validateHitSensor(LiveActor *, const char *);
|
||||
void invalidateHitSensor(LiveActor *, const char *);
|
||||
bool isValidHitSensor(LiveActor *, const char *);
|
||||
void clearHitSensors(LiveActor *);
|
||||
HitSensor* getSensor(LiveActor *, s32);
|
||||
LiveActor* getSensorHost(const HitSensor *);
|
||||
|
||||
u32 setHitSensorApart(HitSensor *, HitSensor *);
|
||||
bool isSensor(const HitSensor *, const char *);
|
||||
bool isSensorPlayer(const HitSensor *);
|
||||
bool isSensorBinder(const HitSensor *);
|
||||
bool isSensorRide(const HitSensor *);
|
||||
bool isSensorPlayerOrRide(const HitSensor *);
|
||||
bool isSensorEnemy(const HitSensor *);
|
||||
bool isSensorEnemyAttack(const HitSensor *);
|
||||
bool isSensorNpc(const HitSensor *);
|
||||
bool isSensorMapObj(const HitSensor *);
|
||||
bool isSensorAutoRush(const HitSensor *);
|
||||
bool isSensorRush(const HitSensor *);
|
||||
bool isSensorPressObj(const HitSensor *);
|
||||
bool isSensorEye(const HitSensor *);
|
||||
bool isSensorPush(const HitSensor *);
|
||||
bool isSensorItem(const HitSensor *);
|
||||
bool tryGetItem(HitSensor *, HitSensor *);
|
||||
|
||||
JGeometry::TVec3<f32> getSensorPos(const HitSensor *);
|
||||
void calcSensorDirection(JGeometry::TVec3<f32> *, const HitSensor *, const HitSensor *);
|
||||
void calcSensorDirectionNormalize(JGeometry::TVec3<f32> *, const HitSensor *, const HitSensor *);
|
||||
void calcSensorHorizonNormalize(JGeometry::TVec3<f32> *, const JGeometry::TVec3<f32> &, const HitSensor *, const HitSensor *);
|
||||
|
||||
HitSensor* getMessageSensor();
|
||||
|
||||
void sendArbitraryMsg(u32, HitSensor *, HitSensor *);
|
||||
void sendMsgPush(HitSensor *, HitSensor *);
|
||||
void sendMsgPlayerTrample(HitSensor *, HitSensor *);
|
||||
void sendMsgPlayerPunch(HitSensor *, HitSensor *);
|
||||
void sendMsgJump(HitSensor *, HitSensor *);
|
||||
void sendMsgTouchJump(HitSensor *, HitSensor *);
|
||||
void sendMsgTaken(HitSensor *, HitSensor *);
|
||||
void sendMsgKick(HitSensor *, HitSensor *);
|
||||
void sendMsgAwayJump(HitSensor *, HitSensor *);
|
||||
|
||||
void sendMsgEnemyAttackMsgToDir(u32, HitSensor *, HitSensor *, const JGeometry::TVec3<f32> &);
|
||||
void sendMsgEnemyAttackFlipWeak(HitSensor *, HitSensor *);
|
||||
void sendMsgEnemyAttackFlipWeakJump(HitSensor *, HitSensor *);
|
||||
void sendMsgEnemyAttackFlip(HitSensor *, HitSensor *);
|
||||
void sendMsgEnemyAttackFlipToDir(HitSensor *, HitSensor *, JGeometry::TVec3<f32> &);
|
||||
void sendMsgEnemyAttackFlipJump(HitSensor *, HitSensor *);
|
||||
void sendMsgEnemyAttackFlipRot(HitSensor *, HitSensor *);
|
||||
void sendMsgEnemyAttackFlipMaximum(HitSensor *, HitSensor *);
|
||||
void sendMsgEnemyAttackFlipMaximumToDir(HitSensor *, HitSensor *, JGeometry::TVec3<f32> &);
|
||||
void sendMsgEnemyAttack(HitSensor *, HitSensor *);
|
||||
void sendMsgEnemyAttackStrong(HitSensor *, HitSensor *);
|
||||
void sendMsgEnemyAttackStrongToDir(HitSensor *, HitSensor *, const JGeometry::TVec3<f32> &);
|
||||
void sendMsgEnemyAttackFire(HitSensor *, HitSensor *);
|
||||
void sendMsgEnemyAttackFireStrong(HitSensor *, HitSensor *);
|
||||
void sendMsgEnemyAttackElectric(HitSensor *, HitSensor *);
|
||||
void sendMsgEnemyAttackFreeze(HitSensor *, HitSensor *);
|
||||
void sendMsgEnemyAttackHeatBeam(HitSensor *, HitSensor *);
|
||||
void sendMsgEnemyAttackExplosion(HitSensor *, HitSensor *);
|
||||
void sendMsgEnemyAttackCounterSpin(HitSensor *, HitSensor *);
|
||||
void sendMsgEnemyAttackCounterHipDrop(HitSensor *, HitSensor *);
|
||||
|
||||
void addHitSensorMapObj(LiveActor *, const char *, u16, f32, const JGeometry::TVec3<f32> &);
|
||||
void sendMsgLockOnStarPieceShoot(HitSensor *, HitSensor *);
|
||||
void sendMsgStarPieceAttack(HitSensor *, HitSensor *);
|
||||
void sendMsgStarPieceGift(HitSensor *, HitSensor *);
|
||||
|
||||
void addHitSensorPosMapObj(LiveActor *, const char *, u16, f32, const JGeometry::TVec3<f32> *, const JGeometry::TVec3<f32> &);
|
||||
void sendMsgEnemyAttackMaximum(HitSensor *, HitSensor *);
|
||||
void sendMsgEnemyAttackMaximumToDir(HitSensor *, HitSensor *, const JGeometry::TVec3<f32> &);
|
||||
void sendMsgEnemyAttackToBindedSensor(LiveActor *, HitSensor *);
|
||||
void sendMsgEnemyAttackExplosionToBindedSensor(LiveActor *, HitSensor *);
|
||||
|
||||
u8 isMsgPlayerHitAll(u32);
|
||||
void sendSimpleMsgToActor(u32, LiveActor *);
|
||||
void sendMsgToBindedSensor(u32, LiveActor *, HitSensor *);
|
||||
void sendMsgToBindedSensor(u32, HitSensor *);
|
||||
void sendMsgToGroundSensor(u32, HitSensor *);
|
||||
void sendMsgToWallSensor(u32, HitSensor *);
|
||||
|
||||
void sendMsgStartDemo(LiveActor *);
|
||||
void sendMsgToEnemyAttackShockWave(HitSensor *, HitSensor *);
|
||||
|
||||
void sendMsgToAllLiveActor(u32, LiveActor *);
|
||||
void sendMsgToGroupMember(u32, LiveActor *, HitSensor *, const char *);
|
||||
void sendMsgExplosionToNearActor(HitSensor *, f32);
|
||||
|
||||
bool isInSpinStormRange(u32, HitSensor *, HitSensor *, f32);
|
||||
bool recieveItemShowMsg(u32, HitSensor *, HitSensor *);
|
||||
bool recieveItemHideMsg(u32, HitSensor *, HitSensor *);
|
||||
|
||||
HitSensor* getGroundSensor(const LiveActor *);
|
||||
HitSensor* getRoofSensor(const LiveActor *);
|
||||
HitSensor* getWallSensor(const LiveActor *);
|
||||
|
||||
bool isMsgPlayerHitAll(u32);
|
||||
bool isMsgPlayerSpinAttack(u32);
|
||||
bool isMsgPlayerTrample(u32);
|
||||
bool isMsgPlayerHitDrop(u32);
|
||||
bool isMsgPlayerHipDropFloor(u32);
|
||||
bool isMsgPlayerUpperPunch(u32);
|
||||
bool isMsgPlayerKick(u32);
|
||||
bool isMsgJetTurtleAttack(u32);
|
||||
bool isMsgFireBallAttack(u32);
|
||||
bool isMsgSearchlightAttack(u32);
|
||||
bool isMsgFreezeAttack(u32);
|
||||
bool isMsgInvincibleAttack(u32);
|
||||
bool isMsgInvalidHit(u32);
|
||||
bool isMsgAutoRushBegin(u32);
|
||||
bool isMsgRushBegin(u32);
|
||||
bool isMsgUpdateBaseMtx(u32);
|
||||
bool isMsgRushCancel(u32);
|
||||
bool isMsgIsRushTakeOver(u32);
|
||||
bool isMsgFloorTouch(u32);
|
||||
bool isMsgWallTouch(u32);
|
||||
bool isMsgCeilTouch(u32);
|
||||
bool isMsgItemGet(u32);
|
||||
bool isMsgItemPull(u32);
|
||||
bool isMsgItemShow(u32);
|
||||
bool isMsgItemHide(u32);
|
||||
bool isMsgItemStartMove(u32);
|
||||
bool isMsgItemEndMove(u32);
|
||||
bool isMsgInhaleBlackHole(u32);
|
||||
bool isMsgEnemyAttack(u32);
|
||||
bool isMsgEnemyAttackFire(u32);
|
||||
bool isMsgEnemyAttackFireStrong(u32);
|
||||
bool isMsgEnemyAttackElectric(u32);
|
||||
bool isMsgExplosionAttack(u32);
|
||||
bool isMsgToEnemyAttackBlow(u32);
|
||||
bool isMsgToEnemyAttackTrample(u32);
|
||||
bool isMsgToEnemyAttackShowWave(u32);
|
||||
bool isMsgSpinStormRange(u32);
|
||||
bool isMsgTutorialStart(u32);
|
||||
bool isMsgTutorialNext(u32);
|
||||
bool isMsgTutorialPrev(u32);
|
||||
bool isMsgTutorialPass(u32);
|
||||
bool isMsgTutorialOmit(u32);
|
||||
bool isMsgRaceReady(u32);
|
||||
bool isMsgRaceStart(u32);
|
||||
bool isMsgRaceReset(u32);
|
||||
bool isMsgLockOnStarPieceShoot(u32);
|
||||
bool isMsgBallDashWall(u32);
|
||||
bool isMsgBallDashGround(u32);
|
||||
bool isMsgStartPowerStarGet(u32);
|
||||
bool isMsgTouchPlantItem(u32);
|
||||
bool isMsgHitmarkEmit(u32);
|
||||
bool isMsgStarPieceAttack(u32);
|
||||
bool isMsgStarPieceReflect(u32);
|
||||
bool isMsgStarPieceGift(u32);
|
||||
u32 getNumStarPieceGift(u32);
|
||||
|
||||
void calcPosBetweenSensors(JGeometry::TVec3<f32> *, const HitSensor *, const HitSensor *, f32);
|
||||
bool tryForceKillIfMsgStarPowerStarGet(LiveActor *, u32);
|
||||
void addBodyMessageSensor(LiveActor *, u32);
|
||||
};
|
||||
|
||||
#endif // ACTORSENSORUTIL_H
|
@ -3,6 +3,31 @@
|
||||
|
||||
#include "Actor/NameObj/NameObj.h"
|
||||
|
||||
enum SceneObj
|
||||
{
|
||||
SENSOR_HIT_CHECKER = 0x0,
|
||||
COLLISION_DIRECTOR = 0x1,
|
||||
CLIPPING_DIRECTOR = 0x2,
|
||||
DEMO_DIRECTOR = 0x3,
|
||||
EVENT_DIRECTOR = 0x4,
|
||||
EFFECT_SYSTEM = 0x5,
|
||||
LIGHT_DIRECTOR = 0x6,
|
||||
SCENE_DATA_INITIALIZER = 0x7,
|
||||
STAGE_DATA_HOLDER = 0x8,
|
||||
MSG_SENSOR_HOLDER = 0x9,
|
||||
STAGE_SWITCH_CONTROLLER = 0xA,
|
||||
SWITCH_WATCHER_HOLDER = 0xB,
|
||||
SLEEP_CONTROLLER = 0xC,
|
||||
|
||||
OCEAN_HOME_MAP_CTRL = 0x40,
|
||||
|
||||
RACE_MANAGER = 0x65,
|
||||
|
||||
SPHERE_SELECTOR = 0x6F,
|
||||
|
||||
PLANET_MAP_CREATOR = 0x74
|
||||
};
|
||||
|
||||
class SceneObjHolder
|
||||
{
|
||||
public:
|
||||
|
@ -1,36 +0,0 @@
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
|
||||
MEMORY {
|
||||
text : origin = 0x80004000
|
||||
}
|
||||
|
||||
SECTIONS {
|
||||
GROUP : {
|
||||
.init ALIGN(0x20) : { }
|
||||
extab ALIGN(0x20) : { }
|
||||
extabindex ALIGN(0x20) : { }
|
||||
.text ALIGN(0x20) : { }
|
||||
.ctors ALIGN(0x20) : { }
|
||||
.dtors ALIGN(0x20) : { }
|
||||
.rodata ALIGN(0x20) : { }
|
||||
.data ALIGN(0x20) : { }
|
||||
.bss ALIGN(0x20) : { }
|
||||
.sdata ALIGN(0x20) : { }
|
||||
.sbss ALIGN(0x20) : { }
|
||||
.sdata2 ALIGN(0x20) : { }
|
||||
.sbss2 ALIGN(0x20) : { }
|
||||
.stack ALIGN(0x100) : { }
|
||||
} > text
|
||||
|
||||
_stack_addr = ((_f_sbss2 + SIZEOF(.sbss2) + 65536 + 0x7) & ~0x7);
|
||||
_stack_end = (_f_sbss2 + SIZEOF(.sbss2));
|
||||
|
||||
_db_stack_addr = (_stack_addr + 0x2000);
|
||||
_db_stack_end = _stack_addr;
|
||||
|
||||
__ArenaLo = ((_db_stack_addr + 0x1F) & ~0x1F);
|
||||
__ArenaHi = 0x81700000;
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
@ -7,9 +7,9 @@ HitSensor::HitSensor(u32 type, u16 a2, f32 a3, LiveActor *pActor)
|
||||
{
|
||||
// todo -- missing clrlwi on second arg
|
||||
mSensorType = type;
|
||||
_4 = 0.0f;
|
||||
_8 = 0.0f;
|
||||
_C = 0.0f;
|
||||
_4.x = 0.0f;
|
||||
_4.y = 0.0f;
|
||||
_4.z = 0.0f;
|
||||
_10 = a3;
|
||||
mNumSensors = 0;
|
||||
_16 = a2;
|
||||
|
60
source/Actor/Sensor/HitSensorInfo.cpp
Normal file
60
source/Actor/Sensor/HitSensorInfo.cpp
Normal file
@ -0,0 +1,60 @@
|
||||
#include "Actor/Sensor/HitSensorInfo.h"
|
||||
|
||||
#include "Actor/LiveActor/LiveActor.h"
|
||||
#include "Actor/Sensor/HitSensor.h"
|
||||
#include "MR/actor/LiveActorUtil.h"
|
||||
|
||||
#include <revolution/mtx.h>
|
||||
|
||||
/*void HitSensorInfo::update()
|
||||
{
|
||||
JGeometry::TVec3<f32> temp;
|
||||
|
||||
if (!_20)
|
||||
{
|
||||
if (!_1C)
|
||||
{
|
||||
if (!_18)
|
||||
{
|
||||
temp.set(mSensor->mParentActor->mTranslation);
|
||||
}
|
||||
else
|
||||
{
|
||||
temp.set(_18->x, _18->y, _18->z);
|
||||
}
|
||||
|
||||
Mtx* mtx = mSensor->mParentActor->getBaseMtx();
|
||||
|
||||
if (!mtx)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
temp.set(_1C[3], _1C[6], _1C[9])
|
||||
}
|
||||
|
||||
mSensor->_4.set(temp);
|
||||
}
|
||||
}*/
|
||||
|
||||
void HitSensorInfo::doObjCol()
|
||||
{
|
||||
u32 curSensor = 0;
|
||||
|
||||
while (curSensor < mSensor->mNumSensors)
|
||||
{
|
||||
if (!MR::isDead(mSensor->mSensors[curSensor]->mParentActor))
|
||||
{
|
||||
mSensor->mParentActor->attackSensor(mSensor, mSensor->mSensors[curSensor]);
|
||||
}
|
||||
|
||||
curSensor++;
|
||||
}
|
||||
}
|
12
source/Actor/Sensor/HitSensorKeeper.cpp
Normal file
12
source/Actor/Sensor/HitSensorKeeper.cpp
Normal file
@ -0,0 +1,12 @@
|
||||
#include "Actor/Sensor/HitSensorKeeper.h"
|
||||
|
||||
HitSensorKeeper::HitSensorKeeper(s32 sensorCount)
|
||||
{
|
||||
mNumSensors = sensorCount;
|
||||
_0 = 0;
|
||||
mSensors = 0;
|
||||
_C = 0;
|
||||
_10 = 0;
|
||||
|
||||
mSensors = (HitSensor**)new HitSensor[sensorCount];
|
||||
}
|
@ -1,7 +1,78 @@
|
||||
#include "MR/actor/ActorSensorUtil.h"
|
||||
#include "Actor/LiveActor/LiveActor.h"
|
||||
|
||||
namespace MR
|
||||
{
|
||||
void addHitSensor(LiveActor *pActor, const char *pSensorName, u32 msg, u16 unk1, f32 unk2, const JGeometry::TVec3<f32> &unk3)
|
||||
{
|
||||
pActor->mSensorKeeper->add(pSensorName, msg, unk1, unk2, pActor, unk3);
|
||||
}
|
||||
|
||||
void addHitSensorBinder(LiveActor *pActor, const char *pSensorName, u16 unk1, f32 unk2, const JGeometry::TVec3<f32> &unk3)
|
||||
{
|
||||
pActor->mSensorKeeper->add(pSensorName, 0x61, unk1, unk2, pActor, unk3);
|
||||
}
|
||||
|
||||
void addHitSensorTransferableBinder(LiveActor *pActor, const char *pSensorName, u16 unk1, f32 unk2, const JGeometry::TVec3<f32> &unk3)
|
||||
{
|
||||
pActor->mSensorKeeper->add(pSensorName, 0x62, unk1, unk2, pActor, unk3);
|
||||
}
|
||||
|
||||
void addHitSensorPriorBinder(LiveActor *pActor, const char *pSensorName, u16 unk1, f32 unk2, const JGeometry::TVec3<f32> &unk3)
|
||||
{
|
||||
pActor->mSensorKeeper->add(pSensorName, 0x63, unk1, unk2, pActor, unk3);
|
||||
}
|
||||
|
||||
void addHitSensorRide(LiveActor *pActor, const char *pSensorName, u16 unk1, f32 unk2, const JGeometry::TVec3<f32> &unk3)
|
||||
{
|
||||
pActor->mSensorKeeper->add(pSensorName, 0x5, unk1, unk2, pActor, unk3);
|
||||
}
|
||||
|
||||
void addHitSensorMapObj(LiveActor *pActor, const char *pSensorName, u16 unk1, f32 unk2, const JGeometry::TVec3<f32> &unk3)
|
||||
{
|
||||
pActor->mSensorKeeper->add(pSensorName, 0x46, unk1, unk2, pActor, unk3);
|
||||
}
|
||||
|
||||
void addHitSensorMapObjPress(LiveActor *pActor, const char *pSensorName, u16 unk1, f32 unk2, const JGeometry::TVec3<f32> &unk3)
|
||||
{
|
||||
pActor->mSensorKeeper->add(pSensorName, 0x76, unk1, unk2, pActor, unk3);
|
||||
}
|
||||
|
||||
void addHitSensorMapObjSimple(LiveActor *pActor, const char *pSensorName, u16 unk1, f32 unk2, const JGeometry::TVec3<f32> &unk3)
|
||||
{
|
||||
pActor->mSensorKeeper->add(pSensorName, 0x47, unk1, unk2, pActor, unk3);
|
||||
}
|
||||
|
||||
void addHitSensorMapObjMoveCollision(LiveActor *pActor, const char *pSensorName, u16 unk1, f32 unk2, const JGeometry::TVec3<f32> &unk3)
|
||||
{
|
||||
pActor->mSensorKeeper->add(pSensorName, 0x48, unk1, unk2, pActor, unk3);
|
||||
}
|
||||
|
||||
void addHitSensorEnemy(LiveActor *pActor, const char *pSensorName, u16 unk1, f32 unk2, const JGeometry::TVec3<f32> &unk3)
|
||||
{
|
||||
pActor->mSensorKeeper->add(pSensorName, 0x14, unk1, unk2, pActor, unk3);
|
||||
}
|
||||
|
||||
void addHitSensorEnemySimple(LiveActor *pActor, const char *pSensorName, u16 unk1, f32 unk2, const JGeometry::TVec3<f32> &unk3)
|
||||
{
|
||||
pActor->mSensorKeeper->add(pSensorName, 0x15, unk1, unk2, pActor, unk3);
|
||||
}
|
||||
|
||||
void addHitSensorEnemyAttack(LiveActor *pActor, const char *pSensorName, u16 unk1, f32 unk2, const JGeometry::TVec3<f32> &unk3)
|
||||
{
|
||||
pActor->mSensorKeeper->add(pSensorName, 0x16, unk1, unk2, pActor, unk3);
|
||||
}
|
||||
|
||||
void addHitSensorNpc(LiveActor *pActor, const char *pSensorName, u16 unk1, f32 unk2, const JGeometry::TVec3<f32> &unk3)
|
||||
{
|
||||
pActor->mSensorKeeper->add(pSensorName, 0x5, unk1, unk2, pActor, unk3);
|
||||
}
|
||||
|
||||
void addHitSensorEye(LiveActor *pActor, const char *pSensorName, u16 unk1, f32 unk2, const JGeometry::TVec3<f32> &unk3)
|
||||
{
|
||||
pActor->mSensorKeeper->add(pSensorName, 0x7F, unk1, unk2, pActor, unk3);
|
||||
}
|
||||
|
||||
bool isMsgPlayerSpinAttack(u32 msg)
|
||||
{
|
||||
return !(msg - 1);
|
||||
|
@ -1,2 +1,2 @@
|
||||
SDK_PATH=C:/Users/14106/Downloads/Revolution
|
||||
MW_BASE_PATH=C:/CodeWarrior
|
||||
SDK_PATH=C:/Users/xarf9/Hacking/Wii/Revolution
|
||||
MW_BASE_PATH=C:/Users/xarf9/Hacking/Wii/CodeWarrior
|
Loading…
x
Reference in New Issue
Block a user