1
+ #pragma once
2
+
3
+ #include < Spore\App\IMessageListener.h>
4
+ #include < Spore\ArgScript\ICommand.h>
5
+ #include < Spore\Simulator\SubSystem\cStrategy.h>
6
+ #include < Spore\MathUtils.h>
7
+
8
+ // / Accesses the current instance of Simulator::cCinematicManager
9
+ #define CinematicManager (*Simulator::cCinematicManager::Get ())
10
+
11
+ namespace Simulator
12
+ {
13
+ class CinematicActionUnkBase
14
+ {
15
+ public:
16
+ virtual ~CinematicActionUnkBase () = 0 ;
17
+ virtual int AddRef () = 0;
18
+ virtual int Release () = 0;
19
+ };
20
+
21
+ typedef bool (*CinematicActionFunction_t)(Object* actionData, bool );
22
+
23
+ class CinematicAction
24
+ : public RefCountTemplate
25
+ , public CinematicActionUnkBase
26
+ {
27
+ public:
28
+ virtual ~CinematicAction ();
29
+ virtual int AddRef () override ;
30
+ virtual int Release () override ;
31
+
32
+ static CinematicActionFunction_t GetStartVignetteFunction ();
33
+
34
+ public:
35
+ // / For instance, CinematicVignetteAction
36
+ /* 0Ch */ ObjectPtr mActionData ;
37
+ /* 10h */ CinematicActionFunction_t mFunction ;
38
+ };
39
+ ASSERT_SIZE (CinematicAction, 0x14 );
40
+
41
+ namespace Addresses ( CinematicAction) {
42
+ DeclareAddress (StartVignetteFunction_ptr); // 0xAD3D50 0xAD3EF0
43
+ }
44
+
45
+
46
+ class cCinematicManager
47
+ : public App::IMessageListener
48
+ , public cStrategy
49
+ {
50
+ public:
51
+ static cCinematicManager* Get ();
52
+
53
+ /* 10h */ virtual void AddCommand (const char * commandName, ArgScript::ICommand* command);
54
+
55
+ void PlayCinematic (const char * cinematicName, int arg0, int arg1, int arg2, int arg3, int arg4);
56
+
57
+ public:
58
+ /* 20h */ char padding_20[0x3c8 - 0x20 ];
59
+ };
60
+ ASSERT_SIZE (cCinematicManager, 0x3C8 );
61
+
62
+ namespace Addresses ( cCinematicManager) {
63
+ DeclareAddress (Get); // 0xB3D430 0xB3D5D0
64
+ DeclareAddress (PlayCinematic); // 0xAE0480 0xAE08B0
65
+ }
66
+
67
+
68
+
69
+ class CinematicVignetteAction
70
+ : public Object
71
+ , public DefaultRefCounted
72
+ {
73
+ public:
74
+ enum class PositionType
75
+ {
76
+ None = 0 ,
77
+ Unk1 = 1 ,
78
+ Effect = 2 ,
79
+ ActorNest = 3 ,
80
+ ActorHut = 4 ,
81
+ ActorTribe = 5 ,
82
+ ActorCity = 6 ,
83
+ Object = 7 ,
84
+ Actor = 8 ,
85
+ NearestWater = 9 ,
86
+ NearestLand = 10
87
+ };
88
+
89
+ enum class OffsetMultiplier {
90
+ // / Uses the foot radius of the actor as an offset multiplier
91
+ FootprintRadius = 0 ,
92
+ // / Uses the max width of the target object as an offset multiplier
93
+ TargetWidth = 1 ,
94
+ // / Uses the height of the target object as an offset multiplier
95
+ TargetHeight = 2 ,
96
+ None = 3 ,
97
+ };
98
+
99
+ static const uint32_t TYPE = 0x55113D6 ;
100
+
101
+ virtual int AddRef () override ;
102
+ virtual int Release () override ;
103
+ virtual void * Cast (uint32_t type) const override ;
104
+
105
+ public:
106
+ // / Actor name
107
+ /* 0Ch */ uint32_t mActorId ;
108
+ // / Vignette identifier
109
+ /* 10h */ uint32_t mVignetteId ;
110
+ // / Vignette identifier
111
+ /* 14h */ ResourceKey mVignetteKey ;
112
+ // / Relative position (if no options specified, then relative to the actor)
113
+ /* 20h */ Math::Vector3 mPosition ;
114
+ /* 2Ch */ Math::Vector3 mFacingOffset ;
115
+ // / If not None, relative to a position
116
+ /* 38h */ PositionType mRelativePosType ; // Unk1
117
+ /* 3Ch */ uint32_t mRelativePosId ;
118
+ // / If not None, face a position with an optional offset mFacingOffset
119
+ /* 40h */ PositionType mFacingType ; // None
120
+ /* 44h */ uint32_t mFacingId ;
121
+ // / state does not wait for routing to finish
122
+ /* 48h */ bool mNoWait ;
123
+ /* 4Ch */ OffsetMultiplier mOffsetMultiplier ; // None
124
+ /* 50h */ uint32_t field_50; // -1
125
+ };
126
+ ASSERT_SIZE (CinematicVignetteAction, 0x54 );
127
+ }
0 commit comments