Match and link BombSarai.cpp

**bomb vomiting noises**
This commit is contained in:
HeartPiece 2023-09-04 19:57:19 +10:00
parent 9644a68bad
commit 1a32318d3d
14 changed files with 234 additions and 3086 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1179,7 +1179,7 @@ LIBS = [
"plugProjectNishimuraU/BombSaraiState",
["plugProjectNishimuraU/BombSaraiAnimator", True],
["plugProjectNishimuraU/BombSaraiMgr", True],
"plugProjectNishimuraU/BombSarai",
["plugProjectNishimuraU/BombSarai", True],
["plugProjectNishimuraU/OtakaraBaseState", True],
["plugProjectNishimuraU/OtakaraBaseAnimator", True],
["plugProjectNishimuraU/OtakaraBaseMgr", True],

View File

@ -149,7 +149,7 @@
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/ElecHiba.cpp">ElecHiba.cpp</a> | 21841 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/QueenState.cpp">QueenState.cpp</a> | 22549 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/ElecBug.cpp">ElecBug.cpp</a> | 24345 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/ArmorState.cpp">ArmorState.cpp</a> | 24720 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/SaraiState.cpp">SaraiState.cpp</a> | 24929 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/TobiState.cpp">TobiState.cpp</a> | 24992 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/UjibState.cpp">UjibState.cpp</a> | 25560 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/Armor.cpp">Armor.cpp</a> | 28789 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/UjibState.cpp">UjibState.cpp</a> | 25560 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/Armor.cpp">Armor.cpp</a> | 28880 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/TankState.cpp">TankState.cpp</a> | 29299 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/RandItemUnit.cpp">RandItemUnit.cpp</a> | 29622 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/IKSystemBase.cpp">IKSystemBase.cpp</a> | 30077 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/FrogState.cpp">FrogState.cpp</a> | 30870 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/BigTreasureShadow.cpp">BigTreasureShadow.cpp</a> | 32354 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/plugProjectNishimuraU/MarState.cpp">MarState.cpp</a> | 33440 |
@ -193,7 +193,7 @@
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/moviePlayerPauseAndDraw.cpp">moviePlayerPauseAndDraw.cpp</a> | 8587 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/screenScene.cpp">screenScene.cpp</a> | 9274 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/THPVideoDecode.c">THPVideoDecode.c</a> | 10029 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/JSTObjectParticleActor.cpp">JSTObjectParticleActor.cpp</a> | 11032 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/loadResource.cpp">loadResource.cpp</a> | 11781 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/heapStatus.cpp">heapStatus.cpp</a> | 12405 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/dvdThread.cpp">dvdThread.cpp</a> | 12535 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/JSTObjectCamera.cpp">JSTObjectCamera.cpp</a> | 12872 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/dvdThread.cpp">dvdThread.cpp</a> | 12535 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/JSTObjectCamera.cpp">JSTObjectCamera.cpp</a> | 12894 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/P2DScreen.cpp">P2DScreen.cpp</a> | 12998 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/modelEffect.cpp">modelEffect.cpp</a> | 13173 |
| <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/JSTObjectGameActor.cpp">JSTObjectGameActor.cpp</a> | 16832 | <a href="https://github.com/projectPiki/pikmin2/tree/main/src/sysGCU/light.cpp">light.cpp</a> | 17447 |

View File

@ -616,9 +616,10 @@ struct EnemyBase : public Creature, public SysShape::MotionListener, virtual pub
return angleDist;
}
// this seems necessary and correct based on BombSarai::Obj::throwBomb
inline void updateFaceDir(f32 angle)
{
mFaceDir = roundAng(angle + getFaceDir());
mFaceDir = angle;
mRotation.y = mFaceDir;
}
@ -634,7 +635,7 @@ struct EnemyBase : public Creature, public SysShape::MotionListener, virtual pub
turnSpeed = (turnSpeed > 0.0f) ? limit : -limit;
}
updateFaceDir(turnSpeed);
updateFaceDir(roundAng(turnSpeed + getFaceDir()));
return angleDist;
}
@ -652,7 +653,7 @@ struct EnemyBase : public Creature, public SysShape::MotionListener, virtual pub
turnSpeed = (turnSpeed > 0.0f) ? limit : -limit;
}
updateFaceDir(turnSpeed);
updateFaceDir(roundAng(turnSpeed + getFaceDir()));
return angleDist;
}

View File

@ -91,7 +91,7 @@ struct Obj : public EnemyBase {
int _2C4; // _2C4
u8 _2C8; // _2C8
u8 _2C9; // _2C9
OtakaraBase::Obj* mOtakara; // _2CC
EnemyBase* mCarrier; // _2CC, enemy carrying the bomb (dweevil, dirigibug)
FSM* mFsm; // _2D0
efx::TBombrockLight* mEfxLight; // _2D4
// _2D8 = PelletView

View File

@ -21,6 +21,24 @@ struct Obj;
namespace BombSarai {
struct FSM;
enum StateID {
BOMBSARAI_NULL = -1,
BOMBSARAI_Dead = 0,
BOMBSARAI_Damage = 1,
BOMBSARAI_Wait = 2,
BOMBSARAI_BombWait = 3,
BOMBSARAI_Move = 4,
BOMBSARAI_BombMove = 5,
BOMBSARAI_Supply = 6,
BOMBSARAI_Release = 7,
BOMBSARAI_Fall = 8,
BOMBSARAI_TakeOff1 = 9,
BOMBSARAI_TakeOff2 = 10,
BOMBSARAI_Flick = 11,
BOMBSARAI_BombFlick = 12,
BOMBSARAI_StateCount, // 13
};
struct Obj : public EnemyBase {
Obj();
@ -28,32 +46,35 @@ struct Obj : public EnemyBase {
virtual void onInit(CreatureInitArg* settings); // _30
virtual void onKill(CreatureKillArg* settings); // _34
virtual void doDirectDraw(Graphics& gfx); // _50
virtual void inWaterCallback(WaterBox* wb); // _84 (weak)
virtual void outWaterCallback(); // _88 (weak)
virtual void inWaterCallback(WaterBox* wb) { } // _84 (weak)
virtual void outWaterCallback() { } // _88 (weak)
virtual void getShadowParam(ShadowParam& settings); // _134
virtual ~Obj() { } // _1BC (weak)
virtual void setInitialSetting(EnemyInitialParamBase*); // _1C4
virtual void doUpdate(); // _1CC
virtual void doDebugDraw(Graphics&); // _1EC
virtual EnemyTypeID::EEnemyTypeID getEnemyTypeID(); // _258 (weak)
virtual bool bombCallBack(Creature*, Vector3f&, f32); // _294
virtual void doFinishStoneState(); // _2A8
virtual void startCarcassMotion(); // _2C4
virtual void doStartWaitingBirthTypeDrop(); // _2E0
virtual void doFinishWaitingBirthTypeDrop(); // _2E4
virtual f32 getDownSmokeScale(); // _2EC (weak)
virtual void doStartMovie(); // _2F0
virtual void doEndMovie(); // _2F4
virtual void setFSM(FSM*); // _2F8
virtual f32 getDownSmokeScale() { return 0.9f; } // _2EC (weak)
virtual EnemyTypeID::EEnemyTypeID getEnemyTypeID() // _258 (weak)
{
return EnemyTypeID::EnemyID_BombSarai;
}
//////////////// VTABLE END
void setHeightVelocity(bool);
f32 setHeightVelocity(bool);
void setRandTarget();
void addPitchRatio();
void supplyBomb();
void throwBomb(Vector3f&);
void getAttackablePikmin();
void getNextStateOnHeight();
Creature* getAttackablePikmin();
StateID getNextStateOnHeight();
void createEffect();
void setupEffect();
void createSupliEffect();

View File

@ -14,7 +14,7 @@ namespace Game {
struct MoviePlayer;
namespace P2JST {
static f32 sFovBackup;
extern f32 sFovBackup;
// Size: 0xC9
struct ObjectCamera : public JStage::TCamera, public ObjectBase {
ObjectCamera(const char*, Game::MoviePlayer*);

View File

@ -6,12 +6,22 @@
namespace efx {
struct TBsaraiDead : public TSimple2 {
inline TBsaraiDead()
: TSimple2(PID_BSaraiDead_1, PID_BSaraiDead_2)
{
}
// _00 = VTBL
// _00-_10 = TSimple2
};
struct TBsaraiSupli : public TChaseMtx {
virtual ~TBsaraiSupli(); // _48 (weak)
inline TBsaraiSupli()
: TChaseMtx(PID_BSaraiSupli, nullptr)
{
}
virtual ~TBsaraiSupli() { } // _48 (weak)
// _00 = VTBL
// _00-_14 = TChaseMtx

View File

@ -75,7 +75,7 @@ void Obj::onInit(CreatureInitArg* initArg)
_2C8 = 0;
_2C0 = 0;
_2C4 = 0;
mOtakara = nullptr;
mCarrier = nullptr;
mFsm->start(this, BOMB_Wait, nullptr);
@ -377,8 +377,8 @@ void Obj::doStartStoneState()
*/
void Obj::onKill(CreatureKillArg* killArg)
{
if (mOtakara && mOtakara->getEnemyTypeID() == EnemyTypeID::EnemyID_BombOtakara) {
mOtakara->mTargetCreature = nullptr;
if (mCarrier && mCarrier->getEnemyTypeID() == EnemyTypeID::EnemyID_BombOtakara) {
mCarrier->mTargetCreature = nullptr;
}
mEfxLight->fade();

View File

@ -171,9 +171,9 @@ void StateBomb::exec(EnemyBase* enemy)
creature->stimulate(interBomb);
} else if (creature->isNavi() || creature->isPiki()) {
Creature* target = static_cast<Obj*>(enemy)->mOtakara;
Creature* target = static_cast<Obj*>(enemy)->mCarrier;
if (static_cast<Obj*>(enemy)->mOtakara == nullptr) {
if (static_cast<Obj*>(enemy)->mCarrier == nullptr) {
target = enemy;
}

File diff suppressed because it is too large Load Diff

View File

@ -150,7 +150,7 @@ NISHIMURA_FILES:=\
$(BUILD_DIR)/asm/plugProjectNishimuraU/BombSaraiState.o\
$(BUILD_DIR)/src/plugProjectNishimuraU/BombSaraiAnimator.o\
$(BUILD_DIR)/src/plugProjectNishimuraU/BombSaraiMgr.o\
$(BUILD_DIR)/asm/plugProjectNishimuraU/BombSarai.o\
$(BUILD_DIR)/src/plugProjectNishimuraU/BombSarai.o\
$(BUILD_DIR)/src/plugProjectNishimuraU/OtakaraBaseState.o\
$(BUILD_DIR)/src/plugProjectNishimuraU/OtakaraBaseAnimator.o\
$(BUILD_DIR)/src/plugProjectNishimuraU/OtakaraBaseMgr.o\

View File

@ -104,7 +104,7 @@
namespace Game {
namespace P2JST {
static f32 sFovBackup;
/*
* --INFO--
* Address: 8042F6E4

View File

@ -509,3 +509,5 @@ You have 2485 out of 10000 Pokos and 69 out of 201 treasures.",2023-08-30 22:14:
You have 2505 out of 10000 Pokos and 70 out of 201 treasures.",2023-09-01 18:16:39.925520
2525,1175144,0.252591377436617,70,249731,0.35032460973885327,"
You have 2525 out of 10000 Pokos and 70 out of 201 treasures.",2023-09-02 00:49:20.776964
2534,1179204,0.2534640543105939,70,250808,0.3518354338043027,"
You have 2534 out of 10000 Pokos and 70 out of 201 treasures.",2023-09-04 19:53:22.225641

1 code_count_in_pokos code_completion_in_bytes code_completion_in_percentage data_count_in_treasures data_completion_in_bytes data_completion_in_percentage sentence created_at
509
510
511
512
513