diff --git a/data/sprites/humans.sprite b/data/sprites/humans.sprite index ff1fe02..0d63ee2 100644 --- a/data/sprites/humans.sprite +++ b/data/sprites/humans.sprite @@ -153,6 +153,150 @@ "frame_time" : 100, "originx" : 32, "originy" : 50 +}, + +"female_walkcycle_N" : { + "texture" : "female_walkcycle", + "topx" : 64, + "topy" : 0, + "height" : 64, + "width" : 64, + "number_of_frames" : 8, + "frame_time" : 100, + "originx" : 32, + "originy" : 50 +}, + +"female_walkcycle_W" : { + "texture" : "female_walkcycle", + "topx" : 64, + "topy" : 64, + "height" : 64, + "width" : 64, + "number_of_frames" : 8, + "frame_time" : 100, + "originx" : 32, + "originy" : 50 +}, + +"female_walkcycle_S" : { + "texture" : "female_walkcycle", + "topx" : 64, + "topy" : 128, + "height" : 64, + "width" : 64, + "number_of_frames" : 8, + "frame_time" : 100, + "originx" : 32, + "originy" : 50 +}, + +"female_walkcycle_E" : { + "texture" : "female_walkcycle", + "topx" : 64, + "topy" : 192, + "height" : 64, + "width" : 64, + "number_of_frames" : 8, + "frame_time" : 100, + "originx" : 32, + "originy" : 50 +}, + +"female_standing_N" : { + "texture" : "female_walkcycle", + "topx" : 0, + "topy" : 0, + "height" : 64, + "width" : 64, + "number_of_frames" : 1, + "frame_time" : 100, + "originx" : 32, + "originy" : 50 +}, + +"female_standing_W" : { + "texture" : "female_walkcycle", + "topx" : 0, + "topy" : 64, + "height" : 64, + "width" : 64, + "number_of_frames" : 1, + "frame_time" : 100, + "originx" : 32, + "originy" : 50 +}, + +"female_standing_S" : { + "texture" : "female_walkcycle", + "topx" : 0, + "topy" : 128, + "height" : 64, + "width" : 64, + "number_of_frames" : 1, + "frame_time" : 100, + "originx" : 32, + "originy" : 50 +}, + +"female_standing_E" : { + "texture" : "female_walkcycle", + "topx" : 0, + "topy" : 192, + "height" : 64, + "width" : 64, + "number_of_frames" : 1, + "frame_time" : 100, + "originx" : 32, + "originy" : 50 +}, + +"female_spellcast_N" : { + "texture" : "female_spellcast", + "topx" : 0, + "topy" : 0, + "height" : 64, + "width" : 64, + "number_of_frames" : 7, + "frame_time" : 100, + "originx" : 32, + "originy" : 50 +}, + +"female_spellcast_W" : { + "texture" : "female_spellcast", + "topx" : 0, + "topy" : 64, + "height" : 64, + "width" : 64, + "number_of_frames" : 7, + "frame_time" : 100, + "originx" : 32, + "originy" : 50 +}, + +"female_spellcast_S" : { + "texture" : "female_spellcast", + "topx" : 0, + "topy" : 128, + "height" : 64, + "width" : 64, + "number_of_frames" : 7, + "frame_time" : 100, + "originx" : 32, + "originy" : 50 +}, + +"female_spellcast_E" : { + "texture" : "female_spellcast", + "topx" : 0, + "topy" : 192, + "height" : 64, + "width" : 64, + "number_of_frames" : 7, + "frame_time" : 100, + "originx" : 32, + "originy" : 50 } } diff --git a/data/textures/female_hurt.png b/data/textures/female_hurt.png new file mode 100644 index 0000000..44d7725 Binary files /dev/null and b/data/textures/female_hurt.png differ diff --git a/data/textures/female_slash.png b/data/textures/female_slash.png new file mode 100644 index 0000000..89b690b Binary files /dev/null and b/data/textures/female_slash.png differ diff --git a/data/textures/female_spellcast.png b/data/textures/female_spellcast.png new file mode 100644 index 0000000..1028793 Binary files /dev/null and b/data/textures/female_spellcast.png differ diff --git a/data/textures/female_walkcycle.png b/data/textures/female_walkcycle.png new file mode 100644 index 0000000..c106c37 Binary files /dev/null and b/data/textures/female_walkcycle.png differ diff --git a/data/textures/hairfemale.png b/data/textures/hairfemale.png new file mode 100644 index 0000000..0e3fe6f Binary files /dev/null and b/data/textures/hairfemale.png differ diff --git a/src/saland.cpp b/src/saland.cpp index 01dac4c..b6cd188 100644 --- a/src/saland.cpp +++ b/src/saland.cpp @@ -84,7 +84,7 @@ public: 0, 0, 255, 255); const sago::SagoSprite& s = globalData.spriteHolder->GetSprite("male_walkcycle_E"); s.Draw(globalData.screen, SDL_GetTicks(), 100, 100); - const sago::SagoSprite& sc = globalData.spriteHolder->GetSprite("male_spellcast_E"); + const sago::SagoSprite& sc = globalData.spriteHolder->GetSprite("female_spellcast_E"); sc.Draw(globalData.screen, SDL_GetTicks(), 200, 100); const sago::SagoSprite& bee = globalData.spriteHolder->GetSprite("bee_E"); bee.Draw(globalData.screen, SDL_GetTicks(), 100, 200); diff --git a/src/saland/Game.cpp b/src/saland/Game.cpp index 107f1c9..b6260d7 100644 --- a/src/saland/Game.cpp +++ b/src/saland/Game.cpp @@ -153,7 +153,6 @@ static SpawnPoint GetSpawnpoint(const sago::tiled::TileMap& tm) { void Game::ResetWorld(int x, int y, bool forceResetWorld) { data->gameRegion.SaveRegion(); data->gameRegion.Init(x, y, data->worldName, forceResetWorld); - data->human.reset(new Human()); data->gameRegion.placeables.push_back(data->human); b2BodyDef myBodyDef; myBodyDef.type = b2_dynamicBody; //this will be a dynamic body @@ -175,8 +174,11 @@ Game::Game() { RegisterCommand(&gcc); RegisterCommand(&rrcc); data.reset(new Game::GameImpl()); + data->human.reset(new Human()); data->lastUpdate = SDL_GetTicks(); ResetWorld(0, 0, false); + data->human->pants = "pants_1"; + data->human->hair = "hair_1"; data->bottomField.SetHolder(globalData.dataHolder); data->bottomField.SetFontSize(20); diff --git a/src/saland/model/placeables.hpp b/src/saland/model/placeables.hpp index 35d70f5..8752ec3 100644 --- a/src/saland/model/placeables.hpp +++ b/src/saland/model/placeables.hpp @@ -59,8 +59,8 @@ public: class Human : public Creature { public: std::string race = "male"; - std::string hair = "hair_1"; - std::string pants = "pants_1"; + std::string hair = ""; + std::string pants = ""; float castTimeRemaining = 0; //If non-zero then we are casting a spell float castTime = 400; //Number of milliseconds it will take to complete the cast };