Never mind. Did exactly as it says in the the Filesystem article of the Oxygine wiki. Now it works.
Living in Stockholm, Sweden. Newbee, hobbyist game developer. Developing Leapfrog, a sandbox space adventure using Oxygine and Box2d. Aerospace system engineer by employment.
Posts made by stfrha
Loading files from c++ using android ndk
I have built a game that is working in Windows. It loads multiple XML-files that define game maps. The files are stored in the data folder together with the res.xml and I use pugi XML to read the files. Now I am migrating to android using Android studio and ndk (as the oxygine Hello world android example). I have managed to build the project. The XML files are located in the assets project folder (once again, together with the rest.xml file). After the build I can see that they are included in the apk-file.
The game starts (I see this in the debugger) and the res.xml file is successfully loaded but when my code reads the additional XML files, the pugi reader says that the file is not found. Do I have to do anything special to access these files?
RE: Texturer offsets and scale
Sorry för being unclear. Suppose I have a big sprite for a large object that encapsule a bitmap like the following figure:
The thick frame is the sprite outline.
Now I want to use the same bitmap for a second smaller sprite like the following figure:
However, if I can not set an offset of the bitmap within the sprite the result will be like the following figure:
Texturer offsets and scale
What kind of possibilities do I have to adjust the offset and scale of the bitmap/texture of a sprite?
Let's say I have a big sprite for the ground of the game and even bigger bitmap as it's texture. Can I adjust the position of the bitmap and/or its scale within the sprite?