Skip to content
Snippets Groups Projects
Commit 1bdd13ae authored by belkhiritaha's avatar belkhiritaha
Browse files

Merge branch 'monster' into render

parents ea6bfa6e ca38c3b5
No related branches found
No related tags found
No related merge requests found
#include "monster.h"
#include "monstre.h"
#include "player.h"
monster_t monster;
int markov[SIZEMARKOV][SIZEMARKOV];
void initMonster (){
monster.x= (rand()%((MAPSIZEX-3)/2)+16)*CELLSIZE;
monster.y= (rand()%(MAPSIZEY-2))*CELLSIZE;
srand(time(NULL));
monster.x= (rand()%((MAP_WIDTH-3)/2)+16)*BLOCK_SIZE;
monster.y= (rand()%(MAP_HEIGHT-2))*BLOCK_SIZE;
monster.state= PEACEFULL;
monster.healthPoint= 3;
monster.speed=1;
monster.angle=0;
monter.angle=0;
//monster.dammage
}
......
#ifndef MONSTER_H
#define MONSTER_H
#ifndef MONSTRE_H
#define MONSTRE_H
#include <stdlib.h>
#include <time.h>
......
......@@ -3,8 +3,8 @@
player_t player;
void initPlayer(){
player.x= 8*CELLSIZE;
player.y= 8*CELLSIZE;
player.x= 8*BLOCK_SIZE;
player.y= 8*BLOCK_SIZE;
player.speed = 1;
player.isMoving = 0;
player.HPMax = 3;
......
#ifndef PLAYER_H
#define PLAYER_H
#define PLAYER_UP 0
#define PLAYER_DOWN 1
#define PLAYER_LEFT 2
#define PLAYER_RIGHT 3
#define ENTITIES_UP 0
#define ENTITIES_DOWN 1
#define ENTITIES_LEFT 2
#define ENTITIES_RIGHT 3
typedef struct player{
int x;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment