__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "fatal", 1);
__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "major", 2);
__ecereNameSpace__ecere__com__eEnum_AddFixedValue(class, "minor", 3);
-__ecereNameSpace__ecere__com__eSystem_RegisterDefine("ecere::sys::AllErrors", "ecere::sys::ErrorLevel::Minor", module, 1);
+__ecereNameSpace__ecere__com__eSystem_RegisterDefine("ecere::sys::AllErrors", "ecere::sys::ErrorLevel::minor", module, 1);
class = __ecereNameSpace__ecere__com__eSystem_RegisterClass(2, "ecere::sys::ErrorCode", 0, 0, 0, (void *)0, (void *)0, module, 1, 1);
if(((struct __ecereNameSpace__ecere__com__Module *)(((char *)module + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application == ((struct __ecereNameSpace__ecere__com__Module *)(((char *)__thisModule + sizeof(struct __ecereNameSpace__ecere__com__Instance))))->application && class)
__ecereClass___ecereNameSpace__ecere__sys__ErrorCode = class;
}
else
{
-char * libLocation = (((void *)0));
+const char * libLocation = (((void *)0));
library = Instance_Module_Load(libLocation, name, (void *)(&Load), (void *)(&Unload));
}
}
else
{
- char * libLocation = null;
+ const char * libLocation = null;
#if defined(__ANDROID__)
libLocation = AndroidInterface_GetLibLocation();
#endif
EGL_SAMPLES, 0, //2,*/
EGL_NONE
};
- EGLint w, h, dummy, format;
+ EGLint w, h, format;
EGLint numConfigs;
EGLConfig config;
EGLSurface surface;
void glesOrtho( double l, double r, double b, double t, double n, double f )
{
- Matrix m =
+ Matrix m
{ {
(2 / (r - l)), 0, 0, 0,
0, (2 / (t - b)), 0, 0,
0, 0, (-2 / (f - n)), 0,
(-(r + l) / (r - l)), (-(t + b) / (t - b)), (-(f + n) / (f - n)), 1
- } }, res;
+ } };
+ Matrix res;
res.Multiply(m, matrixStack[curStack][matrixIndex[curStack]]);
matrixStack[curStack][matrixIndex[curStack]] = res;
LoadCurMatrix();
double B = ((t + b) / (t - b));
double C = (-(f + n) / (f - n));
double D = (-2*f*n/(f-n));
- Matrix m =
+ Matrix m
{ {
(2.0*n / (r - l)), 0, 0, 0,
0, (2.0*n / (t - b)), 0, 0,
A, B, C,-1,
0, 0, D, 0
- } }, res;
+ } };
+ Matrix res;
res.Multiply(m, matrixStack[curStack][matrixIndex[curStack]]);
matrixStack[curStack][matrixIndex[curStack]] = res;
LoadCurMatrix();
void glesLineStipple( int i, unsigned short j )
{
uint texture[1*16];
- int c;
int x;
for(x = 0; x < 16; x++)
{
{
#ifdef __ANDROID__
if(type == GL_DOUBLE)
- glesBufferDatad(target, size, data, usage);
+ glesBufferDatad(target, size, (void *)data, usage);
else if(type == GL_UNSIGNED_INT)
- glesBufferDatai(target, size, data, usage);
+ glesBufferDatai(target, size, (void *)data, usage);
else
glBufferData(target, size, data, usage);
#else
int imageBuffers[2];
byte * pboMemory1, * pboMemory2;
*/
-#else
+#elif !defined(__ANDROID__)
GLXContext glContext;
Pixmap pixmap;
HDC hdc;
HGLRC glrc;
HWND hwnd;
-#else
+#elif !defined(__ANDROID__)
XVisualInfo * visualInfo;
GLXContext glContext;
GLXDrawable glxDrawable;
bool LockSystem(DisplaySystem displaySystem)
{
+#if !defined(__ANDROID__)
OGLSystem oglSystem = displaySystem.driverData;
if(useSingleGLContext) return true;
#if defined(__WIN32__)
#elif defined(__unix__) || defined(__APPLE__)
//if(previous) return true;
// printf("Making SYSTEM current\n");
-#if !defined(__ANDROID__)
glXMakeCurrent(xGlobalDisplay, (GLXDrawable)oglSystem.glxDrawable, oglSystem.glContext);
-#endif
//previous = oglSystem.glContext;
#endif
+#endif
return true;
}
bool Lock(Display display)
{
+#if !defined(__ANDROID__)
OGLDisplay oglDisplay = display.driverData;
-
if(useSingleGLContext) return true;
#if defined(__WIN32__)
wglMakeCurrent(oglDisplay.hdc, oglDisplay.glrc);
#elif defined(__unix__) || defined(__APPLE__)
// if(previous) glXMakeCurrent(xGlobalDisplay, None, null);
// printf(" Making DISPLAY current\n");
- #if defined(__ANDROID__)
- #else
glXMakeCurrent(xGlobalDisplay, (GLXDrawable)display.window, oglDisplay.glContext);
- #endif
#endif
+#endif
return true;
}
{
bool result = false;
OGLDisplay oglDisplay = display.driverData;
+#if !defined(__ANDROID__)
OGLSystem oglSystem = display.displaySystem.driverData;
+#endif
if(!oglDisplay)
oglDisplay = display.driverData = OGLDisplay { };
//printf("Inside CreateDisplay\n");
{
if(displaySystem)
{
- OGLSystem system = displaySystem.driverData;
#if defined(__WIN32__)
+ OGLSystem system = displaySystem.driverData;
return system.glrc;
-#else
+#elif !defined(__ANDROID__)
+ OGLSystem system = displaySystem.driverData;
return system.glContext;
+#else
+ return eglContext;
#endif
}
return null;
AInputEvent* event = null;
if(AInputQueue_getEvent(inputQueue, &event) >= 0)
{
- int handled = 0;
+ //int handled = 0;
LOGV("New input event: type=%d\n", AInputEvent_getType(event));
if(AInputQueue_preDispatchEvent(inputQueue, event))
return;
- handled = onInputEvent(event);
+ /*handled = */onInputEvent(event);
//AInputQueue_finishEvent(inputQueue, event, handled);
}
else
void pre_exec_cmd(AppCommand cmd)
{
- PrintLn("pre_exec_cmd: ", (int)cmd);
+ PrintLn("pre_exec_cmd: ", cmd);
switch(cmd)
{
case inputChanged:
void post_exec_cmd(AppCommand cmd)
{
- PrintLn("post_exec_cmd: ", (int)cmd);
+ PrintLn("post_exec_cmd: ", cmd);
switch(cmd)
{
case termWindow:
void GetMousePosition(int *x, int *y)
{
- int rootWindow, childWindow;
- int mx, my;
- unsigned int state;
-
*x = mouseX;
*y = mouseY;
}
bool GetKeyState(Key key)
{
- int keyState = 0;
+ bool keyState = false;
return keyState;
}
0, //AKEYCODE_BUTTON_START = 108,
0, //AKEYCODE_BUTTON_SELECT = 109,
0, //AKEYCODE_BUTTON_MODE = 110,
- escape, //AKEYCODE_BUTTON_ESCAPE = 111,
- del //AKEYCODE_BUTTON_ESCAPE = 112,
+ escape, //AKEYCODE_BUTTON_ESCAPE = 111,
+ del, //AKEYCODE_BUTTON_ESCAPE = 112,
leftControl, // = 113
rightControl, // = 114
capsLock, // = 115
if(type == AINPUT_EVENT_TYPE_MOTION)
{
uint actionAndIndex = AMotionEvent_getAction(event);
- uint source = AInputEvent_getSource(event);
+ //uint source = AInputEvent_getSource(event);
uint action = actionAndIndex & AMOTION_EVENT_ACTION_MASK;
- uint index = (actionAndIndex & AMOTION_EVENT_ACTION_POINTER_INDEX_MASK) >> AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT;
- uint flags = AMotionEvent_getFlags(event);
+ //uint index = (actionAndIndex & AMOTION_EVENT_ACTION_POINTER_INDEX_MASK) >> AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT;
+ //uint flags = AMotionEvent_getFlags(event);
uint meta = AMotionEvent_getMetaState(event);
- uint edge = AMotionEvent_getEdgeFlags(event);
- int64 downTime = AMotionEvent_getDownTime(event); // nanotime
- int64 eventTime = AMotionEvent_getDownTime(event);
+ //uint edge = AMotionEvent_getEdgeFlags(event);
+ //int64 downTime = AMotionEvent_getDownTime(event); // nanotime
+ //int64 eventTime = AMotionEvent_getDownTime(event);
//float axis;
Modifiers keyFlags = 0;
int x = (int)AMotionEvent_getX(event, 0);
int y = (int)AMotionEvent_getY(event, 0);
bool shift = (meta & AMETA_SHIFT_ON) ? true : false;
bool alt = (meta & AMETA_ALT_ON) ? true : false;
- bool sym = (meta & AMETA_SYM_ON) ? true : false;
+ //bool sym = (meta & AMETA_SYM_ON) ? true : false;
keyFlags.shift = shift;
keyFlags.alt = alt;
else if(type == AINPUT_EVENT_TYPE_KEY)
{
uint action = AKeyEvent_getAction(event);
- uint flags = AKeyEvent_getFlags(event);
+ //uint flags = AKeyEvent_getFlags(event);
uint keyCode = AKeyEvent_getKeyCode(event);
uint meta = AKeyEvent_getMetaState(event);
Key key = keyCodeTable[keyCode];
bool shift = (meta & AMETA_SHIFT_ON) ? true : false;
bool alt = (meta & AMETA_ALT_ON || meta & AMETA_ALT_LEFT_ON || meta & AMETA_ALT_RIGHT_ON) ? true : false;
- bool metaMeta = (meta & AMETA_META_ON || meta & AMETA_META_LEFT_ON || meta & AMETA_META_RIGHT_ON) ? true : false;
- bool sym = (meta & AMETA_SYM_ON) ? true : false;
+ //bool metaMeta = (meta & AMETA_META_ON || meta & AMETA_META_LEFT_ON || meta & AMETA_META_RIGHT_ON) ? true : false;
+ //bool sym = (meta & AMETA_SYM_ON) ? true : false;
//unichar ch = AKeyEvent_getUnichar(event);
unichar ch = 0;
guiApp = (GuiApplication)__androidCurrentModule;
{
- String skin = guiApp.skin;
+ const String skin = guiApp.skin;
*&guiApp.currentSkin = null;
guiApp.SelectSkin(skin);
}
minor = 3
};
-public define AllErrors = ErrorLevel::Minor;
+public define AllErrors = ErrorLevel::minor;
public class ErrorCode
{