summaryrefslogtreecommitdiff
path: root/fpcsrc/packages/libndsfpc/src/nds/arm9/image.inc
blob: a7a194f42fc9c973734b07667a3002f4357162ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{$ifdef NDS_INTERFACE}
type
//holds a rgb triplet
  RGB_24 = packed record
    r: cuchar;
    g: cuchar;
    b: cuchar;
  end;

 //holds a basic image type for loading image files
 sImage = record
    height: cshort; 
    width: cshort; 
    bpp: cint;
    palette: pcushort;
    image: record
      case integer of
        0: (data8: pcuchar);
        1: (data16: pcushort);
        2: (data32: pcuint);
    end;
  end;
  TsImage = sImage; 
  PsImage = ^sImage;


procedure image24to16(img: PsImage); cdecl; external;
procedure image8to16(img: PsImage); cdecl; external;
procedure image8to16trans(img: PsImage; transperentColor: cuint8); cdecl; external;
procedure imageDestroy(img: PsImage); cdecl; external;
procedure imageTileData(img: PsImage); cdecl; external;
{$endif NDS_INTERFACE}