summaryrefslogtreecommitdiff
path: root/src/bossWrenchThrow.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/bossWrenchThrow.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/bossWrenchThrow.cpp b/src/bossWrenchThrow.cpp
index 5247c62..338e3ec 100644
--- a/src/bossWrenchThrow.cpp
+++ b/src/bossWrenchThrow.cpp
@@ -134,14 +134,14 @@ int daWrench::onCreate() {
_324 = 5.0f;
// These structs tell stupid collider what to collide with - these are from koopa troopa
- static const u8 one[16] = {0,0,0,1, 0,0,0xC0,0, 0,0,0x40,0, 0,0,0,0};
- static const u8 two[12] = {0,0,0,0, 0,0,0,0, 0,0,0xC0,0};
- static const u8 three[16] = {0,0,0,1, 0,0,0x60,0, 0,0,0x90,0, 0,0,0x60,0};
+ static const lineSensor_s below(12<<12, 4<<12, 0<<12);
+ static const pointSensor_s above(0<<12, 12<<12);
+ static const lineSensor_s adjacent(6<<12, 9<<12, 6<<12);
- collMgr.Init(this, one, two, three);
- collMgr.execute();
+ collMgr.init(this, &below, &above, &adjacent);
+ collMgr.calculateBelowCollisionWithSmokeEffect();
- cmgr_returnValue = collMgr.CollidedWithTile();
+ cmgr_returnValue = collMgr.isOnTopOfTile();
if (this->direction == 0) { // Ground Facing Left
@@ -222,10 +222,10 @@ void daWrench::executeState_Kaboom() {
HandleYSpeed();
doSpriteMovement();
- cmgr_returnValue = collMgr.CollidedWithTile();
- collMgr.execute();
+ cmgr_returnValue = collMgr.isOnTopOfTile();
+ collMgr.calculateBelowCollisionWithSmokeEffect();
- if (collMgr.CollidedWithTile()) {
+ if (collMgr.isOnTopOfTile()) {
// hit the ground
PlaySoundAsync(this, SE_BOSS_JR_BOMB_BURST);
@@ -233,7 +233,7 @@ void daWrench::executeState_Kaboom() {
SpawnEffect("Wm_mr_wirehit", 0, &this->pos, &(S16Vec){0,0,0}, &(Vec){1.25, 1.25, 1.25});
this->Delete(1);
}
- if (collMgr.bitfield_for_checks & (0x15 << direction)) {
+ if (collMgr.outputMaybe & (0x15 << direction)) {
// hit the wall
PlaySoundAsync(this, SE_BOSS_JR_BOMB_BURST);
@@ -281,17 +281,17 @@ void daWrench::executeState_Straight() {
HandleYSpeed();
doSpriteMovement();
- cmgr_returnValue = collMgr.CollidedWithTile();
- collMgr.execute();
+ cmgr_returnValue = collMgr.isOnTopOfTile();
+ collMgr.calculateBelowCollisionWithSmokeEffect();
- if (collMgr.CollidedWithTile()) {
+ if (collMgr.isOnTopOfTile()) {
// hit the ground
PlaySoundAsync(this, SE_BOSS_JR_FLOOR_BREAK);
SpawnEffect("Wm_en_burst_s", 0, &this->pos, &(S16Vec){0,0,0}, &(Vec){0.75, 0.75, 0.75});
this->Delete(1);
}
- if (collMgr.bitfield_for_checks & (0x15 << direction)) {
+ if (collMgr.outputMaybe & (0x15 << direction)) {
// hit the wall
PlaySoundAsync(this, SE_BOSS_JR_FLOOR_BREAK);