diff options
author | drumsetmonkey <abelleisle@roadrunner.com> | 2015-09-28 08:47:43 -0400 |
---|---|---|
committer | drumsetmonkey <abelleisle@roadrunner.com> | 2015-09-28 08:47:43 -0400 |
commit | 113bb97e4ce7db5bc275e0dccf7c790c86cda5d7 (patch) | |
tree | 6db84a77b149476ecd45f838237385ab7d360cf3 /src/entities.cpp | |
parent | 9630c8a49cbad7b1b71b9401ff24881ebf4c7c25 (diff) |
Added enum for types and improved NPCs
Diffstat (limited to 'src/entities.cpp')
-rw-r--r-- | src/entities.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/entities.cpp b/src/entities.cpp index e93f23a..421badb 100644 --- a/src/entities.cpp +++ b/src/entities.cpp @@ -36,7 +36,7 @@ Player::Player(){ width = HLINE * 8; height = HLINE * 12; speed = 1; - type = 0; + type = PLAYERT; subtype = 5; alive = true; ground = false; @@ -50,7 +50,7 @@ NPC::NPC(){ width = HLINE * 8; height = HLINE * 12; speed = 1; - type = 1; + type = NPCT; subtype = 0; alive = true; canMove = true; @@ -61,17 +61,17 @@ void NPC::interact(){ } Structures::Structures(){ - type = -1; + type = STRUCTURET; speed = 0; } -unsigned int Structures::spawn(int t, float x, float y){ +unsigned int Structures::spawn(_TYPE t, float x, float y){ loc.x = x; loc.y = y; type = t; /*VILLAGE*/ - if(type == -1){ + if(type == STRUCTURET){ width = 4 * HLINE; height = 4 * HLINE; |