Started work on new update

Added some small new map generation features
Added "NPCs" and "Quests" (atleast a first experiment for them)
Added magic compass to make search for stairs leass annoying
Added mostly visual season and weather effects
This commit is contained in:
Andre Schweiger 2017-01-07 21:54:28 +01:00
parent f6e2d30ab6
commit 3699414dcd
19 changed files with 1324 additions and 253 deletions

View file

@ -346,6 +346,22 @@ Entity newGlowwormEntity(int x, int y, int level){
return e;
}
Entity newNPCEntity(int type, int x, int y, int level){
Entity e;
e.type = ENTITY_NPC;
e.level = level;
e.x = x;
e.y = y;
e.hurtTime = 0;
e.xKnockback = 0;
e.yKnockback = 0;
e.npc.type = type;
e.xr = 4;
e.yr = 3;
e.canPass = false;
return e;
}
void addEntityToList(Entity e, EntityManager* em){
e.slotNum = em->lastSlot[e.level];
em->entities[e.level][em->lastSlot[e.level]] = e;