delorie.com/archives/browse.cgi | search |
From: | krizz <krizz AT mailto DOT de> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Vesa 2.0 Palette... |
Date: | Tue, 09 Dec 1997 10:05:54 +0100 |
Organization: | LF.net GmbH, Internet Services, Stuttgart, Germany |
Lines: | 38 |
Message-ID: | <348D09F2.752EBCB@mailto.de> |
NNTP-Posting-Host: | p1-03.stuttgart.netsurf.de |
Mime-Version: | 1.0 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
hi i don't know how to change the Palette in Vesa 2.0. i think it must look something like this: #define BYTE unsigned char #define WORD unsigned int #define ULONG unsigned long #define _getmem malloc void setpallete(BYTE *p) { BYTE *pal=_getmem(768L); WORD a=0; ULONG addr=(ULONG) pal; __dpmi_regs r; for (a=0; a<768; a+=3) { pal[a] = p[a+2]; pal[a+1] = p[a+1]; pal[a+2] = p[a]; } r.d.eax = 0x4F09; r.d.ebx = 0; r.d.ecx = 256; r.d.esi = 0; r.d.edi = addr; __dpmi_int(0x10, &r); } it changes to a palette but it looks very crazy... please help me. thanx krizz
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |