The program presents the ways of mixing the colors
Delphi & Pascal (česká wiki)
Category: Programs in C, C++
Program: Fapa.c, Help.c, Help.h, Mys.c, Mys.h
File exe: Fapa.exe
need: Egavga.bgi, Help.txt, Litt.chr, Trip.chr
Program: Fapa.c, Help.c, Help.h, Mys.c, Mys.h
File exe: Fapa.exe
need: Egavga.bgi, Help.txt, Litt.chr, Trip.chr
The program presents the ways of mixing the colors. It's base on the following methods
Models used:
RGB - red, green, blue
CMY - cyan, magenta, yellow
HSV - Hue saturation value
HLS - Hue lightness value
Models used:
RGB - red, green, blue
CMY - cyan, magenta, yellow
HSV - Hue saturation value
HLS - Hue lightness value
// MYS.C Copyright (c) TrSek alias Zdeno Sekerak // Sucast programu Fapa.c. Obsahuje rutiny obsluhujuce mys. // // Datum:14.12.1994 http://www.trsek.com #include <dos.h> int inmys; // globalna premenna urcujuca ci je aktivna mys // inicializuje mys void init_mys(void) { union REGS in,out; in.x.ax=0x0000; int86(0x33,&in,&out); if (out.x.ax==0) inmys=0; else inmys=1; in.x.ax=0x0001; if (inmys) int86(0x33,&in,&out); } // nastavi suradnice mysi void set_mys(int x, int y) { union REGS in,out; in.x.ax=0x0004; in.x.cx=x; in.x.dx=y; if (inmys) int86(0x33,&in,&out); } // zisti suradnice mysi void getmys(int *but, int *x, int *y) { union REGS in,out; but=but; x=x; y=y; in.x.ax=0x0003; if (inmys) { int86(0x33,&in,&out); *but=out.x.bx; *x=rcmx(out.x.cx); *y=rcmy(out.x.dx); } else { *but=0; *x=0; *y=0; } } // zobrazi kurzor mysi void zobmys(int zob) { union REGS in,out; if (zob) in.x.ax=0x0001; else in.x.ax=0x0002; if (inmys) int86(0x33,&in,&out); }