2020-08-21 18:13:08 +00:00
|
|
|
inline unsigned char to_vram_word(pixel_t screen_v) {
|
|
|
|
return static_cast<unsigned char>(screen_v / 16);
|
2019-11-21 20:53:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class VRAMWord {
|
|
|
|
public:
|
|
|
|
// Code generation will require direct access to v, if performing
|
|
|
|
// arithmetic with a local variable...
|
2020-08-21 18:13:08 +00:00
|
|
|
unsigned char v;
|
2019-11-21 20:53:24 +00:00
|
|
|
|
2020-08-21 18:13:08 +00:00
|
|
|
void operator =(pixel_t screen_v) {
|
2019-11-21 20:53:24 +00:00
|
|
|
v = to_vram_word(screen_v);
|
|
|
|
}
|
|
|
|
};
|