VIEWER.C File Reference

Go to the source code of this file.

Defines

#define FI_GIF   0
#define FI_TGA   1
#define FI_DIB   3
#define FI_TIF   4
#define FI_JPG   5
#define FI_PNG   6
#define PALVERSION   0x300
#define MAXPALETTE   256
#define MAXTEXT   256
#define BOUND(x, min, max)   ((x) < (min) ? (min) : ((x) > (max) ? (max) : (x)))
#define SWAP(x, y)   ((x)^=(y)^=(x)^=(y))
#define MIN(x, y)   (((x) <= (y)) : x ? y)
#define StartWait()   hcurSave = SetCursor(LoadCursor(NULL,IDC_WAIT))
#define EndWait()   SetCursor(hcurSave)
#define ISDIB(bft)   ((bft) == BFT_BITMAP)
#define ALIGNULONG(i)   ((i+3)/4*4)
#define WIDTHBYTES(i)   ((i+31)/32*4)
#define DibNumColors(bmih)

Functions

short read_gif_image (char *, short)
BOOL CALLBACK AboutDlgProc (HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
LRESULT CALLBACK MainWndProc (HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam)
BOOL MenuCommand (HWND hWnd, WORD id, LONG lparam)
char * R_GetEnv (char const *aa)
int Viewer (HINSTANCE hInstance)
int APIENTRY WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)

Variables

INT __argc
CHAR ** __argv
unsigned char p_red []
unsigned char p_green []
unsigned char p_blue []
int colourmap_size
int x_size
int y_size
int gif_iLace
HWND hWndApp = NULL
HINSTANCE hInst = NULL
HPALETTE hpalCurrent = NULL
HBITMAP hbmCurrent = NULL
RGBQUAD * pRgb = NULL
LPSTR lpBitmapHeader = NULL
LPSTR lpBitmapBits = NULL
char IniFilename [256]
char IniSection [] = "VIEWER"


Define Documentation

#define FI_GIF   0

Definition at line 24 of file VIEWER.C.

#define FI_TGA   1

Definition at line 25 of file VIEWER.C.

#define FI_DIB   3

Definition at line 27 of file VIEWER.C.

#define FI_TIF   4

Definition at line 28 of file VIEWER.C.

Referenced by MenuCommand().

#define FI_JPG   5

Definition at line 29 of file VIEWER.C.

Referenced by MenuCommand().

#define FI_PNG   6

Definition at line 30 of file VIEWER.C.

Referenced by MenuCommand().

#define PALVERSION   0x300

Definition at line 31 of file VIEWER.C.

#define MAXPALETTE   256

Definition at line 32 of file VIEWER.C.

#define MAXTEXT   256

Definition at line 33 of file VIEWER.C.

#define BOUND ( x,
min,
max   )     ((x) < (min) ? (min) : ((x) > (max) ? (max) : (x)))

Definition at line 47 of file VIEWER.C.

#define SWAP ( x,
y   )     ((x)^=(y)^=(x)^=(y))

Definition at line 48 of file VIEWER.C.

#define MIN ( x,
y   )     (((x) <= (y)) : x ? y)

Definition at line 49 of file VIEWER.C.

 
#define StartWait (  )     hcurSave = SetCursor(LoadCursor(NULL,IDC_WAIT))

Definition at line 50 of file VIEWER.C.

 
#define EndWait (  )     SetCursor(hcurSave)

Definition at line 51 of file VIEWER.C.

#define ISDIB ( bft   )     ((bft) == BFT_BITMAP)

Definition at line 53 of file VIEWER.C.

#define ALIGNULONG (  )     ((i+3)/4*4)

Definition at line 55 of file VIEWER.C.

#define WIDTHBYTES (  )     ((i+31)/32*4)

Definition at line 57 of file VIEWER.C.

#define DibNumColors ( bmih   ) 

Value:

(bmih.biClrUsed == 0 && bmih.biBitCount <= 8 \
                            ? (int)(1 << (int)bmih.biBitCount)          \
                            : (int)bmih.biClrUsed)

Definition at line 699 of file VIEWER.C.


Function Documentation

short read_gif_image ( char *  ,
short   
)

LRESULT CALLBACK MainWndProc ( HWND  hWnd,
UINT  iMessage,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 165 of file VIEWER.C.

References BOUND, FALSE, hpalCurrent, IDM_HIDE, L, MenuCommand(), and TRUE.

Referenced by Viewer().

BOOL MenuCommand ( HWND  hWnd,
WORD  id,
LONG  lparam 
)

int Viewer ( HINSTANCE  hInstance  ) 

Definition at line 115 of file VIEWER.C.

References FALSE, hInst, hWndApp, MainWndProc(), and szViewClass.

Referenced by _GetPresetMapImage(), _PaintMap(), _TraceOutline(), _Xmodeler(), and WinMain().

int APIENTRY WinMain ( HINSTANCE  hInstance,
HINSTANCE  hPrevInstance,
LPSTR  lpCmdLine,
int  nCmdShow 
)

Definition at line 766 of file VIEWER.C.

References FALSE, FileInPath(), IniFilename, R_GetEnv(), szViewClass, TempPath, and Viewer().


Variable Documentation

CHAR** __argv

unsigned char p_red[]

Definition at line 76 of file GIF.C.

unsigned char p_green[]

Definition at line 76 of file GIF.C.

unsigned char p_blue[]

Definition at line 76 of file GIF.C.

Definition at line 75 of file GIF.C.

int x_size

Definition at line 75 of file GIF.C.

int y_size

Definition at line 75 of file GIF.C.

int gif_iLace

Definition at line 75 of file GIF.C.

HWND hWndApp = NULL

Definition at line 39 of file VIEWER.C.

Referenced by Viewer().

HINSTANCE hInst = NULL

Definition at line 40 of file VIEWER.C.

HPALETTE hpalCurrent = NULL

Definition at line 41 of file VIEWER.C.

HBITMAP hbmCurrent = NULL

Definition at line 42 of file VIEWER.C.

RGBQUAD* pRgb = NULL

Definition at line 43 of file VIEWER.C.

LPSTR lpBitmapHeader = NULL

Definition at line 44 of file VIEWER.C.

LPSTR lpBitmapBits = NULL

Definition at line 45 of file VIEWER.C.

char IniFilename[256]

Definition at line 61 of file VIEWER.C.

char IniSection[] = "VIEWER"

Definition at line 62 of file VIEWER.C.


Generated on Sun Apr 27 14:20:15 2014 for OpenFX by  doxygen 1.5.6