Skip to content

Commit 1b016dd

Browse files
Merge branch 'master' into feature/timerclock
# Conflicts: # include/courtroom.h
2 parents 07993a6 + 0926f3c commit 1b016dd

41 files changed

Lines changed: 5212 additions & 3200 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

include/aoapplication.h

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
#ifndef AOAPPLICATION_H
22
#define AOAPPLICATION_H
33

4+
#define UNUSED(x) (void)(x)
5+
46
#include "aopacket.h"
57
#include "datatypes.h"
8+
#include "demoserver.h"
69
#include "discord_rich_presence.h"
710

811
#include "bass.h"
@@ -28,6 +31,8 @@
2831
#include <QTextStream>
2932
#include <QTime>
3033

34+
#include <QElapsedTimer>
35+
3136
class NetworkManager;
3237
class Lobby;
3338
class Courtroom;
@@ -129,6 +134,7 @@ class AOApplication : public QApplication {
129134
QString get_default_theme_path(QString p_file);
130135
QString get_custom_theme_path(QString p_theme, QString p_file);
131136
QString get_character_path(QString p_char, QString p_file);
137+
QString get_misc_path(QString p_misc, QString p_file);
132138
QString get_sounds_path(QString p_file);
133139
QString get_music_path(QString p_song);
134140
QString get_background_path(QString p_file);
@@ -223,6 +229,9 @@ class AOApplication : public QApplication {
223229
// Current wait time between messages for the queue system
224230
int stay_time();
225231

232+
// Returns Minimum amount of time (in miliseconds) that must pass before the next Enter key press will send your IC message. (new behaviour)
233+
int get_chat_ratelimit();
234+
226235
// Returns whether the log should go upwards (new behaviour)
227236
// or downwards (vanilla behaviour).
228237
bool get_log_goes_downwards();
@@ -265,6 +274,9 @@ class AOApplication : public QApplication {
265274
// directory if it doesn't exist.
266275
bool append_to_file(QString p_text, QString p_file, bool make_dir = false);
267276

277+
// Append to the currently open demo file if there is one
278+
void append_to_demofile(QString packet_string);
279+
268280
// Appends the argument string to serverlist.txt
269281
void write_to_serverlist_txt(QString p_line);
270282

@@ -294,14 +306,14 @@ class AOApplication : public QApplication {
294306
// Returns the color with p_identifier from p_file
295307
QColor get_color(QString p_identifier, QString p_file);
296308

297-
// Returns the markdown symbol used for specified p_identifier such as colors
298-
QString get_chat_markdown(QString p_identifier, QString p_file);
309+
// Returns the markup symbol used for specified p_identifier such as colors
310+
QString get_chat_markup(QString p_identifier, QString p_file);
299311

300312
// Returns the color from the misc folder.
301313
QColor get_chat_color(QString p_identifier, QString p_chat);
302314

303315
// Returns the sfx with p_identifier from sounds.ini in the current theme path
304-
QString get_sfx(QString p_identifier);
316+
QString get_sfx(QString p_identifier, QString p_misc="default");
305317

306318
// Figure out if we can opus this or if we should fall back to wav
307319
QString get_sfx_suffix(QString sound_to_check);
@@ -337,6 +349,9 @@ class AOApplication : public QApplication {
337349
// Returns the showname from the ini of p_char
338350
QString get_showname(QString p_char);
339351

352+
// Returns the category of this character
353+
QString get_category(QString p_char);
354+
340355
// Returns the value of chat image from the specific p_char's ini file
341356
QString get_chat(QString p_char);
342357

@@ -370,9 +385,9 @@ class AOApplication : public QApplication {
370385
// t
371386
QString get_effect(QString effect, QString p_char, QString p_folder);
372387

373-
// Return the effect sound associated with the fx_name in the
374-
// misc/effects/<char-defined>/sounds.ini, or theme/effects/sounds.ini.
375-
QString get_effect_sound(QString fx_name, QString p_char);
388+
// Return p_property of fx_name. If p_property is "sound", return
389+
// the value associated with fx_name, otherwise use fx_name + '_' + p_property.
390+
QString get_effect_property(QString fx_name, QString p_char, QString p_property);
376391

377392
// Returns the custom realisation used by the character.
378393
QString get_custom_realization(QString p_char);
@@ -422,6 +437,15 @@ class AOApplication : public QApplication {
422437
// Returns p_char's blips (previously called their "gender")
423438
QString get_blips(QString p_char);
424439

440+
// Get a property of a given emote, or get it from "options" if emote doesn't have it
441+
QString get_emote_property(QString p_char, QString p_emote, QString p_property);
442+
443+
// Return a transformation mode from a string ("smooth" for smooth, anything else for fast)
444+
Qt::TransformationMode get_scaling(QString p_scaling);
445+
446+
// Returns the scaling type for p_miscname
447+
Qt::TransformationMode get_misc_scaling(QString p_miscname);
448+
425449
// ======
426450
// These are all casing-related settings.
427451
// ======
@@ -462,6 +486,9 @@ class AOApplication : public QApplication {
462486
void *user);
463487
static void doBASSreset();
464488

489+
QElapsedTimer demo_timer;
490+
DemoServer* demo_server = nullptr;
491+
465492
private:
466493
const int RELEASE = 2;
467494
const int MAJOR_VERSION = 8;

include/aocharmovie.h

Lines changed: 0 additions & 125 deletions
This file was deleted.

include/aoevidencedisplay.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#define AOEVIDENCEDISPLAY_H
33

44
#include "aoapplication.h"
5-
#include "aomovie.h"
5+
#include "aolayer.h"
66
#include "aosfxplayer.h"
77

88
#include <QDebug>
@@ -21,7 +21,7 @@ class AOEvidenceDisplay : public QLabel {
2121

2222
private:
2323
AOApplication *ao_app;
24-
AOMovie *evidence_movie;
24+
InterfaceLayer *evidence_movie;
2525
QLabel *evidence_icon;
2626
AOSfxPlayer *sfx_player;
2727

0 commit comments

Comments
 (0)