[DEV] better init of vec 2/3

This commit is contained in:
Edouard DUPIN 2013-03-01 09:14:53 +01:00
parent c767266dfe
commit ed462a3b36
4 changed files with 24 additions and 19 deletions

View File

@ -1,6 +1,6 @@
# #
# Automatically generated make config: don't edit # Automatically generated file; DO NOT EDIT.
# Linux kernel version: # Linux Kernel Configuration
# #
# #
@ -8,8 +8,9 @@
# #
CONFIG_BUILD_EDN=y CONFIG_BUILD_EDN=y
# CONFIG_BUILD_AGG is not set # CONFIG_BUILD_AGG is not set
CONFIG_BUILD_LINEARMATH=y
CONFIG_BUILD_BULLET=y
# CONFIG_BUILD_ETK is not set # CONFIG_BUILD_ETK is not set
# CONFIG_BUILD_EWOL is not set
# CONFIG_BUILD_FREETYPE is not set # CONFIG_BUILD_FREETYPE is not set
# CONFIG_BUILD_LUA is not set # CONFIG_BUILD_LUA is not set
# CONFIG_BUILD_OGG is not set # CONFIG_BUILD_OGG is not set
@ -19,6 +20,7 @@ CONFIG_BUILD_EDN=y
# CONFIG_BUILD_TINYXML is not set # CONFIG_BUILD_TINYXML is not set
# CONFIG_BUILD_ZLIB is not set # CONFIG_BUILD_ZLIB is not set
# CONFIG_BUILD_LIBZIP is not set # CONFIG_BUILD_LIBZIP is not set
# CONFIG_BUILD_EWOL is not set
# #
# edn # edn
@ -37,5 +39,11 @@ CONFIG_APPL_BUFFER_FONT_NORMAL=y
# #
# General # General
# #
# CONFIG___EWOL_INTEGRATED_FONT__ is not set
CONFIG___EWOL_APPL_BASIC_TITLE__="Edn : Sources Code Editor" CONFIG___EWOL_APPL_BASIC_TITLE__="Edn : Sources Code Editor"
# CONFIG___EWOL_INTEGRATED_FONT__ is not set
#
# Linux
#
CONFIG___EWOL_LINUX_GUI_MODE_X11__=y
# CONFIG___EWOL_LINUX_GUI_MODE_DIRECT_FB__ is not set

View File

@ -114,9 +114,7 @@ bool BufferText::NeedToUpdateDisplayPosition(void)
vec2 BufferText::GetBorderSize(void) vec2 BufferText::GetBorderSize(void)
{ {
vec2 tmpVal; return vec2(30,30);;
tmpVal.setValue(30,30);
return tmpVal;
} }
@ -864,7 +862,7 @@ vec2 BufferText::GetPosition(int32_t fontId, bool& centerRequested)
{ {
centerRequested = m_centerRequested; centerRequested = m_centerRequested;
m_centerRequested = false; m_centerRequested = false;
vec2 outputPosition; vec2 outputPosition(0,0);
// Display position (Y mode): // Display position (Y mode):
APPL_INFO("change the position : " << m_cursorPos); APPL_INFO("change the position : " << m_cursorPos);
@ -892,7 +890,7 @@ vec2 BufferText::GetPosition(int32_t fontId, bool& centerRequested)
/* if we request a center : /* if we request a center :
} else { } else {
// center the line at the middle of the screen : // center the line at the middle of the screen :
vec2 outputPosition; vec2 outputPosition(0,0);
//APPL_DEBUG(" -------------------------------------------------"); //APPL_DEBUG(" -------------------------------------------------");
outputPosition.y = m_EdnBuf.CountLines(0, m_cursorPos); outputPosition.y = m_EdnBuf.CountLines(0, m_cursorPos);
//APPL_DEBUG(" cursor position : " << m_cursorPos << " ==> ligne=" << outputPosition.y); //APPL_DEBUG(" cursor position : " << m_cursorPos << " ==> ligne=" << outputPosition.y);

View File

@ -84,8 +84,7 @@ CodeView::~CodeView(void)
*/ */
void CodeView::UpdateNumberOfLineReference(int32_t bufferID) void CodeView::UpdateNumberOfLineReference(int32_t bufferID)
{ {
vec2 tmpCoord; vec2 tmpCoord(0,0);
tmpCoord.setValue(0,0);
if (m_lineNumberList.Size()<=bufferID) { if (m_lineNumberList.Size()<=bufferID) {
// update the number of elements : // update the number of elements :
for (int32_t iii=m_lineNumberList.Size(); iii <= bufferID; iii++) { for (int32_t iii=m_lineNumberList.Size(); iii <= bufferID; iii++) {

View File

@ -49,22 +49,22 @@ int main(int argc, const char *argv[])
void APP_Init(void) void APP_Init(void)
{ {
#ifdef MODE_RELEASE #ifdef MODE_RELEASE
char * debugMode = "Release"; const char * debugMode = "Release";
#else #else
char * debugMode = "Debug"; const char * debugMode = "Debug";
#endif #endif
#ifdef __TARGET_OS__Linux #ifdef __TARGET_OS__Linux
char * osMode = "Linux"; const char * osMode = "Linux";
#elif defined(__TARGET_OS__Android) #elif defined(__TARGET_OS__Android)
char * osMode = "Android"; const char * osMode = "Android";
#elif defined(__TARGET_OS__Windows) #elif defined(__TARGET_OS__Windows)
char * osMode = "Windows"; const char * osMode = "Windows";
#elif defined(__TARGET_OS__IOs) #elif defined(__TARGET_OS__IOs)
char * osMode = "IOs"; const char * osMode = "IOs";
#elif defined(__TARGET_OS__MacOs) #elif defined(__TARGET_OS__MacOs)
char * osMode = "MacOs"; const char * osMode = "MacOs";
#else #else
char * osMode = "Unknown"; const char * osMode = "Unknown";
#endif #endif
APPL_INFO("==> Init "PROJECT_NAME" (START) [" << osMode << "] (" << debugMode << ")"); APPL_INFO("==> Init "PROJECT_NAME" (START) [" << osMode << "] (" << debugMode << ")");