--- nono/vm/newsio.cpp 2026/04/29 17:05:29 1.1.1.3 +++ nono/vm/newsio.cpp 2026/04/29 17:06:01 1.1.1.7 @@ -36,7 +36,9 @@ #include "lance.h" #include "mainbus.h" #include "mk48t02.h" +#include "monitor.h" #include "newsctlr.h" +#include "nop.h" #include "scc.h" #include "subram.h" #include "vm.h" @@ -82,11 +84,10 @@ NewsIODevice::NewsIODevice() src_screen.Init(75, 64, TextScreen::Ring); - monitor.func = ToMonitorCallback(&NewsIODevice::MonitorUpdate); - monitor.SetSize(src_screen.GetCol(), 1 + 32); - monitor.SetMaxHeight(1 + 64); - monitor.Regist(ID_SUBWIN_NEWSIO); - + monitor = gMonitorManager->Regist(ID_SUBWIN_NEWSIO, this); + monitor->SetCallback(&NewsIODevice::MonitorScreen); + monitor->SetSize(src_screen.GetCol(), 1 + 32); + monitor->SetMaxHeight(1 + 64); } // デストラクタ @@ -98,10 +99,6 @@ NewsIODevice::~NewsIODevice() bool NewsIODevice::Init() { - if (inherited::Init() == false) { - return false; - } - const ConfigItem& olditem = gConfig->Find("xxx-news-sci-ignore"); const ConfigItem& newitem = gConfig->Find("xxx-news-sic-ignore"); @@ -199,11 +196,11 @@ NewsIODevice::InitMonitor() } // 下半分は NewsCtlr で処理。 - newsctlr->MonitorUpdateNewsCtlr(screen, y); + newsctlr->MonitorScreenNewsCtlr(screen, y); } void -NewsIODevice::MonitorUpdate(Monitor *, TextScreen& screen) +NewsIODevice::MonitorScreen(Monitor *, TextScreen& screen) { // pos が表示開始位置(0-) int pos = (int)screen.userdata;