Builder_for_CG/src/objects.h

78 lines
1.4 KiB
C

typedef struct Tool Tool;
struct Tool{
int* breakable_easy;
int easy_lenght;
int* breakable_middle;
int middle_lenght;
int* breakable_hard;
int hard_lenght;
int* breakable_very_hard;
int very_hard_lenght;
int attack;
};
typedef struct Player Player;
struct Player{
int x;
int y;
int falling;
int jumping;
int jumpheight;
int selx;
int sely;
int orient;
int timing;
int animation;
int inventoryitems[INVENTORY_SIZE];
int inventorynum[INVENTORY_SIZE];
int invselect;
int invmoving;
int overlayframe;
int overlaytimer;
int select_tx;
int select_ty;
int old_select_tx;
int old_select_ty;
int wasdestroyingbefore;
int destroytime;
bool is_breakable;
Tool tool;
};
typedef struct Destroy Destroy;
struct Destroy{
int selected;
};
typedef struct Crafting Crafting;
struct Crafting{
int selected;
int ispossible;
int hasanything;
int hasitem;
};
const int craftingsitems[CRAFTINGS*CRAFTSIZE] = {
5, 0, 0, 0, 0, 0, 0, 0, 0,
6, 0, 0, 0, 0, 0, 0, 0, 0,
6, 0, 0, 0, 0, 0, 0, 0, 0,
6, 2, 3, 0, 0, 0, 0, 0, 0
};
const int craftingsnum[CRAFTINGS*CRAFTSIZE] = {
1, 0, 0, 0, 0, 0, 0, 0, 0,
4, 0, 0, 0, 0, 0, 0, 0, 0,
5, 0, 0, 0, 0, 0, 0, 0, 0,
5, 1, 1, 0, 0, 0, 0, 0, 0
};
const int craftingitem[CRAFTINGS] = {
6,
5,
7,
8
};
const int craftingnum[CRAFTINGS] = {
4,
1,
1,
1
};