Skip to content

Commit

Permalink
Fix object graphic.
Browse files Browse the repository at this point in the history
  • Loading branch information
henriquegemignani committed Feb 10, 2015
1 parent a4c1649 commit c343ba6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/frontend/gameview/objectgraphic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ namespace {
std::forward_list<std::size_t> avaiable_indices_;
}

const std::vector<const ObjectGraphic*>& CurrentInstances() {
const std::vector<const ObjectGraphic*>& ObjectGraphic::CurrentInstances() {
return current_instances_vector_;
}

Expand Down Expand Up @@ -119,7 +119,7 @@ namespace {
}
}

ObjectGraphic* ObjectGraphic::Create(CreateTypes type, const std::string& arg) {
ObjectGraphic* ObjectGraphic::Create(component::Graphic::CreateTypes type, const std::string& arg) {
ObjectGraphic* g = new ObjectGraphic;
CreateFunctions[static_cast<int>(type)](g->primitive_, arg);
SetDefaultShader(g->primitive_);
Expand Down
6 changes: 2 additions & 4 deletions src/frontend/gameview/objectgraphic.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <ugdk/graphic/primitive.h>
#include <ugdk/graphic/visualeffect.h>
#include <ugdk/graphic/primitivecontroller.h>
#include "game/components/graphic.h"

#include <string>
#include <memory>
Expand All @@ -18,10 +19,7 @@ namespace gameview {

class ObjectGraphic {
public:
enum class CreateTypes {
SPECIALWALL
};
static ObjectGraphic* Create(CreateTypes, const std::string& arg);
static ObjectGraphic* Create(component::Graphic::CreateTypes, const std::string& arg);

static ObjectGraphic* CreateWithSpritesheet(const std::string& spritesheet_name);
static ObjectGraphic* CreateWithSingleFrame(const std::string& spritesheet_name, const std::string& frame_name);
Expand Down

0 comments on commit c343ba6

Please sign in to comment.