Shawn Jefferson, on Sun Oct 16, 2005 9:00 PM, said:
I'll look for the routines and put them up on the web somewhere for you guys to download.
and here they are.
A few comments:
1. I've never created a library before. I based this loosely around the Allegro game programming library that I had quite a bit of experience using several years ago. Since cc65 links in code at the object file level, each function is in its own file. That means a crap load of small .c files.
2. I am using an undocumented internal cc65 runtime library function, _heapadd to return allocated memory back to the heap. This function is not meant to be called by the user and it may change name or parameters, and it has in fact done this at least once during the development of this library (there's something to fix!) This is part of the aligned memory allocation functions. The idea is that you can use these functions if you like, or you could reserve space another way (linker config file for instance) and just cast a pointer to it in the BITMAP or PMAREA structure.
3. It's not very optimized. I did some preliminary optimizing of the C code in some functions, but I see that I don't even use register variables, which several functions could use quite readily. Hand tuning the assembly would probably be the best bet. It was always envisioned as a general purpose library, not anything you would use to create the next kick butt game or demo (

).
4. The display list creation function is a little wierd... it may need some explaining. Take a look and see if you have any questions. It's basically a quick way to build a display list with different bitmaps, etc...
5. The load_bitmap_mic function doesn't work as you may notice by all the debug output sprinkled throughout.
6. Quite a few graphics primitives are missing: hline, vline, circle, etc... You'll see some other stuff in the header file that is totally missing too. (ie. SPRITE structure)
7. Use it, abuse it, sell it, whatever. It'd be cool if you improved it and released it to the community though!
Any questions, just ask and I'll try my best to answer.