diff --git a/Build/Makefile.mk b/Build/Makefile.mk index 643f4a6c..52d57e23 100644 --- a/Build/Makefile.mk +++ b/Build/Makefile.mk @@ -19,8 +19,8 @@ else ifeq ($(PLATFORM), IMac) else ifeq ($(PLATFORM), IOs) else ifeq ($(PLATFORM), Android) - PROJECT_NDK?=$(realpath $(PROJECT_MODULE)/android/ndk/) - PROJECT_SDK?=$(realpath $(PROJECT_MODULE)/android/sdk/) + PROJECT_NDK:=$(PROJECT_MODULE)/android/ndk/ + PROJECT_SDK:=$(PROJECT_MODULE)/android/sdk/ else $(error you must specify a corect platform : make PLATFORM=$(SUPPORTED_PLATFORM)) endif diff --git a/Java/ewolAndroidAbstraction.cpp b/Java/ewolAndroidAbstraction.cpp index 14aeb478..b399e57e 100644 --- a/Java/ewolAndroidAbstraction.cpp +++ b/Java/ewolAndroidAbstraction.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include @@ -57,49 +57,49 @@ extern "C" void Java_com___PROJECT_VENDOR_____PROJECT_PACKAGE_____PROJECT_NAME___ActivityOnCreate( JNIEnv* env ) { - EDN_DEBUG("*******************************************"); - EDN_DEBUG("** Activity On Create **"); - EDN_DEBUG("*******************************************"); + APPL_DEBUG("*******************************************"); + APPL_DEBUG("** Activity On Create **"); + APPL_DEBUG("*******************************************"); EWOL_SystemStart(); } void Java_com___PROJECT_VENDOR_____PROJECT_PACKAGE_____PROJECT_NAME___ActivityOnStart( JNIEnv* env ) { - EDN_DEBUG("*******************************************"); - EDN_DEBUG("** Activity On Start **"); - EDN_DEBUG("*******************************************"); + APPL_DEBUG("*******************************************"); + APPL_DEBUG("** Activity On Start **"); + APPL_DEBUG("*******************************************"); } void Java_com___PROJECT_VENDOR_____PROJECT_PACKAGE_____PROJECT_NAME___ActivityOnReStart( JNIEnv* env ) { - EDN_DEBUG("*******************************************"); - EDN_DEBUG("** Activity On Re-Start **"); - EDN_DEBUG("*******************************************"); + APPL_DEBUG("*******************************************"); + APPL_DEBUG("** Activity On Re-Start **"); + APPL_DEBUG("*******************************************"); } void Java_com___PROJECT_VENDOR_____PROJECT_PACKAGE_____PROJECT_NAME___ActivityOnResume( JNIEnv* env ) { - EDN_DEBUG("*******************************************"); - EDN_DEBUG("** Activity On Resume **"); - EDN_DEBUG("*******************************************"); + APPL_DEBUG("*******************************************"); + APPL_DEBUG("** Activity On Resume **"); + APPL_DEBUG("*******************************************"); } void Java_com___PROJECT_VENDOR_____PROJECT_PACKAGE_____PROJECT_NAME___ActivityOnPause( JNIEnv* env ) { - EDN_DEBUG("*******************************************"); - EDN_DEBUG("** Activity On Pause **"); - EDN_DEBUG("*******************************************"); + APPL_DEBUG("*******************************************"); + APPL_DEBUG("** Activity On Pause **"); + APPL_DEBUG("*******************************************"); // All the openGl has been destroyed ... // TODO : Mark all the texture to be reloaded ... EWOL_NativeGLDestroy(); } void Java_com___PROJECT_VENDOR_____PROJECT_PACKAGE_____PROJECT_NAME___ActivityOnStop( JNIEnv* env ) { - EDN_DEBUG("*******************************************"); - EDN_DEBUG("** Activity On Stop **"); - EDN_DEBUG("*******************************************"); + APPL_DEBUG("*******************************************"); + APPL_DEBUG("** Activity On Stop **"); + APPL_DEBUG("*******************************************"); } void Java_com___PROJECT_VENDOR_____PROJECT_PACKAGE_____PROJECT_NAME___ActivityOnDestroy( JNIEnv* env ) { - EDN_DEBUG("*******************************************"); - EDN_DEBUG("** Activity On Destroy **"); - EDN_DEBUG("*******************************************"); + APPL_DEBUG("*******************************************"); + APPL_DEBUG("** Activity On Destroy **"); + APPL_DEBUG("*******************************************"); EWOL_SystemStop(); } diff --git a/Sources/libetk/etk/DebugInternal.cpp b/Sources/libetk/etk/DebugInternal.cpp index 8e1b9a03..b7894836 100644 --- a/Sources/libetk/etk/DebugInternal.cpp +++ b/Sources/libetk/etk/DebugInternal.cpp @@ -22,4 +22,4 @@ ******************************************************************************* */ -const char * etkLibName = "Etk "; +const char * etkLibName = "Etk "; diff --git a/Sources/libewol/ewol/Debug.cpp b/Sources/libewol/ewol/Debug.cpp index 49ac7926..7225a70a 100644 --- a/Sources/libewol/ewol/Debug.cpp +++ b/Sources/libewol/ewol/Debug.cpp @@ -25,4 +25,4 @@ #include -const char * ewolLibName = "ewol "; +const char * ewolLibName = "ewol "; diff --git a/Sources/libewol/ewol/Game/GameElement.cpp b/Sources/libewol/ewol/Game/GameElement.cpp index 04a58b51..8ed198c7 100644 --- a/Sources/libewol/ewol/Game/GameElement.cpp +++ b/Sources/libewol/ewol/Game/GameElement.cpp @@ -36,10 +36,11 @@ ewol::GameElement::GameElement(void) m_visible = true; m_position.x = 0.0; m_position.y = 0.0; - m_acceleration.x = 0.0; - m_acceleration.y = 0.0; + m_speed.x = 0.0; + m_speed.y = 0.0; m_size = 64.0; m_angle = 0.0; + m_gravity = 0.0; } diff --git a/Sources/libewol/ewol/Game/GameElement.h b/Sources/libewol/ewol/Game/GameElement.h index ed5e2732..1dd912ac 100644 --- a/Sources/libewol/ewol/Game/GameElement.h +++ b/Sources/libewol/ewol/Game/GameElement.h @@ -37,9 +37,10 @@ namespace ewol { protected: bool m_visible; coord2D_ts m_position; - coord2D_ts m_acceleration; + coord2D_ts m_speed; etkFloat_t m_size; etkFloat_t m_angle; + etkFloat_t m_gravity; public: GameElement(void); virtual ~GameElement(void); @@ -48,15 +49,20 @@ namespace ewol { coord2D_ts PositionGet(void) { return m_position; }; void PositionSet(coord2D_ts state) { m_position = state; }; void PositionSet(etkFloat_t xxx, etkFloat_t yyy) { m_position.x = xxx; m_position.y = yyy; }; - coord2D_ts AccelerationGet(void) { return m_acceleration; }; - void AccelerationSet(coord2D_ts state) { m_acceleration = state; }; + coord2D_ts SpeedGet(void) { return m_speed; }; + void SpeedSet(coord2D_ts state) { m_speed = state; }; + void SpeedSet(etkFloat_t xxx, etkFloat_t yyy) { m_speed.x = xxx; m_speed.y = yyy; }; etkFloat_t SizeGet(void) { return m_size; }; void SizeSet(etkFloat_t state) { m_size = state; }; etkFloat_t AngleGet(void) { return m_angle; }; void AngleSet(etkFloat_t state) { m_angle = state; }; + etkFloat_t GravityGet(void) { return m_gravity; }; + void GravitySet(etkFloat_t state) { m_gravity = state; }; virtual bool Process(int64_t time, int32_t deltaTime, etk::VectorType & listOfElement); virtual void Draw(etk::VectorType & listOfSprite, etk::VectorType & listOfEffects); virtual void RemoveElement(int32_t idOfElement); + virtual bool HaveImpact(int32_t type, coord2D_ts position, etkFloat_t size) {return false;}; + virtual void Explosion(int32_t type, coord2D_ts position, etkFloat_t pxAtenuation, etkFloat_t power) { } ; int32_t LoadSprite(etk::VectorType listOfElement[NB_BOUBLE_BUFFER], etk::UString fileName, coord2D_ts maxSize); }; diff --git a/Sources/libewol/ewol/widget/Button.cpp b/Sources/libewol/ewol/widget/Button.cpp index 4c75bfa0..84e62028 100644 --- a/Sources/libewol/ewol/widget/Button.cpp +++ b/Sources/libewol/ewol/widget/Button.cpp @@ -28,9 +28,11 @@ #include -extern const char * const ewolEventButtonPressed = "ewol Button Pressed"; -extern const char * const ewolEventButtonEnter = "ewol Button Enter"; -extern const char * const ewolEventButtonLeave = "ewol Button Leave"; +extern const char * const ewolEventButtonPressed = "ewol-button-Pressed"; +extern const char * const ewolEventButtonDown = "ewol-button-down"; +extern const char * const ewolEventButtonUp = "ewol-button-up"; +extern const char * const ewolEventButtonEnter = "ewol-button-enter"; +extern const char * const ewolEventButtonLeave = "ewol-button-leave"; /** @@ -51,6 +53,8 @@ void ewol::WIDGET_ButtonInit(void) void ewol::Button::Init(void) { AddEventId(ewolEventButtonPressed); + AddEventId(ewolEventButtonDown); + AddEventId(ewolEventButtonUp); AddEventId(ewolEventButtonEnter); AddEventId(ewolEventButtonLeave); m_hasAnImage = false; @@ -277,11 +281,15 @@ bool ewol::Button::OnEventInput(int32_t IdInput, eventInputType_te typeEvent, co { //EWOL_DEBUG("Event on BT ..."); if (1 == IdInput) { + if(ewol::EVENT_INPUT_TYPE_DOWN == typeEvent) { + GenerateEventId(ewolEventButtonDown); + } + if(ewol::EVENT_INPUT_TYPE_UP == typeEvent) { + GenerateEventId(ewolEventButtonUp); + } if( ewol::EVENT_INPUT_TYPE_SINGLE == typeEvent || ewol::EVENT_INPUT_TYPE_DOUBLE == typeEvent || ewol::EVENT_INPUT_TYPE_TRIPLE == typeEvent) { - // nothing to do ... - //EWOL_DEBUG(" ==> generate event : " << ewolEventButtonPressed); GenerateEventId(ewolEventButtonPressed); MarkToReedraw(); return true; diff --git a/Sources/libewol/ewol/widget/Button.h b/Sources/libewol/ewol/widget/Button.h index 793f4273..b6eb3ed7 100644 --- a/Sources/libewol/ewol/widget/Button.h +++ b/Sources/libewol/ewol/widget/Button.h @@ -30,6 +30,8 @@ #include extern const char * const ewolEventButtonPressed; +extern const char * const ewolEventButtonDown; +extern const char * const ewolEventButtonUp; extern const char * const ewolEventButtonEnter; extern const char * const ewolEventButtonLeave; diff --git a/Sources/libewol/ewol/widget/Scene.cpp b/Sources/libewol/ewol/widget/Scene.cpp index 5ac05ef0..5c374299 100644 --- a/Sources/libewol/ewol/widget/Scene.cpp +++ b/Sources/libewol/ewol/widget/Scene.cpp @@ -167,11 +167,15 @@ void ewol::Scene::AddElement(ewol::GameElement* newElement) */ void ewol::Scene::PeriodicCall(int64_t localTime) { + //EWOL_ERROR("Periodic Call ... " << localTime); for (int32_t iii=0; iiiProcess(localTime, 100, m_listAnimatedElements); + // check if the element request an auto Kill ... + if (true == m_listAnimatedElements[iii]->Process(localTime, 20000, m_listAnimatedElements) ) { + delete(m_listAnimatedElements[iii]); + m_listAnimatedElements[iii] = NULL; + } } } MarkToReedraw(); diff --git a/Sources/libparsersvg/parserSVG/Debug.cpp b/Sources/libparsersvg/parserSVG/Debug.cpp index 0beef09f..2c7b9c14 100644 --- a/Sources/libparsersvg/parserSVG/Debug.cpp +++ b/Sources/libparsersvg/parserSVG/Debug.cpp @@ -24,4 +24,4 @@ #include -const char * parserSVGLibName = "parserSVG "; +const char * parserSVGLibName = "parserSVG";