summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-09-01 05:09:47 +0200
committerTreeki <treeki@gmail.com>2012-09-01 05:09:47 +0200
commitf1d937694dc9d9f9637af8c72293dab9edeaf7a2 (patch)
treed02dca08e9077b77f3ce85516689110f3825dce8 /include
parentfbcd0d0d86409976ab22caeea25dc934486345a1 (diff)
downloadkamek-f1d937694dc9d9f9637af8c72293dab9edeaf7a2.tar.gz
kamek-f1d937694dc9d9f9637af8c72293dab9edeaf7a2.zip
the beginnings of a working cutscene player
Diffstat (limited to '')
-rwxr-xr-xinclude/game.h70
1 files changed, 66 insertions, 4 deletions
diff --git a/include/game.h b/include/game.h
index af235b9..f3b14c3 100755
--- a/include/game.h
+++ b/include/game.h
@@ -491,6 +491,7 @@ namespace lyt {
class AnimResource;
class AnimationLink;
class ResourceAccessor;
+ class Group;
class GroupContainer;
class Layout {
@@ -2546,6 +2547,14 @@ namespace lyt {
// class ends at 0xB0
};
+ class AnimResource {
+ public:
+ void *fileHeader;
+ void *info;
+ void *tags;
+ void *share;
+ };
+
}
}
@@ -2557,9 +2566,11 @@ namespace m2d {
virtual void initialSetup();
nw4r::lyt::ResourceAccessor *resAccPtr; // 0x04
- u32 unk_08; // 0x08
+ void *arcData; // 0x08
nw4r::lyt::ArcResourceAccessor resAcc; // 0x0C
// class ends at 0xBC
+
+ bool attachArc(void *data, const char *rootDir); // 0x801637A0
};
class ResAccLoader_c : public ResAcc_c {
@@ -2576,6 +2587,57 @@ namespace m2d {
void free();
};
+ class AnmResHandler_c {
+ public:
+ AnmResHandler_c();
+ ~AnmResHandler_c();
+
+ struct Thing {
+ nw4r::lyt::Group *group;
+ nw4r::lyt::AnimTransform *animTransform;
+ };
+
+ nw4r::lyt::AnimResource resource; // 0x04
+ Thing *groups; // 0x14
+ u32 groupCount; // 0x18
+
+ bool load(const char *name, ResAcc_c *resAcc, nw4r::lyt::Layout *layout, bool useDiffInit);
+ bool free();
+ Thing *getThingForGroupName(const char *name); // 80164130
+ };
+
+ class FrameCtrl_c {
+ public:
+ virtual ~FrameCtrl_c();
+
+ float frameCount; // 0x04
+ float currentFrame; // 0x08
+ float lastFrame; // 0x0C
+ float speed; // 0x10; default: 1
+ u8 flags; // 0x14
+
+ void processAnim(); // 0x80163800
+ void setup(u8 flags, float frameCount, float speed, float initialFrame); // 0x801638A0
+ void setCurrentFrame(float frame); // 0x80163910
+ void setSpeed(float speed); // 0x80163920
+ bool isDone(); // 0x80163930
+ };
+
+ class Anm_c {
+ public:
+ FrameCtrl_c *frameCtrlPtr;
+
+ AnmResHandler_c *resHandler; // ? 0x04
+ AnmResHandler_c::Thing *thing; // 0x08
+ u8 flags; // 0x0C - |1 = enabled successfully?
+
+ FrameCtrl_c frameCtrl; // 0x10
+
+ // too lazy to list the methods for this atm
+ // after IDA reverted all the changes I made to the DB this
+ // afternoon ...
+ };
+
class EmbedLayoutBase_c : public Base_c {
public:
EmbedLayoutBase_c();
@@ -2597,7 +2659,7 @@ namespace m2d {
nw4r::lyt::Layout layout; // 0x10 -- actually m2d::Layout_c but I'll add that later
nw4r::lyt::DrawInfo drawInfo; // 0x30
- void *unk_84; // 0x84 -- a ResAcc? referenced in Build()
+ ResAcc_c *resAccPtr; // 0x84 -- a ResAcc? referenced in Build()
float posX; // 0x88
float posY; // 0x8C
float clipX; // 0x90
@@ -2649,8 +2711,8 @@ namespace m2d {
void execAnimations();
ResAccLoader_c loader; // 0xAC
- void *brlanHandlers; // 0x180
- void *grpHandlers; // 0x184
+ AnmResHandler_c *brlanHandlers; // 0x180
+ Anm_c *grpHandlers; // 0x184
bool *animsEnabled; // 0x188
int brlanCount; // 0x18C
int grpCount; // 0x190