2022-08-26 18:06:27 +02:00
|
|
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
2022-07-08 19:19:05 +02:00
|
|
|
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;
|
2022-07-23 14:50:50 +02:00
|
|
|
int invmoving;
|
2022-07-18 22:33:05 +02:00
|
|
|
int overlayframe;
|
|
|
|
int overlaytimer;
|
|
|
|
int select_tx;
|
|
|
|
int select_ty;
|
|
|
|
int old_select_tx;
|
|
|
|
int old_select_ty;
|
|
|
|
int wasdestroyingbefore;
|
|
|
|
int destroytime;
|
2022-08-26 18:06:27 +02:00
|
|
|
bool is_breakable;
|
|
|
|
Tool tool;
|
2022-07-24 12:44:49 +02:00
|
|
|
};
|
|
|
|
|
2022-08-27 13:35:21 +02:00
|
|
|
typedef struct Destroy Destroy;
|
|
|
|
struct Destroy{
|
|
|
|
int selected;
|
|
|
|
};
|
|
|
|
|
2022-07-24 12:44:49 +02:00
|
|
|
typedef struct Crafting Crafting;
|
|
|
|
struct Crafting{
|
|
|
|
int selected;
|
|
|
|
int ispossible;
|
2022-07-28 13:50:16 +02:00
|
|
|
int hasanything;
|
|
|
|
int hasitem;
|
2022-07-24 12:44:49 +02:00
|
|
|
};
|
|
|
|
const int craftingsitems[CRAFTINGS*CRAFTSIZE] = {
|
2022-07-27 13:41:44 +02:00
|
|
|
5, 0, 0, 0, 0, 0, 0, 0, 0,
|
2022-08-26 18:06:27 +02:00
|
|
|
6, 0, 0, 0, 0, 0, 0, 0, 0,
|
2022-08-27 13:35:21 +02:00
|
|
|
6, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
6, 2, 3, 0, 0, 0, 0, 0, 0
|
2022-07-24 12:44:49 +02:00
|
|
|
};
|
|
|
|
const int craftingsnum[CRAFTINGS*CRAFTSIZE] = {
|
2022-07-27 13:41:44 +02:00
|
|
|
1, 0, 0, 0, 0, 0, 0, 0, 0,
|
2022-08-26 18:06:27 +02:00
|
|
|
4, 0, 0, 0, 0, 0, 0, 0, 0,
|
2022-08-27 13:35:21 +02:00
|
|
|
5, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
5, 1, 1, 0, 0, 0, 0, 0, 0
|
2022-07-24 12:44:49 +02:00
|
|
|
};
|
|
|
|
const int craftingitem[CRAFTINGS] = {
|
2022-07-27 13:41:44 +02:00
|
|
|
6,
|
2022-08-26 18:06:27 +02:00
|
|
|
5,
|
2022-08-27 13:35:21 +02:00
|
|
|
7,
|
|
|
|
8
|
2022-07-28 13:50:16 +02:00
|
|
|
};
|
|
|
|
const int craftingnum[CRAFTINGS] = {
|
|
|
|
4,
|
2022-08-26 18:06:27 +02:00
|
|
|
1,
|
2022-08-27 13:35:21 +02:00
|
|
|
1,
|
2022-07-28 13:50:16 +02:00
|
|
|
1
|
2022-07-08 19:19:05 +02:00
|
|
|
};
|