Fix compilation error
Allow realization flashes to be animated images by making them AOMovies
Eploit the newly added 'duration' system for realization AOMovie
(cherry picked from commit bb98f79083)
This commit is contained in:
parent
5a31516a36
commit
3b3507df60
@ -306,9 +306,6 @@ private:
|
||||
//delay before sfx plays
|
||||
QTimer *sfx_delay_timer;
|
||||
|
||||
//keeps track of how long realization is visible(it's just a white square and should be visible less than a second)
|
||||
QTimer *realization_timer;
|
||||
|
||||
//every time point in char.inis times this equals the final time
|
||||
const int time_mod = 40;
|
||||
|
||||
@ -394,7 +391,7 @@ private:
|
||||
AOImage *ui_vp_chatbox;
|
||||
QLabel *ui_vp_showname;
|
||||
QTextEdit *ui_vp_message;
|
||||
AOImage *ui_vp_realization;
|
||||
AOMovie *ui_vp_realization;
|
||||
AOMovie *ui_vp_testimony;
|
||||
AOMovie *ui_vp_wtce;
|
||||
AOMovie *ui_vp_objection;
|
||||
@ -538,11 +535,6 @@ public slots:
|
||||
void objection_done();
|
||||
void preanim_done();
|
||||
|
||||
void realization_done();
|
||||
|
||||
void show_testimony();
|
||||
void hide_testimony();
|
||||
|
||||
void mod_called(QString p_ip);
|
||||
|
||||
void case_called(QString msg, bool def, bool pro, bool jud, bool jur, bool steno);
|
||||
|
||||
@ -55,9 +55,6 @@ Courtroom::Courtroom(AOApplication *p_ao_app) : QMainWindow()
|
||||
sfx_delay_timer = new QTimer(this);
|
||||
sfx_delay_timer->setSingleShot(true);
|
||||
|
||||
realization_timer = new QTimer(this);
|
||||
realization_timer->setSingleShot(true);
|
||||
|
||||
music_player = new AOMusicPlayer(this, ao_app);
|
||||
music_player->set_volume(0);
|
||||
|
||||
@ -97,7 +94,7 @@ Courtroom::Courtroom(AOApplication *p_ao_app) : QMainWindow()
|
||||
|
||||
ui_vp_testimony = new AOMovie(this, ao_app);
|
||||
ui_vp_testimony->set_play_once(false);
|
||||
ui_vp_realization = new AOImage(this, ao_app);
|
||||
ui_vp_realization = new AOMovie(this, ao_app);
|
||||
ui_vp_wtce = new AOMovie(this, ao_app);
|
||||
ui_vp_objection = new AOMovie(this, ao_app);
|
||||
|
||||
@ -273,8 +270,6 @@ Courtroom::Courtroom(AOApplication *p_ao_app) : QMainWindow()
|
||||
|
||||
connect(chat_tick_timer, SIGNAL(timeout()), this, SLOT(chat_tick()));
|
||||
|
||||
connect(realization_timer, SIGNAL(timeout()), this, SLOT(realization_done()));
|
||||
|
||||
connect(ui_emote_left, SIGNAL(clicked()), this, SLOT(on_emote_left_clicked()));
|
||||
connect(ui_emote_right, SIGNAL(clicked()), this, SLOT(on_emote_right_clicked()));
|
||||
|
||||
@ -487,9 +482,7 @@ void Courtroom::set_widgets()
|
||||
ui_vp_testimony->combo_resize(ui_viewport->width(), ui_viewport->height());
|
||||
|
||||
ui_vp_realization->move(ui_viewport->x(), ui_viewport->y());
|
||||
ui_vp_realization->resize(ui_viewport->width(), ui_viewport->height());
|
||||
ui_vp_realization->set_image("realizationflash.png");
|
||||
ui_vp_realization->hide();
|
||||
ui_vp_realization->combo_resize(ui_viewport->width(), ui_viewport->height());
|
||||
|
||||
ui_vp_wtce->move(ui_viewport->x(), ui_viewport->y());
|
||||
ui_vp_wtce->combo_resize(ui_viewport->width(), ui_viewport->height());
|
||||
@ -1972,10 +1965,6 @@ void Courtroom::preanim_done()
|
||||
handle_chatmessage_3();
|
||||
}
|
||||
|
||||
void Courtroom::realization_done()
|
||||
{
|
||||
ui_vp_realization->hide();
|
||||
}
|
||||
|
||||
void Courtroom::start_chat_ticking()
|
||||
{
|
||||
@ -1985,8 +1974,7 @@ void Courtroom::start_chat_ticking()
|
||||
|
||||
if (m_chatmessage[REALIZATION] == "1")
|
||||
{
|
||||
realization_timer->start(60);
|
||||
ui_vp_realization->show();
|
||||
ui_vp_realization->play("realizationflash", "", "", 60);
|
||||
sfx_player->play(ao_app->get_custom_realization(m_chatmessage[CHAR_NAME]));
|
||||
}
|
||||
|
||||
|
||||
@ -592,7 +592,7 @@ QString AOApplication::get_custom_realization(QString p_char)
|
||||
|
||||
if (f_result == "")
|
||||
return get_sfx("realization");
|
||||
else return f_result;
|
||||
else return get_sfx_suffix(f_result);
|
||||
}
|
||||
|
||||
bool AOApplication::get_blank_blip()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user