Ogre in android problem with ACP binary heather

Discussion of issues specific to mobile platforms such as iOS, Android, Symbian and Meego.
elkree
Gnoblar
Posts: 20
Joined: Wed Apr 21, 2010 9:08 pm
x 1

Ogre in android problem with ACP binary heather

Post by elkree »

Hi,

i'm doing a port of a football game developed with ogre3d to android, in ogre3d 1.8 there is a browser that works and now i'm working on my own code...

my problem is the next:

-all the media is zipped and the extension changed to .mp3
-right click open with zip and opens it ok
-right click open with notepadd and the content starts with "PK" characters

using the code to get the file system, in class ACPFile, at method loadHeader used in method load:

Code: Select all

Ogre::DataStreamPtr stream(OGRE_NEW Ogre::MemoryDataStream(buffer, size, false, true));
	char mc[3] = "";
	stream->read(mc, sizeof(char)*3);
	if(mc[0] == 'A' && mc[1] == 'C' && mc[2] == 'P')
	{
		LOGI("Magic char check passed");
the example media contains "ACP" the first 3 bytes but a normal zip adding ACP, substituting PK for ACP or with only PK the code don't works fine

the question is, how i can generate that ACP files? this isn't a normal zip or rar, i didn't try with tar and then i need to set ACP at start of file?

i tryed uzing zip, rar files compressed uncompressed, adding the ACP or not and there isn't any result

thx!
Nebojsa
Gnoblar
Posts: 8
Joined: Tue Apr 10, 2012 10:46 am

Re: Ogre in android problem with ACP binary heather

Post by Nebojsa »

Hi have you found out how to pack in mp3(APC) file format. I have been trying for few days now and couldn't find solution.
Did you find other way to add new textures to android project?

Thanks!
elkree
Gnoblar
Posts: 20
Joined: Wed Apr 21, 2010 9:08 pm
x 1

Re: Ogre in android problem with ACP binary heather

Post by elkree »

well.. i successfully implemented my own simple file system for android but i had rendering problems with opengles 2...

at last, i'm waiting an oficial port to android and i'm doing my current projects with unity3d and working in a little library for opengl es 2

good luck!
Nebojsa
Gnoblar
Posts: 8
Joined: Tue Apr 10, 2012 10:46 am

Re: Ogre in android problem with ACP binary heather

Post by Nebojsa »

Thanks for quick reply, I was able to load resources from filesystem.
sportstiger
Gnoblar
Posts: 4
Joined: Tue Apr 24, 2012 4:23 am

Re: Ogre in android problem with ACP binary heather

Post by sportstiger »

How to load resources from filesystem in Android?ACP pack or others?
Nebojsa wrote:Thanks for quick reply, I was able to load resources from filesystem.
sportstiger
Gnoblar
Posts: 4
Joined: Tue Apr 24, 2012 4:23 am

Re: Ogre in android problem with ACP binary heather

Post by sportstiger »

I know the answer. The ACP format was implemented in "ogre-android\Samples\Browser\Android\project\jni\ACPFile.cpp", you can analyse "ACPFile::save(const char *path)" method to understand ACP format. I packed the Sinbad resource, runned Sinbad character demo successfully. Good luck!