diff options
author | Colin Noga <Tempus@Spectrum-Song.local> | 2011-10-10 22:46:16 -0500 |
---|---|---|
committer | Colin Noga <Tempus@Spectrum-Song.local> | 2011-10-10 22:46:16 -0500 |
commit | faa753075c7751b106dfdb60b6a56dd7bbd6a6b7 (patch) | |
tree | 28d35e1d3e7eef6550385b6b751a74bb432b9674 /include/game.h | |
parent | 5ba33f06b89159191cdcbbefd9196ca6f2bab89e (diff) | |
parent | 5f3eca3f6074605272b7bdde4a685d2f0934d6a7 (diff) | |
download | kamek-faa753075c7751b106dfdb60b6a56dd7bbd6a6b7.tar.gz kamek-faa753075c7751b106dfdb60b6a56dd7bbd6a6b7.zip |
Merge branch 'level-select' of ssh://treeki.shacknet.nu:30000/Kamek into level-select
Diffstat (limited to '')
-rwxr-xr-x | include/game.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/game.h b/include/game.h index c57a93d..b6b07dd 100755 --- a/include/game.h +++ b/include/game.h @@ -2199,5 +2199,30 @@ inline u8 *getResource(const char *arcName, const char *fileName) { return GetRes((void*)(((u8*)DVDClass)+4), arcName, fileName);
}
+inline void scaleDown(Vec* scale, float amt) { scale->x -= amt; scale->y -= amt; scale->z -= amt; }
+inline void scaleUp(Vec* scale, float amt) { scale->x -= amt; scale->y -= amt; scale->z -= amt; }
+inline void setNewActivePhysicsRect(dStageActor_c* actor, Vec* scale) {
+ float amtX = scale->x;
+ float amtY = scale->y;
+
+ ActivePhysics::Info info;
+ info.xDistToCenter = 0.0;
+ info.yDistToCenter = 3.0 * amtY;
+ info.xDistToEdge = 4.0 * amtX;
+ info.yDistToEdge = 4.0 * amtY;
+
+ info.category1 = actor->aPhysics.info.category1;
+ info.category2 = actor->aPhysics.info.category2;
+ info.bitfield1 = actor->aPhysics.info.bitfield1;
+ info.bitfield2 = actor->aPhysics.info.bitfield2;
+ info.unkShort1C = actor->aPhysics.info.unkShort1C;
+ info.callback = actor->aPhysics.info.callback;
+
+ OSReport("Making new Physics Class and adding to the list\n");
+ actor->aPhysics.removeFromList();
+ actor->aPhysics.initWithStruct(actor, &info);
+ actor->aPhysics.addToList();
+}
+
#endif
|