Date augustus 05, 96
The source files are:
The data files are in the directory DATA:
I wrote these new routines for Rars 0.64. The actual version is not a final one. A lot of things can be changed, maybe to avoid some problem of protability with some OS, or maybe because you have an idea to improve the code. Please, send me your suggestions of changes )
There are 2 ways to port the graphics on an other platform. - a very easy way, but that can be slow and memory hungry. - a more difficult way, by redefining all the simple drawing primitives.
Here is the list of the platform dependent files: - os.cpp - bc_lowgr.cpp - bc_define.h
In the original low graphics library, each View is first drawn inside a bitmap (array of char) and then copied to the screen with a platform dependent function.
This type of function that copies a bitmap of 256 colors to the screen exists in most
of the Os.
I think (...) this type of function exists also in the graphics extensions of XWindows and in Windows even without WinG or DirectX ... PS: - if you have a such function inside your OS, use it, if your graphic driver is well done, the function will use the hardware capabilities of your graphics card and your CPU will not lose its time to copy the bitmap. - Depending of the OS the screen has to be in a 256 color mode or not ( in Windows, it works also in a 16 colors mode )
The actual code uses only 16 colors.
For performance reasons or because a 'BitBlt' function does not exist in your GUI/OS, you can use another way to port the graphics.
This is a very simple file that defines the types - int16, - int32, - ... for your compiler.
( You need also to modify the file g_define.h )
I've tried my code with 2 different compilers: