summaryrefslogtreecommitdiff
path: root/include/game.h
diff options
context:
space:
mode:
authorStephen Simpson <megazig@gmail.com>2011-10-10 16:04:33 -0500
committerStephen Simpson <megazig@gmail.com>2011-10-10 16:04:33 -0500
commita61758720db96f59e0fb82aab9f326d37e186a11 (patch)
tree8df4117f3723132afa42ecd35e28189b3b69196b /include/game.h
parent9cde0784c0d82a4e95d7ff7195537d3a519efeb9 (diff)
downloadkamek-a61758720db96f59e0fb82aab9f326d37e186a11.tar.gz
kamek-a61758720db96f59e0fb82aab9f326d37e186a11.zip
got MountainGoomba to a working condition
added Hermite Interpolation into linker and common.h added player.cpp and player.h for some common functions removed classic controller hack from NewerProject.yaml added more PSVEC functions to linker
Diffstat (limited to '')
-rwxr-xr-xinclude/game.h25
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