Implemented client-side HandleCharacterCreate

This commit is contained in:
Kayne Ruse
2014-12-18 09:14:11 +11:00
parent ae046977f0
commit 015631a73d
6 changed files with 62 additions and 21 deletions
+5 -1
View File
@@ -21,6 +21,8 @@
*/
#include "base_character.hpp"
#include "config_utility.hpp"
//-------------------------
//graphics
//-------------------------
@@ -71,7 +73,9 @@ std::string BaseCharacter::GetHandle() const {
}
std::string BaseCharacter::SetAvatar(std::string s) {
return avatar = s;
avatar = s;
sprite.LoadSurface(ConfigUtility::GetSingleton()["dir.sprites"] + avatar, CHARACTER_CELLS_X, CHARACTER_CELLS_Y);
return avatar;
}
std::string BaseCharacter::GetAvatar() const {
-8
View File
@@ -42,10 +42,6 @@ int Entity::SetEntityIndex(int i) {
return entityIndex = i;
}
int Entity::SetRoomIndex(int i) {
return roomIndex = i;
}
Vector2 Entity::SetOrigin(Vector2 v) {
return origin = v;
}
@@ -62,10 +58,6 @@ int Entity::GetEntityIndex() {
return entityIndex;
}
int Entity::GetRoomIndex() {
return roomIndex;
}
Vector2 Entity::GetOrigin() {
return origin;
}
-3
View File
@@ -36,13 +36,11 @@ public:
//accessors & mutators
int SetEntityIndex(int i);
int SetRoomIndex(int i);
Vector2 SetOrigin(Vector2 v);
Vector2 SetMotion(Vector2 v);
BoundingBox SetBounds(BoundingBox b);
int GetEntityIndex();
int GetRoomIndex();
Vector2 GetOrigin();
Vector2 GetMotion();
BoundingBox GetBounds();
@@ -53,7 +51,6 @@ protected:
SpriteSheet sprite;
int entityIndex = -1;
int roomIndex = -1;
Vector2 origin;
Vector2 motion;
BoundingBox bounds;