2023-07-06 22:02:37 +02:00
|
|
|
#include "player.h"
|
|
|
|
#include "map.h"
|
2023-07-07 14:20:13 +02:00
|
|
|
#include <gint/display.h>
|
2023-07-06 22:02:37 +02:00
|
|
|
|
2023-07-07 14:20:13 +02:00
|
|
|
#define P_WIDTH 16
|
|
|
|
#define P_HEIGHT 16
|
|
|
|
|
|
|
|
extern Player MyPlayer;
|
2023-07-06 22:02:37 +02:00
|
|
|
extern struct Map *map_level;
|
2023-07-07 14:20:13 +02:00
|
|
|
extern bopti_image_t demo_player_img;
|
2023-07-06 22:02:37 +02:00
|
|
|
|
2023-07-07 14:20:13 +02:00
|
|
|
void PlayerDraw( void )
|
2023-07-06 22:02:37 +02:00
|
|
|
{
|
2023-07-07 14:20:13 +02:00
|
|
|
dimage(MyPlayer.px-P_WIDTH/2, MyPlayer.py-P_HEIGHT/2, &demo_player_img);
|
|
|
|
}
|
2023-07-06 22:02:37 +02:00
|
|
|
|
2023-07-07 14:20:13 +02:00
|
|
|
void PlayerLeft( void )
|
|
|
|
{
|
|
|
|
MyPlayer.x--;
|
2023-07-06 22:02:37 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PlayerRight( void )
|
|
|
|
{
|
2023-07-07 14:20:13 +02:00
|
|
|
MyPlayer.x++;
|
2023-07-06 22:02:37 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PlayerUp( void )
|
|
|
|
{
|
2023-07-07 14:20:13 +02:00
|
|
|
MyPlayer.y--;
|
2023-07-06 22:02:37 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PlayerDown( void )
|
|
|
|
{
|
2023-07-07 14:20:13 +02:00
|
|
|
MyPlayer.y++;
|
2023-07-06 22:02:37 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PlayerAction( void )
|
|
|
|
{
|
|
|
|
|
2023-07-07 14:20:13 +02:00
|
|
|
}
|