Merge branch 'rr1-maint'

This commit is contained in:
Ilari Liusvaara 2013-02-09 13:02:04 +02:00
commit bf3255e315
3 changed files with 340 additions and 176 deletions

View file

@ -95,7 +95,7 @@ gambatte (for gambatte core)
\begin_deeper
\begin_layout Enumerate
SVN r320
SVN r320, r358 or r364
\end_layout
\begin_layout Enumerate
@ -144,17 +144,15 @@ libao (libao sound only)
\end_layout
\begin_layout Enumerate
Lua (if Lua support is needed).
Lua version 5.1.X or 5.2.X
\end_layout
\begin_deeper
\begin_layout Itemize
Version 5.1.X or 5.2X.
\end_layout
\end_deeper
\begin_layout Enumerate
G++ 4.6 (bsnes doesn't seem to like 4.7, status for gambatte is unknown).
G++ 4.6 or 4.7
\end_layout
\begin_layout Enumerate
libopus (optional, for commentary track tool)
\end_layout
\begin_layout Section
@ -3259,6 +3257,103 @@ Callback: on_post_rewind()
Called just after unsafe rewind has occured.
\end_layout
\begin_layout Section
Movie editor
\end_layout
\begin_layout Itemize
The editor edits in-memory movie.
\end_layout
\begin_layout Itemize
Because past can't be edited and readwrite mode doesn't allow future, editing
only works in
\emph on
read only
\emph default
mode.
\end_layout
\begin_layout Itemize
Keyboard triggers the normal hotkeys and bindings.
\end_layout
\begin_layout Subsection
Left button actions
\end_layout
\begin_layout Itemize
Clicking on cell in future (indicated by lack of redish background) toggles
it (if it is a button) or prompts for a value (if it is an axis)
\end_layout
\begin_layout Itemize
Dragging vertically toggles sequence of buttons or changes a sequence of
axis values.
\end_layout
\begin_layout Subsection
Right button actions
\end_layout
\begin_layout Standard
The right mouse button pops up a context-sensitive menu:
\end_layout
\begin_layout Itemize
Toggle <something>: Toggle this button
\end_layout
\begin_layout Itemize
Change <something>: Change this axis value
\end_layout
\begin_layout Itemize
Insert frame after: Insert a frame after this frame
\end_layout
\begin_layout Itemize
Append frame: Append a frame to movie
\end_layout
\begin_layout Itemize
Append frames: Append specified number of frames to movie
\end_layout
\begin_layout Itemize
Delete frame: Delete this frame
\end_layout
\begin_layout Itemize
Delete subframe: Delete this subframe
\end_layout
\begin_layout Itemize
Truncate movie: Delete this subframe and everything after it.
\end_layout
\begin_layout Itemize
Scroll to frame: Prompt for a frame and scroll the display to that frame.
\end_layout
\begin_layout Itemize
Scroll to current frame: Scroll the display to current position
\end_layout
\begin_layout Itemize
Run to frame: Prompts for frame and runs the emulation to that frame.
\end_layout
\begin_layout Itemize
Change number of lines visible: Change the height of the movie display (1
to 255).
\end_layout
\begin_layout Itemize
Lock scroll to playback: While playing back or rewinding movies, the display
will follow if enabled.
\end_layout
\begin_layout Section
Memory watch expression syntax
\end_layout
@ -3394,6 +3489,11 @@ D : read_unsigned_dword(a)
C0x<number>z : Push number <number> (hexadecimal) to stack.
\end_layout
\begin_layout Itemize
H<digit> : Set hexadecimal mode with specified number of digits (use A-G
for 10-16 digits).
\end_layout
\begin_layout Itemize
Q : read_unsigned_qword(a)
\end_layout

File diff suppressed because it is too large Load diff

View file

@ -31,6 +31,7 @@ enum
wxID_APPEND_FRAMES,
wxID_TRUNCATE,
wxID_SCROLL_FRAME,
wxID_SCROLL_CURRENT_FRAME
};
void update_movie_state();
@ -338,7 +339,7 @@ private:
void on_mouse1(unsigned x, unsigned y, bool polarity);
void on_mouse2(unsigned x, unsigned y, bool polarity);
void do_toggle_buttons(unsigned idx, uint64_t row1, uint64_t row2);
void do_alter_axis(unsigned idx, uint64_t row);
void do_alter_axis(unsigned idx, uint64_t row1, uint64_t row2);
void do_append_frames(uint64_t count);
void do_append_frames();
void do_insert_frame_after(uint64_t row);
@ -346,6 +347,7 @@ private:
void do_truncate(uint64_t row);
void do_set_stop_at_frame();
void do_scroll_to_frame();
void do_scroll_to_current_frame();
uint64_t first_editable(unsigned index);
uint64_t first_nextframe();
int width(controller_frame& f);
@ -572,9 +574,9 @@ void wxeditor_movie::_moviepanel::render_linen(text_framebuffer& fb, controller_
//Button.
char c[2];
bool v = (fcontrols.read_index(f, i.index) != 0);
c[0] = v ? i.ch : ' ';
c[0] = i.ch;
c[1] = 0;
fb.write(c, 0, divcnt + 1 + i.position_left, y, 0x000000, bgc);
fb.write(c, 0, divcnt + 1 + i.position_left, y, v ? 0x000000 : 0xC8C8C8, bgc);
} else if(i.type == 1) {
//Axis.
char c[7];
@ -648,10 +650,11 @@ void wxeditor_movie::_moviepanel::do_toggle_buttons(unsigned idx, uint64_t row1,
max_subframe = _press_line; //Reparse.
}
void wxeditor_movie::_moviepanel::do_alter_axis(unsigned idx, uint64_t row)
void wxeditor_movie::_moviepanel::do_alter_axis(unsigned idx, uint64_t row1, uint64_t row2)
{
frame_controls* _fcontrols = &fcontrols;
uint64_t line = row;
uint64_t line = row1;
uint64_t line2 = row2;
short value;
bool valid = true;
runemufn([idx, line, &value, _fcontrols, &valid]() {
@ -679,13 +682,17 @@ void wxeditor_movie::_moviepanel::do_alter_axis(unsigned idx, uint64_t row)
wxMessageBox(wxT("Invalid value"), _T("Error"), wxICON_EXCLAMATION | wxOK, m);
return;
}
runemufn([idx, line, value, _fcontrols]() {
if(line > line2)
std::swap(line, line2);
runemufn([idx, line, line2, value, _fcontrols]() {
uint64_t fedit = real_first_editable(*_fcontrols, idx);
controller_frame_vector& fv = movb.get_movie().get_frame_vector();
if(line < fedit || line >= fv.size())
return;
controller_frame cf = fv[line];
_fcontrols->write_index(cf, idx, value);
for(uint64_t i = line; i <= line2; i++) {
if(i < fedit || i >= fv.size())
continue;
controller_frame cf = fv[i];
_fcontrols->write_index(cf, idx, value);
}
});
}
@ -874,19 +881,12 @@ void wxeditor_movie::_moviepanel::on_mouse0(unsigned x, unsigned y, bool polarit
unsigned off = divcnt + 1;
unsigned idx = i.index;
frame_controls* _fcontrols = &fcontrols;
if(press_x >= i.position_left + off && press_x < i.position_left + i.reserved + off) {
if(i.type == 0) {
//Button.
if(press_x == x) {
//Drag action.
do_toggle_buttons(idx, press_line, line);
}
} else if(i.type == 1) {
if(press_x == x && press_line == line) {
//Click change value.
do_alter_axis(idx, line);
}
}
if((press_x >= i.position_left + off && press_x < i.position_left + i.reserved + off) &&
(x >= i.position_left + off && x < i.position_left + i.reserved + off)) {
if(i.type == 0)
do_toggle_buttons(idx, press_line, line);
else if(i.type == 1)
do_alter_axis(idx, press_line, line);
}
}
}
@ -921,6 +921,12 @@ void wxeditor_movie::_moviepanel::do_scroll_to_frame()
signal_repaint();
}
void wxeditor_movie::_moviepanel::do_scroll_to_current_frame()
{
moviepos = cached_cffs;
signal_repaint();
}
void wxeditor_movie::_moviepanel::on_popup_menu(wxCommandEvent& e)
{
wxMenuItem* tmpitem;
@ -930,7 +936,7 @@ void wxeditor_movie::_moviepanel::on_popup_menu(wxCommandEvent& e)
do_toggle_buttons(press_index, press_line, press_line);
return;
case wxID_CHANGE:
do_alter_axis(press_index, press_line);
do_alter_axis(press_index, press_line, press_line);
return;
case wxID_APPEND_FRAME:
do_append_frames(1);
@ -956,6 +962,9 @@ void wxeditor_movie::_moviepanel::on_popup_menu(wxCommandEvent& e)
case wxID_SCROLL_FRAME:
do_scroll_to_frame();
return;
case wxID_SCROLL_CURRENT_FRAME:
do_scroll_to_current_frame();
return;
case wxID_POSITION_LOCK:
if(!current_popup)
return;
@ -1065,6 +1074,7 @@ void wxeditor_movie::_moviepanel::on_mouse2(unsigned x, unsigned y, bool polarit
menu.AppendSeparator();
outrange:
menu.Append(wxID_SCROLL_FRAME, wxT("Scroll to frame..."));
menu.Append(wxID_SCROLL_CURRENT_FRAME, wxT("Scroll to current frame"));
menu.Append(wxID_RUN_TO_FRAME, wxT("Run to frame..."));
menu.Append(wxID_CHANGE_LINECOUNT, wxT("Change number of lines visible"));
menu.AppendCheckItem(wxID_POSITION_LOCK, wxT("Lock scroll to playback"))->Check(position_locked);