home *** CD-ROM | disk | FTP | other *** search
- /* this program is the first program donated by me for public
- domain purposes. It may be used as an Amigados utility and is partailly
- supported though Workbench. it changes an RGB screen monitor to your choice
- of popular color monocrome screens with the proper suffix. advantages of
- using this program over Preferences is that it is a quick short specific
- utillity that can easily be accessed though amigados; just put it in the c
- directory and it will be seconds away.
- If anyone wishes to comment on it or wants to know how to get additional
- values for colors please feel free to call me at home 914-352-3498
-
- -Steven Schafetz
-
- Modifications for extended colors by Tony Solomon PLINK ID Tony*S
-
-
- values for amber monocrome are color0= 0
- color1= 3968
- color2= 0
- color3= 3968 (3652 if you want the cursor
- to stand out)
-
- values for green pref are color0=0
- color1=656
- color2=0
- color3=656
-
- values for yellow pref are color0=0
- color1=3792
- color2=0
- color3=3792
-
-
- values for default pref are color0= 90
- color1= 4095
- color2= 2
- color3= 3968
-
- */
- #include <intuition/intuition.h>
- #include <exec/types.h>
- #include <exec/tasks.h>
- #include <exec/libraries.h>
- #include <graphics/copper.h>
- #include <graphics/display.h>
- #include <graphics/gfxbase.h>
- #include <graphics/text.h>
- #include <graphics/view.h>
- #include <hardware/blit.h>
- #include <intuition/intuitionbase.h>
-
- struct GfxBase *GfxBase;
- struct IntuitionBase *IntuitionBase;
- struct Preferences Pref, *pref;
-
- main (argc,argv)
- char *argv[];
- short int argc;
- {
- long int size;
- GfxBase = (struct GfxBase *)OpenLibrary("graphics.library", 0);
- if (GfxBase == NULL) exit(1000);
-
- if (!(IntuitionBase = (struct IntuitionBase *)
- OpenLibrary("intuition.library",0)) )
- {
- CloseLibrary(IntuitionBase);
- printf("no intuition here!!\n");
- exit(1);
- }
-
-
- size=sizeof(struct Preferences);
- if (!( pref= GetPrefs(&Pref,size)))
- printf("getprefs failed\n");
- {
- GfxBase->system_bplcon0 |= INTERLACE;
- RemakeDisplay();
- RethinkDisplay();
- }
-
- if (argc==0)
- *argv[1]='a';
-
- switch (*argv[1])
- {
- case 'a':
- Pref.color0=0;
- Pref.color1=3968;
- Pref.color2=0;
- Pref.color3=3968;
- break;
-
- case 'n':
- Pref.color0=90;
- Pref.color1=4095;
- Pref.color2=2;
- Pref.color3=3968;
- break;
-
- case 'g':
- Pref.color0=0;
- Pref.color1=656;
- Pref.color2=0;
- Pref.color3=656;
- break;
-
- case 'y':
- Pref.color0=0;
- Pref.color1=3792;
- Pref.color2=0;
- Pref.color3=3792;
- break;
-
- case 'o':
- GfxBase->system_bplcon0 &= !INTERLACE;
- break;
-
- case '1':
- Pref.color0=2184;
- Pref.color1=514;
- Pref.color2=106;
- Pref.color3=2896;
- break;
- case '2':
- Pref.color0=256;
- Pref.color1=80;
- Pref.color2=1024;
- Pref.color3=2912;
- break;
- case '3':
- Pref.color0=0;
- Pref.color1=1638;
- Pref.color2=274;
- Pref.color3=9;
- break;
- case '4':
- Pref.color0=273;
- Pref.color1=1638;
- Pref.color2=1281;
- Pref.color3=356;
- break;
- case '5':
- Pref.color0=4;
- Pref.color1=1365;
- Pref.color2=7;
- Pref.color3=2336;
- break;
- case '6':
- Pref.color0=2457;
- Pref.color1=546;
- Pref.color2=1387;
- Pref.color3=9;
- break;
-
- default:
- puts("usage a/amber g/green y/yellow n/normal o/Lace Off 1-6/PreSet Colors");
- exit(0);
- }
-
- if (!( pref = SetPrefs(&Pref,size,TRUE)))
- printf("setprefs failed\n");
-
- CloseLibrary(IntuitionBase);
- CloseLibrary(GfxBase);
- }
-