Generic files in .bar | developer.brewmp.com Generic files in .bar | developer.brewmp.com

Developer

Generic files in .bar

Forums:

Hello.

Is there some way of store generic data files in a .bar file?

I would like to store my levels and game information int a .bar file.

for example, in levels.bar I could store

level1.bmp
level1.dat
level2.bmp
level2.dat
.
.
.

To load them in run time, I can just use ISHELL_LoadResData()?

Thanks

I believe the .bar file format is capable of handling arbitrary data, but unfortunately the resource editor doesn't provide any straightforward means of doing it. You might try storing them as "images."

I believe the .bar file format is capable of handling arbitrary data, but unfortunately the resource editor doesn't provide any straightforward means of doing it. You might try storing them as "images."

There's a little handy tool named BARC.exe that comes with sample of BREWSER (BREW Browser), available from extranet (or even for free, I don't remember). This is sort of 'make' utility for .bar files that allows to compose .bar file using plain-text definitions file. It's much more convinient way to build .bar files, especially since it can be included into pre-build process with some simple scripting. And it allows you to store arbitrary information in .bar file too.
Highly recommended.

There's a little handy tool named BARC.exe that comes with sample of BREWSER (BREW Browser), available from extranet (or even for free, I don't remember). This is sort of 'make' utility for .bar files that allows to compose .bar file using plain-text definitions file. It's much more convinient way to build .bar files, especially since it can be included into pre-build process with some simple scripting. And it allows you to store arbitrary information in .bar file too.
Highly recommended.

It is very easy to do. simply use the Brew Resource Editor and add your files as "images." Regardless of the datatype you ca nthen load your data using LoadResData in your application.
Mind you, there is a mime header, though, that you will have to skip. The first word in the pointer returned by LoadResData contains the length of the header and can be used to skip. Kinda like this...
pointer += *pointer;
That's all you need to do.

It is very easy to do. simply use the Brew Resource Editor and add your files as "images." Regardless of the datatype you ca nthen load your data using LoadResData in your application.
Mind you, there is a mime header, though, that you will have to skip. The first word in the pointer returned by LoadResData contains the length of the header and can be used to skip. Kinda like this...
pointer += *pointer;
That's all you need to do.

Thank you all for your tips!

Thank you all for your tips!

You may also want to take a look at ReszEdit, a BAR Editor from Seismic Studios that uses XML files to generate your BAR files and allows you to create different handset builds etc in one wash. Very cool tool that I've been using for some time now.
Check out more about it in this thread
http://brewforums.qualcomm.com/showthread.php?s=&threadid=1792
I am highly recommmending it. It has made my life so much easier.

You may also want to take a look at ReszEdit, a BAR Editor from Seismic Studios that uses XML files to generate your BAR files and allows you to create different handset builds etc in one wash. Very cool tool that I've been using for some time now.
Check out more about it in this thread
http://brewforums.qualcomm.com/showthread.php?s=&threadid=1792
I am highly recommmending it. It has made my life so much easier.

Thank you for pointing me to this tool.
Though I don't see too much 'pros', if you do not create both J2ME and BREW versions of the same game. At the same moment, it's not free, as BARC.
And as ReszEdit author mentioned in the PDF, we're also using Ant scripts for configuration management and BARC is exactly what we need to run fully automated builds.
Anyway, it's good that people starting to create tools for BREW development, since unfortunately those from Qualcomm are quite buggy and missing many improtant features.

Thank you for pointing me to this tool.
Though I don't see too much 'pros', if you do not create both J2ME and BREW versions of the same game. At the same moment, it's not free, as BARC.
And as ReszEdit author mentioned in the PDF, we're also using Ant scripts for configuration management and BARC is exactly what we need to run fully automated builds.
Anyway, it's good that people starting to create tools for BREW development, since unfortunately those from Qualcomm are quite buggy and missing many improtant features.