#include "player.h" #include "map.h" #include #define P_WIDTH 8 #define P_HEIGHT 8 extern Player MyPlayer; extern Map *map_level; extern bopti_image_t demo_player_img; void PlayerDraw(void) { dimage(MyPlayer.px-P_WIDTH/2, MyPlayer.py-P_HEIGHT/2, &demo_player_img); } void PlayerLeft(void) { if(MyPlayer.x > 0){ MyPlayer.x--; } } void PlayerRight(void) { if(MyPlayer.x < map_level->w * T_WIDTH){ MyPlayer.x++; } } void PlayerUp(void) { if(MyPlayer.y > 0){ MyPlayer.y--; } } void PlayerDown(void) { if(MyPlayer.y < map_level->h * T_HEIGHT){ MyPlayer.y++; } } void PlayerAction(void) { }