home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cutting-Edge 3D Game Programming with C++
/
CE3DC++.ISO
/
BOOK
/
CHAP08
/
PALETTE.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1996-04-19
|
752b
|
38 lines
//
// File name: Palette.HPP
//
// Description: A palette setting inline function.
//
// Author: John De Goes
//
// Project: Cutting Edge 3D Game Programming
//
// Target: 32-bit OS
//
#ifndef PALETTEHPP
#define PALETTEHPP
void inline SetPalReg ( long Index, char Red, char Green, char Blue )
{
REGS Regs;
Regs.w.ax = 0x1010;
Regs.x.ebx = Index;
Regs.h.ch = Red;
Regs.h.cl = Green;
Regs.h.dh = Blue;
int386 ( 0x10, &Regs, &Regs );
}
void inline setpalreg ( long Index, char Red, char Green, char Blue )
{
REGS Regs;
Regs.w.ax = 0x1010;
Regs.x.ebx = Index;
Regs.h.ch = Red;
Regs.h.cl = Green;
Regs.h.dh = Blue;
int386 ( 0x10, &Regs, &Regs );
}
#endif