A CGALIB Update: Some New Utilities
There are some new additions to the CGALIB graphics library. The two major changes are a new bitmap editor and a new font editor, to replace the rudimentary bitmap and font makers originally supplied.
The Bitmap Editor, called makebit.exe like its predecessor, is now a capable utility for editing tiles and sprites. It supports up to 24 bitmaps in a single file, each ranging in size from 4x2 pixels to 24x24. Bitmaps can be copied and pasted, flipped and rotated. This editor should make it easier to create the graphics for simple game projects.
The Font Editor, called makefont.exe, is also a capable editor that works in a similar way to the Bitmap Editor. Fonts of up to 256 characters are supported, at 4x8 pixel size (a limitation of the CGALIB library). While three versatile fonts are supplied with CGALIB, this utility will make it easier to create bespoke fonts for your project.
A more subtle change is that previously hidden attributes of bitmaps and fonts are now made accessible to programs that use CGALIB. Some attributes were hidden to prevent accidental change causing glitches and crashes. This was fine for most projects, but the bitmap and font editors required access to, for example, bitmap width and height, since these would not be known at run time. So the include files have been changed to expose these values to the rest of the project.
The source and binaries for CGALIB are available from its Itch page. The sources are also available as a git repository from its github page.
Get CGALIB
CGALIB
A Graphics Library for Retro Game Development
Status | Released |
Category | Tool |
Author | Cyningstan |
Tags | 2D, c, cga, DOS, graphics, library, programming, Turn-based |
More posts
- CGALIB Now Supports Hercules Graphics!Jan 21, 2024
- CGALIB Library UpdatedSep 05, 2022
Comments
Log in with itch.io to leave a comment.
Awesome. Thanks!
These are excellent additions! I ended up making my own bitmap editor with CGALIB, but I had to access the private structures to be able to do single-pixel reads/writes to the bitmap being edited. Having it as part of the library will make that much cleaner.
CGALIB has also been extremely useful in helping me get started with a DOS/CGA port of my RPG, so I thank you for that.
That's looking really good! I'm glad you're finding CGALIB useful! In my latest update I forgot to expose the screen attributes too, but it's relatively simple to do. I'll probably get around to that once another update is necessary.
The new bitmap editor is still a bit limited (24x24 tiles, and only 24) because it's really only there to get people started. Your own is probably better for your purposes. For my own projects I'll probably continue using The GIMP to make screen-sized collages of bitmaps and writing a bespoke asset maker for each game to grab the bitmaps.
I'm looking forward to seeing where your RPG project goes.