Index: proj/include/graph.h
===================================================================
--- proj/include/graph.h	(revision 177)
+++ proj/include/graph.h	(revision 178)
@@ -1,9 +1,6 @@
 #ifndef GRAPH_H_INCLUDED
 #define GRAPH_H_INCLUDED
 
-#include <lcom/lcf.h>
-#include <stdint.h>
-
 /// MACROS
 //#define GET_ALP(n)          (0xFF & ((n) >> 24))
 #define GET_RED(n)          (0xFF & ((n) >> 16))
Index: proj/include/i8254.h
===================================================================
--- proj/include/i8254.h	(revision 177)
+++ proj/include/i8254.h	(revision 178)
@@ -1,8 +1,6 @@
 #ifndef _LCOM_I8254_H_
 #define _LCOM_I8254_H_
 
-#include <lcom/lcf.h>
-
 /** @defgroup i8254 i8254
  *
  * Constants for programming the i8254 Timer. Needs to be completed.
Index: proj/include/interrupts_func.h
===================================================================
--- proj/include/interrupts_func.h	(revision 177)
+++ proj/include/interrupts_func.h	(revision 178)
@@ -1,8 +1,6 @@
 #ifndef INTERRUPTS_FUNC_H_INCLUDED
 #define INTERRUPTS_FUNC_H_INCLUDED
 
-#include <stdint.h>
-
 /**
  * @brief Subscribes all drivers used (timer->keyboard->mouse)
  * @return ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
Index: proj/include/mouse.h
===================================================================
--- proj/include/mouse.h	(revision 177)
+++ proj/include/mouse.h	(revision 178)
@@ -1,8 +1,6 @@
 #ifndef MOUSE_H_INCLUDED
 #define MOUSE_H_INCLUDED
 
-#include <stdint.h>
-
 /**
  * @brief Subscribes Mouse Interrupts and disables Minix Default IH
  * @param interrupt_bit Bit of Interrupt Vector that will be set when Mouse Interrupt is pending
Index: proj/include/rectangle.h
===================================================================
--- proj/include/rectangle.h	(nonexistent)
+++ proj/include/rectangle.h	(revision 178)
@@ -0,0 +1,10 @@
+#ifndef RECTANGLE_H_INCLUDED
+#define RECTANGLE_H_INCLUDED
+
+struct rectangle;
+typedef struct rectangle rectangle_t;
+
+rectangle_t* (rectangle_ctor)(int16_t x, int16_t y, uint16_t w, uint16_t h);
+void         (rectangle_dtor)(rectangle_t *p);
+
+#endif //RECTANGLE_H_INCLUDED

Property changes on: proj/include/rectangle.h
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: proj/include/sprite.h
===================================================================
--- proj/include/sprite.h	(revision 177)
+++ proj/include/sprite.h	(revision 178)
@@ -13,10 +13,10 @@
 void (sprite_set_angle) (sprite_t *p, double angle);
 void (sprite_set_center)(sprite_t *p, int16_t u0, int16_t v0);
 
-int sprite_get_x(const sprite_t *p);
-int sprite_get_y(const sprite_t *p);
-int sprite_get_w(const sprite_t *p);
-int sprite_get_h(const sprite_t *p);
+int16_t  (sprite_get_x)(const sprite_t *p);
+int16_t  (sprite_get_y)(const sprite_t *p);
+uint16_t (sprite_get_w)(const sprite_t *p);
+uint16_t (sprite_get_h)(const sprite_t *p);
 
 void (sprite_draw)(const sprite_t *p);
 
Index: proj/include/timer.h
===================================================================
--- proj/include/timer.h	(revision 177)
+++ proj/include/timer.h	(revision 178)
@@ -5,8 +5,6 @@
 #ifndef TIMER_H_INCLUDED
 #define TIMER_H_INCLUDED
 
-#include <stdint.h>
-
 int (subscribe_timer_interrupt)(uint8_t interrupt_bit, int *interrupt_id);
 
 uint32_t no_interrupts;
Index: proj/src/fast_math.c
===================================================================
--- proj/src/fast_math.c	(revision 177)
+++ proj/src/fast_math.c	(revision 178)
@@ -1,3 +1,5 @@
+#include <lcom/lcf.h>
+
 #include "fast_math.h"
 
 #include <math.h>
Index: proj/src/graph.c
===================================================================
--- proj/src/graph.c	(revision 177)
+++ proj/src/graph.c	(revision 178)
@@ -1,9 +1,9 @@
+#include <lcom/lcf.h>
+
 #include "graph.h"
 #include "graph_macros.h"
 #include "errors.h"
 
-#include <lcom/lcf.h>
-
 #include <stdio.h>
 
 /// MACROS
@@ -55,7 +55,7 @@
 //}
 
 /// MEMORY
-static void    *video_mem = NULL; /** @brief Frame-buffer VM address. */
+static uint8_t *video_mem = NULL; /** @brief Frame-buffer VM address. */
 static uint8_t *video_buf = NULL; /** @brief Primary buffer for drawing before copying to video_mem. */
 static mmap_t mem_map;
 static int (graph_free_memory)(void) {
@@ -276,7 +276,7 @@
 }
 
 int (graph_draw)(void){
-    memcpy((uint8_t*)video_mem, video_buf, graph_get_vram_size());
+    memcpy(video_mem, video_buf, graph_get_vram_size());
     return 0;
 }
 
Index: proj/src/interrupts_func.c
===================================================================
--- proj/src/interrupts_func.c	(revision 177)
+++ proj/src/interrupts_func.c	(revision 178)
@@ -1,3 +1,5 @@
+#include <lcom/lcf.h>
+
 #include "interrupts_func.h"
 #include "timer.h"
 #include "i8254.h"
@@ -7,8 +9,6 @@
 #include "utils.h"
 #include "errors.h"
 
-#include <lcom/lcf.h>
-
 static int timer_subscribed = 0, timer_id;
 
 static int keyboard_subscribed = 0, kbc_id;
Index: proj/src/rectangle.c
===================================================================
--- proj/src/rectangle.c	(nonexistent)
+++ proj/src/rectangle.c	(revision 178)
@@ -0,0 +1,21 @@
+#include <lcom/lcf.h>
+
+#include "rectangle.h"
+
+struct rectangle{
+    int16_t x, y;
+    uint16_t w, h;
+    uint32_t fill_color;
+    uint32_t outline_color;
+    uint16_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));
+
+    return ret;
+}
+void         (rectangle_dtor)(rectangle_t *p){
+    if(p == NULL) return;
+    free(p);
+}

Property changes on: proj/src/rectangle.c
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: proj/src/sprite.c
===================================================================
--- proj/src/sprite.c	(revision 177)
+++ proj/src/sprite.c	(revision 178)
@@ -36,7 +36,7 @@
 }
 void (sprite_dtor)(sprite_t *p){
     if(p == NULL) return;
-    if(p->map) free(p->map);
+    free(p->map);
     free(p);
 }
 
@@ -46,10 +46,10 @@
 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; }
 
-int sprite_get_x(const sprite_t *p){ return p->x; }
-int sprite_get_y(const sprite_t *p){ return p->y; }
-int sprite_get_w(const sprite_t *p){ return p->w; }
-int sprite_get_h(const sprite_t *p){ return p->h; }
+int16_t  (sprite_get_x)(const sprite_t *p){ return p->x; }
+int16_t  (sprite_get_y)(const sprite_t *p){ return p->y; }
+uint16_t (sprite_get_w)(const sprite_t *p){ return p->w; }
+uint16_t (sprite_get_h)(const sprite_t *p){ return p->h; }
 
 void (sprite_src2pic)(const sprite_t *p, int16_t x, int16_t y, int16_t *u, int16_t *v){
     int16_t dx = x - p->x;
Index: proj/DR.mk
===================================================================
--- proj/DR.mk	(revision 177)
+++ proj/DR.mk	(revision 178)
@@ -2,7 +2,7 @@
 
 .PATH: ${.CURDIR}/src
 
-SRCS= proj.c graph.c sprite.c kbc.c keyboard.c mouse.c utils.c timer.c interrupts_func.c proj_func.c fast_math.c
+SRCS= proj.c graph.c sprite.c kbc.c keyboard.c mouse.c utils.c timer.c interrupts_func.c proj_func.c fast_math.c rectangle.c
 
 CPPFLAGS += -pedantic -I./include -I./bmp -I./xpm -D DIOGO -D __LCOM_OPTIMIZED_
 
Index: proj/Makefile
===================================================================
--- proj/Makefile	(revision 177)
+++ proj/Makefile	(revision 178)
@@ -2,7 +2,7 @@
 
 .PATH: ${.CURDIR}/src
 
-SRCS= proj.c graph.c sprite.c kbc.c keyboard.c mouse.c utils.c timer.c interrupts_func.c proj_func.c fast_math.c
+SRCS= proj.c graph.c sprite.c kbc.c keyboard.c mouse.c utils.c timer.c interrupts_func.c proj_func.c fast_math.c rectangle.c
 
 CPPFLAGS += -pedantic -I./include -I./bmp -I./xpm -D __LCOM_OPTIMIZED_
 
Index: proj/TB.mk
===================================================================
--- proj/TB.mk	(revision 177)
+++ proj/TB.mk	(revision 178)
@@ -2,7 +2,7 @@
 
 .PATH: ${.CURDIR}/src
 
-SRCS= proj.c graph.c sprite.c kbc.c keyboard.c mouse.c utils.c timer.c interrupts_func.c proj_func.c fast_math.c
+SRCS= proj.c graph.c sprite.c kbc.c keyboard.c mouse.c utils.c timer.c interrupts_func.c proj_func.c fast_math.c rectangle.c
 
 CPPFLAGS += -pedantic -I./include -I./bmp -I./xpm -D TELMO #-D __LCOM_OPTIMIZED_
 
