|
|
1.1 root 1: //
2: // nono
3: // Copyright (C) 2020 nono project
4: // Licensed under nono-license.txt
5: //
6:
7: //
8: // TVRAM モニタ (LUNA ではビットマップモニタ)
9: //
10:
11: #pragma once
12:
13: #include "wxscreenmonitor.h"
14: #include <array>
15:
16: class BT45xDevice;
17: class PlaneVRAMDevice;
18: class VideoCtlrDevice;
19:
20: // テキスト画面パネル
21: class WXTVRAMPanel : public WXScreenPanel
22: {
23: using inherited = WXScreenPanel;
24:
25: public:
26: explicit WXTVRAMPanel(wxWindow *parent);
27: ~WXTVRAMPanel() override;
28:
29: void EnablePlane(int plane, bool value);
30: void EnablePalette(bool value);
31:
32: private:
33: void Draw() override;
34:
35: void OnPaletteChanged(wxCommandEvent& event);
36: void GenPalette();
37:
38: std::array<Color, 256> pal {};
39: uint32 planemask {};
40: bool apply_palette {};
41:
42: BT45xDevice *bt45x {};
43: PlaneVRAMDevice *planevram {};
44: VideoCtlrDevice *videoctlr {};
45: };
46:
47: // テキスト画面ウィンドウ
48: class WXTVRAMWindow : public WXScreenWindow
49: {
50: using inherited = WXScreenWindow;
51:
52: public:
53: WXTVRAMWindow(wxWindow *parent, const wxString& name);
54: ~WXTVRAMWindow() override;
55:
56: private:
57: void UpdateInfo(TextScreen&, int px, int py) override;
58:
59: void OnPlane(wxCommandEvent&);
60: void DoPlane(int plane, bool value);
61: void OnApplyPalette(wxCommandEvent&);
62: void DoApplyPalette(bool value);
63:
64: PlaneVRAMDevice *planevram {};
65:
66: // イベントテーブル
67: wxDECLARE_EVENT_TABLE();
68: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.