Index: proj/include/proj_structures.h
===================================================================
--- proj/include/proj_structures.h	(revision 323)
+++ proj/include/proj_structures.h	(revision 324)
@@ -52,11 +52,11 @@
 
 void host_info_dtor(host_info_t *p);
 
-remote_info_t* remote_info_ctor();
+remote_info_t* remote_info_ctor(void);
 
 void remote_info_dtor(remote_info_t *p);
 
-bullet_info_t* bullet_info_ctor();
+bullet_info_t* bullet_info_ctor(void);
 
 void bullet_info_dtor(bullet_info_t *p);
 
Index: proj/libs/graph/src/graph.c
===================================================================
--- proj/libs/graph/src/graph.c	(revision 323)
+++ proj/libs/graph/src/graph.c	(revision 324)
@@ -8,22 +8,22 @@
 #define VC_BIOS_SERV  0x10 /** @brief Interrupt service of video card */
 #define VBE_CALL      0x4F /** @brief VBE call function specifier */
 
-//#define MBYTE_BASE  0x0         /** @brief Base address (zero address) */
-//#define MBYTE_SIZE  0xFFFFF     /** @brief Size of a mebibyte */
+#define MBYTE_BASE  0x0         /** @brief Base address (zero address) */
+#define MBYTE_SIZE  0xFFFFF     /** @brief Size of a mebibyte */
 
 // Graphics Functions
-//#define VBE_CTRL_INFO       0x00    /** @brief Get VBE Controller Information */
+#define VBE_CTRL_INFO       0x00    /** @brief Get VBE Controller Information */
 #define VBE_MD_INFO         0x01    /** @brief Get VBE Mode Information */
 #define SET_VBE_MD          0x02    /** @brief Set VBE Mode */
 
 // Error codes (AH)
 #define AH_SUCCESS          0x00    /** @brief Success code on BIOS call */
-//#define AH_FUNC_CALL_FAIL   0x01    /** @brief Function call failed */
-//#define AH_FUNC_NOT_SUPP    0x02    /** @brief Function call is not supported in current HW configuration */
-//#define AH_FUNC_INVALID     0x03    /** @brief Invalid function in current video mode */
+#define AH_FUNC_CALL_FAIL   0x01    /** @brief Function call failed */
+#define AH_FUNC_NOT_SUPP    0x02    /** @brief Function call is not supported in current HW configuration */
+#define AH_FUNC_INVALID     0x03    /** @brief Invalid function in current video mode */
 
 /// MACROS
-//#define FAR2PHYS(n)         ((((n)>>12) & 0xFFFFFFF0) + ((n) & 0x0000FFFF))
+#define FAR2PHYS(n)         ((((n)>>12) & 0xFFFFFFF0) + ((n) & 0x0000FFFF))
 
 /// STRUCT
 typedef struct __attribute__((packed)) {
Index: proj/libs/graph/src/menu.c
===================================================================
--- proj/libs/graph/src/menu.c	(revision 323)
+++ proj/libs/graph/src/menu.c	(revision 324)
@@ -8,11 +8,11 @@
 #include "proj_macros.h"
 #include "errors.h"
 
-const int W  = 400;
-const int H  = 60;
-const int W1 = 40;
-const int H1 = 40;
-const int H2 = 20;
+static const int W  = 400;
+static const int H  = 60;
+static const int W1 = 40;
+static const int H1 = 40;
+static const int H2 = 20;
 
 struct menu {
     const font_t *fnt;
@@ -23,10 +23,10 @@
 };
 
 static int menu_recalculate(menu_t *menu){
-    const int Wtotal = 2*W1+W;
-    const int Htotal = 2*H1+menu->sz*H+(menu->sz-1)*H2;
-    int x = graph_get_XRes()/2-Wtotal/2;
-    int y = graph_get_YRes()/2-Htotal/2;
+    const uint16_t Wtotal = 2*W1+W;
+    const uint16_t Htotal = (uint16_t)(2*H1+menu->sz*H+(menu->sz-1)*H2);
+    int16_t x = graph_get_XRes()/2-Wtotal/2;
+    int16_t y = graph_get_YRes()/2-Htotal/2;
     rectangle_set_pos (menu->frame, x, y);
     rectangle_set_size(menu->frame, Wtotal, Htotal);
     x += W1; y += H1;
@@ -86,7 +86,7 @@
     if(!click) return -1;
     for(size_t i = 0; i < menu->sz; ++i)
         if(rectangle_collide_point(menu->r[i], *get_mouse_X(), *get_mouse_Y()))
-            return i;
+            return (int)i;
     return -1;
 }
 
Index: proj/libs/kbc/src/mouse.c
===================================================================
--- proj/libs/kbc/src/mouse.c	(revision 323)
+++ proj/libs/kbc/src/mouse.c	(revision 324)
@@ -19,23 +19,23 @@
 // Byte 2 - Y delta
 
 /* Mouse Commands */
-//#define RESET           0xFF /* @brief Reset mouse */
-//#define RESEND          0xFE /* @brief Resend command */
-//#define DEFAULT         0xF6 /* @brief Set default values */
+#define RESET           0xFF /* @brief Reset mouse */
+#define RESEND          0xFE /* @brief Resend command */
+#define DEFAULT         0xF6 /* @brief Set default values */
 #define DIS_DATA_REP    0xF5 /* @brief Disable Data Reporting */
 #define ENABLE_DATA_REP 0xF4 /* @brief Enable Data Reporting */
-//#define SET_SAMPLE_RT   0xF3 /* @brief Sets state sampling rate */
-//#define SET_REMOTE_MD   0xF0 /* @brief Sets Mouse on Remote Mode, data on request */
+#define SET_SAMPLE_RT   0xF3 /* @brief Sets state sampling rate */
+#define SET_REMOTE_MD   0xF0 /* @brief Sets Mouse on Remote Mode, data on request */
 #define READ_DATA       0xEB /* @brief Sends data packet request */
-//#define SET_STREAM_MD   0xEA /* @brief Sets mouse on Stream Mode, data on events */
-//#define STATUS_REQUEST  0xE9 /* @brief Get mouse configuration */
-//#define SET_RESOLUTION  0xE8 /* @brief Sets resolution for mouse movement */
-//#define SCALING_ACC_MD  0xE7 /* @brief Sets scaling on acceleration mode */
-//#define SCALING_LIN_MD  0xE6 /* @brief Sets scaling on linear mode */
+#define SET_STREAM_MD   0xEA /* @brief Sets mouse on Stream Mode, data on events */
+#define STATUS_REQUEST  0xE9 /* @brief Get mouse configuration */
+#define SET_RESOLUTION  0xE8 /* @brief Sets resolution for mouse movement */
+#define SCALING_ACC_MD  0xE7 /* @brief Sets scaling on acceleration mode */
+#define SCALING_LIN_MD  0xE6 /* @brief Sets scaling on linear mode */
 
 /* Mouse Controller Responses */
 #define ACK_OK      0xFA /* @brief Operation sucessful */
-//#define ACK_INVALID 0xFE /* @brief Invalid Byte, first occurence */
+#define ACK_INVALID 0xFE /* @brief Invalid Byte, first occurence */
 #define ACK_ERROR   0xFC /* @brief Invalid Byte on resend */
 
 int (subscribe_mouse_interrupt)(uint8_t interrupt_bit, int *interrupt_id) {
Index: proj/libs/timer/src/timer.c
===================================================================
--- proj/libs/timer/src/timer.c	(revision 323)
+++ proj/libs/timer/src/timer.c	(revision 324)
@@ -2,55 +2,55 @@
 
 #include "timer.h"
 
-//#define TIMER_FREQ     1193182                                                          /**< @brief clock frequency for timer in PC and AT */
-//#define TIMER_MIN_FREQ (TIMER_FREQ/UINT16_MAX) + ((TIMER_FREQ % UINT16_MAX) ? 1 : 0)    /**< @brief mininum frequency for timer */
+#define TIMER_FREQ     1193182                                                          /**< @brief clock frequency for timer in PC and AT */
+#define TIMER_MIN_FREQ (TIMER_FREQ/UINT16_MAX) + ((TIMER_FREQ % UINT16_MAX) ? 1 : 0)    /**< @brief mininum frequency for timer */
 
 /* I/O port addresses */
 
-//#define TIMER_0    0x40         /**< @brief Timer 0 count register */
-//#define TIMER_1    0x41         /**< @brief Timer 1 count register */
-//#define TIMER_2    0x42         /**< @brief Timer 2 count register */
-//#define TIMER_CTRL 0x43         /**< @brief Control register */
+#define TIMER_0    0x40         /**< @brief Timer 0 count register */
+#define TIMER_1    0x41         /**< @brief Timer 1 count register */
+#define TIMER_2    0x42         /**< @brief Timer 2 count register */
+#define TIMER_CTRL 0x43         /**< @brief Control register */
 
-//#define SPEAKER_CTRL 0x61       /**< @brief Register for speaker control  */
+#define SPEAKER_CTRL 0x61       /**< @brief Register for speaker control  */
 
 /* Timer control */
 
 /* Timer selection: bits 7 and 6 */
 
-//#define TIMER_SEL0   0x00              /**< @brief Control Word for Timer 0 */
-//#define TIMER_SEL1   BIT(6)            /**< @brief Control Word for Timer 1 */
-//#define TIMER_SEL2   BIT(7)            /**< @brief Control Word for Timer 2 */
-//#define TIMER_RB_CMD (BIT(7) | BIT(6)) /**< @brief Read Back Command */
+#define TIMER_SEL0   0x00              /**< @brief Control Word for Timer 0 */
+#define TIMER_SEL1   BIT(6)            /**< @brief Control Word for Timer 1 */
+#define TIMER_SEL2   BIT(7)            /**< @brief Control Word for Timer 2 */
+#define TIMER_RB_CMD (BIT(7) | BIT(6)) /**< @brief Read Back Command */
 
 /* Register selection: bits 5 and 4 */
 
-//#define TIMER_LSB     BIT(4)                    /**< @brief Initialize Counter LSB only */
-//#define TIMER_MSB     BIT(5)                    /**< @brief Initialize Counter MSB only */
-//#define TIMER_LSB_MSB (TIMER_LSB | TIMER_MSB)   /**< @brief Initialize LSB first and MSB afterwards */
-//#define TIMER_INMODE_MASK 0x30                  /**< @brief Mask for Timer Counter Mode */
-//#define TIMER_INMODE_POS  4                     /**< @brief Bit position of Timer Counter Mode */
+#define TIMER_LSB     BIT(4)                    /**< @brief Initialize Counter LSB only */
+#define TIMER_MSB     BIT(5)                    /**< @brief Initialize Counter MSB only */
+#define TIMER_LSB_MSB (TIMER_LSB | TIMER_MSB)   /**< @brief Initialize LSB first and MSB afterwards */
+#define TIMER_INMODE_MASK 0x30                  /**< @brief Mask for Timer Counter Mode */
+#define TIMER_INMODE_POS  4                     /**< @brief Bit position of Timer Counter Mode */
 
 /* Operating mode: bits 3, 2 and 1 */
 
-//#define TIMER_SQR_WAVE (BIT(2) | BIT(1)) /**< @brief Mode 3: square wave generator */
-//#define TIMER_RATE_GEN BIT(2)            /**< @brief Mode 2: rate generator */
-//#define TIMER_MODE_MASK 0x0E             /**< @brief Mask for mode */
-//#define TIMER_MODE_POS  1                /**< @brief Position of smallest bit from mode */
-//#define TIMER_MODE_2ALT 0x6              /**< @brief Alternative notation for mode 2 */
-//#define TIMER_MODE_3ALT 0x7              /**< @brief Alternative notation for mode 3 */
-//#define TIMER_MODE_RED2 0x03             /**< @brief Reduce 3-bit mode to 2-bit mode */
+#define TIMER_SQR_WAVE (BIT(2) | BIT(1)) /**< @brief Mode 3: square wave generator */
+#define TIMER_RATE_GEN BIT(2)            /**< @brief Mode 2: rate generator */
+#define TIMER_MODE_MASK 0x0E             /**< @brief Mask for mode */
+#define TIMER_MODE_POS  1                /**< @brief Position of smallest bit from mode */
+#define TIMER_MODE_2ALT 0x6              /**< @brief Alternative notation for mode 2 */
+#define TIMER_MODE_3ALT 0x7              /**< @brief Alternative notation for mode 3 */
+#define TIMER_MODE_RED2 0x03             /**< @brief Reduce 3-bit mode to 2-bit mode */
 
 /* Counting mode: bit 0 */
 
-//#define TIMER_BCD 0x01 /**< @brief Count in BCD */
-//#define TIMER_BIN 0x00 /**< @brief Count in binary */
+#define TIMER_BCD 0x01 /**< @brief Count in BCD */
+#define TIMER_BIN 0x00 /**< @brief Count in binary */
 
 /* READ-BACK COMMAND FORMAT */
 
-//#define TIMER_RB_COUNT_  BIT(5)         /**< @brief Read counter value on read-back (0 to activate) */
-//#define TIMER_RB_STATUS_ BIT(4)         /**< @brief Read status value on read-back (0 to activate) */
-//#define TIMER_RB_SEL(n)  BIT((n) + 1)   /**< @brief Select timer to read information from */
+#define TIMER_RB_COUNT_  BIT(5)         /**< @brief Read counter value on read-back (0 to activate) */
+#define TIMER_RB_STATUS_ BIT(4)         /**< @brief Read status value on read-back (0 to activate) */
+#define TIMER_RB_SEL(n)  BIT((n) + 1)   /**< @brief Select timer to read information from */
 
 int (subscribe_timer_interrupt)(uint8_t interrupt_bit, int *interrupt_id) {
     if (interrupt_id == NULL) return 1;
Index: proj/libs/uart/src/hltp.c
===================================================================
--- proj/libs/uart/src/hltp.c	(revision 323)
+++ proj/libs/uart/src/hltp.c	(revision 324)
@@ -6,14 +6,14 @@
 
 static void* hltp_interpret_string(const uint8_t *p, const size_t sz){
     void *ret = malloc((sz+1)*sizeof(char));
-    for(size_t i = 0; i < sz; ++i) ((char*)ret)[i] = p[i];
+    for(size_t i = 0; i < sz; ++i) ((char*)ret)[i] = (char)p[i];
     ((char*)ret)[sz] = '\0';
     return ret;
 }
 int hltp_send_string(const char *p){
     uint8_t type = hltp_type_string;
-    uint8_t* ptr[2]; ptr[0] = &type; ptr[1] = (uint8_t*)p;
-    size_t    sz[2]; sz [0] =     1; sz [1] = strlen(p);
+    const uint8_t* ptr[2]; ptr[0] = &type; ptr[1] = (const uint8_t*)p;
+    size_t         sz[2]; sz [0] =     1; sz [1] = strlen(p);
     return nctp_send(2, ptr, sz);
 }
 
Index: proj/libs/uart/src/uart.c
===================================================================
--- proj/libs/uart/src/uart.c	(revision 323)
+++ proj/libs/uart/src/uart.c	(revision 324)
@@ -113,7 +113,7 @@
     config->receiver_line_stat_int = UART_GET_INT_EN_RECEIVER_LINE_STAT(config->ier);
     config->modem_stat_int         = UART_GET_INT_EN_MODEM_STAT        (config->ier);
     /// DIV LATCH
-    config->divisor_latch          = UART_GET_DIV_LATCH(config->dlm, config->dll);
+    config->divisor_latch          = (uint16_t)UART_GET_DIV_LATCH(config->dlm, config->dll);
 }
 
 static int uart_get_lcr(int base_addr, uint8_t *p){
@@ -176,11 +176,12 @@
     printf("\tLCR = 0x%X: %d bits per char\t %d stop bits\t", config.lcr, config.bits_per_char, config.stop_bits);
     if((config.parity&BIT(0)) == 0) printf("NO parity\n");
     else switch(config.parity){
+        case uart_parity_none: printf("NO parity\n"      ); break;
         case uart_parity_odd : printf("ODD parity\n"     ); break;
         case uart_parity_even: printf("EVEN parity\n"    ); break;
         case uart_parity_par1: printf("parity bit is 1\n"); break;
         case uart_parity_par0: printf("parity bit is 0\n"); break;
-        default              : printf("invalid\n"        ); break;
+        //default              : printf("invalid\n"        ); break;
     }
     printf("\tDLM = 0x%02X DLL=0x%02X: bitrate = %d bps\n", config.dlm, config.dll, UART_BITRATE/config.divisor_latch);
     printf("\tIER = 0x%02X: Rx interrupts: %s\tTx interrupts: %s\n", config.ier,
@@ -200,7 +201,7 @@
     if(stop != 1 && stop != 2) return INVALID_ARG;
     int ret = SUCCESS;
     stop -= 1;
-    stop = (stop&1)<<2;
+    stop = (uint8_t)((stop&1)<<2);
     uint8_t conf; if((ret = uart_get_lcr(base_addr, &conf))) return ret;
     conf = (conf & (~UART_STOP_BITS)) | stop;
     return uart_set_lcr(base_addr, conf);
@@ -207,7 +208,7 @@
 }
 int uart_set_parity(int base_addr, uart_parity par){
     int ret = SUCCESS;
-    uint8_t parity = par << 3;
+    uint8_t parity = (uint8_t)(par << 3);
     uint8_t conf; if((ret = uart_get_lcr(base_addr, &conf))) return ret;
     conf = (conf & (~UART_PARITY)) | parity;
     return uart_set_lcr(base_addr, conf);
@@ -214,7 +215,7 @@
 }
 int uart_set_bit_rate(int base_addr, double bit_rate){
     int ret = SUCCESS;
-    uint16_t latch = UART_BITRATE/bit_rate;
+    uint16_t latch = (uint16_t)(UART_BITRATE/bit_rate);
     uint8_t dll = UART_GET_DLL(latch);
     uint8_t dlm = UART_GET_DLM(latch);
     if((ret = uart_enable_divisor_latch(base_addr))) return ret;
@@ -282,9 +283,9 @@
 #define NCTP_OK         0xFF
 #define NCTP_NOK        0x00
 
-queue_t *out = NULL;
-queue_t *in  = NULL;
-void (*process)(const uint8_t*, const size_t) = NULL;
+static queue_t *out = NULL;
+static queue_t *in  = NULL;
+static void (*process)(const uint8_t*, const size_t) = NULL;
 
 int nctp_init(void){
     out = queue_ctor(); if(out == NULL) return NULL_PTR;
@@ -374,7 +375,10 @@
         switch(UART_GET_INT_PEND(iir)){
             case uart_int_rx: nctp_receive (); break;
             case uart_int_tx: nctp_transmit(); break;
-            default: break;
+            case uart_int_receiver_line_stat: break;
+            case uart_int_modem_stat: break;
+            case uart_int_char_timeout_fifo: break;
+            //default: break;
         }
     }
 }
Index: proj/src/ent.c
===================================================================
--- proj/src/ent.c	(revision 323)
+++ proj/src/ent.c	(revision 324)
@@ -301,7 +301,7 @@
     return map_collides_gunner_pos(p, gunner_get_x(shooter), gunner_get_y(shooter), radius);
 }
 int (map_make_dijkstra)(map_t *p, double x_, double y_){
-    int16_t x = x_, y = y_;
+    int16_t x = (int16_t)x_, y = (int16_t)y_;
 
     const uint16_t W = basic_sprite_get_w(p->bsp_background),
                    H = basic_sprite_get_h(p->bsp_background);
@@ -322,7 +322,7 @@
 
     while(!queue_empty(q)){
         c = *(int*)queue_top(q); free(queue_top(q)); queue_pop(q);
-        x = c%W, y = c/W;
+        x = (int16_t)(c%W), y = (int16_t)(c/W);
         if(p->visited[c]) continue;
         p->visited[c] = true;
         if(p->collide_gunner[c]) continue;
@@ -338,11 +338,9 @@
 }
 int (map_where_to_follow)(const map_t *p, double x, double y, double *theta){
     const uint16_t W = basic_sprite_get_w(p->bsp_background);
-    int x_ = x, y_ = y;
-    int pos = y_*W+x_;
-    //printf("Is in %d,%d\n", x_, y_);
-    int newx = p->prev[pos]%W, newy = p->prev[pos]/W;
-    //printf("from %d,%d to %d,%d\n", x_, y_, newx, newy);
+    int16_t x_ = (int16_t)x, y_ = (int16_t)y;
+    int32_t pos = y_*W+x_;
+    int16_t newx = (int16_t)(p->prev[pos]%W), newy = (int16_t)(p->prev[pos]/W);
     *theta = atan2(-(newy-y_), newx-x_);
     return SUCCESS;
 }
Index: proj/src/makecode_map.c
===================================================================
--- proj/src/makecode_map.c	(revision 323)
+++ proj/src/makecode_map.c	(revision 324)
@@ -1,13 +1,12 @@
 #include "makecode_map.h"
 
-const char makecode_map[] = {'1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '\'', ERROR_CODE /*«*/, ERROR_CODE /*escape*/,
-                            ERROR_CODE /*tab*/, 'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', '+', ERROR_CODE /* ´ */, ERROR_CODE /*enter*/,
-                            ERROR_CODE /*ctrl*/, 'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', ERROR_CODE /* Ç */, ERROR_CODE /* º */, '\\', ERROR_CODE /*lshift*/, '~',
-                            'Z', 'X', 'C', 'V', 'B', 'N', 'M', ',', '.', '-', ERROR_CODE /*rshift*/, ERROR_CODE /*unkown*/, ERROR_CODE /*alt*/, ' ' /*space*/};
+static const char makecode_map[] = {'1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '\'', ERROR_CODE /*«*/, ERROR_CODE /*escape*/,
+                                    ERROR_CODE /*tab*/, 'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', '+', ERROR_CODE /* ´ */, ERROR_CODE /*enter*/,
+                                    ERROR_CODE /*ctrl*/, 'A', 'S', 'D', 'F', 'G', 'H', 'J', 'K', 'L', ERROR_CODE /* Ç */, ERROR_CODE /* º */, '\\', ERROR_CODE /*lshift*/, '~',
+                                    'Z', 'X', 'C', 'V', 'B', 'N', 'M', ',', '.', '-', ERROR_CODE /*rshift*/, ERROR_CODE /*unkown*/, ERROR_CODE /*alt*/, ' ' /*space*/};
 
-const int size = sizeof(makecode_map);
+static const int size = sizeof(makecode_map);
 
-
 char (map_makecode)(uint8_t code) {
     int key = code - BASE_CODE;
     if (key < 0 || key >= size) return ERROR_CODE;
Index: proj/src/proj_func.c
===================================================================
--- proj/src/proj_func.c	(revision 323)
+++ proj/src/proj_func.c	(revision 324)
@@ -65,7 +65,7 @@
     free(p);
 }
 
-remote_info_t* remote_info_ctor() {
+remote_info_t* remote_info_ctor(void) {
     remote_info_t *ret = (remote_info_t*)malloc(sizeof(remote_info_t));
     if (ret == NULL) return ret;
 
@@ -81,7 +81,7 @@
     free(p);
 }
 
-bullet_info_t* bullet_info_ctor() {
+bullet_info_t* bullet_info_ctor(void) {
     bullet_info_t *ret = (bullet_info_t*)malloc(sizeof(bullet_info_t));
     if (ret == NULL) return ret;
 
@@ -117,69 +117,69 @@
 }
 
 void update_movement(map_t *map, gunner_t *p, keys_t *keys, list_t *shooter_list) {
-    int ver_mov = keys->s_pressed - keys->w_pressed;
-    int hor_mov = keys->d_pressed - keys->a_pressed;
-    double x = gunner_get_x(p);
-    double y = gunner_get_y(p);
+    /** Player movement */{
+        int ver_mov = keys->s_pressed - keys->w_pressed;
+        int hor_mov = keys->d_pressed - keys->a_pressed;
+        double x = gunner_get_x(p);
+        double y = gunner_get_y(p);
 
-    gunner_set_pos(p, x + SHOOTER_SPEED * hor_mov, y);
-    if (map_collides_gunner(map, p)) gunner_set_pos(p, x, y);
-    else {
-        list_node_t *it = list_begin(shooter_list);
-        while (it != list_end(shooter_list)) {
-            gunner_t *p2 = *(gunner_t**)list_node_val(it);
-            if (p != p2 && gunner_collides_gunner(p, p2)) {
-                gunner_set_pos(p, x, y);
-                break;
+        gunner_set_pos(p, x + SHOOTER_SPEED * hor_mov, y);
+        if (map_collides_gunner(map, p)) gunner_set_pos(p, x, y);
+        else {
+            list_node_t *it = list_begin(shooter_list);
+            while (it != list_end(shooter_list)) {
+                gunner_t *p2 = *(gunner_t**)list_node_val(it);
+                if (p != p2 && gunner_collides_gunner(p, p2)) {
+                    gunner_set_pos(p, x, y);
+                    break;
+                }
+                it = list_node_next(it);
             }
-            it = list_node_next(it);
         }
-    }
-    x = gunner_get_x(p);
-    gunner_set_pos(p, x, y + SHOOTER_SPEED * ver_mov);
-    if (map_collides_gunner(map, p)) gunner_set_pos(p, x, y);
-    else {
-        list_node_t *it = list_begin(shooter_list);
-        while (it != list_end(shooter_list)) {
-            gunner_t *p2 = *(gunner_t**)list_node_val(it);
-            if (p != p2 && gunner_collides_gunner(p, p2)) {
-                gunner_set_pos(p, x, y);
-                break;
+        x = gunner_get_x(p);
+        gunner_set_pos(p, x, y + SHOOTER_SPEED * ver_mov);
+        if (map_collides_gunner(map, p)) gunner_set_pos(p, x, y);
+        else {
+            list_node_t *it = list_begin(shooter_list);
+            while (it != list_end(shooter_list)) {
+                gunner_t *p2 = *(gunner_t**)list_node_val(it);
+                if (p != p2 && gunner_collides_gunner(p, p2)) {
+                    gunner_set_pos(p, x, y);
+                    break;
+                }
+                it = list_node_next(it);
             }
-            it = list_node_next(it);
         }
     }
-
-    // Update zombie positions
-    list_node_t *it = list_begin(shooter_list);
-    while(it != list_end(shooter_list)){
-        gunner_t *g = *(gunner_t**)list_node_val(it);
-        if(gunner_get_type(g) & GUNNER_FOLLOW){
-            double theta = 0.0;
-            map_where_to_follow(map, gunner_get_x(g), gunner_get_y(g), &theta);
-            double c = fm_cos(theta), s = fm_sin(theta);
-            double dx = ZOMBIE_SPEED*c, dy = -ZOMBIE_SPEED*s;
-            double x = gunner_get_x(g);
-            double y = gunner_get_y(g);
-            gunner_set_pos(g, x+dx, y+dy);
-            if (map_collides_gunner(map, g)){
-                //printf("Zombie colliding with map\n");
-                gunner_set_pos(g, x, y);
-            } else {
-                list_node_t *it = list_begin(shooter_list);
-                while (it != list_end(shooter_list)) {
-                    gunner_t *p2 = *(gunner_t**)list_node_val(it);
-                    if (g != p2 && gunner_collides_gunner(g, p2)) {
-                        //printf("Zombie colliding with zombie\n");
-                        gunner_set_pos(g, x, y);
-                        break;
+    /** Followers movement */ {
+        list_node_t *it = list_begin(shooter_list);
+        while(it != list_end(shooter_list)){
+            gunner_t *g = *(gunner_t**)list_node_val(it);
+            if(gunner_get_type(g) & GUNNER_FOLLOW){
+                double theta = 0.0;
+                map_where_to_follow(map, gunner_get_x(g), gunner_get_y(g), &theta);
+                double c = fm_cos(theta), s = fm_sin(theta);
+                double dx = ZOMBIE_SPEED*c, dy = -ZOMBIE_SPEED*s;
+                double x = gunner_get_x(g);
+                double y = gunner_get_y(g);
+                gunner_set_pos(g, x+dx, y+dy);
+                if (map_collides_gunner(map, g)){
+                    gunner_set_pos(g, x, y);
+                } else {
+                    list_node_t *it2 = list_begin(shooter_list);
+                    while (it2 != list_end(shooter_list)) {
+                        gunner_t *p2 = *(gunner_t**)list_node_val(it2);
+                        if (g != p2 && gunner_collides_gunner(g, p2)) {
+                            gunner_set_pos(g, x, y);
+                            break;
+                        }
+                        it2 = list_node_next(it2);
                     }
-                    it = list_node_next(it);
                 }
+                gunner_set_angle(g, theta-M_PI_2);
             }
-            gunner_set_angle(g, theta-M_PI_2); /*printf("angle: %d.%d\n", (int)theta, abs((int)(theta*1000)%1000));*/
+            it = list_node_next(it);
         }
-        it = list_node_next(it);
     }
 }
 
@@ -298,10 +298,10 @@
 
 void (update_mouse)(struct packet *p) {
     mouse_x = max16(0, mouse_x + p->delta_x);
-    mouse_x = min16(mouse_x, graph_get_XRes() - 1);
+    mouse_x = min16(mouse_x, (int16_t)graph_get_XRes() - 1);
 
     mouse_y = max16(0, mouse_y - p->delta_y);
-    mouse_y = min16(mouse_y, graph_get_YRes() - 1);
+    mouse_y = min16(mouse_y, (int16_t)graph_get_YRes() - 1);
 
     key_presses.lb_pressed = p->lb;
 }
Index: proj/Makefile
===================================================================
--- proj/Makefile	(revision 323)
+++ proj/Makefile	(revision 324)
@@ -9,10 +9,10 @@
 .PATH: ${.CURDIR}/libs/classes/src
 .PATH: ${.CURDIR}/libs/utils/src
 
-SRCS= list.c queue.c graph.c kbc.c keyboard.c mouse.c utils.c timer.c interrupts_func.c fast_math.c xpm_utils.c ent.c rtc.c uart.c hltp.c makecode_map.c menu.c proj.c proj_func.c rectangle.c font.c
+SRCS= list.c queue.c graph.c kbc.c keyboard.c mouse.c utils.c timer.c interrupts_func.c fast_math.c xpm_utils.c rtc.c uart.c makecode_map.c menu.c proj_func.c rectangle.c font.c ent.c proj.c hltp.c
 IPATHS=-I./include -I./libs/graph/include -I./libs/kbc/include -I./libs/rtc/include -I./libs/timer/include -I./libs/uart/include -I./libs/classes/include -I./libs/utils/include -I./maps -I./media/xpm
 
-CPPFLAGS += -pedantic ${IPATHS} -D LCOM_MACRO -D __LCOM_OPTIMIZED__ #-Weverything
+CPPFLAGS += -pedantic ${IPATHS} -D LCOM_MACRO -D __LCOM_OPTIMIZED__ -Weverything -Wno-padded -Wno-unused-macros
 
 
 DPADD += ${LIBLCF}
