summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2011-09-17 03:38:41 +0200
committerTreeki <treeki@gmail.com>2011-09-17 03:38:41 +0200
commite0ff484a06fd3f068e29eff4a125f61fbfd174c4 (patch)
treea7df31ed5108e4107ebb2aaa63a1f401a9cf86a4 /include
parente86081a64a2f2fc3e3d0d4974572702b158dfd64 (diff)
downloadkamek-classic_controller.tar.gz
kamek-classic_controller.zip
merged level-select updates to game.h and State stuffclassic_controller
Diffstat (limited to 'include')
-rwxr-xr-xinclude/game.h72
1 files changed, 72 insertions, 0 deletions
diff --git a/include/game.h b/include/game.h
index 554e17a..7382c34 100755
--- a/include/game.h
+++ b/include/game.h
@@ -1020,6 +1020,25 @@ public:
u8 layer;
u8 someFlagByte;
u8 isLinkedIntoList;
+
+ void clear();
+ void addToList();
+ void removeFromList();
+
+ void initWithStruct(dActor_c *owner, Info *info);
+ void initWithStruct(dActor_c *owner, Info *info, u8 clMode);
+
+ u16 checkResult1(u16 param);
+ u16 checkResult3(u16 param);
+
+ float top();
+ float bottom();
+ float yCenter();
+ float right();
+ float left();
+ float xCenter();
+
+ // Plus more stuff that isn't needed in the public API, I'm pretty sure.
};
@@ -1085,6 +1104,23 @@ public:
};
+#define DECLARE_STATE(NAME) \
+ static State StateID_##NAME; \
+ void beginState_##NAME(); \
+ void executeState_##NAME(); \
+ void endState_##NAME();
+
+#define CREATE_STATE(CLASS, NAME) \
+ CLASS::State CLASS::StateID_##NAME \
+ (#CLASS "::StateID_" #NAME, \
+ &CLASS::beginState_##NAME, \
+ &CLASS::executeState_##NAME, \
+ &CLASS::endState_##NAME);
+
+#define USING_STATES(CLASS) \
+ typedef State<CLASS> State;
+
+
struct LinkListEntry {
LinkListEntry *prev;
LinkListEntry *next;
@@ -1347,6 +1383,29 @@ public:
};
+class dAc_Py_c : public dStageActor_c {
+public:
+ u8 data[0x1164 - 0x394];
+ ActivePhysics bPhysics;
+ ActivePhysics cPhysics;
+ ActivePhysics dPhysics;
+ ActivePhysics ePhysics;
+
+ dAc_Py_c();
+
+ int beforeCreate();
+ int afterCreate(int);
+ int beforeDelete();
+ int afterDelete(int);
+ int beforeExecute();
+ int afterExecute(int);
+ int beforeDraw();
+ int afterDraw(int);
+
+ ~dAc_Py_c();
+};
+
+
/* TODO
class dActorState_c : public dStageActor_c {
public:
@@ -1534,6 +1593,9 @@ public:
virtual void _vf27C(); // nullsub, params unknown
~dEn_c();
+
+
+ static void collisionCallback(ActivePhysics::Info *one, ActivePhysics::Info *two);
};
@@ -2070,5 +2132,15 @@ struct BGRender {
u16 tileNumberWithinBlock, areaID;
};
+// A HACK
+extern void *DVDClass;
+extern "C" u8 *GetRes(void *Something, const char *arcname, const char *filename);
+
+// Use THESE instead, until I write something up for dRes or dRes_c or whatever the fuck it's called
+
+inline u8 *getResource(const char *arcName, const char *fileName) {
+ return GetRes((void*)(((u8*)DVDClass)+4), arcName, fileName);
+}
+
#endif