Skip to content

Commit

Permalink
fixed a freeze-related objection bug + a bug where < and > would not …
Browse files Browse the repository at this point in the history
…display in chatbox. version 2.3.0 ready for release
  • Loading branch information
OmniTroid committed Mar 16, 2017
1 parent 0c19374 commit ccebb77
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 37 deletions.
2 changes: 1 addition & 1 deletion Attorney_Online_remake.pro
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
4 changes: 2 additions & 2 deletions aoapplication.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ class AOApplication : public QApplication

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";

Expand Down
52 changes: 23 additions & 29 deletions aomovie.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions aomovie.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
13 changes: 10 additions & 3 deletions courtroom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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");

}

Expand Down Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions networkmanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ class NetworkManager : public QObject
bool partial_packet = false;
QString temp_packet = "";

unsigned int s_decryptor = 5;

void connect_to_master();
void connect_to_server(server_type p_server);

Expand Down

0 comments on commit ccebb77

Please sign in to comment.