I want to convert some card games to B4A. Does anyone know of a module for B4A which allows calling up the card images?
http://www.b4x.com/forum/code-samples-tips/1648-card-images.html
and
http://www.b4x.com/forum/questions-help-needed/6181-dll-questions.html
The card images are packed in data files for use with Basic4ppc BinaryFile.RetrieveImage. I can't remember what format the actual images are, probably bmp or jpeg but unpacking them should be easy. The file format is an 8 byte (64 bit) Int64 byte count then the file image as a byte sequence, then another Int64 byte count and the next file and so on. The Int64 will be little-endian and depending on how you read it may need transposition to big-endian under Android
If someone can tell me how to extract the card faces (and back), I'll upload the B4A source code for my old CardShark Spades and CardShark Hearts games when I get them converted.
The attached demo program includes a full deck of cards. Although the demo just shows the faces of the 52 cards, if you look in the files you will see various backs and jokers.
The images are 71 x 96 png files. As you can see, I added ImageViews and loaded the images as needed.
The attached demo program includes a full deck of cards. Although the demo just shows the faces of the 52 cards, if you look in the files you will see various backs and jokers.
The images are 71 x 96 png files. As you can see, I added ImageViews and loaded the images as needed.
The attached demo program includes a full deck of cards. Although the demo just shows the faces of the 52 cards, if you look in the files you will see various backs and jokers.
The images are 71 x 96 png files. As you can see, I added ImageViews and loaded the images as needed.
I'm no expert here (just learning myself) so Erel, Andrew, Klaus, or another expert may correct me. But it seems you are trying to install the apk file. I did not sign that file (or more accurately, it is signed with the default debug signature) so that may be why you can't install it directly. If you unzip Cards.zip with the defaut folders, start B4A, and through the Menu, choose Open Source, browse to Cards.b4a and select it, the source code will be loaded. When you then run the program it will compile and be loaded onto whatever device your are using and should run just fine from then on.
You can try cleaning the project by choosing Tools - Clean Project. It might help.