From 3c0cedbe922c9fcacd0d171423f83e375f66e178 Mon Sep 17 00:00:00 2001 From: iamgoofball Date: Fri, 18 Jan 2019 19:08:56 -0800 Subject: Add screenshake, frame-specific effects, looping SFX, and clientside music looping Committed by patch since Goof is currently banned on GitHub for no good reason. --- include/aoapplication.h | 29 ++++++++++++++++++++++++----- include/aocharmovie.h | 30 ++++++++++++++++++++++++------ include/aomusicplayer.h | 18 ++++++++++++++---- include/aooptionsdialog.h | 4 ++++ include/aosfxplayer.h | 10 ++++++++-- include/courtroom.h | 23 +++++++++++++++++++---- include/datatypes.h | 7 ++++++- 7 files changed, 99 insertions(+), 22 deletions(-) (limited to 'include') 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 #include #include +#include +#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 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 #include #include +#include +#include -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 #include #include +#include -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 #include @@ -48,11 +49,15 @@ #include #include #include +#include +#include +#include +#include #include 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 -- cgit From 248444307ff7cbe87ec4fe4024073cddb999dabc Mon Sep 17 00:00:00 2001 From: iamgoofball Date: Fri, 18 Jan 2019 22:05:21 -0800 Subject: Fix bug with simultaneous shakes --- include/aoapplication.h | 2 +- include/courtroom.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/aoapplication.h b/include/aoapplication.h index cff0afb4..2ae1655e 100644 --- a/include/aoapplication.h +++ b/include/aoapplication.h @@ -319,7 +319,7 @@ public: private: const int RELEASE = 2; const int MAJOR_VERSION = 7; - const int MINOR_VERSION = 0; + const int MINOR_VERSION = 1; QString current_theme = "default"; diff --git a/include/courtroom.h b/include/courtroom.h index 3f93e4c5..7d2a5513 100644 --- a/include/courtroom.h +++ b/include/courtroom.h @@ -124,7 +124,7 @@ public: //reads theme inis and sets size and pos based on the identifier void set_size_and_pos(QWidget *p_widget, QString p_identifier); - + QPoint get_theme_pos(QString p_identifier); //sets status as taken on character with cid n_char and places proper shading on charselect void set_taken(int n_char, bool p_taken); -- cgit From 10436992148e2342e6bd563d1acfb684f225aa30 Mon Sep 17 00:00:00 2001 From: iamgoofball Date: Sat, 19 Jan 2019 21:01:19 -0800 Subject: Suffix-independent Music, Mod Music List, looping bugfixes, easter eggs, etc. --- include/aomusicplayer.h | 1 + include/courtroom.h | 10 +++------- 2 files changed, 4 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/aomusicplayer.h b/include/aomusicplayer.h index 54f3b5f0..24ea0c57 100644 --- a/include/aomusicplayer.h +++ b/include/aomusicplayer.h @@ -21,6 +21,7 @@ public: void kill_loop(); QString get_path(); + bool enable_looping = true; private: QWidget *m_parent; diff --git a/include/courtroom.h b/include/courtroom.h index 7d2a5513..c76e4a1f 100644 --- a/include/courtroom.h +++ b/include/courtroom.h @@ -68,14 +68,10 @@ 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() + void handle_failed_login(); + void reset_music_list() { - if (area_list.size() > 0) - { - QString malplaced = area_list.last(); - area_list.removeLast(); - append_music(malplaced); - } + music_list.clear(); } void arup_append(int players, QString status, QString cm, QString locked) -- cgit From debd386a7176327d481470621a7a3a65cd715f2e Mon Sep 17 00:00:00 2001 From: iamgoofball Date: Sun, 20 Jan 2019 21:06:21 -0800 Subject: Bugfixes and blip speeds --- include/courtroom.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/courtroom.h b/include/courtroom.h index c76e4a1f..b746c6ac 100644 --- a/include/courtroom.h +++ b/include/courtroom.h @@ -251,7 +251,7 @@ private: bool message_is_centered = false; int current_display_speed = 3; - int message_display_speed[7] = {30, 40, 50, 60, 75, 100, 120}; + int message_display_speed[7] = {10, 20, 30, 40, 50, 60, 75}; // This is for checking if the character should start talking again // when an inline blue text ends. -- cgit From a7a614482e379ad13f8e0ca1e7f3e31c33bb1c21 Mon Sep 17 00:00:00 2001 From: iamgoofball Date: Mon, 21 Jan 2019 15:45:51 -0800 Subject: final commit --- include/aoapplication.h | 4 ++++ include/aocharmovie.h | 1 + include/aooptionsdialog.h | 2 ++ 3 files changed, 7 insertions(+) (limited to 'include') diff --git a/include/aoapplication.h b/include/aoapplication.h index 2ae1655e..7a5e6339 100644 --- a/include/aoapplication.h +++ b/include/aoapplication.h @@ -166,6 +166,10 @@ public: // from the config.ini. bool is_discord_enabled(); + // Returns the value of whether shaking and flashing should be enabled. + // from the config.ini. + bool is_shakeandflash_enabled(); + // Returns the value of the maximum amount of lines the IC chatlog // may contain, from config.ini. int get_max_log_size(); diff --git a/include/aocharmovie.h b/include/aocharmovie.h index 94e242b5..6c127a66 100644 --- a/include/aocharmovie.h +++ b/include/aocharmovie.h @@ -64,6 +64,7 @@ private: bool m_flipped = false; bool play_once = true; + bool apng = false; signals: void done(); diff --git a/include/aooptionsdialog.h b/include/aooptionsdialog.h index 03b1e71e..175b8044 100644 --- a/include/aooptionsdialog.h +++ b/include/aooptionsdialog.h @@ -55,6 +55,8 @@ private: QLineEdit *ui_ms_textbox; QLabel *ui_discord_lbl; QCheckBox *ui_discord_cb; + QLabel *ui_epilepsy_lbl; + QCheckBox *ui_epilepsy_cb; QWidget *ui_callwords_tab; QWidget *ui_callwords_widget; -- cgit From 13bc82094f76011eef371ece3b3894d7cc20eaf9 Mon Sep 17 00:00:00 2001 From: iamgoofball Date: Wed, 23 Jan 2019 00:14:47 -0800 Subject: >>>>multi-threading the frame sfx/screenshake/flashes --- include/aoapplication.h | 5 +++++ include/courtroom.h | 24 +++++++++++++++++------- 2 files changed, 22 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/aoapplication.h b/include/aoapplication.h index 7a5e6339..22c6c23c 100644 --- a/include/aoapplication.h +++ b/include/aoapplication.h @@ -23,6 +23,11 @@ #include #include +#include +#include +#include +#include + class NetworkManager; class Lobby; class Courtroom; diff --git a/include/courtroom.h b/include/courtroom.h index b746c6ac..1c739b8f 100644 --- a/include/courtroom.h +++ b/include/courtroom.h @@ -40,7 +40,7 @@ #include #include #include - +#include #include #include #include @@ -53,7 +53,11 @@ #include #include #include - +#include +#include +#include +#include +#include #include class AOApplication; @@ -69,6 +73,16 @@ public: void append_music(QString f_music){music_list.append(f_music);} void append_area(QString f_area){area_list.append(f_area);} void handle_failed_login(); + QString threading_sfx = ""; + QString threading_shake = ""; + QString threading_flash = ""; + QString threading_prefix = ""; + //cid and this may differ in cases of ini-editing + QString current_char = ""; + int current_emote = 0; + AOApplication *ao_app; + void mt_pre_framegetter(int frameNumber); + void mt_framegetter(int frameNumber); void reset_music_list() { music_list.clear(); @@ -216,7 +230,6 @@ public: ~Courtroom(); private: - AOApplication *ao_app; int m_courtroom_width = 714; int m_courtroom_height = 668; @@ -232,7 +245,7 @@ private: QPropertyAnimation *screenshake_animation; QPropertyAnimation *chatbox_screenshake_animation; QParallelAnimationGroup *screenshake_group; - QImageReader *frame_emote_checker; + QMovie *frame_emote_checker; // This is for inline message-colouring. enum INLINE_COLOURS { @@ -352,8 +365,6 @@ private: //character id, which index of the char_list the player is int m_cid = -1; - //cid and this may differ in cases of ini-editing - QString current_char = ""; int objection_state = 0; int realization_state = 0; @@ -373,7 +384,6 @@ private: const int button_height = 60; int current_emote_page = 0; - int current_emote = 0; int emote_columns = 5; int emote_rows = 2; int max_emotes_on_page = 10; -- cgit From 906c9016bb4660eb0445a3345a55ede959c3cb96 Mon Sep 17 00:00:00 2001 From: iamgoofball Date: Wed, 23 Jan 2019 00:58:30 -0800 Subject: Multithreaded character generation TODO: fix loading screen --- include/courtroom.h | 22 ++++++++++------------ include/lobby.h | 3 ++- 2 files changed, 12 insertions(+), 13 deletions(-) (limited to 'include') diff --git a/include/courtroom.h b/include/courtroom.h index 1c739b8f..f6124127 100644 --- a/include/courtroom.h +++ b/include/courtroom.h @@ -58,6 +58,7 @@ #include #include #include +#include #include class AOApplication; @@ -81,6 +82,15 @@ public: QString current_char = ""; int current_emote = 0; AOApplication *ao_app; + //abstract widget to hold char buttons + QWidget *ui_char_buttons; + QVector char_list; + QVector evidence_list; + QVector music_list; + QVector area_list; + QSignalMapper *char_button_mapper; + QVector ui_char_button_list; + QVector ui_char_button_list_filtered; void mt_pre_framegetter(int frameNumber); void mt_framegetter(int frameNumber); void reset_music_list() @@ -280,18 +290,11 @@ private: // The offset this user has given if they want to appear alongside someone. int offset_with_pair = 0; - QVector char_list; - QVector evidence_list; - QVector music_list; - QVector area_list; - QVector arup_players; QVector arup_statuses; QVector arup_cms; QVector arup_locks; - QSignalMapper *char_button_mapper; - QVector ic_chatlog_history; // These map music row items and area row items to their actual IDs. @@ -534,11 +537,6 @@ private: AOImage *ui_char_select_background; - //abstract widget to hold char buttons - QWidget *ui_char_buttons; - - QVector ui_char_button_list; - QVector ui_char_button_list_filtered; AOImage *ui_selector; AOButton *ui_back_to_lobby; diff --git a/include/lobby.h b/include/lobby.h index 19276a7d..3a34fb8e 100644 --- a/include/lobby.h +++ b/include/lobby.h @@ -76,7 +76,8 @@ private: AOButton *ui_cancel; void set_size_and_pos(QWidget *p_widget, QString p_identifier); - +public slots: + void fucking_threading_goddamn_it(QString fuckshitassgoddamnfuck); private slots: void on_public_servers_clicked(); void on_favorites_clicked(); -- cgit From f75032840450263bfe27d3b5a68ea1458a0ce8a5 Mon Sep 17 00:00:00 2001 From: iamgoofball Date: Wed, 23 Jan 2019 01:07:20 -0800 Subject: Multithreaded filtering of the character list --- include/courtroom.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/courtroom.h b/include/courtroom.h index f6124127..be37869a 100644 --- a/include/courtroom.h +++ b/include/courtroom.h @@ -91,6 +91,9 @@ public: QSignalMapper *char_button_mapper; QVector ui_char_button_list; QVector ui_char_button_list_filtered; + QLineEdit *ui_char_search; + QCheckBox *ui_char_passworded; + QCheckBox *ui_char_taken; void mt_pre_framegetter(int frameNumber); void mt_framegetter(int frameNumber); void reset_music_list() @@ -548,10 +551,6 @@ private: AOButton *ui_spectator; - QLineEdit *ui_char_search; - QCheckBox *ui_char_passworded; - QCheckBox *ui_char_taken; - void construct_char_select(); void set_char_select(); void set_char_select_page(); -- cgit From f9406d0a7f2363843d9d7c09a9e8d3422c967a64 Mon Sep 17 00:00:00 2001 From: iamgoofball Date: Wed, 23 Jan 2019 01:56:56 -0800 Subject: multithread the music **harder** --- include/aoapplication.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/aoapplication.h b/include/aoapplication.h index 22c6c23c..095dafd7 100644 --- a/include/aoapplication.h +++ b/include/aoapplication.h @@ -95,6 +95,7 @@ public: int loaded_evidence = 0; int music_list_size = 0; int loaded_music = 0; + int area_count = 0; bool courtroom_loaded = false; -- cgit From 0649e7b28e16a054072d8656a5046c7cc3cfefb6 Mon Sep 17 00:00:00 2001 From: iamgoofball Date: Wed, 23 Jan 2019 07:35:29 -0800 Subject: Case Announcer: Witness Support also some other shit --- include/aocaseannouncerdialog.h | 1 + include/courtroom.h | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/aocaseannouncerdialog.h b/include/aocaseannouncerdialog.h index a238c3f2..da26fab0 100644 --- a/include/aocaseannouncerdialog.h +++ b/include/aocaseannouncerdialog.h @@ -36,6 +36,7 @@ private: QCheckBox *ui_judge_needed; QCheckBox *ui_juror_needed; QCheckBox *ui_steno_needed; + QCheckBox *ui_witness_needed; public slots: void ok_pressed(); diff --git a/include/courtroom.h b/include/courtroom.h index be37869a..e00e454c 100644 --- a/include/courtroom.h +++ b/include/courtroom.h @@ -59,6 +59,7 @@ #include #include #include +#include #include class AOApplication; @@ -194,6 +195,9 @@ public: //properly sets up some varibles: resets user state void enter_courtroom(int p_cid); + // mfw this didnt fucking exist yet + void set_character(int char_id); + //helper function that populates ui_music_list with the contents of music_list void list_music(); void list_areas(); @@ -234,7 +238,7 @@ public: //Toggles the judge buttons, whether they should appear or not. void toggle_judge_buttons(bool is_on); - void announce_case(QString title, bool def, bool pro, bool jud, bool jur, bool steno); + void announce_case(QString title, bool def, bool pro, bool jud, bool jur, bool steno, bool wit); void check_connection_received(); void doScreenShake(); @@ -575,7 +579,7 @@ public slots: void mod_called(QString p_ip); - void case_called(QString msg, bool def, bool pro, bool jud, bool jur, bool steno); + void case_called(QString msg, bool def, bool pro, bool jud, bool jur, bool steno, bool witness); private slots: void start_chat_ticking(); -- cgit From fc984fcfe2a4416274810de81a8f36fe77b0dba9 Mon Sep 17 00:00:00 2001 From: iamgoofball Date: Fri, 1 Feb 2019 16:28:14 -0800 Subject: bugfixes and shit --- include/aoapplication.h | 3 +++ include/aomusicplayer.h | 3 --- include/aooptionsdialog.h | 2 ++ include/aosfxplayer.h | 3 --- 4 files changed, 5 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/aoapplication.h b/include/aoapplication.h index 095dafd7..19eb474e 100644 --- a/include/aoapplication.h +++ b/include/aoapplication.h @@ -323,6 +323,9 @@ public: // Same for CM. bool get_casing_cm_enabled(); + // Same for witnesses. + bool get_casing_wit_enabled(); + // Get the message for the CM for casing alerts. QString get_casing_can_host_cases(); diff --git a/include/aomusicplayer.h b/include/aomusicplayer.h index 24ea0c57..a88cb79b 100644 --- a/include/aomusicplayer.h +++ b/include/aomusicplayer.h @@ -26,14 +26,11 @@ public: 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 175b8044..53bd3096 100644 --- a/include/aooptionsdialog.h +++ b/include/aooptionsdialog.h @@ -106,6 +106,8 @@ private: QCheckBox *ui_casing_steno_cb; QLabel *ui_casing_cm_lbl; QCheckBox *ui_casing_cm_cb; + QLabel *ui_casing_wit_lbl; + QCheckBox *ui_casing_wit_cb; QLabel *ui_casing_cm_cases_lbl; QLineEdit *ui_casing_cm_cases_textbox; diff --git a/include/aosfxplayer.h b/include/aosfxplayer.h index 5c6f1088..39bea0d4 100644 --- a/include/aosfxplayer.h +++ b/include/aosfxplayer.h @@ -22,13 +22,10 @@ public: 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 -- cgit From 0dcf8a7f179069dabae8aa61ba69675ad5182d76 Mon Sep 17 00:00:00 2001 From: iamgoofball Date: Fri, 1 Feb 2019 17:20:08 -0800 Subject: bump the version number to 2.7.2 --- include/aoapplication.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/aoapplication.h b/include/aoapplication.h index 19eb474e..f1c41907 100644 --- a/include/aoapplication.h +++ b/include/aoapplication.h @@ -332,7 +332,7 @@ public: private: const int RELEASE = 2; const int MAJOR_VERSION = 7; - const int MINOR_VERSION = 1; + const int MINOR_VERSION = 2; QString current_theme = "default"; -- cgit From cb1ed6d60dc394f293f90f06ad9988de053feecb Mon Sep 17 00:00:00 2001 From: sD Date: Fri, 21 Feb 2020 16:43:40 +0100 Subject: put minor version back --- include/aoapplication.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/aoapplication.h b/include/aoapplication.h index 280b7314..e4f2ee68 100644 --- a/include/aoapplication.h +++ b/include/aoapplication.h @@ -342,6 +342,7 @@ public: private: const int RELEASE = 2; const int MAJOR_VERSION = 7; + const int MINOR_VERSION = 0; QString current_theme = "default"; -- cgit From c8b11b398a7db6d8f45a88136e8a45e35b44320e Mon Sep 17 00:00:00 2001 From: sD Date: Fri, 21 Feb 2020 16:48:11 +0100 Subject: fix audio --- include/aomusicplayer.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/aomusicplayer.h b/include/aomusicplayer.h index 71ae6045..255cc456 100644 --- a/include/aomusicplayer.h +++ b/include/aomusicplayer.h @@ -6,6 +6,7 @@ #elif defined(QTAUDIO) #include #endif + #include "aoapplication.h" #include @@ -14,12 +15,14 @@ #include #include +#if defined(BASSAUDIO) class AOMusicPlayer : public QObject { Q_OBJECT public: AOMusicPlayer(QWidget *parent, AOApplication *p_ao_app); virtual ~AOMusicPlayer(); + void play(QString p_song); void set_volume(int p_value); @@ -30,6 +33,7 @@ public: private: QWidget *m_parent; AOApplication *ao_app; + int m_volume = 0; QString f_path; @@ -46,12 +50,18 @@ public: void play(QString p_song); void set_volume(int p_value); + void kill_loop(); + QString get_path(); + bool enable_looping = true; + private: - QMediaPlayer m_player; QWidget *m_parent; AOApplication *ao_app; + QMediaPlayer m_player; + int m_volume = 0; + QString f_path; }; #else class AOMusicPlayer : public QObject @@ -63,9 +73,16 @@ public: void play(QString p_song); void set_volume(int p_value); + void kill_loop(); + QString get_path(); + bool enable_looping = true; + private: QWidget *m_parent; AOApplication *ao_app; + + int m_volume = 0; + QString f_path; }; #endif -- cgit From f93459ed0eec6c7c64bece75cb6e8de627c605b9 Mon Sep 17 00:00:00 2001 From: sD Date: Fri, 21 Feb 2020 17:18:25 +0100 Subject: remove fuck --- include/courtroom.h | 2 +- include/lobby.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/courtroom.h b/include/courtroom.h index 587d9630..37d3f6fc 100644 --- a/include/courtroom.h +++ b/include/courtroom.h @@ -197,7 +197,7 @@ public: //properly sets up some varibles: resets user state void enter_courtroom(int p_cid); - // mfw this didnt fucking exist yet + // set the character using an ID void set_character(int char_id); //helper function that populates ui_music_list with the contents of music_list diff --git a/include/lobby.h b/include/lobby.h index 06cd798b..d32debed 100644 --- a/include/lobby.h +++ b/include/lobby.h @@ -79,7 +79,7 @@ private: void set_size_and_pos(QWidget *p_widget, QString p_identifier); public slots: - void fucking_threading_goddamn_it(QString fuckshitassgoddamnfuck); + void lobbyThreadHandler(QString loadingText); private slots: void on_public_servers_clicked(); void on_favorites_clicked(); -- cgit From 2716416b62ce6ffec89d2a8b4b984b709cb5221a Mon Sep 17 00:00:00 2001 From: sD Date: Fri, 21 Feb 2020 18:00:23 +0100 Subject: only load bass plugins when bass is included --- include/courtroom.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/courtroom.h b/include/courtroom.h index 37d3f6fc..4d271e4b 100644 --- a/include/courtroom.h +++ b/include/courtroom.h @@ -688,7 +688,9 @@ private slots: void ping_server(); + #ifdef BASSAUDIO void load_bass_opus_plugin(); + #endif }; #endif // COURTROOM_H -- cgit From 0123b4d1924a495827f91eef72f1427119cf1651 Mon Sep 17 00:00:00 2001 From: sD Date: Sun, 23 Feb 2020 03:19:05 +0100 Subject: move the click event back to the slots --- include/courtroom.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/courtroom.h b/include/courtroom.h index 4d271e4b..41e88e74 100644 --- a/include/courtroom.h +++ b/include/courtroom.h @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -560,7 +561,6 @@ private: void construct_char_select(); void set_char_select(); void set_char_select_page(); - void char_clicked(int n_char); void put_button_in_place(int starting, int chars_on_this_page); void filter_character_list(); @@ -682,6 +682,8 @@ private slots: void on_spectator_clicked(); + void char_clicked(int n_char); + void on_switch_area_music_clicked(); void on_casing_clicked(); -- cgit