54 #ifndef video_screen_h
55 #define video_screen_h
57 #include "../r_code/object.h"
59 namespace video_screen {
73 delete fovea_patterns_;
81 bool load(
const std::vector<r_code::Code *> *objects);
92 void move_eye(
int delta_x,
int delta_y,
int& actual_delta_x,
int& actual_delta_y);
103 void clear_screen() {
104 for (
size_t i = 0; i < width_ * height_; ++i)
114 bool get_screen(
int x,
int y)
const {
115 if (x < 0 || x >= width_ || y < 0 || y >= height_)
118 return screen_[y * width_ + x];
127 void set_screen(
int x,
int y,
bool value) {
128 if (x < 0 || x >= width_ || y < 0 || y >= height_)
131 screen_[y * width_ + x] = value;
137 void draw_paddle(
int x,
int y) {
138 set_screen(x, y - 1,
true);
139 set_screen(x, y,
true);
140 set_screen(x, y + 1,
true);
146 void draw_ball(
int x,
int y) {
148 set_screen(x, y,
true);