Implemented RLE bitmap blitting for Pokitto simulator

Hi,

as Pokitto do not have much memory I thought it would be good to be able to use RLE bitmaps for drawing to the screen buffer :grinning: RLE is compresses quite well paletted images, and is fast to uncompress while blitting to the screen. I also added RLE4 (16 color palette) support for bmp2pok.exe so you can genarate c-code for RLE bitmaps. At least GIMP be used to create RLE4 BMP images for bmp2pok.

I added a new drawRleBitmap-function to Pokittodisplay.h/c. I have made an own implementation of RLE4 decoding. Note that clipping is not supported for RLE bitmaps. Also the build in feature of BMP is that the picture is upside down, so that must be taken into account when creating the original picture in GIMP.

If you think this is useful, I could make a merge request to the main branch, or how this is handled in GitHub?

-H

2 Likes

Absolutely! Just go and create a pull request to the master branch on Github.

Thanks for the good work. Could you make a read-from-SD/file version of this routine? :grinning:

Ok good, I will make a PR.

So you mean a rle-bmp decoder, which reads the bmp-file and stores the output to the bitmap?

Edit: The data could also be in rle-bitmap format in the memory to save memory. Then it woud be rle-bmp to Pokitto rle-bitmap converter.

-H

I do not have permission to push my local branch. My account in gitHub is “haviital”.

hannu@DESKTOP-QD4TMI1 MINGW64 /c/git/PokittoSim (hannus_rle_bitmap)
$ git.exe push --set-upstream --progress "origin" hannus_rle_bitmap
remote: Permission to pokitto/PokittoSim.git denied to haviital.
fatal: unable to access 'https://github.com/pokitto/PokittoSim.git/': The requested URL returned error: 403
1 Like

i will add you later today

Still cannot push my branch to repository.

sorry Hanski, forgot about this. I am driving back home at the moment, will notify you when I’ve added you

Added you as collaborator, now you can PR

Anyone can create a pull request. You don’t have to be a collaborator. Collaborators can apply pull requests or push from local repositories.

Thanks Jonne. I was able to push my branch and make a PR.

I need to do that also for the “bmp2pok” repository too. Could you give collaborator rights?

1 Like

For pushing my branch to main repostitory I need collaborator rights. For forking the main repository and pushing branch to a forked repository I do not need collaborator rights.

But @jonne said:

I was just pointing out that anyone can create a PR (pull request) targeting the main repository without having collaborator rights. @jonne (or any collaborator) could then merge that PR to the desired branch in the main repository.

It’s a matter of terminology. A PR has nothing to do with pushing.

1 Like