sundagy wrote:Also I noticed that there appeared classes CAndroidAssetReader and CAndroidAssetFileArchive, they are already work properly?
If yes, could you provide a small example of how to use them?
They are working as good as it might get I'd say (android's API does not return subdirectory names, so getFileList only returns files). There is a CAndroidAssetFileArchive class, which uses the reader. The one example I hacked together is example 08:
- Import example 08 into eclipse
- create a media subdirectory under assets (the assets directory should have been created by the previous step).
- copy axe.jpg dwarf.jpg dwarf.x fire.bmp particlewhite.bmp portal1.bmp portal2.bmp portal3.bmp portal4.bmp portal5.bmp portal6.bmp portal7.bmp room.3ds stones.jpg wall.jpg water.jpg from irrlicht's media directory into assets/media
- compile using ndk-build
- Run using eclipse
No need to use a memory card with the assets anymore
The assets file system is added to the list of file systems by the android device, and it will try to read all files starting with /assets (kind of a virtual file system, since obviously there is no /assets directory
). So there should be no need to actually use it, just use the standard irrlicht file system and read files from "/assets".
Note that I had to revert some part of r4311 - the files under aesGladman do not compile with android anymore (I had to add the "#include <string.h>" back), and Nadro haven't had the time to fix that yet.
And last question, at this stage this branch is supports retrieving events from device - (multi)touch, buttons, accelerometer?
There is some code in it, but I am not sure how much all of it is working. The example 08 reacts to touching the screen, though it's hard (nearly impossible) to control it imho