#ifndef _VIEWTUBE_USER_KMOD_LIB_H
#define _VIEWTUBE_USER_KMOD_LIB_H

//#include "viewtube_kmod.h"

#define WINDOW_DIR_UP    0
#define WINDOW_DIR_LEFT  1
#define WINDOW_DIR_RIGHT 2
#define WINDOW_DIR_DOWN  3

#define WINDOW_Y_MOVE_INTERVAL 10
#define WINDOW_X_MOVE_INTERVAL 15


// avoid any conflicts  with the MVC
#ifndef GRAPHIC_WIDTH 
  #define GRAPHIC_WIDTH 1500
#endif

#ifndef GRAPHIC_HEIGHT
  #define GRAPHIC_HEIGHT 1814
#endif 

#ifndef WINDOW_WIDTH
  #define WINDOW_WIDTH  500
#endif

#ifndef WINDOW_HEIGHT
  #define WINDOW_HEIGHT 425
#endif

#ifndef RIGHT_WALL
  #define RIGHT_WALL (GRAPHIC_WIDTH - WINDOW_WIDTH -1)
#endif 

#ifndef VERTICAL_FLOOR
  #define VERTICAL_FLOOR (GRAPHIC_HEIGHT - WINDOW_HEIGHT -1)
#endif

int viewtube_fd;

viewtube_background_window_position_t vla;


/* Set x,y position of window into background*/
void set_viewtube_background_position(unsigned short x, unsigned short y,unsigned char bounce);


void set_viewtube_sprite_data(viewtube_sprite_t * sprite);


void set_viewtube_sprite_pos(viewtube_sprite_t * sprite);

void poll_background_position(viewtube_background_window_position_t * position);


void move_viewtube_background_position_direction(unsigned char direction, unsigned short interval);



#endif