53 lines
940 B
C
53 lines
940 B
C
//#include "playerInterface.h"
|
|
|
|
#ifndef ARENAENGINE_H_
|
|
#define ARENAENGINE_H_
|
|
|
|
|
|
|
|
/*
|
|
typedef struct items{
|
|
int type_id;
|
|
//texture?
|
|
int isFlat;
|
|
int minedId;
|
|
struct items *nextItem;
|
|
}ITEMS;
|
|
*/
|
|
|
|
typedef struct tileType
|
|
{
|
|
int type_id;
|
|
//texture?
|
|
int isGround;
|
|
int canBeMined;
|
|
}TILE;
|
|
|
|
typedef struct arena_h_tile
|
|
{ //Rows chained list
|
|
int type_id;
|
|
//PLAYER* playerOnTile;
|
|
struct arena_h_tile *nextRow;
|
|
struct arena_w_tile *nextColumn;
|
|
}ARENA_H_TILE;
|
|
|
|
typedef struct arena_w_tile
|
|
{ //Columns chained list
|
|
int type_id;
|
|
//PLAYER* playerOnTile;
|
|
struct arena_w_tile *nextColumn;
|
|
}ARENA_W_TILE;
|
|
|
|
|
|
//Generation functions
|
|
ARENA_H_TILE* genNewArena(int size_h, int size_w);
|
|
void deleteArena(ARENA_H_TILE* arena);
|
|
|
|
ARENA_H_TILE* createHTile(ARENA_H_TILE* prevHTile);
|
|
ARENA_W_TILE* createWTile(ARENA_H_TILE* prevHTile, ARENA_W_TILE* prevWTile);
|
|
|
|
//Status functions
|
|
int getTileTypeID(ARENA_H_TILE* arena, int coord_x, int coord_y);
|
|
|
|
#endif
|