FreeBASIC
0.91.0
Main Page
Data Structures
Files
File List
Globals
gfx_palettegetusing.c
Go to the documentation of this file.
1
/* retrieve whole palette into an array */
2
3
#include "
fb_gfx.h
"
4
5
FBCALL
void
fb_GfxPaletteGetUsing
(
int
*data)
6
{
7
int
i, imax;
8
9
if
(!
__fb_gfx
)
10
return
;
11
12
imax =
__fb_gfx
->
default_palette
->
colors
;
13
if
(imax > (1 <<
__fb_gfx
->
depth
))
14
imax = (1 <<
__fb_gfx
->
depth
);
15
16
for
(i = 0; i < imax; i++)
17
data[i] = (
__fb_gfx
->
device_palette
[i] & 0xFCFCFC) >> 2;
18
}
gfxlib2
gfx_palettegetusing.c
Generated on Thu Jan 23 2014 19:40:06 for FreeBASIC by
1.8.4