mirror of
https://github.com/dingusdev/dingusppc.git
synced 2025-01-24 13:30:26 +00:00
appleramdac: Add get_clut_entry_cb.
This commit is contained in:
parent
9a26016ed4
commit
97f08f21b7
@ -64,6 +64,10 @@ PlatinumCtrl::PlatinumCtrl() : MemCtrlBase(), VideoCtrlBase(640, 480) {
|
||||
|
||||
// attach DACula RAMDAC
|
||||
this->dacula = std::unique_ptr<AppleRamdac>(new AppleRamdac(DacFlavour::DACULA));
|
||||
this->dacula->get_clut_entry_cb = [this](uint8_t index, uint8_t *colors) {
|
||||
uint8_t a;
|
||||
this->get_palette_color(index, colors[0], colors[1], colors[2], a);
|
||||
};
|
||||
this->dacula->set_clut_entry_cb = [this](uint8_t index, uint8_t *colors) {
|
||||
this->set_palette_color(index, colors[0], colors[1], colors[2], 0xFF);
|
||||
};
|
||||
|
@ -65,6 +65,7 @@ enum RamdacRegs : uint8_t {
|
||||
|
||||
}; // namespace RamdacRegs
|
||||
|
||||
typedef std::function<void(uint8_t index, uint8_t *colors)> GetClutEntryCallback;
|
||||
typedef std::function<void(uint8_t index, uint8_t *colors)> SetClutEntryCallback;
|
||||
typedef std::function<void(bool cursor_on)> CursorCtrlCallback;
|
||||
|
||||
@ -89,6 +90,7 @@ public:
|
||||
void measure_hw_cursor(uint8_t *fb_ptr);
|
||||
void draw_hw_cursor(uint8_t *src_buf, uint8_t *dst_buf, int dst_pitch);
|
||||
|
||||
GetClutEntryCallback get_clut_entry_cb = nullptr;
|
||||
SetClutEntryCallback set_clut_entry_cb = nullptr;
|
||||
CursorCtrlCallback cursor_ctrl_cb = nullptr;
|
||||
|
||||
|
@ -94,6 +94,10 @@ ControlVideo::ControlVideo()
|
||||
|
||||
// attach RAMDAC
|
||||
this->radacal = std::unique_ptr<AppleRamdac>(new AppleRamdac(DacFlavour::RADACAL));
|
||||
this->radacal->get_clut_entry_cb = [this](uint8_t index, uint8_t *colors) {
|
||||
uint8_t a;
|
||||
this->get_palette_color(index, colors[0], colors[1], colors[2], a);
|
||||
};
|
||||
this->radacal->set_clut_entry_cb = [this](uint8_t index, uint8_t *colors) {
|
||||
this->set_palette_color(index, colors[0], colors[1], colors[2], 0xFF);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user