diff --git a/Attorney_Online_remake.pro b/Attorney_Online_remake.pro index 7cda4ca..c7a1285 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 c52d824..a259ee7 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 66effb1..9e1b64e 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) -{ - 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(); -} - -void AOMovie::play(QString p_gif, bool p_play_once) +void AOMovie::set_play_once(bool p_play_once) { play_once = p_play_once; +} +void AOMovie::play(QString p_gif, QString p_char) +{ 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 19d0dab..4b3eb48 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 7257447..d4290bf 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("<"); + else if (f_character == ">") + ui_vp_message->insertHtml(">"); else if (m_chatmessage[TEXT_COLOR].toInt() == RAINBOW) { QString html_color; diff --git a/networkmanager.h b/networkmanager.h index e10dcca..9d366a6 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);