Wacko Software presents:

ChromaPlas 0.95 (pre-release) - Source distribution.

Pre-compiled binary distributions can be found at: http://software.wackonet.net/#CHROMAPLAS

This file explains how to build ChromaPlas from the sourcecode. For an explanation about ChromaPlas itself and it's many settings, see the 'readme.txt' file that came with this distribution.

The code requires the 4.x branch of the Allegro library to be installed (4.2 or above but not 5.x). This can be obtained from http://alleg.sourceforge.net/ This program should theoretically be able to work on any platform supported by Allegro. Optionally, in order for JPEG support to be enabled, the code requires JPGalleg, and in order for PNG support to be enabled, LoadPNG is needed (LoadPNG requires zlib and libpng). Newer versions of the 4.x branch of Allegro are bundled with these addons, but just in case you don't have them, JPGAlleg can be obtained from http://www.ecplusplus.com/index.php?page=projects&pid=1 and LoadPNG can be obtained from http://tjaden.strangesoft.net/loadpng/ (LoadPNG requires zlib and libpng (there are links on the LoadPNG webpage)) . However, if you do not wish to install another lib, you may invoke the makefile using "make CP_NO_JPEG=1 CP_NO_PNG=1".

In order to make use of the statically-linked Allegro library, pass in 'STATICLINK=1' to make (i.e. "make STATICLINK=1"), and everything is built accordingly. Use static-linking if you plan to use ChromaPlas on a machine where the Allegro library is not installed (this does not apply to platforms where static-linking with Allegro does not mean anything (e.g. DOS)). If you are using JPEG support with static linking, you will need to have built the statically linked version of JPGalleg. Ditto for LoadPNG. If you do not want to use static linking, you will have to make sure the appropriate dynamically linked libraries (eg. DLLs) are available on the target machines.

In order to build a screensaver rather than just a standalone executable, pass in 'SCREENSAVER=1' to make (i.e. "make SCREENSAVER=1") and it will be built as a screensaver. Note that currently this can only be done on the Windows version.

A release-build is built by default. To build a debug-build, pass in DEBUGMODE=1. To build a profile-build, pass in PROFILEMODE=1. Note that you cannot build a build that is both debug and profile.



FILES INCLUDED WITH THIS DISTRIBUTION:

Source files (in 'src/' directory'):

Source files for all platforms:
aecolspc.c
aecolspc.h
aeconfig.c
aeconfig.h
aeglobal.h
cpbltiim.c
cpbltiim.h
cpconfig.c
cpconfig.h
cpfunpal.c
cpfunpal.h
cpgfx.c
cpgfx.h
cpglobal.h
cpimcosp.c
cpimcosp.h
cpmthhlp.c
cpmthhlp.h
cpplasma.c
cpplasma.h
cpprglp.c
cpprglp.h
cprender.c
cprender.h
cpsttngs.c
cpsttngs.h
main.c

Windows specific source-files:
cpwin_.c
cpwin_.h

Windows screensaver specific source-files:
cpwin_ss.c
cpwin_ss.h
cpwinico.ico
cpwinrsc.rc
cpwinrsc.rh


Other files:

makefile: A GNU makefile. Used to build ChromaPlas with GCC. Currently supports DJGPP, MinGW (works under Cygwin too) and Unix (e.g. Linux), and should in theory work on the Mac. If it detects the MinGW port of GCC in Windows, it automatically compiles and links in the Windows-specific code. The MinGW build even works under Cygwin.

chromaplas.dsp: This is the MSVC 6 project file. If you have MSVC, you can use this project-file as an alternative to building with the makefile under a GCC-port. In the project file, CP_IS_SCREENSAVER is #defined. If you want to #define CP_NO_JPEG or CP_NO_PNG, the appropriate jpgal and loadpng libraries should be removed from the Object/Library modules.

source.txt: This text file.

various delete.me files in 'obj/': used to make sure the object-file directories are created.


Files needed for non-source distributions:

All files listed below (along with the executable file generated by building ChromaPlas) are required for a non-source distribution. These files (except the compiled executable) are included with this source-distribution.

readme.txt: The readme file.

chromapl.ini: A sample .INI file with sample settings and an explanation of the settings in the comments. This can be tweaked for a good example for the given platform you want to package it for (e.g. if it's being compiled as a screensaver, you may want to specify the desktop as the image). It is recommended that when porting to a new platform, the default settings in the 'chromapl.ini' file are tweaked to give results appropriate to that platform. As well as tweaking the sample 'chromapl.ini' settings for a distribution, it is recommended to make the changes to the platform-specific versions of the default values for these parameters as specified in 'cpsttngs.h' as well.

cp_patrn.png:		Example test-pattern image
cp_photo.jpg:		Example photo-image
Atari8BitPalette.pcx:		Example palette.
binarypal_bw.pcx:		Example palette.
binarypal_op.pcx:		Example palette.
binarypal_op_weighted.pcx:	Example palette.



ADDITIONAL NOTES:

Under Windows, ChromaPlas can be built as a Windows Screensaver depending on whether or not CP_IS_SCREENSAVER is #defined (pass 'SCREENSAVER=1' to the makefile). Currently, screensavers for other platforms have not been implemented. Because of the way Windows Screensavers are built, the Windows version uses 'WinMain()' as it's main procedure (even when not building as a screensaver), and all other platforms currently use 'main()'. Both these are defined in main.c. In the Windows version, WinMain sorts out various passed in parameters that are specific to Windows screensavers, and acts on them accordingly by calling the appropriate function. All of these functions called from by WinMain (with the exception of the main ChromaPlas program (cpDoProgram()), are contained in cpwin_ss.c. It is recommended that if anyone wants to turn ChromaPlas into a screensaver for another platform, they merge the main procedure with the one in main.c (or create a new one for platforms that require one), and place the code specific for screensavers for that platform in separate files. See cpwin_ss.[c|h] for an example.

If you manage to create a binary ChromaPlas distribution for a platform for which there's currently no binary distribution, or of you create a ChromaPlas screensaver for a platform where there wasn't one previously, then let me know, and I'll add it to the downloadable distributions on my website.



THE BIT AT THE END:

Visit http://software.wackonet.net/#CHROMAPLAS for updates and etceteras.


Andrei Ellman.	19/06/11

ae-a-chromaplas
wacko
wackonet
ten

(to get email address, reverse the contents of the last line, concatenate the lines with an @ for the first concatenation and a . for the next two concatenations.)
