aboutsummaryrefslogtreecommitdiff
path: root/include/aolayer.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/aolayer.h')
-rw-r--r--include/aolayer.h46
1 files changed, 29 insertions, 17 deletions
diff --git a/include/aolayer.h b/include/aolayer.h
index 6265cec6..8510edfb 100644
--- a/include/aolayer.h
+++ b/include/aolayer.h
@@ -10,6 +10,27 @@
class AOApplication;
+// "Brief" explanation of what the hell this is:
+//
+// AOLayer handles all animations both inside and outside
+// the viewport. It was originally devised as a layering
+// system, but turned into a full refactor of the existing
+// animation code.
+//
+// AOLayer has six subclasses, all of which differ mainly in
+// how they handle path resolution.
+//
+// - BackgroundLayer: self-explanatory, handles files found in base/background
+// - CharLayer: handles all the "wonderful" quirks of character path resolution
+// - SplashLayer: handles elements that can either be provided by a misc/ directory
+// or by the theme - speedlines, shouts, WT/CE, et cetera
+// - EffectLayer: this is basically a dummy layer since effects do their own wonky
+// path resolution in a different file
+// - InterfaceLayer: handles UI elements like the chat arrow and the music display
+// - StickerLayer: Crystalwarrior really wanted this. Handles "stickers," whatever those are.
+//
+// For questions comments or concerns, bother someone else
+
class AOLayer : public QLabel {
Q_OBJECT
@@ -24,6 +45,11 @@ public:
bool play_once = false; // Whether to loop this animation or not
bool cull_image = true; // if we're done playing this animation, should we
// hide it? also controls durational culling
+ // Are we loading this from the same frame we left off on?
+ bool continuous = false;
+ // Whether or not to forcibly bypass the simple check done by start_playback
+ // and use the existent value of continuous instead
+ bool force_continuous = false;
Qt::TransformationMode transform_mode = Qt::FastTransformation; // transformation mode to use for this image
bool stretch = false; // Should we stretch/squash this image to fill the screen?
@@ -72,7 +98,7 @@ protected:
QElapsedTimer actual_time;
// Usually used to turn seconds into milliseconds such as for [Time] tag in
- // char.ini
+ // char.ini (which is no longer used)
const int tick_ms = 60;
// These are the X and Y values before they are fixed based on the sprite's
@@ -91,12 +117,6 @@ protected:
int speed = 100;
bool m_flipped = false;
- // Are we loading this from the same frame we left off on? TODO: actually make
- // this work
- bool continuous = false;
- // Whether or not to forcibly bypass the simple check done by start_playback
- // and use the existent value of continuous instead
- bool force_continuous = false;
int duration = 0;
@@ -129,14 +149,6 @@ public:
void load_image(QString p_filename);
};
-class ForegroundLayer : public AOLayer {
- Q_OBJECT
-public:
- ForegroundLayer(QWidget *p_parent, AOApplication *p_ao_app);
- QString miscname; //'misc' folder to search. we fetch this based on p_charname below
- void load_image(QString p_filename, QString p_charname);
-};
-
class CharLayer : public AOLayer {
Q_OBJECT
public:
@@ -191,10 +203,10 @@ signals:
void play_sfx(QString sfx);
};
-class InterjectionLayer : public AOLayer {
+class SplashLayer : public AOLayer {
Q_OBJECT
public:
- InterjectionLayer(QWidget *p_parent, AOApplication *p_ao_app);
+ SplashLayer(QWidget *p_parent, AOApplication *p_ao_app);
void load_image(QString p_filename, QString p_charname, QString p_miscname);
};