summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/debug/dvtext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/debug/dvtext.cpp')
-rw-r--r--src/emu/debug/dvtext.cpp39
1 files changed, 23 insertions, 16 deletions
diff --git a/src/emu/debug/dvtext.cpp b/src/emu/debug/dvtext.cpp
index 63ad674ec10..6a4d2893562 100644
--- a/src/emu/debug/dvtext.cpp
+++ b/src/emu/debug/dvtext.cpp
@@ -9,10 +9,12 @@
***************************************************************************/
#include "emu.h"
-#include "debugvw.h"
#include "dvtext.h"
+
#include "debugcon.h"
#include "debugger.h"
+#include "debugvw.h"
+
//**************************************************************************
// DEBUG VIEW TEXTBUF
@@ -22,11 +24,16 @@
// debug_view_textbuf - constructor
//-------------------------------------------------
-debug_view_textbuf::debug_view_textbuf(running_machine &machine, debug_view_type type, debug_view_osd_update_func osdupdate, void *osdprivate, text_buffer &textbuf)
- : debug_view(machine, type, osdupdate, osdprivate),
- m_textbuf(textbuf),
- m_at_bottom(true),
- m_topseq(0)
+debug_view_textbuf::debug_view_textbuf(
+ running_machine &machine,
+ debug_view_type type,
+ debug_view_osd_update_func osdupdate,
+ void *osdprivate,
+ text_buffer &textbuf)
+ : debug_view(machine, type, osdupdate, osdprivate)
+ , m_textbuf(textbuf)
+ , m_at_bottom(true)
+ , m_topseq(0)
{
}
@@ -47,7 +54,7 @@ debug_view_textbuf::~debug_view_textbuf()
void debug_view_textbuf::clear()
{
begin_update();
- text_buffer_clear(&m_textbuf);
+ text_buffer_clear(m_textbuf);
m_at_bottom = true;
m_topseq = 0;
end_update();
@@ -61,8 +68,8 @@ void debug_view_textbuf::clear()
void debug_view_textbuf::view_update()
{
// update the console info
- m_total.x = text_buffer_max_width(&m_textbuf);
- m_total.y = text_buffer_num_lines(&m_textbuf);
+ m_total.x = text_buffer_max_width(m_textbuf);
+ m_total.y = text_buffer_num_lines(m_textbuf);
if (m_total.x < 80)
m_total.x = 80;
@@ -71,24 +78,24 @@ void debug_view_textbuf::view_update()
if (!m_at_bottom)
{
curseq = m_topseq;
- if (!text_buffer_get_seqnum_line(&m_textbuf, curseq))
+ if (!text_buffer_get_seqnum_line(m_textbuf, curseq))
m_at_bottom = true;
}
if (m_at_bottom)
{
- curseq = text_buffer_line_index_to_seqnum(&m_textbuf, m_total.y - 1);
+ curseq = text_buffer_line_index_to_seqnum(m_textbuf, m_total.y - 1);
if (m_total.y < m_visible.y)
curseq -= m_total.y - 1;
else
curseq -= m_visible.y - 1;
}
- m_topleft.y = curseq - text_buffer_line_index_to_seqnum(&m_textbuf, 0);
+ m_topleft.y = curseq - text_buffer_line_index_to_seqnum(m_textbuf, 0);
// loop over visible rows
debug_view_char *dest = &m_viewdata[0];
for (u32 row = 0; row < m_visible.y; row++)
{
- const char *line = text_buffer_get_seqnum_line(&m_textbuf, curseq++);
+ const char *line = text_buffer_get_seqnum_line(m_textbuf, curseq++);
u32 col = 0;
// if this visible row is valid, add it to the buffer
@@ -133,7 +140,7 @@ void debug_view_textbuf::view_notify(debug_view_notification type)
/* otherwise, track the seqence number of the top line */
if (!m_at_bottom)
- m_topseq = text_buffer_line_index_to_seqnum(&m_textbuf, m_topleft.y);
+ m_topseq = text_buffer_line_index_to_seqnum(m_textbuf, m_topleft.y);
}
}
@@ -148,7 +155,7 @@ void debug_view_textbuf::view_notify(debug_view_notification type)
//-------------------------------------------------
debug_view_console::debug_view_console(running_machine &machine, debug_view_osd_update_func osdupdate, void *osdprivate)
- : debug_view_textbuf(machine, DVT_CONSOLE, osdupdate, osdprivate, *machine.debugger().console().get_console_textbuf())
+ : debug_view_textbuf(machine, DVT_CONSOLE, osdupdate, osdprivate, machine.debugger().console().get_console_textbuf())
{
}
@@ -163,6 +170,6 @@ debug_view_console::debug_view_console(running_machine &machine, debug_view_osd_
//-------------------------------------------------
debug_view_log::debug_view_log(running_machine &machine, debug_view_osd_update_func osdupdate, void *osdprivate)
- : debug_view_textbuf(machine, DVT_LOG, osdupdate, osdprivate, *machine.debugger().console().get_errorlog_textbuf())
+ : debug_view_textbuf(machine, DVT_LOG, osdupdate, osdprivate, machine.debugger().console().get_errorlog_textbuf())
{
}