--- nono/vm/lcd.h 2026/04/29 17:05:29 1.1.1.12 +++ nono/vm/lcd.h 2026/04/29 17:06:01 1.1.1.15 @@ -11,7 +11,8 @@ #pragma once #include "device.h" -#include "monitor.h" + +class UIMessage; class LCDDevice : public Device { @@ -20,6 +21,7 @@ class LCDDevice : public Device LCDDevice(); ~LCDDevice() override; + bool Init() override; void ResetHard(bool poweron) override; void PowerOff() override; @@ -56,7 +58,7 @@ class LCDDevice : public Device const uint8 *GetFont(uint ch) const; private: - DECLARE_MONITOR_CALLBACK(MonitorUpdate); + DECLARE_MONITOR_SCREEN(MonitorScreen); // 現在のアドレスでデータレジスタにラッチ void LatchData(); @@ -83,11 +85,13 @@ class LCDDevice : public Device uint8 ddram[0x80] {}; uint8 cgram[0x40] {}; - Monitor monitor { this }; + Monitor *monitor {}; + + UIMessage *uimessage {}; static const uint8 CGROM[12 * 16 * 8]; }; -static inline LCDDevice *GetLCDDevice() { +inline LCDDevice *GetLCDDevice() { return Object::GetObject(OBJ_LCD); }