diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/aoapplication.h | 13 | ||||
| -rw-r--r-- | include/aoblipplayer.h | 3 | ||||
| -rw-r--r-- | include/aooptionsdialog.h | 2 | ||||
| -rw-r--r-- | include/aopacket.h | 7 | ||||
| -rw-r--r-- | include/aosfxplayer.h | 3 | ||||
| -rw-r--r-- | include/courtroom.h | 47 | ||||
| -rw-r--r-- | include/datatypes.h | 2 | ||||
| -rw-r--r-- | include/encryption_functions.h | 15 | ||||
| -rw-r--r-- | include/hex_functions.h | 16 | ||||
| -rw-r--r-- | include/lobby.h | 1 |
10 files changed, 54 insertions, 55 deletions
diff --git a/include/aoapplication.h b/include/aoapplication.h index 458a8844..b17ac4a9 100644 --- a/include/aoapplication.h +++ b/include/aoapplication.h @@ -67,14 +67,10 @@ public: /////////////////server metadata////////////////// - unsigned int s_decryptor = 5; - bool encryption_needed = true; - bool yellow_text_enabled = false; bool prezoom_enabled = false; bool flipping_enabled = false; bool custom_objection_enabled = false; - bool improved_loading_enabled = false; bool desk_mod_enabled = false; bool evidence_enabled = false; bool cccc_ic_support_enabled = false; @@ -84,6 +80,8 @@ public: bool looping_sfx_support_enabled = false; bool additive_enabled = false; bool effects_enabled = false; + bool y_offset_enabled = false; + bool expanded_desk_mods_enabled = false; ///////////////loading info/////////////////// @@ -227,6 +225,9 @@ public: // Returns whether the log should have a timestamp. bool get_log_timestamp(); + // Returns whether to log IC actions. + bool get_log_ic_actions(); + // Returns the username the user may have set in config.ini. QString get_default_username(); @@ -407,8 +408,8 @@ public: // Returns the desk modifier for p_char's p_emote int get_desk_mod(QString p_char, int p_emote); - // Returns p_char's gender - QString get_gender(QString p_char); + // Returns p_char's blips (previously called their "gender") + QString get_blips(QString p_char); // ====== // These are all casing-related settings. diff --git a/include/aoblipplayer.h b/include/aoblipplayer.h index 4d3b5f14..a11e29db 100644 --- a/include/aoblipplayer.h +++ b/include/aoblipplayer.h @@ -22,12 +22,9 @@ public: int m_cycle = 0; private: - const int max_blip_ms = 60; - QWidget *m_parent; AOApplication *ao_app; qreal m_volume; - QElapsedTimer delay; void set_volume_internal(qreal p_volume); diff --git a/include/aooptionsdialog.h b/include/aooptionsdialog.h index fe99626a..2e2d7b8a 100644 --- a/include/aooptionsdialog.h +++ b/include/aooptionsdialog.h @@ -52,6 +52,8 @@ private: QSpinBox *ui_log_margin_spinbox; QLabel *ui_log_timestamp_lbl; QCheckBox *ui_log_timestamp_cb; + QLabel *ui_log_ic_actions_lbl; + QCheckBox *ui_log_ic_actions_cb; QFrame *ui_log_names_divider; QLineEdit *ui_username_textbox; QLabel *ui_username_lbl; diff --git a/include/aopacket.h b/include/aopacket.h index 4097be86..6d1debad 100644 --- a/include/aopacket.h +++ b/include/aopacket.h @@ -8,21 +8,16 @@ class AOPacket { public: AOPacket(QString p_packet_string); - AOPacket(QString header, QStringList &p_contents); - ~AOPacket(); + AOPacket(QString header, QStringList &p_contents) : m_header(header), m_contents(p_contents){} QString get_header() { return m_header; } QStringList &get_contents() { return m_contents; } QString to_string(); - void encrypt_header(unsigned int p_key); - void decrypt_header(unsigned int p_key); - void net_encode(); void net_decode(); private: - bool encrypted = false; QString m_header; QStringList m_contents; diff --git a/include/aosfxplayer.h b/include/aosfxplayer.h index 0a5fffa8..75976368 100644 --- a/include/aosfxplayer.h +++ b/include/aosfxplayer.h @@ -16,8 +16,7 @@ public: void clear(); void loop_clear(); - void play(QString p_sfx, QString p_char = "", QString shout = "", - int channel = -1); + void play(QString p_sfx, QString p_char = "", QString shout = ""); void stop(int channel = -1); void set_volume(qreal p_volume); void set_looping(bool toggle, int channel = -1); diff --git a/include/courtroom.h b/include/courtroom.h index 72b4989c..e0db7195 100644 --- a/include/courtroom.h +++ b/include/courtroom.h @@ -59,6 +59,7 @@ #include <QTextCharFormat> #include <QElapsedTimer> +#include <algorithm> #include <stack> class AOApplication; @@ -175,6 +176,9 @@ public: // sets desk and bg based on pos in chatmessage void set_scene(QString f_desk_mod, QString f_side); + // sets ui_vp_player_char according to SELF_OFFSET, only a function bc it's used with desk_mod 4 and 5 + void set_self_offset(QString p_list); + // takes in serverD-formatted IP list as prints a converted version to server // OOC admittedly poorly named void set_ip_list(QString p_list); @@ -226,14 +230,14 @@ public: // selected // or the user isn't already scrolled to the top void append_ic_text(QString p_text, QString p_name = "", QString action = "", - int color = 0); + int color = 0, QDateTime timestamp = QDateTime::currentDateTime()); // prints who played the song to IC chat and plays said song(if found on local // filesystem) takes in a list where the first element is the song name and // the second is the char id of who played it void handle_song(QStringList *p_contents); - void play_preanim(bool noninterrupting); + void play_preanim(bool immediate); // plays the witness testimony or cross examination animation based on // argument @@ -259,6 +263,8 @@ public: void set_clock_visibility(bool visible); qint64 pong(); + // Truncates text so it fits within theme-specified boundaries and sets the tooltip to the full string + void truncate_label_text(QWidget* p_widget, QString p_identifier); ~Courtroom(); private: @@ -284,14 +290,17 @@ private: bool message_is_centered = false; int current_display_speed = 3; - int message_display_speed[7] = {0, 10, 25, 40, 50, 70, 90}; + int message_display_speed[7] = {5, 10, 25, 40, 50, 70, 90}; // The character ID of the character this user wants to appear alongside with. int other_charid = -1; - // The offset this user has given if they want to appear alongside someone. + // The horizontal offset this user has given if they want to appear alongside someone. int char_offset = 0; + // The vertical offset this user has given. + int char_vert_offset = 0; + // 0 = in front, 1 = behind int pair_order = 0; @@ -325,7 +334,7 @@ private: int real_tick_pos = 0; // used to determine how often blips sound int blip_ticker = 0; - int blip_rate = 1; + int blip_rate = 2; int rainbow_counter = 0; bool rainbow_appended = false; bool blank_blip = false; @@ -342,6 +351,9 @@ private: // True, if the log should display the message like name<br>text instead of name: text bool log_newline = false; + // True, if the log should include RP actions like interjections, showing evidence, etc. + bool log_ic_actions = true; + // Margin in pixels between log entries for the IC log. int log_margin = 0; @@ -408,6 +420,11 @@ private: int objection_state = 0; QString objection_custom = ""; + struct CustomObjection { + QString name; + QString filename; + }; + QList<CustomObjection> custom_objections_list; int realization_state = 0; int screenshake_state = 0; int text_color = 0; @@ -422,6 +439,17 @@ private: // List of associated RGB colors for this color index QVector<QColor> color_rgb_list; + // Same as above but populated from misc/default's config + QVector<QColor> default_color_rgb_list; + + // Get a color index from an arbitrary misc config + void gen_char_rgb_list(QString p_char); + QVector<QColor> char_color_rgb_list; + + // Misc we used for the last message, and the one we're using now. Used to avoid loading assets when it's not needed + QString current_misc; + QString last_misc; + // List of markdown start characters, their index is tied to the color index QStringList color_markdown_start_list; @@ -438,8 +466,12 @@ private: // List of all currently available pos QStringList pos_dropdown_list; + // is the message we're about to send supposed to present evidence? bool is_presenting_evidence = false; + // have we already presented evidence for this message? + bool evidence_presented = false; + QString effect = ""; // Music effect flags we want to send to server when we play music @@ -536,6 +568,7 @@ private: AOButton *ui_pair_button; QListWidget *ui_pair_list; QSpinBox *ui_pair_offset_spinbox; + QSpinBox *ui_pair_vert_offset_spinbox; QComboBox *ui_pair_order_dropdown; @@ -595,7 +628,7 @@ private: QCheckBox *ui_guard; QCheckBox *ui_casing; - QCheckBox *ui_pre_non_interrupt; + QCheckBox *ui_immediate; QCheckBox *ui_showname_enable; AOButton *ui_custom_objection; @@ -717,6 +750,7 @@ private slots: void music_random(); void music_list_expand_all(); void music_list_collapse_all(); + void music_stop(); void on_area_list_double_clicked(QTreeWidgetItem *p_item, int column); void select_emote(int p_id); @@ -790,6 +824,7 @@ private slots: void on_log_limit_changed(int value); void on_pair_offset_changed(int value); + void on_pair_vert_offset_changed(int value); void on_ooc_toggle_clicked(); diff --git a/include/datatypes.h b/include/datatypes.h index 21ade040..ebf2e380 100644 --- a/include/datatypes.h +++ b/include/datatypes.h @@ -91,7 +91,7 @@ enum CHAT_MESSAGE { SELF_OFFSET, OTHER_OFFSET, OTHER_FLIP, - NONINTERRUPTING_PRE, + IMMEDIATE, LOOPING_SFX, SCREENSHAKE, FRAME_SCREENSHAKE, diff --git a/include/encryption_functions.h b/include/encryption_functions.h deleted file mode 100644 index b70e8e65..00000000 --- a/include/encryption_functions.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef ENCRYPTION_FUNCTIONS_H -#define ENCRYPTION_FUNCTIONS_H - -#include <QString> - -#include <QVector> -#include <cstddef> -#include <iomanip> -#include <sstream> -#include <stdlib.h> - -QString fanta_encrypt(QString p_input, unsigned int key); -QString fanta_decrypt(QString p_input, unsigned int key); - -#endif // ENCRYPTION_FUNCTIONS_H diff --git a/include/hex_functions.h b/include/hex_functions.h deleted file mode 100644 index d178ba1b..00000000 --- a/include/hex_functions.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef HEX_OPERATIONS_H -#define HEX_OPERATIONS_H - -#include <algorithm> -#include <bitset> -#include <cstdint> -#include <iomanip> -#include <iostream> -#include <sstream> -#include <string> - -namespace omni { -std::string int_to_hex(unsigned int input); -} - -#endif // HEX_OPERATIONS_H diff --git a/include/lobby.h b/include/lobby.h index 42f52977..4278534c 100644 --- a/include/lobby.h +++ b/include/lobby.h @@ -46,6 +46,7 @@ public: void set_loading_value(int p_value); bool public_servers_selected = true; + bool doubleclicked = false; ~Lobby(); |
