All the Stuff(Forgot to commit)
This commit is contained in:
parent
7eb2832f9b
commit
7d08458f3f
22 changed files with 1668 additions and 319 deletions
|
@ -13,6 +13,11 @@
|
|||
#define ENTITY_TEXTPARTICLE 7
|
||||
#define ENTITY_SMASHPARTICLE 8
|
||||
#define ENTITY_PLAYER 9
|
||||
#define ENTITY_PASSIVE 10
|
||||
#define ENTITY_ARROW 11
|
||||
#define ENTITY_SKELETON 12
|
||||
#define ENTITY_KNIGHT 13
|
||||
#define ENTITY_GLOWWORM 14
|
||||
|
||||
typedef struct Entity Entity;
|
||||
|
||||
|
@ -59,6 +64,16 @@ typedef struct {
|
|||
s16 oSel; // other selection inside the chest inv.
|
||||
} EntityFurniture;
|
||||
|
||||
typedef struct {
|
||||
u8 mtype;
|
||||
s8 xa;
|
||||
s8 ya;
|
||||
s16 health;
|
||||
s8 dir;
|
||||
s8 randWalkTime;
|
||||
s8 walkDist;
|
||||
} PassiveMob;
|
||||
|
||||
typedef struct {
|
||||
s8 xa;
|
||||
s8 ya;
|
||||
|
@ -67,8 +82,9 @@ typedef struct {
|
|||
s8 lvl;
|
||||
s8 randWalkTime;
|
||||
s8 walkDist;
|
||||
s8 randAttackTime;
|
||||
u32 color;
|
||||
} Zombie;
|
||||
} HostileMob;
|
||||
|
||||
typedef struct {
|
||||
s8 xa;
|
||||
|
@ -93,6 +109,14 @@ typedef struct {
|
|||
s8 spriteAdjust;
|
||||
} AirWizard;
|
||||
|
||||
typedef struct {
|
||||
Entity* parent;
|
||||
s16 age;
|
||||
s16 itemID;
|
||||
s8 xa;
|
||||
s8 ya;
|
||||
} Arrow;
|
||||
|
||||
typedef struct {
|
||||
Entity* parent;
|
||||
s16 age;
|
||||
|
@ -102,6 +126,13 @@ typedef struct {
|
|||
float yy;
|
||||
} Spark;
|
||||
|
||||
typedef struct {
|
||||
s8 xa;
|
||||
s8 ya;
|
||||
s8 randWalkTime;
|
||||
s8 waitTime;
|
||||
} Glowworm;
|
||||
|
||||
typedef struct {
|
||||
float xa;
|
||||
float ya;
|
||||
|
@ -133,36 +164,45 @@ struct Entity {
|
|||
Player p;
|
||||
EntityItem entityItem;
|
||||
EntityFurniture entityFurniture;
|
||||
Zombie zombie;
|
||||
PassiveMob passive;
|
||||
HostileMob hostile;
|
||||
Slime slime;
|
||||
AirWizard wizard;
|
||||
Spark spark;
|
||||
Arrow arrow;
|
||||
Glowworm glowworm;
|
||||
TextParticleEntity textParticle;
|
||||
SmashParticleEntity smashParticle;
|
||||
};
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
Entity entities[5][1000];
|
||||
Entity entities[6][1000];
|
||||
Entity wizardSparks[120];
|
||||
s16 lastSlot[5];
|
||||
s16 lastSlot[6];
|
||||
Inventory invs[301];//1 for the player, 300 for chests.
|
||||
s16 nextInv;
|
||||
} EntityManager;
|
||||
|
||||
EntityManager eManager;
|
||||
Entity nullEntity;
|
||||
s8 currentLevel;
|
||||
|
||||
|
||||
double gaussrand();
|
||||
Entity newItemEntity(Item item, int x, int y, int level);
|
||||
Entity newFurnitureEntity(int itemID,Inventory * invPtr, int x, int y, int level);
|
||||
Entity newPassiveEntity(int type, int x, int y, int level);
|
||||
Entity newZombieEntity(int lvl, int x, int y, int level);
|
||||
Entity newSkeletonEntity(int lvl, int x, int y, int level);
|
||||
Entity newKnightEntity(int lvl, int x, int y, int level);
|
||||
Entity newSlimeEntity(int lvl, int x, int y, int level);
|
||||
Entity newAirWizardEntity(int x, int y, int level);
|
||||
Entity newSparkEntity(Entity* parent, float xa, float ya);
|
||||
Entity newTextParticleEntity(char * str, u32 color, int xa, int ya, int level);
|
||||
Entity newSmashParticleEntity(int xa, int ya, int level);
|
||||
Entity newArrowEntity(Entity* parent, int itemID, s8 xa, s8 ya, int level);
|
||||
Entity newGlowwormEntity(int x, int y, int level);
|
||||
void addEntityToList(Entity e, EntityManager* em);
|
||||
void removeEntityFromList(Entity * e,int level,EntityManager* em);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue