aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/aoapplication.h29
-rw-r--r--include/aocharmovie.h30
-rw-r--r--include/aomusicplayer.h18
-rw-r--r--include/aooptionsdialog.h4
-rw-r--r--include/aosfxplayer.h10
-rw-r--r--include/courtroom.h23
-rw-r--r--include/datatypes.h7
7 files changed, 99 insertions, 22 deletions
diff --git a/include/aoapplication.h b/include/aoapplication.h
index 44aef7a8..cff0afb4 100644
--- a/include/aoapplication.h
+++ b/include/aoapplication.h
@@ -74,6 +74,7 @@ public:
bool arup_enabled = false;
bool casing_alerts_enabled = false;
bool modcall_reason_enabled = false;
+ bool looping_sfx_support_enabled = false;
///////////////loading info///////////////////
@@ -94,9 +95,9 @@ public:
//////////////////versioning///////////////
- constexpr int get_release() const { return RELEASE; }
- constexpr int get_major_version() const { return MAJOR_VERSION; }
- constexpr int get_minor_version() const { return MINOR_VERSION; }
+ int get_release() const { return RELEASE; }
+ int get_major_version() const { return MAJOR_VERSION; }
+ int get_minor_version() const { return MINOR_VERSION; }
QString get_version_string();
///////////////////////////////////////////
@@ -146,6 +147,12 @@ public:
//Returns true if blank blips is enabled in config.ini and false otherwise
bool get_blank_blip();
+ //Returns true if looping sound effects are enabled in the config.ini
+ bool get_looping_sfx();
+
+ //Returns true if kill music on object is enabled in the config.ini
+ bool get_objectmusic();
+
//Returns the value of default_music in config.ini
int get_default_music();
@@ -257,6 +264,18 @@ public:
//Returns the sfx of p_char's p_emote
QString get_sfx_name(QString p_char, int p_emote);
+ //Returns if an emote loops it's SFX
+ QString get_sfx_looping(QString p_char, int p_emote);
+
+ //Returns if an emote has a frame specific SFX for it
+ QString get_frame_sfx_name(QString p_char, QString p_emote, int n_frame);
+
+ //Returns if an emote has a frame specific SFX for it
+ QString get_realization_frame(QString p_char, QString p_emote, int n_frame);
+
+ //Returns if an emote has a frame specific SFX for it
+ QString get_screenshake_frame(QString p_char, QString p_emote, int n_frame);
+
//Not in use
int get_sfx_delay(QString p_char, int p_emote);
@@ -299,8 +318,8 @@ public:
private:
const int RELEASE = 2;
- const int MAJOR_VERSION = 6;
- const int MINOR_VERSION = 1;
+ const int MAJOR_VERSION = 7;
+ const int MINOR_VERSION = 0;
QString current_theme = "default";
diff --git a/include/aocharmovie.h b/include/aocharmovie.h
index 7ef7da3f..94e242b5 100644
--- a/include/aocharmovie.h
+++ b/include/aocharmovie.h
@@ -6,9 +6,12 @@
#include <QTimer>
#include <QDebug>
#include <QImageReader>
+#include <QPainter>
+#include "include/aosfxplayer.h"
+#include "include/courtroom.h"
-class AOApplication;
+class AOApplication;
class AOCharMovie : public QLabel
{
Q_OBJECT
@@ -22,25 +25,41 @@ public:
void play_idle(QString p_char, QString p_emote);
void set_flipped(bool p_flipped) {m_flipped = p_flipped;}
-
+ void LoadImageWithStupidMethodForFlipSupport(QImage image);
void stop();
void move(int ax, int ay);
-
void combo_resize(int w, int h);
-
+ void play_frame_sfx();
+
+ void sfx_two_network_boogaloo();
+ void screenshake_two_network_boogaloo();
+ void realization_two_network_boogaloo();
+
+ AOSfxPlayer *frame_specific_sfx_player;
+ Courtroom *mycourtroom;
+ QString frame_sfx_hellstring = "";
+ QString frame_screenshake_hellstring = "";
+ QString frame_realization_hellstring = "";
+ bool use_networked_framehell = false;
private:
AOApplication *ao_app;
QMovie *m_movie;
QVector<QImage> movie_frames;
QTimer *preanim_timer;
+ QTimer *ticker;
+ QString last_path;
+ QString current_emote;
+ QString current_char;
const int time_mod = 62;
// These are the X and Y values before they are fixed based on the sprite's width.
int x = 0;
int y = 0;
+ int default_w;
+ int default_h;
bool m_flipped = false;
@@ -50,8 +69,7 @@ signals:
void done();
private slots:
- void frame_change(int n_frame);
void timer_done();
+ void movie_ticker();
};
-
#endif // AOCHARMOVIE_H
diff --git a/include/aomusicplayer.h b/include/aomusicplayer.h
index 560a7f90..54f3b5f0 100644
--- a/include/aomusicplayer.h
+++ b/include/aomusicplayer.h
@@ -7,22 +7,32 @@
#include <QWidget>
#include <string.h>
#include <QDebug>
+#include <QTimer>
+#include <QObject>
-class AOMusicPlayer
+class AOMusicPlayer : public QObject
{
+ Q_OBJECT
public:
AOMusicPlayer(QWidget *parent, AOApplication *p_ao_app);
- ~AOMusicPlayer();
-
+ virtual ~AOMusicPlayer();
void play(QString p_song);
void set_volume(int p_value);
+ void kill_loop();
+ QString get_path();
+
private:
QWidget *m_parent;
AOApplication *ao_app;
-
+ QTimer *music_loop_timer;
int m_volume = 0;
+ QString f_path;
+
HSTREAM m_stream;
+
+private slots:
+ void restart_loop();
};
#endif // AOMUSICPLAYER_H
diff --git a/include/aooptionsdialog.h b/include/aooptionsdialog.h
index a65e3f59..03b1e71e 100644
--- a/include/aooptionsdialog.h
+++ b/include/aooptionsdialog.h
@@ -80,6 +80,10 @@ private:
QLabel *ui_bliprate_lbl;
QCheckBox *ui_blank_blips_cb;
QLabel *ui_blank_blips_lbl;
+ QLabel *ui_loopsfx_lbl;
+ QCheckBox *ui_loopsfx_cb;
+ QLabel *ui_objectmusic_lbl;
+ QCheckBox *ui_objectmusic_cb;
QDialogButtonBox *ui_settings_buttons;
QWidget *ui_casing_tab;
diff --git a/include/aosfxplayer.h b/include/aosfxplayer.h
index 30cbe9d3..5c6f1088 100644
--- a/include/aosfxplayer.h
+++ b/include/aosfxplayer.h
@@ -7,22 +7,28 @@
#include <QWidget>
#include <string.h>
#include <QDebug>
+#include <QTimer>
-class AOSfxPlayer
+class AOSfxPlayer : public QObject
{
+ Q_OBJECT
public:
AOSfxPlayer(QWidget *parent, AOApplication *p_ao_app);
void play(QString p_sfx, QString p_char = "", QString shout = "");
void stop();
void set_volume(int p_volume);
-
+ void setLooping(bool is_looping);
private:
QWidget *m_parent;
AOApplication *ao_app;
+ QTimer *sfx_loop_timer;
int m_volume = 0;
+ bool looping_sfx = false;
HSTREAM m_stream;
+private slots:
+ void restart_loop();
};
#endif // AOSFXPLAYER_H
diff --git a/include/courtroom.h b/include/courtroom.h
index ec9f9ef0..3f93e4c5 100644
--- a/include/courtroom.h
+++ b/include/courtroom.h
@@ -25,6 +25,7 @@
#include "datatypes.h"
#include "debug_functions.h"
#include "chatlogpiece.h"
+#include "aocharmovie.h"
#include <QMainWindow>
#include <QLineEdit>
@@ -48,11 +49,15 @@
#include <QFont>
#include <QInputDialog>
#include <QFileDialog>
+#include <QWidget>
+#include <QPropertyAnimation>
+#include <QTransform>
+#include <QParallelAnimationGroup>
#include <stack>
class AOApplication;
-
+class AOCharMovie;
class Courtroom : public QMainWindow
{
Q_OBJECT
@@ -63,7 +68,6 @@ public:
void append_evidence(evi_type p_evi){evidence_list.append(p_evi);}
void append_music(QString f_music){music_list.append(f_music);}
void append_area(QString f_area){area_list.append(f_area);}
-
void fix_last_area()
{
if (area_list.size() > 0)
@@ -210,6 +214,8 @@ public:
void announce_case(QString title, bool def, bool pro, bool jud, bool jur, bool steno);
void check_connection_received();
+ void doScreenShake();
+ void doRealization();
~Courtroom();
@@ -227,7 +233,10 @@ private:
bool first_message_sent = false;
int maximumMessages = 0;
-
+ QPropertyAnimation *screenshake_animation;
+ QPropertyAnimation *chatbox_screenshake_animation;
+ QParallelAnimationGroup *screenshake_group;
+ QImageReader *frame_emote_checker;
// This is for inline message-colouring.
enum INLINE_COLOURS {
@@ -318,7 +327,7 @@ private:
//every time point in char.inis times this equals the final time
const int time_mod = 40;
- static const int chatmessage_size = 23;
+ static const int chatmessage_size = 28;
QString m_chatmessage[chatmessage_size];
bool chatmessage_is_empty = false;
@@ -352,6 +361,7 @@ private:
int objection_state = 0;
int realization_state = 0;
+ int screenshake_state = 0;
int text_color = 0;
bool is_presenting_evidence = false;
@@ -390,6 +400,9 @@ private:
AOMusicPlayer *music_player;
AOSfxPlayer *sfx_player;
+ AOSfxPlayer *misc_sfx_player;
+ AOSfxPlayer *frame_emote_sfx_player;
+ AOSfxPlayer *pair_frame_emote_sfx_player;
AOSfxPlayer *objection_player;
AOBlipPlayer *blip_player;
@@ -478,6 +491,7 @@ private:
AOButton *ui_custom_objection;
AOButton *ui_realization;
+ AOButton *ui_screenshake;
AOButton *ui_mute;
AOButton *ui_defense_plus;
@@ -605,6 +619,7 @@ private slots:
void on_custom_objection_clicked();
void on_realization_clicked();
+ void on_screenshake_clicked();
void on_mute_clicked();
void on_pair_clicked();
diff --git a/include/datatypes.h b/include/datatypes.h
index aaa5de52..1b76f725 100644
--- a/include/datatypes.h
+++ b/include/datatypes.h
@@ -100,7 +100,12 @@ enum CHAT_MESSAGE
SELF_OFFSET,
OTHER_OFFSET,
OTHER_FLIP,
- NONINTERRUPTING_PRE
+ NONINTERRUPTING_PRE,
+ LOOPING_SFX,
+ SCREENSHAKE,
+ FRAME_SCREENSHAKE,
+ FRAME_REALIZATION,
+ FRAME_SFX
};
enum COLOR