Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - NathanielSheller

Pages: [1]
1
SFML projects / Re: 'Tiled' Tile-map Loader
« on: June 24, 2013, 03:32:14 pm »
Thank you ever so much :D, and sorry for the late reply, been a little busy.

2
SFML projects / Re: 'Tiled' Tile-map Loader
« on: June 14, 2013, 08:15:50 pm »
Ahhhh ty :)))

Edit: Still not compiling correctly :/

Quote
C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\src\map_loader\MapLoaderPrivate.cpp   In member function 'const bool tmx::MapLoader::m_ParseMapNode(const pugi::xml_node&)':
71   14   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\src\map_loader\MapLoaderPrivate.cpp   [Error] expected unqualified-id before 'or' token
73   5   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\src\map_loader\MapLoaderPrivate.cpp   [Error] expected primary-expression before 'or' token
73   8   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\src\map_loader\MapLoaderPrivate.cpp   [Error] expected primary-expression before '==' token
77   10   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\src\map_loader\MapLoaderPrivate.cpp   [Error] expected primary-expression before 'or' token
77   13   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\src\map_loader\MapLoaderPrivate.cpp   [Error] expected primary-expression before '==' token
84   38   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\src\map_loader\MapLoaderPrivate.cpp   [Error] expected primary-expression before 'or' token
84   41   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\src\map_loader\MapLoaderPrivate.cpp   [Error] expected primary-expression before '<<' token
C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\src\map_loader\MapLoaderPrivate.cpp   In member function 'const bool tmx::MapLoader::m_Decompress(const char*, std::vector<unsigned char>&, int, int)':
736   4   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\src\map_loader\MapLoaderPrivate.cpp   [Error] 'memcpy' is not a member of 'std'
736   4   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\src\map_loader\MapLoaderPrivate.cpp   [Note] suggested alternative:
46   0   c:\program files (x86)\dev-cpp\mingw64\lib\gcc\x86_64-w64-mingw32\4.7.1\include\c++\cwchar   In file included from c:\program files (x86)\dev-cpp\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.7.1/include/c++/cwchar
42      c:\program files (x86)\dev-cpp\mingw64\lib\gcc\x86_64-w64-mingw32\4.7.1\include\c++\bits\postypes.h                    from c:\program files (x86)\dev-cpp\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.7.1/include/c++/bits/postypes.h
42      c:\program files (x86)\dev-cpp\mingw64\lib\gcc\x86_64-w64-mingw32\4.7.1\include\c++\bits\char_traits.h                    from c:\program files (x86)\dev-cpp\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.7.1/include/c++/bits/char_traits.h
42      c:\program files (x86)\dev-cpp\mingw64\lib\gcc\x86_64-w64-mingw32\4.7.1\include\c++\string                    from c:\program files (x86)\dev-cpp\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.7.1/include/c++/string
32      C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\inc\map_loader\MapObject.h                    from C:/Users/Natha_000/Desktop/Blood of Tyr Prototype/inc/map_loader/MapObject.h
32      C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\inc\map_loader\MapLoader.h                    from C:/Users/Natha_000/Desktop/Blood of Tyr Prototype/inc/map_loader/MapLoader.h
29      C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\src\map_loader\MapLoaderPrivate.cpp                    from src/map_loader/MapLoaderPrivate.cpp
961   17   c:\program files (x86)\dev-cpp\mingw64\x86_64-w64-mingw32\include\wchar.h   [Note] 'memcpy'
758   2   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\src\map_loader\MapLoaderPrivate.cpp   [Error] 'memcpy' is not a member of 'std'
758   2   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\src\map_loader\MapLoaderPrivate.cpp   [Note] suggested alternative:
46   0   c:\program files (x86)\dev-cpp\mingw64\lib\gcc\x86_64-w64-mingw32\4.7.1\include\c++\cwchar   In file included from c:\program files (x86)\dev-cpp\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.7.1/include/c++/cwchar
42      c:\program files (x86)\dev-cpp\mingw64\lib\gcc\x86_64-w64-mingw32\4.7.1\include\c++\bits\postypes.h                    from c:\program files (x86)\dev-cpp\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.7.1/include/c++/bits/postypes.h
42      c:\program files (x86)\dev-cpp\mingw64\lib\gcc\x86_64-w64-mingw32\4.7.1\include\c++\bits\char_traits.h                    from c:\program files (x86)\dev-cpp\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.7.1/include/c++/bits/char_traits.h
42      c:\program files (x86)\dev-cpp\mingw64\lib\gcc\x86_64-w64-mingw32\4.7.1\include\c++\string                    from c:\program files (x86)\dev-cpp\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.7.1/include/c++/string
32      C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\inc\map_loader\MapObject.h                    from C:/Users/Natha_000/Desktop/Blood of Tyr Prototype/inc/map_loader/MapObject.h
32      C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\inc\map_loader\MapLoader.h                    from C:/Users/Natha_000/Desktop/Blood of Tyr Prototype/inc/map_loader/MapLoader.h
29      C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\src\map_loader\MapLoaderPrivate.cpp                    from src/map_loader/MapLoaderPrivate.cpp
961   17   c:\program files (x86)\dev-cpp\mingw64\x86_64-w64-mingw32\include\wchar.h   [Note] 'memcpy'

3
SFML projects / Re: 'Tiled' Tile-map Loader
« on: June 14, 2013, 02:05:56 pm »
Thank you very much :), but I am getting a few error messages when trying to use your loader.

Quote
32   0   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\inc\map_loader\MapLoader.h   In file included from C:/Users/Natha_000/Desktop/Blood of Tyr Prototype/inc/map_loader/MapLoader.h
29      C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\src\map_loader\MapLoaderPrivate.cpp                    from src/map_loader/MapLoaderPrivate.cpp
C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\inc\map_loader\MapObject.h   In member function 'const bool tmx::MapObject::Intersects(tmx::MapObject&)':
159   13   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\inc\map_loader\MapObject.h   [Error] 'i' does not name a type
159   47   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\inc\map_loader\MapObject.h   [Error] expected ';' before 'i'
159   47   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\inc\map_loader\MapObject.h   [Error] 'i' was not declared in this scope
159   65   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\inc\map_loader\MapObject.h   [Error] 'class std::vector<sf::Vector2<float> >' has no member named 'cend'
162   13   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\inc\map_loader\MapObject.h   [Error] 'i' does not name a type
162   40   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\inc\map_loader\MapObject.h   [Error] expected ';' before 'i'
162   40   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\inc\map_loader\MapObject.h   [Error] 'i' was not declared in this scope
162   58   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\inc\map_loader\MapObject.h   [Error] 'class std::vector<sf::Vector2<float> >' has no member named 'cend'
C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\inc\map_loader\MapObject.h   In member function 'void tmx::MapObject::CreateDebugShape(sf::Color)':
172   13   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\inc\map_loader\MapObject.h   [Error] 'i' does not name a type
172   40   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\inc\map_loader\MapObject.h   [Error] expected ';' before 'i'
172   40   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\inc\map_loader\MapObject.h   [Error] 'i' was not declared in this scope
172   58   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\inc\map_loader\MapObject.h   [Error] 'class std::vector<sf::Vector2<float> >' has no member named 'cend'
C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\inc\map_loader\MapObject.h   In member function 'void tmx::MapObject::m_CalcTestValues()':
264   13   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\inc\map_loader\MapObject.h   [Error] 'i' does not name a type
264   40   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\inc\map_loader\MapObject.h   [Error] expected ';' before 'i'
264   40   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\inc\map_loader\MapObject.h   [Error] 'i' was not declared in this scope
264   58   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\inc\map_loader\MapObject.h   [Error] 'class std::vector<sf::Vector2<float> >' has no member named 'cend'
C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\src\map_loader\MapLoaderPrivate.cpp   In member function 'const bool tmx::MapLoader::m_ParseMapNode(const pugi::xml_node&)':
71   14   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\src\map_loader\MapLoaderPrivate.cpp   [Error] expected unqualified-id before 'or' token
73   5   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\src\map_loader\MapLoaderPrivate.cpp   [Error] expected primary-expression before 'or' token
73   8   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\src\map_loader\MapLoaderPrivate.cpp   [Error] expected primary-expression before '==' token
77   10   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\src\map_loader\MapLoaderPrivate.cpp   [Error] expected primary-expression before 'or' token
77   13   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\src\map_loader\MapLoaderPrivate.cpp   [Error] expected primary-expression before '==' token
84   38   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\src\map_loader\MapLoaderPrivate.cpp   [Error] expected primary-expression before 'or' token
84   41   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\src\map_loader\MapLoaderPrivate.cpp   [Error] expected primary-expression before '<<' token
C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\src\map_loader\MapLoaderPrivate.cpp   In member function 'const bool tmx::MapLoader::m_ParseLayer(const pugi::xml_node&)':
272   14   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\src\map_loader\MapLoaderPrivate.cpp   [Error] 'i' does not name a type
272   33   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\src\map_loader\MapLoaderPrivate.cpp   [Error] expected ';' before 'i'
272   33   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\src\map_loader\MapLoaderPrivate.cpp   [Error] 'i' was not declared in this scope
272   43   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\src\map_loader\MapLoaderPrivate.cpp   [Error] 'std::string' has no member named 'cend'
C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\src\map_loader\MapLoaderPrivate.cpp   In member function 'const bool tmx::MapLoader::m_ParseObjectgroup(const pugi::xml_node&)':
548   11   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\src\map_loader\MapLoaderPrivate.cpp   [Error] 'std::string' has no member named 'pop_back'
C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\src\map_loader\MapLoaderPrivate.cpp   In member function 'void tmx::MapLoader::m_SetIsometricCoords(tmx::MapLayer&)':
666   11   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\src\map_loader\MapLoaderPrivate.cpp   [Error] 'tile' does not name a type
666   39   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\src\map_loader\MapLoaderPrivate.cpp   [Error] expected ';' before 'tile'
666   39   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\src\map_loader\MapLoaderPrivate.cpp   [Error] 'tile' was not declared in this scope
C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\src\map_loader\MapLoaderPrivate.cpp   In member function 'const bool tmx::MapLoader::m_Decompress(const char*, std::vector<unsigned char>&, int, int)':
736   4   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\src\map_loader\MapLoaderPrivate.cpp   [Error] 'memcpy' is not a member of 'std'
736   4   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\src\map_loader\MapLoaderPrivate.cpp   [Note] suggested alternative:
46   0   c:\program files (x86)\dev-cpp\mingw64\lib\gcc\x86_64-w64-mingw32\4.7.1\include\c++\cwchar   In file included from c:\program files (x86)\dev-cpp\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.7.1/include/c++/cwchar
42      c:\program files (x86)\dev-cpp\mingw64\lib\gcc\x86_64-w64-mingw32\4.7.1\include\c++\bits\postypes.h                    from c:\program files (x86)\dev-cpp\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.7.1/include/c++/bits/postypes.h
42      c:\program files (x86)\dev-cpp\mingw64\lib\gcc\x86_64-w64-mingw32\4.7.1\include\c++\bits\char_traits.h                    from c:\program files (x86)\dev-cpp\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.7.1/include/c++/bits/char_traits.h
42      c:\program files (x86)\dev-cpp\mingw64\lib\gcc\x86_64-w64-mingw32\4.7.1\include\c++\string                    from c:\program files (x86)\dev-cpp\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.7.1/include/c++/string
32      C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\inc\map_loader\MapObject.h                    from C:/Users/Natha_000/Desktop/Blood of Tyr Prototype/inc/map_loader/MapObject.h
32      C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\inc\map_loader\MapLoader.h                    from C:/Users/Natha_000/Desktop/Blood of Tyr Prototype/inc/map_loader/MapLoader.h
29      C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\src\map_loader\MapLoaderPrivate.cpp                    from src/map_loader/MapLoaderPrivate.cpp
961   17   c:\program files (x86)\dev-cpp\mingw64\x86_64-w64-mingw32\include\wchar.h   [Note] 'memcpy'
758   2   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\src\map_loader\MapLoaderPrivate.cpp   [Error] 'memcpy' is not a member of 'std'
758   2   C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\src\map_loader\MapLoaderPrivate.cpp   [Note] suggested alternative:
46   0   c:\program files (x86)\dev-cpp\mingw64\lib\gcc\x86_64-w64-mingw32\4.7.1\include\c++\cwchar   In file included from c:\program files (x86)\dev-cpp\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.7.1/include/c++/cwchar
42      c:\program files (x86)\dev-cpp\mingw64\lib\gcc\x86_64-w64-mingw32\4.7.1\include\c++\bits\postypes.h                    from c:\program files (x86)\dev-cpp\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.7.1/include/c++/bits/postypes.h
42      c:\program files (x86)\dev-cpp\mingw64\lib\gcc\x86_64-w64-mingw32\4.7.1\include\c++\bits\char_traits.h                    from c:\program files (x86)\dev-cpp\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.7.1/include/c++/bits/char_traits.h
42      c:\program files (x86)\dev-cpp\mingw64\lib\gcc\x86_64-w64-mingw32\4.7.1\include\c++\string                    from c:\program files (x86)\dev-cpp\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.7.1/include/c++/string
32      C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\inc\map_loader\MapObject.h                    from C:/Users/Natha_000/Desktop/Blood of Tyr Prototype/inc/map_loader/MapObject.h
32      C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\inc\map_loader\MapLoader.h                    from C:/Users/Natha_000/Desktop/Blood of Tyr Prototype/inc/map_loader/MapLoader.h
29      C:\Users\Natha_000\Desktop\Blood of Tyr Prototype\src\map_loader\MapLoaderPrivate.cpp                    from src/map_loader/MapLoaderPrivate.cpp
961   17   c:\program files (x86)\dev-cpp\mingw64\x86_64-w64-mingw32\include\wchar.h   [Note] 'memcpy'

4
SFML projects / Re: 'Tiled' Tile-map Loader
« on: June 14, 2013, 03:32:44 am »
I am having issues using this loader.

The following code compiles, but seems to do nothing. Please help :) Thank you :D.

#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
#include <level.h>

int main(){

sf::RenderWindow window(sf::VideoMode(640, 480), "");

sf::View view;
view.setCenter(player_x, player_y);
view.setSize(640, 480);

Level sample_map;
sample_map.LoadFromFile("c:/gfx/sample_map.tmx");
sample_map.SetDrawingBounds(view.getViewport());

while (window.isOpen()){
sf::Event event;
        while(window.pollEvent(event)){
        if (event.type == sf::Event::Closed)
                window.close();
       
        }



window.clear(sf::Color::Green);

window.setView(view);

sample_map.Draw(window);

window.display();
}
return 0;
}

Pages: [1]
anything