We programmers accumulate code libraries, and mine were so extensive that a friend once called them 'OsRay'. They are not an operating system, but the name stuck. When I switched to Windows development and C++, I rewrote them as OsRay++.
OsRay++ is a collection of libraries and tools that provide building blocks for 32-bit Windows programs. They can work with or replace the standard C, C++ and MFC libraries. The libraries consist of:
|• OsRay||Core including strings, containers, file access, timing, etc.|
|• Visual-C||Program startup code for use with Microsoft compilers|
|• Pixel||2D graphics including bitmap blitters|
|• Scene||3D rendering with a scene graph|
|• Glaze||GUI windows and controls|
|• Pane||GUI sub-components for animation|
|• Codec||Lossless & lossy image and data compression|
|• Slang||Scripting language compiler|
|• Storage||Simplified persistent database|
The goal for the tools is to reduce complexity in the libraries by preprocessing data. Therefore, while the libraries represent more than 350 source files, the object code is very small and efficient. The tool programs include:
|• Glazier||Window and dialog editor|
|• Schema||Database layout editor|
|• Res-Comp||Resource compiler to convert editor files to program data|
|• Animax||Image editor for icons and sprites|
|• Formax||File format converter|
I've written a document describing these libraries in some detail: OsRay.PDF. If you're a programmer, please take a look and let me know if I should release this as open source.
I started programming on machines with very little support software, and have worked on embedded systems with absolutely none. This means that I supplied everything, including the bios and operating system. I got used to doing it all, so my libraries are a little unique.
For the scripting language, I started by writing my own lexical analyzer, a replacment for the common tool 'lex'. I wrote a parser generator, replacing 'yacc'. Then I wrote a virtual machine and finally the scripting language.
I work this way out of a desire to understand what's really going on, in addition to a likely obsessive compulsive disorder. It results in code that's very different from what you'll find elsewhere. I particularly dislike code that's harder to read than to write.
A glazier is a person who cuts and fits glass to windows. My Glazier program is an editor for user interface windows and dialogs, and Glaze is its companion library for Microsoft Windows. Together, the two allow you to create windows, attach controls, menus and keystroke assignments, and connect C++ code.
Glazier does not require numeric identifiers. You can specify the names of classes and methods to execute when the user interacts with your window, making the code much simpler.
Res-Comp.EXE is a resource compiler. Glazier saves each window as a single binary file which includes text, icons and bitmaps. Res-Comp goes into your program's make script and converts that file into a header and an object.
It handles several other binary files in addition to Glazier windows. For example, cels, folders and animations from Animax can become bitmap resources, both compressed and uncompressed.
Res-Comp also converts text scripts. OsRay includes a formatted text generator, similar to printf (), which uses messages preprocessed by Res-Comp. Likewise, OsRay's lexical analyzer, grammar parser and other components take resources defined in scripts.
Res-Comp generates structures that are linked into your program as standard external data instead of resources that need to be explicitly loaded. I reverse engineered Microsoft's name decoration so that everything smoothly meshes with the C++ code.