aboutsummaryrefslogtreecommitdiff
path: root/include/aoapplication.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/aoapplication.h')
-rw-r--r--include/aoapplication.h54
1 files changed, 48 insertions, 6 deletions
diff --git a/include/aoapplication.h b/include/aoapplication.h
index 095ea18f..c217dad7 100644
--- a/include/aoapplication.h
+++ b/include/aoapplication.h
@@ -1,8 +1,11 @@
#ifndef AOAPPLICATION_H
#define AOAPPLICATION_H
+#define UNUSED(x) (void)(x)
+
#include "aopacket.h"
#include "datatypes.h"
+#include "demoserver.h"
#include "discord_rich_presence.h"
#include "bass.h"
@@ -26,6 +29,9 @@
#include <QScreen>
#include <QStringList>
#include <QTextStream>
+#include <QTime>
+
+#include <QElapsedTimer>
class NetworkManager;
class Lobby;
@@ -61,6 +67,9 @@ public:
void call_settings_menu();
void call_announce_menu(Courtroom *court);
+ qint64 latency = 0;
+ QString window_title;
+
/////////////////server metadata//////////////////
bool yellow_text_enabled = false;
@@ -125,6 +134,7 @@ public:
QString get_default_theme_path(QString p_file);
QString get_custom_theme_path(QString p_theme, QString p_file);
QString get_character_path(QString p_char, QString p_file);
+ QString get_misc_path(QString p_misc, QString p_file);
QString get_sounds_path(QString p_file);
QString get_music_path(QString p_song);
QString get_background_path(QString p_file);
@@ -166,6 +176,14 @@ public:
// Returns the value of default_blip in config.ini
int get_default_blip();
+ // Returns the value if objections interrupt and skip the message queue
+ // from the config.ini.
+ bool is_instant_objection_enabled();
+
+ // returns if log will show messages as-received, while viewport will parse according to the queue (Text Stay Time)
+ // from the config.ini
+ bool is_desyncrhonized_logs_enabled();
+
// Returns the value of whether Discord should be enabled on startup
// from the config.ini.
bool is_discord_enabled();
@@ -208,6 +226,12 @@ public:
// may contain, from config.ini.
int get_max_log_size();
+ // Current wait time between messages for the queue system
+ int stay_time();
+
+ // Returns Minimum amount of time (in miliseconds) that must pass before the next Enter key press will send your IC message. (new behaviour)
+ int get_chat_ratelimit();
+
// Returns whether the log should go upwards (new behaviour)
// or downwards (vanilla behaviour).
bool get_log_goes_downwards();
@@ -250,6 +274,9 @@ public:
// directory if it doesn't exist.
bool append_to_file(QString p_text, QString p_file, bool make_dir = false);
+ // Append to the currently open demo file if there is one
+ void append_to_demofile(QString packet_string);
+
// Appends the argument string to serverlist.txt
void write_to_serverlist_txt(QString p_line);
@@ -279,14 +306,14 @@ public:
// Returns the color with p_identifier from p_file
QColor get_color(QString p_identifier, QString p_file);
- // Returns the markdown symbol used for specified p_identifier such as colors
- QString get_chat_markdown(QString p_identifier, QString p_file);
+ // Returns the markup symbol used for specified p_identifier such as colors
+ QString get_chat_markup(QString p_identifier, QString p_file);
// Returns the color from the misc folder.
QColor get_chat_color(QString p_identifier, QString p_chat);
// Returns the sfx with p_identifier from sounds.ini in the current theme path
- QString get_sfx(QString p_identifier);
+ QString get_sfx(QString p_identifier, QString p_misc="default");
// Figure out if we can opus this or if we should fall back to wav
QString get_sfx_suffix(QString sound_to_check);
@@ -322,6 +349,9 @@ public:
// Returns the showname from the ini of p_char
QString get_showname(QString p_char);
+ // Returns the category of this character
+ QString get_category(QString p_char);
+
// Returns the value of chat image from the specific p_char's ini file
QString get_chat(QString p_char);
@@ -355,9 +385,9 @@ public:
// t
QString get_effect(QString effect, QString p_char, QString p_folder);
- // Return the effect sound associated with the fx_name in the
- // misc/effects/<char-defined>/sounds.ini, or theme/effects/sounds.ini.
- QString get_effect_sound(QString fx_name, QString p_char);
+ // Return p_property of fx_name. If p_property is "sound", return
+ // the value associated with fx_name, otherwise use fx_name + '_' + p_property.
+ QString get_effect_property(QString fx_name, QString p_char, QString p_property);
// Returns the custom realisation used by the character.
QString get_custom_realization(QString p_char);
@@ -407,6 +437,15 @@ public:
// Returns p_char's blips (previously called their "gender")
QString get_blips(QString p_char);
+ // Get a property of a given emote, or get it from "options" if emote doesn't have it
+ QString get_emote_property(QString p_char, QString p_emote, QString p_property);
+
+ // Return a transformation mode from a string ("smooth" for smooth, anything else for fast)
+ Qt::TransformationMode get_scaling(QString p_scaling);
+
+ // Returns the scaling type for p_miscname
+ Qt::TransformationMode get_misc_scaling(QString p_miscname);
+
// ======
// These are all casing-related settings.
// ======
@@ -447,6 +486,9 @@ public:
void *user);
static void doBASSreset();
+ QElapsedTimer demo_timer;
+ DemoServer* demo_server = nullptr;
+
private:
const int RELEASE = 2;
const int MAJOR_VERSION = 9;