aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmniTroid <davidskoland@gmail.com>2017-03-17 00:39:28 +0100
committerOmniTroid <davidskoland@gmail.com>2017-03-17 00:39:28 +0100
commitccebb7710a836b7d12db9ab3b6c71b2e764a398d (patch)
tree73c34f290273f0f4704e42908f94512a04c8495b
parent0c193741dd7d9349bf8052101245ee20dd695570 (diff)
fixed a freeze-related objection bug + a bug where < and > would not display in chatbox. version 2.3.0 ready for release
-rw-r--r--Attorney_Online_remake.pro2
-rw-r--r--aoapplication.h4
-rw-r--r--aomovie.cpp52
-rw-r--r--aomovie.h4
-rw-r--r--courtroom.cpp13
-rw-r--r--networkmanager.h2
6 files changed, 40 insertions, 37 deletions
diff --git a/Attorney_Online_remake.pro b/Attorney_Online_remake.pro
index 7cda4ca4..c7a1285a 100644
--- a/Attorney_Online_remake.pro
+++ b/Attorney_Online_remake.pro
@@ -13,7 +13,7 @@ RC_ICONS = logo.ico
TARGET = Attorney_Online_remake
TEMPLATE = app
-VERSION = 2.2.5.0
+VERSION = 2.3.0.0
SOURCES += main.cpp\
lobby.cpp \
diff --git a/aoapplication.h b/aoapplication.h
index c52d8246..a259ee7d 100644
--- a/aoapplication.h
+++ b/aoapplication.h
@@ -128,8 +128,8 @@ public:
private:
const int RELEASE = 2;
- const int MAJOR_VERSION = 2;
- const int MINOR_VERSION = 5;
+ const int MAJOR_VERSION = 3;
+ const int MINOR_VERSION = 0;
QString user_theme = "default";
diff --git a/aomovie.cpp b/aomovie.cpp
index 66effb12..9e1b64ee 100644
--- a/aomovie.cpp
+++ b/aomovie.cpp
@@ -15,43 +15,37 @@ AOMovie::AOMovie(QWidget *p_parent, AOApplication *p_ao_app) : QLabel(p_parent)
connect(m_movie, SIGNAL(frameChanged(int)), this, SLOT(frame_change(int)));
}
-void AOMovie::play(QString p_gif, QString p_char)
+void AOMovie::set_play_once(bool p_play_once)
{
- play_once = true;
-
- m_movie->stop();
-
- QString default_path = ao_app->get_default_theme_path() + p_gif + ".gif";
- QString gif_path;
-
- if (p_gif == "custom")
- gif_path = ao_app->get_character_path(p_char) + "custom.gif";
- else
- gif_path = ao_app->get_theme_path() + p_gif + ".gif";
-
-
- if (file_exists(gif_path))
- m_movie->setFileName(gif_path);
- else
- m_movie->setFileName(default_path);
-
- this->show();
- m_movie->start();
+ play_once = p_play_once;
}
-void AOMovie::play(QString p_gif, bool p_play_once)
+void AOMovie::play(QString p_gif, QString p_char)
{
- play_once = p_play_once;
-
m_movie->stop();
- QString default_path = ao_app->get_default_theme_path() + p_gif + ".gif";
- QString gif_path = ao_app->get_theme_path() + p_gif + ".gif";
+ QString gif_path;
- if (file_exists(gif_path))
- m_movie->setFileName(gif_path);
+ QString custom_path = ao_app->get_character_path(p_char) + p_gif + ".gif";
+ QString theme_path = ao_app->get_theme_path() + p_gif + ".gif";
+ QString default_theme_path = ao_app->get_default_theme_path() + p_gif + ".gif";
+ QString placeholder_path = ao_app->get_theme_path() + "placeholder.gif";
+ QString default_placeholder_path = ao_app->get_default_theme_path() + "placeholder.gif";
+
+ if (file_exists(custom_path))
+ gif_path = custom_path;
+ else if (file_exists(theme_path))
+ gif_path = theme_path;
+ else if (file_exists(default_theme_path))
+ gif_path = default_theme_path;
+ else if (file_exists(placeholder_path))
+ gif_path = placeholder_path;
+ else if (file_exists(default_placeholder_path))
+ gif_path = default_placeholder_path;
else
- m_movie->setFileName(default_path);
+ gif_path = "";
+
+ m_movie->setFileName(gif_path);
this->show();
m_movie->start();
diff --git a/aomovie.h b/aomovie.h
index 19d0dabd..4b3eb489 100644
--- a/aomovie.h
+++ b/aomovie.h
@@ -14,8 +14,8 @@ class AOMovie : public QLabel
public:
AOMovie(QWidget *p_parent, AOApplication *p_ao_app);
- void play(QString p_gif, QString p_char = "null");
- void play(QString p_gif, bool p_play_once);
+ void set_play_once(bool p_play_once);
+ void play(QString p_gif, QString p_char = "");
void combo_resize(int w, int h);
void stop();
diff --git a/courtroom.cpp b/courtroom.cpp
index 72574472..d4290bf6 100644
--- a/courtroom.cpp
+++ b/courtroom.cpp
@@ -58,6 +58,7 @@ Courtroom::Courtroom(AOApplication *p_ao_app) : QMainWindow()
ui_viewport = new QWidget(this);
ui_vp_background = new AOScene(ui_viewport, ao_app);
ui_vp_speedlines = new AOMovie(ui_viewport, ao_app);
+ ui_vp_speedlines->set_play_once(false);
ui_vp_player_char = new AOCharMovie(ui_viewport, ao_app);
ui_vp_desk = new AOScene(ui_viewport, ao_app);
ui_vp_legacy_desk = new AOScene(ui_viewport, ao_app);
@@ -1003,7 +1004,9 @@ void Courtroom::handle_chatmessage_2()
ui_vp_speedlines->stop();
ui_vp_player_char->stop();
- QString f_showname = ao_app->get_showname(char_list.at(m_chatmessage[CHAR_ID].toInt()).name);
+ QString real_name = char_list.at(m_chatmessage[CHAR_ID].toInt()).name;
+
+ QString f_showname = ao_app->get_showname(real_name);
ui_vp_showname->setText(f_showname);
@@ -1060,9 +1063,9 @@ void Courtroom::handle_chatmessage_3()
if (side == "pro" ||
side == "hlp" ||
side == "wit")
- ui_vp_speedlines->play("prosecution_speedlines", false);
+ ui_vp_speedlines->play("prosecution_speedlines");
else
- ui_vp_speedlines->play("defense_speedlines", false);
+ ui_vp_speedlines->play("defense_speedlines");
}
@@ -1227,6 +1230,10 @@ void Courtroom::chat_tick()
if (f_character == " ")
ui_vp_message->insertPlainText(" ");
+ else if (f_character == "<")
+ ui_vp_message->insertHtml("&lt;");
+ else if (f_character == ">")
+ ui_vp_message->insertHtml("&gt;");
else if (m_chatmessage[TEXT_COLOR].toInt() == RAINBOW)
{
QString html_color;
diff --git a/networkmanager.h b/networkmanager.h
index e10dcca7..9d366a6b 100644
--- a/networkmanager.h
+++ b/networkmanager.h
@@ -27,6 +27,8 @@ public:
bool partial_packet = false;
QString temp_packet = "";
+ unsigned int s_decryptor = 5;
+
void connect_to_master();
void connect_to_server(server_type p_server);