• # Testé tous les jeux :)

    Posté par . En réponse au journal Gamedev Framework 0.7.0 et 0.8.0. Évalué à 5.

    Voilà, j'ai testé tous les jeux :) J'ai pas trop d'expérience en C++, mais j'aime bien les jeux 2D donc ça fait plaisir de voir des bibliothèques libres et qui plus est ça a l'air solide et pas gourmant en ressources.

    Juste deux petits soucis lors de la compilation (sous OpenBSD, clang 5.0.1), je ne saurais pas dire exactement pourquoi vu mon manque d'expérience en C++.

    diff --git a/include/gf/DataObject.h b/include/gf/DataObject.h
    index eae55da..ca4a1c5 100644
    --- a/include/gf/DataObject.h
    +++ b/include/gf/DataObject.h
    @@ -22,6 +22,7 @@
     #define GF_DATA_OBJECT_H
     #include <cstdint>
    +#include <cstddef>
     #include "Portability.h"
    diff --git a/library/Tmx.cc b/library/Tmx.cc
    index 85a070b..501c110 100644
    --- a/library/Tmx.cc
    +++ b/library/Tmx.cc
    @@ -488,7 +488,7 @@ inline namespace v1 {
     z_stream stream;
     std::memset(&stream, 0, sizeof(stream));
    - stream.next_in = input.data();
    + //stream.next_in = input.data(); // XXX
     stream.avail_in = input.size();
     stream.zalloc = Z_NULL;
     stream.zfree = Z_NULL;

    Première erreur :

    include/gf/DataObject.h:229:30: error: no type named 'nullptr_t' in namespace 'std'
     explicit DataObject(std::nullptr_t)
    

    Pour cette première erreur, j'imagine que glibc doit inclure <cstddef> dans un autre header de façon non standard.

    Deuxième erreur :

    gf/library/Tmx.cc:491:30: error: assigning to 'Bytef *' (aka 'unsigned char *') from incompatible type 'const
     std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >::value_type *' (aka 'const unsigned char *')
     stream.next_in = input.data();