dgcor / DGEngine

An implementation of the Diablo 1 game engine
Other
252 stars 29 forks source link

Compilation error #15

Closed eresid closed 6 years ago

eresid commented 7 years ago

OS: Ubuntu 16.04 64bit GCC 5.4.0

In file included from /home/eugene/Development/dlang/DGEngine/src/StringText.cpp:1:0:
/home/eugene/Development/dlang/DGEngine/src/StringText.h: In member function ‘virtual void StringText::setColor(const sf::Color&)’:
/home/eugene/Development/dlang/DGEngine/src/StringText.h:59:55: error: ‘class sf::Text’ has no member named ‘setFillColor’
  virtual void setColor(const sf::Color& color) { text.setFillColor(color); }
                                                       ^

/home/eugene/Development/dlang/DGEngine/src/StringText.h: In member function ‘void StringText::setOutlineColor(const sf::Color&)’:
/home/eugene/Development/dlang/DGEngine/src/StringText.h:60:54: error: ‘class sf::Text’ has no member named ‘setOutlineColor’
  void setOutlineColor(const sf::Color& color) { text.setOutlineColor(color); }
                                                      ^

/home/eugene/Development/dlang/DGEngine/src/StringText.h: In member function ‘void StringText::setOutlineThickness(float)’:
/home/eugene/Development/dlang/DGEngine/src/StringText.h:61:51: error: ‘class sf::Text’ has no member named ‘setOutlineThickness’
  void setOutlineThickness(float thickness) { text.setOutlineThickness(thickness
                                                   ^

/home/eugene/Development/dlang/DGEngine/src/StringText.h: In member function ‘const sf::Color& StringText::getColor() const’:
/home/eugene/Development/dlang/DGEngine/src/StringText.h:67:50: error: ‘const class sf::Text’ has no member named ‘getFillColor’
  const sf::Color& getColor() const { return text.getFillColor(); }
                                                  ^

/home/eugene/Development/dlang/DGEngine/src/StringText.h: In member function ‘const sf::Color& StringText::getOutlineColor() const’:
/home/eugene/Development/dlang/DGEngine/src/StringText.h:68:57: error: ‘const class sf::Text’ has no member named ‘getOutlineColor’
  const sf::Color& getOutlineColor() const { return text.getOutlineColor(); }
                                                         ^

/home/eugene/Development/dlang/DGEngine/src/StringText.h: In member function ‘float StringText::getOutlineThickness() const’:
/home/eugene/Development/dlang/DGEngine/src/StringText.h:69:50: error: ‘const class sf::Text’ has no member named ‘getOutlineThickness’
  float getOutlineThickness() const { return text.getOutlineThickness(); }
ghost commented 7 years ago

Hi,

Those functions were introduced in SFML 2.4. If you want to, you can replace these functions with the old (equivalent) functions by looking at the previous version:

https://github.com/dgengin/DGEngine/blob/1a022c63ad89897652af53c746ae19422be8cd37/src/StringText.h

mewmew commented 6 years ago

As SFML 2.5 was released some 5 months ago, I think this issue can be closed (since it refers to older releases).