diff --git a/include/engine.h b/include/engine.h index 8ec5a83..090086c 100644 --- a/include/engine.h +++ b/include/engine.h @@ -54,7 +54,6 @@ typedef struct { //army //team - //typedef struct { // EVENT_TYPE trigger; // ACTIVITY_STATE required_state; diff --git a/include/entity.h b/include/entity.h index 0dd16e0..26cda4b 100644 --- a/include/entity.h +++ b/include/entity.h @@ -2,6 +2,8 @@ # define ENTITY_H #include +#include +#include typedef enum { ACT_IDLE, @@ -70,13 +72,13 @@ typedef struct { } Limb; typedef struct { + int mass; + int health; + Vector3 pos; + Vector3 velocity; Limb limbs[10]; BodyStats body_stats; MentalStats mental_stats; - int mass; - Vector3 pos; - Vector3 velocity; - int health; } Body; typedef struct { @@ -86,8 +88,45 @@ typedef struct { } Entity; typedef struct { - Entity entity; - void (*ai)(void); + char gender;//m/n/f + int prefix; + int suffix; + char *name;//player/zombie/etcetc + char *nickname;//can be changed, what npc refers to when talking to you, also npc do not know you until you interact with them +} Identity; + +typedef struct { + Entity *entity; + Identity *identity; + void (*ai)(void); } Mob; + +//player can level up trhough action his physics attribute +//but need other source to level up skill +//and for his mental attribute, either on character creation, or maybe through a experience tree with point given through acomplishement + +typedef enum { + ACTION_FORWARD, + ACTION_BACKWARD, + ACTION_LEFT, + ACTION_RIGHT, + ACTION_PRIMARY, + ACTION_SECONDARY, + ACTION_USE, + ACTION_GRAB, + ACTION_JUMP, + ACTION_DASH, + ACTION_SKILL1, + ACTION_TOOLBAR1, +} PLAYER_ACTION; + +typedef struct { + Entity entity; + Identity identity; + Skill skills[10]; + Inventory inventory; +} Player; +//give more enphasis on the character than the item used (~60% ,~30%) + #endif diff --git a/include/item.h b/include/item.h index bffbee3..0f3dc65 100644 --- a/include/item.h +++ b/include/item.h @@ -10,10 +10,23 @@ typedef enum { ITEM_QUEST, } ITEM_FLAGS; +typedef enum { + TRANSLOCATOR, +} ITEM_LIST; + +#define ITEM_NUMBER 1 + +const char *ITEM_NAME[ITEM_NUMBER] = { + "Translocator", +}; + +const char *ITEM_DESC[ITEM_NUMBER] = { + "Used to access the void network", +}; + typedef struct { + ITEM_LIST id; int number; - int description;//ref to item description table - int name;//ref to item name table int rarity; int flags; int stack; @@ -31,5 +44,9 @@ typedef struct { Item storage[100]; } Inventory; +typedef struct { + int *loot; + int *proba; +} LootTable; #endif diff --git a/include/player.h b/include/player.h index 3a10fbb..3454dc3 100644 --- a/include/player.h +++ b/include/player.h @@ -1,38 +1,6 @@ #ifndef PLAYER_H # define PLAYER_H -#include -#include #include -#include - -typedef enum { - ACTION_FORWARD, - ACTION_BACKWARD, - ACTION_LEFT, - ACTION_RIGHT, - ACTION_PRIMARY, - ACTION_SECONDARY, - ACTION_USE, - ACTION_GRAB, - ACTION_JUMP, - ACTION_DASH, - ACTION_SKILL1, - ACTION_TOOLBAR1, -} PLAYER_ACTION; - -typedef struct { - char *name; - char *gender; - char *nickname;//can be changed, what npc refers to when talking to you, also npc do not know you until you interact with them -} Identity; - -typedef struct { - Entity entity; - Identity identity; - Skill skills[10]; - Inventory inventory; -} Player; -//give more enphasis on the character than the item used (~60% ,~30%) #endif