It will be used for steering on Android.
There are some limitations:
- currently it works only in single player mode (but I don't see any reason to make it working for multiplayer)
- speedometer is not available in race GUI because there is no place for it
TODO:
- add DPI support (race GUI should have probably different proportions on smaller devices for comfortable playing)
- make nice button images
- make nitro button that changes its look depending on collected nitro (a kind of nitro bar)
Touch input events must be handled in android device to make use of it. It can be simulated for debugging on non-android devices using standard mouse.
We need to check numlock mask, because it may be different on different systems, and possibly also modified manually.
It should generally work fine, but some testing are welcome.
Our vidmode code is old, has some bugs (eg. resolution is not restored properly in some cases), doesn't have multi monitor support and IMO shouldn't be used in current state.
If someone really wants to use it, the flags can be set directly in IrrCompileConfig.h.
* irrlicht: Fix harmless typo when setting CMAKE_CXX_FLAGS
The CMAKE_CXX_FLAGS set should be based on previously set
CMAKE_CXX_FLAGS (instead of C flags). This is currently
harmless because CMAKE_CXX_FLAGS is not previously set.
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
* irrlicht: Get rid of unprefixed cflags
Cross-building requires proper include paths. This commit
removes the unprefixed -I/usr/X11R6/include in irrlicht cflags,
replacing it with a proper CMake module.
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
* irrlicht: Fix boolean return type for jpeglib's callback
Building on certain toolchains can fail due to returning an integer
instead of TRUE. In any case, only {TRUE,FALSE} should be used
as 'boolean' jpeglib type. Fix this by returning TRUE.
CImageLoaderJPG.cpp: In static member function 'static boolean
irr::video::CImageLoaderJPG::fill_input_buffer(j_decompress_ptr)':
CImageLoaderJPG.cpp:69:9: error: invalid conversion from 'int' to 'boolean'
[-fpermissive]
Signed-off-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
We need it for proper working. When it's not available, then function glEnable(GL_FRAMEBUFFER_SRGB) doesn't take any effect, and then displayed image is too dark.
It doesn't solve the issue that the screen is too dark for intel graphics cards on linux, because the driver ignores this request. But still, this is the proper way to do it and it may avoid similar issues in future.
Actually we should detect that the visual is not srgb-capable, and in this case maybe make some gamma correction or filter it on our side to get similar effect.