k2
This commit is contained in:
parent
f6f5333007
commit
44f0399239
@ -54,7 +54,6 @@ typedef struct {
|
||||
//army
|
||||
//team
|
||||
|
||||
|
||||
//typedef struct {
|
||||
// EVENT_TYPE trigger;
|
||||
// ACTIVITY_STATE required_state;
|
||||
|
||||
@ -2,6 +2,8 @@
|
||||
# define ENTITY_H
|
||||
|
||||
#include <core.h>
|
||||
#include <item.h>
|
||||
#include <skill.h>
|
||||
|
||||
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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -1,38 +1,6 @@
|
||||
#ifndef PLAYER_H
|
||||
# define PLAYER_H
|
||||
|
||||
#include <core.h>
|
||||
#include <item.h>
|
||||
#include <entity.h>
|
||||
#include <skill.h>
|
||||
|
||||
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user