summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xinclude/game.h70
-rw-r--r--kamek_pal.x6
-rw-r--r--src/objkinoko.cpp55
-rw-r--r--src/shyguy.cpp11
4 files changed, 86 insertions, 56 deletions
diff --git a/include/game.h b/include/game.h
index 99a064a..cceee66 100755
--- a/include/game.h
+++ b/include/game.h
@@ -1436,6 +1436,76 @@ public:
u8 _ED[3]; //FIXME
};
+class BasicCollider {
+ public:
+ BasicCollider();
+
+ virtual ~BasicCollider();
+ virtual void update();
+ virtual void _vf10();
+ virtual void _vf14();
+
+ void clear();
+ void addToList();
+ void removeFromList();
+
+
+ dStageActor_c *owner;
+ BasicCollider *prev, *next;
+ /* dRSomething */ void *ptrToRSomething;
+
+ float rightX, rightY, leftX, leftY;
+ float xDiff, yDiff;
+ float lastLeftX, lastLeftY;
+ float lineLength;
+ float leftXDeltaSinceLastCalculation;
+
+ u32 flags;
+ s16 rotation;
+ u8 type;
+ u8 _43;
+ u8 isInList;
+ u8 _45, _46, _47, _48, _49, _4A;
+};
+
+class StandOnTopCollider : public BasicCollider {
+ public:
+ StandOnTopCollider();
+
+ void update();
+
+ void init(dStageActor_c *owner,
+ float _4C, float _50, float topYOffset,
+ float rightSize, float leftSize,
+ s16 rotation, u8 unk_45, Vec2 *scale = 0);
+
+ void init(dStageActor_c *owner,
+ Vec2 *fields4C_50, float topYOffset,
+ float rightSize, float leftSize,
+ s16 rotation, u8 unk_45, Vec2 *scale = 0);
+
+ void setLeftAndRight(float left, float right);
+ void setLeftAndRightScaled(float left, float right, float scaleFactor);
+
+ // 4C and 50 might be X/Y offset. Not affected by rotation
+ float _4C, _50, topYOffset, rightSize, leftSize;
+};
+
+class RideableActorCollider : public BasicCollider {
+ public:
+ RideableActorCollider();
+
+ void update();
+
+ void init(dStageActor_c *owner, Vec2 *one, Vec2 *two); // 800DB590
+ void init(dStageActor_c *owner, float x1, float x2, float y1, float y2); // 800DB620
+
+ void setPosition(Vec2 *one, Vec2 *two); // 800DB680
+ void setPosition(float x1, float x2, float y1, float y2); // 800DB6E0
+
+ Vec2 left, right;
+};
+
class freezeMgr_c {
public:
diff --git a/kamek_pal.x b/kamek_pal.x
index 8074add..eae7d51 100644
--- a/kamek_pal.x
+++ b/kamek_pal.x
@@ -29,6 +29,12 @@ SECTIONS {
init__18StandOnTopColliderFP13dStageActor_cfffffsUcP7Point2d = 0x800DB270;
+ __ct__21RideableActorCollider = 0x800DB540;
+ init__21RideableActorColliderFP13dStageActor_cP7Point2dP7Point2d = 0x800DB590;
+ init__21RideableActorColliderFP13dStageActor_cffff = 0x800DB620;
+ setPosition__21RideableActorColliderFP7Point2dP7Point2d = 0x800DB680;
+ setPosition__21RideableActorColliderFffff = 0x800DB6E0;
+
drawWithMatrix__21SomethingAboutShroomsFfP4mMtx = 0x800BC700;
original_onCreate__13daObjKinoko_cFv = 0x8087F8D0;
diff --git a/src/objkinoko.cpp b/src/objkinoko.cpp
index baa069d..f8fe4d8 100644
--- a/src/objkinoko.cpp
+++ b/src/objkinoko.cpp
@@ -1,61 +1,6 @@
#include <game.h>
#include <g3dhax.h>
-class BasicCollider {
- public:
- BasicCollider();
-
- virtual ~BasicCollider();
- virtual void update();
- virtual void _vf10();
- virtual void _vf14();
-
- void clear();
- void addToList();
- void removeFromList();
-
-
- dStageActor_c *owner;
- BasicCollider *prev, *next;
- /* dRSomething */ void *ptrToRSomething;
-
- float rightX, rightY, leftX, leftY;
- float xDiff, yDiff;
- float lastLeftX, lastLeftY;
- float lineLength;
- float leftXDeltaSinceLastCalculation;
-
- u32 flags;
- s16 rotation;
- u8 type;
- u8 _43;
- u8 isInList;
- u8 _45, _46, _47, _48, _49, _4A;
-};
-
-class StandOnTopCollider : public BasicCollider {
- public:
- StandOnTopCollider();
-
- void update();
-
- void init(dStageActor_c *owner,
- float _4C, float _50, float topYOffset,
- float rightSize, float leftSize,
- s16 rotation, u8 unk_45, Vec2 *scale = 0);
-
- void init(dStageActor_c *owner,
- Vec2 *fields4C_50, float topYOffset,
- float rightSize, float leftSize,
- s16 rotation, u8 unk_45, Vec2 *scale = 0);
-
- void setLeftAndRight(float left, float right);
- void setLeftAndRightScaled(float left, float right, float scaleFactor);
-
- // 4C and 50 might be X/Y offset. Not affected by rotation
- float _4C, _50, topYOffset, rightSize, leftSize;
-};
-
class SomethingAboutShrooms {
public:
diff --git a/src/shyguy.cpp b/src/shyguy.cpp
index 15bf0d6..22d157f 100644
--- a/src/shyguy.cpp
+++ b/src/shyguy.cpp
@@ -77,6 +77,9 @@ class daShyGuy : public dEn_c {
bool isBouncing;
float balloonSize;
+ RideableActorCollider giantRider;
+
+
static daShyGuy *build();
void bindAnimChr_and_setUpdateRate(const char* name, int unk, float unk2, float rate);
@@ -448,7 +451,9 @@ int daShyGuy::onCreate() {
ActivePhysics::Info HitMeBaby;
if (type > 8) {
- this->scale = (Vec){40.0, 40.0, 40.0};
+ this->scale = (Vec){40.0f, 40.0f, 40.0f};
+
+ giantRider.init(this, -24.0f, 28.0f, 24.0f, 28.0f);
HitMeBaby.xDistToCenter = 0.0;
HitMeBaby.yDistToCenter = 24.0;
@@ -569,6 +574,10 @@ int daShyGuy::onDraw() {
balloonModelB.scheduleForDrawing();
}
+ if (type > 8) {
+ giantRider.update();
+ }
+
return true;
}