/* p2.h -- p2 loader enfle plugin This file is part of Enfle. $Id: p2.h,v 1.1 2000/05/25 15:35:56 sian Exp $ Base plugin system by Hiroshi Takekawa (c) Hiroshi Takekawa Original p2 decode system by Akira Yanagisawa (c) Akira Yanagisawa X680*0/MS-DOS/GO32 modified by Noboru Abe (c) Noboru Abe Enfle plugin modified by Masaru Nakagawa (c) Masaru Nakagawa This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef __p2_h__ #define __p2_h__ #define FORMAT_NAME "P2" #ifndef BYTE #define BYTE unsigned char #define WORD unsigned short #define DWORD unsigned long #define UINT unsigned int #endif #ifndef True #define True 1 #define False 0 #endif typedef signed char schar; typedef struct tagP2HEAD { BYTE magic[4]; BYTE name[18]; BYTE subtitle[8]; BYTE crlf0[2]; BYTE title[30]; BYTE crlf1[2]; BYTE saver[30]; BYTE crlf2[2]; BYTE eof; BYTE reserve0; WORD flag; WORD no; DWORD time; DWORD size; WORD depth; WORD x_aspect; WORD y_aspect; WORD x_max; WORD y_max; DWORD reserve1; } P2HEAD; typedef struct tagP2BLOCK { BYTE id[4]; DWORD size; WORD flag; WORD x_wid; WORD y_wid; WORD x_offset; WORD y_offset; DWORD opaque; DWORD reserve; } P2BLOCK; typedef struct tagP2INFO { int left,top; int width,height; int biWidth,biHeight; int x_wid,y_wid; int x_density,y_density; BYTE depth; Archive *ar; BYTE bitcnts; BYTE c; long len; long len2; long aa; long dd; char cache_hit_c; DWORD *vram_prev_o; DWORD *vram_now_o; DWORD *vram_next_o; DWORD *vram_prev; DWORD *vram_now; DWORD *vram_next; schar *flag_now_o; schar *flag_next_o; schar *flag2_now_o; schar *flag2_next_o; schar *flag2_next2_o; schar *flag_now; schar *flag_next; schar *flag2_now; schar *flag2_next; schar *flag2_next2; WORD *cache_pos; DWORD *cache; WORD *mulu_tab; WORD ynow; DWORD (*p2ss_read_color)(struct tagP2INFO*,WORD); DWORD (*p2sf_read_color)(struct tagP2INFO*,DWORD); void (*line_expand)(struct tagP2INFO*); int (*lpPrgressCallback)(int,int,long); long ldata; BYTE *pHBm; long size; P2HEAD p2_head; P2BLOCK p2_block; } P2INFO; int p2_load_image(Info *, Image *); #endif