diff --git a/Build/coreLinux/main.mk b/Build/coreLinux/main.mk index 25ca1d67..6bf6f72f 100644 --- a/Build/coreLinux/main.mk +++ b/Build/coreLinux/main.mk @@ -18,10 +18,6 @@ DESTDIR := PREFIX := /usr/local # Tools -GCC := gcc -GXX := g++ -AR := ar -LD := ld WINDRES := windres # Overridable settings @@ -29,6 +25,20 @@ V := 0 W := 0 DEBUG := 0 STATIC := 0 +CLANG := 0 + + +ifneq ("$(CLANG)","1") + GCC := gcc + GXX := g++ + AR := ar + LD := ld +else + GCC := clang + GXX := clang++ + AR := ar + LD := ld +endif # Quiet command if V is not 1 ifneq ("$(V)","1") diff --git a/Sources/libagg/agg-2.4/agg_scanline_u.h b/Sources/libagg/agg-2.4/agg_scanline_u.h index 5a28ed17..d690f46c 100644 --- a/Sources/libagg/agg-2.4/agg_scanline_u.h +++ b/Sources/libagg/agg-2.4/agg_scanline_u.h @@ -344,7 +344,7 @@ namespace agg //-------------------------------------------------------------------- - scanline32_u8() : + scanline32_u8(void) : m_min_x(0), m_last_x(0x7FFFFFF0), m_covers() @@ -422,17 +422,17 @@ namespace agg } //-------------------------------------------------------------------- - void reset_spans() + void reset_spans(void) { m_last_x = 0x7FFFFFF0; m_spans.remove_all(); } //-------------------------------------------------------------------- - int y() const { return m_y; } - unsigned num_spans() const { return m_spans.size(); } - const_iterator begin() const { return const_iterator(m_spans); } - iterator begin() { return iterator(m_spans); } + int y(void) const { return m_y; } + unsigned num_spans(void) const { return m_spans.size(); } + const_iterator begin(void) const { return const_iterator(m_spans); } + iterator begin(void) { return iterator(m_spans); } private: scanline32_u8(const self_type&); @@ -464,7 +464,7 @@ namespace agg typedef base_type::coord_type coord_type; - scanline32_u8_am() : base_type(), m_alpha_mask(0) {} + scanline32_u8_am(void) : scanline_u8(), m_alpha_mask(0) {} scanline32_u8_am(const AlphaMask& am) : base_type(), m_alpha_mask(&am) {} //-------------------------------------------------------------------- diff --git a/Sources/libewol/ewol/Game/GameElement.h b/Sources/libewol/ewol/Game/GameElement.h index 13e0c5b2..933bbc24 100644 --- a/Sources/libewol/ewol/Game/GameElement.h +++ b/Sources/libewol/ewol/Game/GameElement.h @@ -33,6 +33,7 @@ #include #define CYCLIC_CALL_PERIODE_US (10000) +#define NB_SPECIAL_PARAM (5) namespace ewol { @@ -55,6 +56,7 @@ namespace ewol { float m_size; //!< Current size of the element more specific size can be done in the under class => this is for simplify calculation ==> all is consider like sphere... bool m_canBeCibled; //!< This is for automatic finding on an ennemy bool m_canHaveImpact; //!< detection of impact is done with this ... + float m_specialParam[NB_SPECIAL_PARAM]; //!< specific game user parameter public: /** * @brief Constructor : here are requested all the needed sprite and effect that can be used in the game @@ -109,6 +111,9 @@ namespace ewol { uint16_t GroupGet(void) { return m_group; }; void GroupSet(uint16_t state) { m_group = state; }; + float SpecialParamGet(int32_t id) { if (id<0 || id>=NB_SPECIAL_PARAM) {return 0.0;} return m_specialParam[id]; }; + void SpecialParamSet(int32_t id, float state) { if (id<0 || id>=NB_SPECIAL_PARAM) {return;} m_specialParam[id]=state; }; + /** * @brief Periodicly this fuction will be call tu change property of all the dynamic obbjects * @param[in] time Current game time (start at 0) diff --git a/Sources/libewol/ewol/Game/SceneElement.cpp b/Sources/libewol/ewol/Game/SceneElement.cpp index 438ac2f8..bb13f6d0 100644 --- a/Sources/libewol/ewol/Game/SceneElement.cpp +++ b/Sources/libewol/ewol/Game/SceneElement.cpp @@ -40,7 +40,7 @@ ewol::SceneElement::SceneElement(void) for (int32_t iii=0; iii position, int32_t g return 0; } while (groupEnemy[groupId][jjj] != -1) { - for (int32_t iii=0; iiiCanBeCibledGet()) { - Vector2D tmpPos = listAnimatedElements[groupEnemy[groupId][jjj]][iii]->PositionGet(); + int32_t gId = groupEnemy[groupId][jjj]; + if (gId == groupId) { + EWOL_ERROR("groupId=" << gId << " is ennemy of groupId:" << groupId); + } + for (int32_t iii=0; iiiCanBeCibledGet()) { + Vector2D tmpPos = listAnimatedElements[gId][iii]->PositionGet(); float distance = quadDist(position, tmpPos); if (distance <= lastQuadDistance) { lastQuadDistance = distance; - result = createUniqueId(listAnimatedElements[groupEnemy[groupId][jjj]][iii]->GetUniqueId(), iii); + result = createUniqueId(listAnimatedElements[gId][iii]->GetUniqueId(), iii); } } }