Skip to content

Commit

Permalink
Merge pull request #246 from AttorneyOnline/2.8
Browse files Browse the repository at this point in the history
Merges 2.8.5, which is a patch release for 2.8 with no substantially new features.

This commit is release-ready.
  • Loading branch information
oldmud0 committed Aug 21, 2020
2 parents ec1c95b + af1e760 commit 2c6a690
Show file tree
Hide file tree
Showing 29 changed files with 1,655 additions and 1,583 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ base/characters
base/sounds
base/callwords.ini
base/config.ini
base/serverlist.txt

.qmake.stash

Expand Down
51 changes: 31 additions & 20 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ stages:

cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- lib/

variables:
DEBIAN_FRONTEND: noninteractive
Expand All @@ -15,7 +13,7 @@ before_script:
- echo Current working directory is $(pwd)

build linux x86_64:
image: ubuntu
image: ubuntu:18.04
stage: build
tags:
- docker
Expand All @@ -34,15 +32,15 @@ build linux x86_64:
- clang --version

# Extract BASS
#- mkdir bass
#- cd bass
#- curl http://www.un4seen.com/files/bass24-linux.zip -o bass.zip
#- unzip bass.zip
#- cp x64/libbass.so ../lib
#- curl http://www.un4seen.com/files/bassopus24-linux.zip -o bassopus.zip
#- unzip bassopus.zip
#- cp x64/libbassopus.so ../lib
#- cd ..
- mkdir bass
- cd bass
- curl http://www.un4seen.com/files/bass24-linux.zip -o bass.zip
- unzip bass.zip
- cp x64/libbass.so ../lib
- curl http://www.un4seen.com/files/bassopus24-linux.zip -o bassopus.zip
- unzip bassopus.zip
- cp x64/libbassopus.so ../lib
- cd ..

# Extract Discord RPC
- mkdir discord-rpc
Expand All @@ -53,21 +51,32 @@ build linux x86_64:
- cd ..

# Extract QtApng
- mkdir qtapng
- cd qtapng
- curl -L https://github.com/Skycoder42/QtApng/releases/download/1.1.0-5/build_gcc_64_5.12.0.tar.xz -o apng.tar.xz
- tar -xvf apng.tar.xz
- cp gcc_64/plugins/imageformats/libqapng.so ../lib
#- mkdir qtapng
#- cd qtapng
#- curl -L https://github.com/Skycoder42/QtApng/releases/download/1.1.0-5/build_gcc_64_5.12.0.tar.xz -o apng.tar.xz
#- tar -xvf apng.tar.xz
#- cp gcc_64/plugins/imageformats/libqapng.so ../lib
#- cd ..

# Build QtApng
- git clone https://github.com/Skycoder42/QtApng
- cd QtApng
- qmake -spec linux-clang
# Don't make examples - they're not compatible with Qt 5.9
- make -j4 sub-src
#- make sub-src-install_subtargets
- cp plugins/imageformats/libqapng.so ../lib
- cd ..

# Build
- qmake -spec linux-clang "DEFINES += DISCORD QTAUDIO"
- qmake -spec linux-clang "DEFINES += DISCORD"
- make -j4

# Post-processing
- upx --lzma -9 --force bin/Attorney_Online
artifacts:
paths:
- lib/
- bin/

build windows i686:
Expand Down Expand Up @@ -109,19 +118,21 @@ build windows i686:
- ls lib

# Build
- /opt/mxe/usr/${TARGET_SPEC}/qt5/bin/qmake "DEFINES += DISCORD BASSAUDIO"
- /opt/mxe/usr/${TARGET_SPEC}/qt5/bin/qmake "DEFINES += DISCORD"
- make -j4

# Post-processing
- upx --lzma -9 --force bin/Attorney_Online.exe
artifacts:
paths:
- lib/
- bin/

# Base folder
.deploy_base: &deploy_base |
mkdir base
cp -a ../base/ base/
rm -rf base/themes/_Unadapted/
rm base/themes/.gitattributes base/themes/.git

# Miscellaneous files
.deploy_misc: &deploy_misc |
Expand Down
34 changes: 7 additions & 27 deletions Attorney_Online.pro
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ QT += core gui widgets network
TARGET = Attorney_Online
TEMPLATE = app

VERSION = 2.8.4.0
VERSION = 2.8.5.0

INCLUDEPATH += $$PWD/include
DESTDIR = $$PWD/bin
Expand All @@ -22,35 +22,15 @@ contains(DEFINES, DISCORD) {
LIBS += -ldiscord-rpc
}

# Uncomment to enable the BASS audio engine
# (Recommended for Windows)
# DEFINES += BASSAUDIO

contains(DEFINES, BASSAUDIO) {
LIBS += -lbass
LIBS += -lbassopus
}

# Uncomment to enable the Qt audio engine
# (Recommended for non-Windows platforms)
# DEFINES += QTAUDIO

contains(DEFINES, QTAUDIO) {
QT += multimedia
}

AUDIO_DEFINES = $$find(DEFINES, BASSAUDIO) $$find(DEFINES, QTAUDIO)
count(AUDIO_DEFINES, 0) {
warning("No audio system selected. Your build will not have audio.")
}

count(AUDIO_DEFINES, 2) {
error("More than one audio system selected.")
}
# As of 2.8.5, BASS and BASSOPUS are required for all platforms. Qt Multimedia
# is no longer an option due to outdated code and lack of versatility.
# Download at un4seen.com and place the DLLs in the "lib" and "bin" folders.
DEFINES += BASSAUDIO
LIBS += -lbass
LIBS += -lbassopus

macx:LIBS += -framework CoreFoundation -framework Foundation -framework CoreServices


CONFIG += c++14

RESOURCES += resources.qrc
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion base/themes
Submodule themes updated 83 files
+ AceAttorney 2x/chat.png
+ AceAttorney 2x/chat_arrow.gif
+ AceAttorney 2x/chatbig.png
+ AceAttorney 2x/chatblank.png
+ AceAttorney 2x/chatmed.png
+121 −125 AceAttorney 2x/courtroom_design.ini
+6 −6 AceAttorney 2x/courtroom_fonts.ini
+36 −0 AceAttorney 2x/courtroom_stylesheets.css
+ AceAttorney 2x/courtroombackground.png
+ AceAttorney 2x/igiari-cyrillic.ttf
+ AceAttorney 2x/music_display.png
+ AceAttorney 2x/placeholder.png
+ AceAttorney 2x/px_Arial_8pt.ttf
+ AceAttorney/Igiari.ttf
+0 −10 AceAttorney/courtroom_config.ini
+1 −1 AceAttorney/courtroom_fonts.ini
+ AceAttorney/igiari-cyrillic.ttf
+ AceAttorney/px_Arial_8pt.ttf
+ DRRetribution/Thumbs.db
+ DRRetribution/V3/ClassTrialEND.wav
+ DRRetribution/V3/ClassTrialSTART.wav
+ DRRetribution/V3/DRV3Gloom.wav
+ DRRetribution/V3/guilty.gif
+ DRRetribution/V3/notguilty.gif
+ DRRetribution/V3/nsdstart.gif
+ DRRetribution/V3/question.gif
+0 −56 DRRetribution/_alt_courtroom_fonts.ini
+ DRRetribution/arrow_left.png
+ DRRetribution/arrow_right.png
+ DRRetribution/chat.png
+ DRRetribution/chatbig.png
+ DRRetribution/chatblank.png
+ DRRetribution/chatmed.png
+0 −8 DRRetribution/courtroom_sounds.ini
+ DRRetribution/courtroombackground.png
+ DRRetribution/crossexamination.gif
+ DRRetribution/crossexamination.pdn
+ DRRetribution/crossexamination.png
+ DRRetribution/custom.png
+ DRRetribution/custom_selected.png
+0 −28 DRRetribution/design.ini
+ DRRetribution/emote_selected.png
+ DRRetribution/evidence_appear_left.gif
+ DRRetribution/evidence_appear_right.gif
+ DRRetribution/evidence_background.png
+ DRRetribution/evidence_background_private.png
+ DRRetribution/evidence_overlay.png
+ DRRetribution/evidence_overlay_private.png
+ DRRetribution/evidence_selector.png
+ DRRetribution/evidencebackground.png
+ DRRetribution/evidenceoverlay.png
+ DRRetribution/guilty.gif
+ DRRetribution/guilty.png
+ DRRetribution/guilty_on.png
+0 −17 DRRetribution/lobby_design.ini
+ DRRetribution/notguilty.gif
+ DRRetribution/notguilty.png
+ DRRetribution/notguilty_on.png
+ DRRetribution/present.png
+ DRRetribution/present_disabled.png
+ DRRetribution/realization.png
+ DRRetribution/realization_pressed.png
+ DRRetribution/sdr2/ClassTrialEND.wav
+ DRRetribution/sdr2/ClassTrialSTART.wav
+ DRRetribution/sdr2/DRannouncement.wav
+ DRRetribution/sdr2/cycle.wav
+ DRRetribution/sdr2/guilty.gif
+ DRRetribution/sdr2/investigation.wav
+ DRRetribution/sdr2/nonstop.wav
+ DRRetribution/sdr2/notguilty.gif
+ DRRetribution/testimony.gif
+ DRRetribution/testimony.png
+ DRRetribution/tnlib_panel_button.png
+ DRRetribution/tnlib_panel_button_pressed.png
+ DRRetribution/witnesstestimony.gif
+ DRRetribution/witnesstestimony.png
+2 −2 KFO 2x Theme/courtroom_design.ini
+ KFO 2x Theme/placeholder.png
+11 −11 KFO 2x Widescreen/courtroom_design.ini
+ KFO 2x Widescreen/placeholder.png
+0 −10 default/courtroom_config.ini
+2 −2 default/courtroom_design.ini
+0 −118 default/meme.ini
29 changes: 21 additions & 8 deletions include/aoapplication.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
#include "datatypes.h"
#include "discord_rich_presence.h"

#include "bass.h"
#include "bassopus.h"

#include <QApplication>
#include <QFile>
#include <QSettings>
Expand All @@ -23,9 +26,6 @@
#include <QScreen>
#include <QStringList>
#include <QTextStream>
#ifdef QTAUDIO
#include <QAudioDeviceInfo>
#endif

class NetworkManager;
class Lobby;
Expand Down Expand Up @@ -202,7 +202,8 @@ class AOApplication : public QApplication {

// Returns the value of whether custom chatboxes should be a thing.
// from the config.ini.
// I am increasingly maddened by the lack of dynamic auto-generation system for settings.
// I am increasingly maddened by the lack of dynamic auto-generation system
// for settings.
bool is_customchat_enabled();

// Returns the value of the maximum amount of lines the IC chatlog
Expand All @@ -213,14 +214,20 @@ class AOApplication : public QApplication {
// or downwards (vanilla behaviour).
bool get_log_goes_downwards();

// Returns whether the log should separate name from text via newline or :
bool get_log_newline();

// Get spacing between IC log entries.
int get_log_margin();

// Returns whether the log should have a timestamp.
bool get_log_timestamp();

// Returns the username the user may have set in config.ini.
QString get_default_username();

// Returns the audio device used for the client.
QString get_audio_output_device();
#ifdef QTAUDIO
QAudioDeviceInfo QtAudioDevice;
#endif

// Returns whether the user would like to have custom shownames on by default.
bool get_showname_enabled_by_default();
Expand Down Expand Up @@ -433,10 +440,16 @@ class AOApplication : public QApplication {
// The file name of the log file in base/logs.
QString log_filename;

void initBASS();
static void load_bass_opus_plugin();
static void CALLBACK BASSreset(HSTREAM handle, DWORD channel, DWORD data,
void *user);
static void doBASSreset();

private:
const int RELEASE = 2;
const int MAJOR_VERSION = 8;
const int MINOR_VERSION = 4;
const int MINOR_VERSION = 5;

QString current_theme = "default";

Expand Down
8 changes: 0 additions & 8 deletions include/aoblipplayer.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
#ifndef AOBLIPPLAYER_H
#define AOBLIPPLAYER_H

#if defined(BASSAUDIO)
#include "bass.h"
#include "bassopus.h"
#elif defined(QTAUDIO)
#include <QSoundEffect>
#endif

#include "aoapplication.h"

Expand Down Expand Up @@ -35,11 +31,7 @@ class AOBlipPlayer {

void set_volume_internal(qreal p_volume);

#if defined(BASSAUDIO)
HSTREAM m_stream_list[5];
#elif defined(QTAUDIO)
QSoundEffect m_blips;
#endif
};

#endif // AOBLIPPLAYER_H
8 changes: 0 additions & 8 deletions include/aomusicplayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@
#define AOMUSICPLAYER_H
#include "file_functions.h"

#if defined(BASSAUDIO)
#include "bass.h"
#include "bassopus.h"
#elif defined(QTAUDIO)
#include <QMediaPlayer>
#endif

#include "aoapplication.h"

Expand Down Expand Up @@ -44,12 +40,8 @@ public slots:
// Channel 1 = ambience
// Channel 2 = extra
// Channel 3 = extra
#if defined(BASSAUDIO)
HSTREAM m_stream_list[4];
HSYNC loop_sync[4];
#elif defined(QTAUDIO)
QMediaPlayer m_stream_list[4];
#endif
};

#endif // AOMUSICPLAYER_H
6 changes: 6 additions & 0 deletions include/aooptionsdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ class AOOptionsDialog : public QDialog {
QCheckBox *ui_downwards_cb;
QLabel *ui_length_lbl;
QSpinBox *ui_length_spinbox;
QLabel *ui_log_newline_lbl;
QCheckBox *ui_log_newline_cb;
QLabel *ui_log_margin_lbl;
QSpinBox *ui_log_margin_spinbox;
QLabel *ui_log_timestamp_lbl;
QCheckBox *ui_log_timestamp_cb;
QFrame *ui_log_names_divider;
QLineEdit *ui_username_textbox;
QLabel *ui_username_lbl;
Expand Down
8 changes: 0 additions & 8 deletions include/aosfxplayer.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
#ifndef AOSFXPLAYER_H
#define AOSFXPLAYER_H

#if defined(BASSAUDIO)
#include "bass.h"
#include "bassopus.h"
#elif defined(QTAUDIO)
#include <QSoundEffect>
#endif

#include "aoapplication.h"

Expand Down Expand Up @@ -37,11 +33,7 @@ class AOSfxPlayer {

const int m_channelmax = 5;

#if defined(BASSAUDIO)
HSTREAM m_stream_list[5];
#elif defined(QTAUDIO)
QSoundEffect m_stream_list[5];
#endif
};

#endif // AOSFXPLAYER_H
8 changes: 4 additions & 4 deletions include/chatlogpiece.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ class chatlogpiece {
public:
chatlogpiece();
chatlogpiece(QString p_name, QString p_showname, QString p_message,
bool p_song,int color);
QString p_action,int color);
chatlogpiece(QString p_name, QString p_showname, QString p_message,
bool p_song, int color, QDateTime p_datetime);
QString p_action, int color, QDateTime p_datetime);

QString get_name();
QString get_showname();
QString get_message();
bool is_song();
QString get_action();
QDateTime get_datetime();
QString get_datetime_as_string();
int get_chat_color();
Expand All @@ -27,9 +27,9 @@ class chatlogpiece {
QString name;
QString showname;
QString message;
QString action;
QDateTime datetime;
int color;
bool p_is_song;
};

#endif // CHATLOGPIECE_H
Loading

0 comments on commit 2c6a690

Please sign in to comment.