-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdolmexicastoryscreen.h
265 lines (219 loc) · 14.3 KB
/
dolmexicastoryscreen.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
#pragma once
#include <prism/stlutil.h>
#include <prism/wrapper.h>
#include <prism/geometry.h>
#include <prism/mugenanimationhandler.h>
#include <prism/mugensoundfilereader.h>
using namespace prism;
#define DOLMEXICA_STORY_TEXT_BACKGROUND_DEFAULT_Z_DELTA -2
#define DOLMEXICA_STORY_TEXT_FACE_DEFAULT_Z_DELTA -1
#define DOLMEXICA_STORY_TEXT_CONTINUE_DEFAULT_Z_DELTA -1
struct RegisteredMugenStateMachine;
typedef struct {
int mID;
MugenAnimationHandlerElement* mAnimationElement;
int mIsBoundToStage;
int mHasShadow;
double mShadowBasePositionY;
MugenAnimationHandlerElement* mShadowAnimationElement;
int mIsDeleted;
} StoryAnimation;
typedef struct {
int mID;
Position mPosition;
int mHasTextSound;
Vector2DI mTextSound;
int mTextSoundFrequency;
Position2D mTextOffset;
int mTextID;
int mHasBackground;
Position mBackgroundOffset;
int mIsBackgroundAnimationOwned;
MugenAnimation* mBackgroundAnimation;
MugenAnimationHandlerElement* mBackgroundAnimationElement;
int mHasFace;
Position mFaceOffset;
int mIsFaceAnimationOwned;
MugenAnimation* mFaceAnimation;
MugenAnimationHandlerElement* mFaceAnimationElement;
int mHasContinue;
Position mContinueOffset;
int mIsContinueAnimationOwned;
MugenAnimation* mContinueAnimation;
MugenAnimationHandlerElement* mContinueAnimationElement;
int mHasContinueSound;
Vector2DI mContinueSound;
int mHasName;
Position2D mNameOffset;
int mNameID;
int mGoesToNextState;
int mNextState;
int mIsLockedOnToCharacter;
Position2D mLockOffset;
Position* mLockCharacterPositionReference;
int mLockCharacterIsBoundToStage;
int mHasFinished;
int mIsDisabled;
} StoryText;
typedef struct {
StoryAnimation mAnimation;
MugenSpriteFile mSprites;
MugenAnimations mAnimations;
std::string mName;
} StoryCharacter;
struct StoryInstance {
std::unordered_map<int, StoryAnimation> mStoryAnimations;
std::unordered_map<int, StoryText> mStoryTexts;
std::unordered_map<int, StoryCharacter> mStoryCharacters;
std::unordered_map<int, int> mIntVars;
std::unordered_map<int, double> mFloatVars;
std::unordered_map<int, std::string> mStringVars;
std::unordered_map<std::string, int> mTextNames;
RegisteredMugenStateMachine* mRegisteredStateMachine;
int mIsScheduledForDeletion;
StoryInstance* mParent;
};
Screen* getDolmexicaStoryScreen();
ActorBlueprint getDolmexicaStoryActor();
void setDolmexicaStoryScreenFileAndPrepareScreen(const char* tPath);
MugenSounds* getDolmexicaStorySounds();
int isStoryCommandActive(const char* tCommand);
void addDolmexicaStoryAnimation(StoryInstance* tInstance, int tID, int tAnimation, const Position2D& tPosition);
void removeDolmexicaStoryAnimation(StoryInstance* tInstance, int tID);
int getDolmexicaStoryAnimationIsLooping(StoryInstance* tInstance, int tID);
void setDolmexicaStoryAnimationLooping(StoryInstance* tInstance, int tID, int tIsLooping);
int getDolmexicaStoryAnimationIsBoundToStage(StoryInstance* tInstance, int tID);
void setDolmexicaStoryAnimationBoundToStage(StoryInstance* tInstance, int tID, int tIsBoundToStage);
int getDolmexicaStoryAnimationHasShadow(StoryInstance* tInstance, int tID);
void setDolmexicaStoryAnimationShadow(StoryInstance* tInstance, int tID, double tBasePositionY);
int getDolmexicaStoryAnimationAnimation(StoryInstance* tInstance, int tID);
void changeDolmexicaStoryAnimation(StoryInstance* tInstance, int tID, int tAnimation);
void setDolmexicaStoryAnimationPositionX(StoryInstance* tInstance, int tID, double tX);
void setDolmexicaStoryAnimationPositionY(StoryInstance* tInstance, int tID, double tY);
void addDolmexicaStoryAnimationPositionX(StoryInstance* tInstance, int tID, double tX);
void addDolmexicaStoryAnimationPositionY(StoryInstance* tInstance, int tID, double tY);
void setDolmexicaStoryAnimationStagePositionX(StoryInstance* tInstance, int tID, double tX);
void setDolmexicaStoryAnimationStagePositionY(StoryInstance* tInstance, int tID, double tY);
void setDolmexicaStoryAnimationScaleX(StoryInstance* tInstance, int tID, double tX);
void setDolmexicaStoryAnimationScaleY(StoryInstance* tInstance, int tID, double tY);
void setDolmexicaStoryAnimationIsFacingRight(StoryInstance* tInstance, int tID, int tIsFacingRight);
void setDolmexicaStoryAnimationAngle(StoryInstance* tInstance, int tID, double tAngle);
void addDolmexicaStoryAnimationAngle(StoryInstance* tInstance, int tID, double tAngle);
void setDolmexicaStoryAnimationColor(StoryInstance* tInstance, int tID, const Vector3D& tColor);
void setDolmexicaStoryAnimationOpacity(StoryInstance* tInstance, int tID, double tOpacity);
void addDolmexicaStoryText(StoryInstance* tInstance, int tID, const char* tText, const Vector3DI& tFont, double tScale, const Position2D& tBasePosition, const Position2D& tTextOffset, double tTextBoxWidth);
void removeDolmexicaStoryText(StoryInstance* tInstance, int tID);
const char* getDolmexicaStoryTextText(StoryInstance* tInstance, int tID);
const char* getDolmexicaStoryTextDisplayedText(StoryInstance* tInstance, int tID);
const char* getDolmexicaStoryTextNameText(StoryInstance* tInstance, int tID);
int isDolmexicaStoryTextVisible(StoryInstance* tInstance, int tID);
void setDolmexicaStoryTextBackground(StoryInstance* tInstance, int tID, const Vector2DI& tSprite, const Position& tOffset, const Vector2D& tScale);
void setDolmexicaStoryTextBackground(StoryInstance* tInstance, int tID, int tAnimation, const Position& tOffset, const Vector2D& tScale);
void setDolmexicaStoryTextFace(StoryInstance* tInstance, int tID, const Vector2DI& tSprite, const Position& tOffset, const Vector2D& tScale);
void setDolmexicaStoryTextFace(StoryInstance* tInstance, int tID, int tAnimation, const Position& tOffset, const Vector2D& tScale);
void setDolmexicaStoryTextName(StoryInstance* tInstance, int tID, const char* tText, const Vector3DI& tFont, const Position2D& tOffset, double tScale);
void setDolmexicaStoryTextContinue(StoryInstance* tInstance, int tID, const Vector2DI& tSprite, const Position& tOffset, const Vector2D& tScale);
void setDolmexicaStoryTextContinue(StoryInstance* tInstance, int tID, int tAnimation, const Position& tOffset, const Vector2D& tScale);
double getDolmexicaStoryTextBasePositionX(StoryInstance* tInstance, int tID);
double getDolmexicaStoryTextBasePositionY(StoryInstance* tInstance, int tID);
void setDolmexicaStoryTextBasePosition(StoryInstance* tInstance, int tID, const Position2D& tPosition);
void setDolmexicaStoryTextText(StoryInstance* tInstance, int tID, const char* tText);
void setDolmexicaStoryTextFont(StoryInstance* tInstance, int tID, const Vector3DI& tFont);
void setDolmexicaStoryTextScale(StoryInstance* tInstance, int tID, double tScale);
void setDolmexicaStoryTextSound(StoryInstance* tInstance, int tID, const Vector2DI& tSound);
void setDolmexicaStoryTextSoundFrequency(StoryInstance* tInstance, int tID, int tSoundFrequency);
void setDolmexicaStoryTextTextOffset(StoryInstance* tInstance, int tID, const Position2D& tOffset);
void setDolmexicaStoryTextBackgroundSprite(StoryInstance* tInstance, int tID, const Vector2DI& tSprite);
void setDolmexicaStoryTextBackgroundOffset(StoryInstance* tInstance, int tID, const Position& tOffset);
void setDolmexicaStoryTextBackgroundScale(StoryInstance* tInstance, int tID, const Vector2D& tScale);
void setDolmexicaStoryTextFaceSprite(StoryInstance* tInstance, int tID, const Vector2DI& tSprite);
void setDolmexicaStoryTextFaceOffset(StoryInstance* tInstance, int tID, const Position& tOffset);
void setDolmexicaStoryTextFaceScale(StoryInstance* tInstance, int tID, const Vector2D& tScale);
void setDolmexicaStoryTextContinueAnimation(StoryInstance* tInstance, int tID, int tAnimation);
void setDolmexicaStoryTextContinueSound(StoryInstance* tInstance, int tID, const Vector2DI& tSound);
void setDolmexicaStoryTextContinueOffset(StoryInstance* tInstance, int tID, const Position& tOffset);
void setDolmexicaStoryTextContinueScale(StoryInstance* tInstance, int tID, const Vector2D& tScale);
void setDolmexicaStoryTextNameText(StoryInstance* tInstance, int tID, const char* tText);
void setDolmexicaStoryTextNameFont(StoryInstance* tInstance, int tID, const Vector3DI& tFont);
void setDolmexicaStoryTextNameOffset(StoryInstance* tInstance, int tID, const Position2D& tOffset);
void setDolmexicaStoryTextNameScale(StoryInstance* tInstance, int tID, double tScale);
int getDolmexicaStoryTextNextState(StoryInstance* tInstance, int tID);
void setDolmexicaStoryTextNextState(StoryInstance* tInstance, int tID, int tNextState);
void setDolmexicaStoryTextLockToCharacter(StoryInstance* tInstance, int tID, int tCharacterID, const Position2D& tOffset);
void setDolmexicaStoryTextLockToCharacter(StoryInstance* tInstance, int tID, int tCharacterID, const Position2D& tOffset, int tHelperID);
void setDolmexicaStoryTextInactive(StoryInstance* tInstance, int tID);
int isDolmexicaStoryTextBuiltUp(StoryInstance* tInstance, int tID);
void setDolmexicaStoryTextBuiltUp(StoryInstance* tInstance, int tID);
void setDolmexicaStoryTextPositionX(StoryInstance* tInstance, int tID, double tX);
void setDolmexicaStoryTextPositionY(StoryInstance* tInstance, int tID, double tY);
void addDolmexicaStoryTextPositionX(StoryInstance* tInstance, int tID, double tX);
void addDolmexicaStoryTextPositionY(StoryInstance* tInstance, int tID, double tY);
void setDolmexicaStoryIDName(StoryInstance* tInstance, int tID, const std::string& tName);
int getDolmexicaStoryTextIDFromName(StoryInstance* tInstance, const std::string& tName);
void changeDolmexicaStoryState(StoryInstance* tInstance, int tNextState);
void changeDolmexicaStoryStateOutsideStateHandler(StoryInstance* tInstance, int tNextState);
void endDolmexicaStoryboard(StoryInstance* tInstance, int tNextStoryState);
int getDolmexicaStoryTimeInState(StoryInstance* tInstance);
int getDolmexicaStoryStateNumber(StoryInstance* tInstance);
int getDolmexicaStoryAnimationTimeLeft(StoryInstance* tInstance, int tID);
double getDolmexicaStoryAnimationPositionX(StoryInstance* tInstance, int tID);
double getDolmexicaStoryAnimationPositionY(StoryInstance* tInstance, int tID);
double getDolmexicaStoryAnimationScreenPositionX(StoryInstance* tInstance, int tID);
double getDolmexicaStoryAnimationScreenPositionY(StoryInstance* tInstance, int tID);
double getDolmexicaStoryAnimationStagePositionX(StoryInstance* tInstance, int tID);
double getDolmexicaStoryAnimationStagePositionY(StoryInstance* tInstance, int tID);
void addDolmexicaStoryCharacter(StoryInstance* tInstance, int tID, const char* tName, int tPreferredPalette, int tAnimation, const Position2D& tPosition);
void removeDolmexicaStoryCharacter(StoryInstance* tInstance, int tID);
int getDolmexicaStoryCharacterIsBoundToStage(StoryInstance* tInstance, int tID);
void setDolmexicaStoryCharacterBoundToStage(StoryInstance* tInstance, int tID, int tIsBoundToStage);
int getDolmexicaStoryCharacterHasShadow(StoryInstance* tInstance, int tID);
void setDolmexicaStoryCharacterShadow(StoryInstance* tInstance, int tID, double tBasePositionY);
int getDolmexicaStoryCharacterAnimation(StoryInstance* tInstance, int tID);
void changeDolmexicaStoryCharacterAnimation(StoryInstance* tInstance, int tID, int tAnimation);
double getDolmexicaStoryCharacterPositionX(StoryInstance* tInstance, int tID);
double getDolmexicaStoryCharacterPositionY(StoryInstance* tInstance, int tID);
double getDolmexicaStoryCharacterScreenPositionX(StoryInstance* tInstance, int tID);
double getDolmexicaStoryCharacterScreenPositionY(StoryInstance* tInstance, int tID);
double getDolmexicaStoryCharacterStagePositionX(StoryInstance* tInstance, int tID);
double getDolmexicaStoryCharacterStagePositionY(StoryInstance* tInstance, int tID);
void setDolmexicaStoryCharacterPositionX(StoryInstance* tInstance, int tID, double tX);
void setDolmexicaStoryCharacterPositionY(StoryInstance* tInstance, int tID, double tY);
void setDolmexicaStoryCharacterPositionZ(StoryInstance* tInstance, int tID, double tZ);
void addDolmexicaStoryCharacterPositionX(StoryInstance* tInstance, int tID, double tX);
void addDolmexicaStoryCharacterPositionY(StoryInstance* tInstance, int tID, double tY);
void setDolmexicaStoryCharacterStagePositionX(StoryInstance* tInstance, int tID, double tX);
void setDolmexicaStoryCharacterStagePositionY(StoryInstance* tInstance, int tID, double tY);
void setDolmexicaStoryCharacterScaleX(StoryInstance* tInstance, int tID, double tX);
void setDolmexicaStoryCharacterScaleY(StoryInstance* tInstance, int tID, double tY);
void setDolmexicaStoryCharacterIsFacingRight(StoryInstance* tInstance, int tID, int tIsFacingRight);
void setDolmexicaStoryCharacterColor(StoryInstance* tInstance, int tID, const Vector3D& tColor);
void setDolmexicaStoryCharacterOpacity(StoryInstance* tInstance, int tID, double tOpacity);
void setDolmexicaStoryCharacterAngle(StoryInstance* tInstance, int tID, double tAngle);
void addDolmexicaStoryCharacterAngle(StoryInstance* tInstance, int tID, double tAngle);
int getDolmexicaStoryCharacterTimeLeft(StoryInstance* tInstance, int tID);
int getDolmexicaStoryIntegerVariable(StoryInstance* tInstance, int tID);
void setDolmexicaStoryIntegerVariable(StoryInstance* tInstance, int tID, int tValue);
void addDolmexicaStoryIntegerVariable(StoryInstance* tInstance, int tID, int tValue);
double getDolmexicaStoryFloatVariable(StoryInstance* tInstance, int tID);
void setDolmexicaStoryFloatVariable(StoryInstance* tInstance, int tID, double tValue);
void addDolmexicaStoryFloatVariable(StoryInstance* tInstance, int tID, double tValue);
std::string getDolmexicaStoryStringVariable(StoryInstance* tInstance, int tID);
void setDolmexicaStoryStringVariable(StoryInstance* tInstance, int tID, const std::string& tValue);
void addDolmexicaStoryStringVariable(StoryInstance* tInstance, int tID, const std::string& tValue);
void addDolmexicaStoryStringVariable(StoryInstance* tInstance, int tID, int tValue);
StoryInstance* getDolmexicaStoryRootInstance();
StoryInstance* getDolmexicaStoryInstanceParent(StoryInstance* tInstance);
StoryInstance* getDolmexicaStoryHelperInstance(int tID);
void addDolmexicaStoryHelper(int tID, int tState, StoryInstance* tParent);
int getDolmexicaStoryGetHelperAmount(int tID);
void removeDolmexicaStoryHelper(int tID);
void destroyDolmexicaStoryHelper(StoryInstance* tInstance);
int getDolmexicaStoryIDFromString(const char* tString, StoryInstance* tInstance);
void playDolmexicaStoryMusic(const std::string& tPath);
void stopDolmexicaStoryMusic();
void pauseDolmexicaStoryMusic();
void resumeDolmexicaStoryMusic();
void setDolmexicaStoryCameraFocusX(double x);
void setDolmexicaStoryCameraFocusY(double y);
void setDolmexicaStoryCameraZoom(double tScale);
int getDolmexicaStoryCoordinateP();