Index: proj/include/ent.h
===================================================================
--- proj/include/ent.h	(revision 331)
+++ proj/include/ent.h	(revision 332)
@@ -1,7 +1,7 @@
 #ifndef ENT_H_INCLUDED
 #define ENT_H_INCLUDED
 
-#include "graph.h"
+#include "basic_sprite.h"
 #include "list.h"
 
 void (ent_set_scale) (double n);
Index: proj/libs/graph/include/graph.h
===================================================================
--- proj/libs/graph/include/graph.h	(revision 331)
+++ proj/libs/graph/include/graph.h	(revision 332)
@@ -40,19 +40,52 @@
 #define SET_BLU(n)          (((n)&0xFF)      )
 #define SET_RGB(r,g,b)      (SET_RED(r) | SET_GRE(g) | SET_BLU(b))
 
-// PUBLIC GET
+/**
+ * @brief Initialize graphics.
+ * @param   mode    Graphics mode to use
+ * @return  SUCCESS if operation was successful, other value otherwise
+ */
+int (graph_init)(uint16_t mode);
+
+/**
+ * @brief Cleanup graphics.
+ * @return  SUCCESS if operation was successful, other value otherwise
+ */
+int (graph_cleanup)(void);
+
+/**
+ * @brief Get screen X-resolution.
+ * @return Screen X-resolution
+ */
 uint16_t   (graph_get_XRes)         (void);
+/**
+ * @brief Get screen Y-resolution.
+ * @return Screen Y-resolution
+ */
 uint16_t   (graph_get_YRes)         (void);
+/**
+ * @brief Get number of bytes per pixel.
+ *
+ * That is, the number of bytes needed to encode the color of a pixel.
+ * @return Number of bytes per pixel
+ */
 uint16_t   (graph_get_bytes_pixel)  (void);
 
-// INIT
-int (graph_init)(uint16_t mode);
-
-// CLEANUP
-int (graph_cleanup)(void);
-
-// PIXEL DRAWING
-int (graph_set_pixel)             (uint16_t x, uint16_t y, uint32_t color);
+/**
+ * @brief Draw pixel with color.
+ * @param   x       X-position of pixel to draw
+ * @param   y       Y-position of pixel to draw
+ * @param   color   Color that will be used to draw the pixel
+ * @return  SUCCESS if operation was successful, other value otherwise
+ */
+void (graph_set_pixel)             (uint16_t x, uint16_t y, uint32_t color);
+/**
+ * @brief Draw pixel with color using position.
+ *
+ * Position is calculated from y*WIDTH+x.
+ * @param   pos     Position
+ * @param   color   Color that will be used to draw the pixel
+ */
 void (graph_set_pixel_pos)         (unsigned pos          , uint32_t color);
 
 // SCREEN
Index: proj/libs/graph/include/sprite.h
===================================================================
--- proj/libs/graph/include/sprite.h	(revision 331)
+++ proj/libs/graph/include/sprite.h	(revision 332)
@@ -11,6 +11,8 @@
  * @{
  */
 
+#include "basic_sprite.h"
+
 struct sprite;
 typedef struct sprite sprite_t;
 
Index: proj/libs/graph/src/graph.c
===================================================================
--- proj/libs/graph/src/graph.c	(revision 331)
+++ proj/libs/graph/src/graph.c	(revision 332)
@@ -256,15 +256,8 @@
 }
 
 /// PIXEL DRAWING
-int (graph_set_pixel)(uint16_t x, uint16_t y, uint32_t color) {
-    //pixels are certain to be inside can reduce lag
-    /*if (x < 0 || vbe_mem_info.XResolution <= x || y < 0 || vbe_mem_info.YResolution <= y) {
-        //printf("%s: invalid pixel.\n", __func__);
-        return OUT_OF_RANGE;
-    }*/
-    unsigned int pos = (x + y * vbe_mem_info.XResolution) * 3/*graph_get_bytes_pixel()*/;
-    memcpy(video_buf + pos, &color, 3/*graph_get_bytes_pixel()*/);
-    return SUCCESS;
+void (graph_set_pixel)(uint16_t x, uint16_t y, uint32_t color) {
+    memcpy(video_buf + (x+y*graph_get_XRes())*graph_get_bytes_pixel(), &color, graph_get_bytes_pixel());
 }
 void (graph_set_pixel_pos)(unsigned pos, uint32_t color){
     memcpy(video_buf + pos, &color, graph_get_bytes_pixel());
@@ -273,6 +266,8 @@
 int (graph_draw)(void){ memcpy(video_mem, video_buf, graph_get_vram_size()); return SUCCESS; }
 
 ///SPRITE
+#include "sprite.h"
+
 #include "utils.h"
 #include "fast_math.h"
 #include <math.h>
Index: proj/src/ent.c
===================================================================
--- proj/src/ent.c	(revision 331)
+++ proj/src/ent.c	(revision 332)
@@ -3,6 +3,7 @@
 #include "ent.h"
 
 #include "graph.h"
+#include "sprite.h"
 #include "utils.h"
 #include "rectangle.h"
 #include "font.h"
Index: proj/src/proj.c
===================================================================
--- proj/src/proj.c	(revision 331)
+++ proj/src/proj.c	(revision 332)
@@ -18,6 +18,7 @@
 #include "makecode_map.h"
 
 #include "graph.h"
+#include "sprite.h"
 #include "rectangle.h"
 #include "font.h"
 #include "ent.h"
