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

Merge branch 'monster' into render

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