Index: proj/include/proj_macros.h
===================================================================
--- proj/include/proj_macros.h	(revision 178)
+++ proj/include/proj_macros.h	(revision 179)
@@ -1,6 +1,8 @@
 #ifndef PROJ_MACROS_H_INCLUDED
 #define PROJ_MACROS_H_INCLUDED
 
+#include "graph_macros.h"
+
 // WASD Movement Keys
 #define W_MAKE_CODE     0x11    /** @brief W Make Code */
 #define W_BREAK_CODE    0x91    /** @brief W Break Code */
Index: proj/include/rectangle.h
===================================================================
--- proj/include/rectangle.h	(revision 178)
+++ proj/include/rectangle.h	(revision 179)
@@ -7,4 +7,17 @@
 rectangle_t* (rectangle_ctor)(int16_t x, int16_t y, uint16_t w, uint16_t h);
 void         (rectangle_dtor)(rectangle_t *p);
 
+void (rectangle_set_pos)          (rectangle_t *p,  int16_t x,  int16_t y);
+void (rectangle_set_size)         (rectangle_t *p, uint16_t w, uint16_t h);
+void (rectangle_set_fill_color)   (rectangle_t *p, uint32_t color);
+void (rectangle_set_outline_color)(rectangle_t *p, uint32_t color);
+void (rectangle_set_outline_width)(rectangle_t *p,  int16_t width);
+
+int16_t  (rectangle_get_x)(const rectangle_t *p);
+int16_t  (rectangle_get_y)(const rectangle_t *p);
+uint16_t (rectangle_get_w)(const rectangle_t *p);
+uint16_t (rectangle_get_h)(const rectangle_t *p);
+
+void (rectangle_draw)(const rectangle_t *p);
+
 #endif //RECTANGLE_H_INCLUDED
Index: proj/include/sprite.h
===================================================================
--- proj/include/sprite.h	(revision 178)
+++ proj/include/sprite.h	(revision 179)
@@ -7,8 +7,6 @@
 sprite_t* (sprite_ctor)(const char **xpm, int u0, int v0);
 void      (sprite_dtor)(sprite_t *p);
 
-void (sprite_set_x)     (sprite_t *p, int16_t x);
-void (sprite_set_y)     (sprite_t *p, int16_t y);
 void (sprite_set_pos)   (sprite_t *p, int16_t x, int16_t y);
 void (sprite_set_angle) (sprite_t *p, double angle);
 void (sprite_set_center)(sprite_t *p, int16_t u0, int16_t v0);
Index: proj/src/proj.c
===================================================================
--- proj/src/proj.c	(revision 178)
+++ proj/src/proj.c	(revision 179)
@@ -2,32 +2,21 @@
 #include <lcom/proj.h>
 #include <lcom/liblm.h>
 
-#include <stdbool.h>
-#include <stdint.h>
-
-#include "i8254.h"
-#include "kbc_macros.h"
-#include "graph_macros.h"
-#include "mouse_macros.h"
 #include "proj_macros.h"
-#include "errors.h"
+#include "proj_func.h"
 
-#include "sprite.h"
 #include "kbc.h"
-#include "graph.h"
 #include "timer.h"
 #include "keyboard.h"
 #include "mouse.h"
-#include "utils.h"
 #include "interrupts_func.h"
-#include "proj_func.h"
 
-#include "fast_math.h"
-#include <math.h>
+#include "graph.h"
+#include "sprite.h"
+#include "rectangle.h"
 
 #ifdef DIOGO
     #include "shooter.h"
-    #include "pistol.xpm"
 #endif
 #ifdef TELMO
     #include "crosshair.h"
@@ -78,6 +67,24 @@
         printf("Time taken: %d/%d \n", t, CLOCKS_PER_SEC);
         sprite_dtor(shooter1);
         */
+        /*
+        rectangle_t *rect = rectangle_ctor(100, 100, 100, 100);
+        rectangle_set_fill_color   (rect, 0x0000FF);
+        rectangle_set_outline_color(rect, 0xFF0000);
+        rectangle_set_outline_width(rect, 0);
+        rectangle_draw(rect);
+        rectangle_set_pos(rect, 205, 100);
+        rectangle_set_outline_width(rect, 1);
+        rectangle_draw(rect);
+        rectangle_set_pos(rect, 310, 100);
+        rectangle_set_outline_width(rect, 2);
+        rectangle_draw(rect);
+        rectangle_set_pos(rect, 415, 100);
+        rectangle_set_outline_width(rect, 3);
+        rectangle_draw(rect);
+
+        graph_draw();
+        */
     #endif
 
     #ifdef TELMO
@@ -92,10 +99,6 @@
     message msg;
     int good = 1;
 
-    #ifdef DIOGO
-        good = 0;
-    #endif
-
     while (good) {
         /* Get a request message. */
         if ((r = driver_receive(ANY, &msg, &ipc_status)) != 0) {
Index: proj/src/rectangle.c
===================================================================
--- proj/src/rectangle.c	(revision 178)
+++ proj/src/rectangle.c	(revision 179)
@@ -2,20 +2,72 @@
 
 #include "rectangle.h"
 
+#include "graph.h"
+#include "utils.h"
+
 struct rectangle{
-    int16_t x, y;
+    int16_t  x, y;
     uint16_t w, h;
     uint32_t fill_color;
     uint32_t outline_color;
-    uint16_t outline_width;
+    int16_t  outline_width;
 };
 
 rectangle_t* (rectangle_ctor)(int16_t x, int16_t y, uint16_t w, uint16_t h){
     rectangle_t *ret = (rectangle_t*)malloc(sizeof(rectangle_t));
-
+    if(ret == NULL) return NULL;
+    ret->x = x;
+    ret->y = y;
+    ret->w = w;
+    ret->h = h;
+    ret->fill_color    = 0xFFFFFF;
+    ret->outline_color = 0x000000;
+    ret->outline_width = 0;
     return ret;
 }
-void         (rectangle_dtor)(rectangle_t *p){
+void (rectangle_dtor)(rectangle_t *p){
     if(p == NULL) return;
     free(p);
 }
+
+void (rectangle_set_pos)          (rectangle_t *p,  int16_t x,  int16_t y){ p->x = x; p->y = y; }
+void (rectangle_set_size)         (rectangle_t *p, uint16_t w, uint16_t h){ p->w = w; p->h = h; }
+void (rectangle_set_fill_color)   (rectangle_t *p, uint32_t color        ){ p->fill_color = color; }
+void (rectangle_set_outline_color)(rectangle_t *p, uint32_t color        ){ p->outline_color = color; }
+void (rectangle_set_outline_width)(rectangle_t *p,  int16_t width        ){ p->outline_width = width; }
+
+int16_t  (rectangle_get_x)(const rectangle_t *p){ return p->x; }
+int16_t  (rectangle_get_y)(const rectangle_t *p){ return p->y; }
+uint16_t (rectangle_get_w)(const rectangle_t *p){ return p->w; }
+uint16_t (rectangle_get_h)(const rectangle_t *p){ return p->h; }
+
+static void (rectangle_draw_hline)(int16_t x, int16_t y, int16_t l, uint32_t color){
+    if(l < 0){ rectangle_draw_hline(x+l, y, -l, color); return; }
+    for(int16_t x_ = max(0,x); x_ < min(x+l,graph_get_XRes()); ++x_){
+        graph_set_pixel(x_, y, color);
+    }
+}
+
+static void (rectangle_draw_vline)(int16_t x, int16_t y, int16_t l, uint32_t color){
+    if(l < 0){ rectangle_draw_vline(x, y+l, -l, color); return; }
+    for(int16_t y_ = max(0,y); y_ < min(y+l,graph_get_YRes()); ++y_){
+        graph_set_pixel(x, y_, color);
+    }
+}
+
+void (rectangle_draw)(const rectangle_t *p){
+    for(int16_t y = max(p->y,0); y < min(p->y+p->h, graph_get_YRes()); ++y)
+        rectangle_draw_hline(p->x, y, p->w, p->fill_color);
+
+    int16_t step = (p->outline_width > 0 ? 1 : -1);
+    int16_t l = p->x, r = p->x+p->w, t = p->y, b = p->y+p->h;
+    if(step > 0){
+        --l; ++r; --t; ++b;
+    }
+    for(int16_t i = 0; i != p->outline_width; i += step, l -= step, r += step, t -= step, b += step){
+        rectangle_draw_hline(l  , t  , r-l, p->outline_color);
+        rectangle_draw_hline(l  , b-1, r-l, p->outline_color);
+        rectangle_draw_vline(l  , t  , b-t, p->outline_color);
+        rectangle_draw_vline(r-1, t  , b-t, p->outline_color);
+    }
+}
Index: proj/src/sprite.c
===================================================================
--- proj/src/sprite.c	(revision 178)
+++ proj/src/sprite.c	(revision 179)
@@ -40,9 +40,7 @@
     free(p);
 }
 
-void (sprite_set_x)     (sprite_t *p, int16_t x){ p->x = x; }
-void (sprite_set_y)     (sprite_t *p, int16_t y){ p->y = y; }
-void (sprite_set_pos)   (sprite_t *p, int16_t x, int16_t y){ sprite_set_x(p, x); sprite_set_y(p, y); }
+void (sprite_set_pos)   (sprite_t *p, int16_t x, int16_t y){ p->x = x; p->y = y; }
 void (sprite_set_angle) (sprite_t *p, double angle){ p->theta = angle; }
 void (sprite_set_center)(sprite_t *p, int16_t u0, int16_t v0){ p->u0 = u0; p->v0 = v0; }
 
