00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef BULL_XTABJTY_H
00021 #define BULL_XTABJTY_H
00022
00023 #include "globals.h"
00024 #include "xtabdat8.h"
00025
00026
00027
00028 #define JTYTB_FILE_BADDATA 1
00029 #define JTYTB_CANNOT_OPEN 2
00030 #define JTYTB_MALLOC_ERR 3
00031 #define JTYTB_INTERNAL 4
00032 #define JTYTB_CANNOT_READ 5
00033
00034 #define JTYTAB_ENTRY_SIZE 16
00035
00036
00037
00038 struct JTYTAB_ITEM {
00039 unsigned long offset;
00040 unsigned int width;
00041 unsigned int height;
00042 struct IMGTAB_ATTRIB attrib;
00043 };
00044
00045 struct JTYTABFILE {
00046 long count;
00047 unsigned long filelength;
00048 struct JTYTAB_ITEM *items;
00049 };
00050
00051
00052
00053 DLLIMPORT short alloc_jtytabfile_data(struct JTYTABFILE *jtabf,long count);
00054 DLLIMPORT short free_jtytabfile_data(struct JTYTABFILE *jtabf);
00055
00056 DLLIMPORT short read_jtytabfile_data(struct JTYTABFILE *jtabf,const char *srcfname);
00057 DLLIMPORT short write_jtytabfile_data(const struct JTYTABFILE *jtabf,const char *dstfname);
00058 DLLIMPORT short switch_jtytabfile_entries(struct JTYTABFILE *jtabf,unsigned long idx1,unsigned long idx2);
00059
00060 DLLIMPORT short create_images_jtytab_idx(struct IMAGELIST *images,const char *jtyfname,const char *tabfname,int verbose);
00061 DLLIMPORT int read_jtytab_images(struct IMAGELIST *images,unsigned long *readcount,
00062 const struct JTYTABFILE *jtabf,const struct DATFILE *jtyf,const int verbose);
00063
00064 DLLIMPORT short create_images_jtytab_enc(struct ENCIMAGELIST *images,const char *jtyfname,
00065 const char *tabfname,const int verbose);
00066 DLLIMPORT short write_jtytab_images_enc(const struct ENCIMAGELIST *images,const char *jtyfname,
00067 const char *tabfname,const int verbose);
00068 DLLIMPORT int read_jtytab_encimages(struct ENCIMAGELIST *images,unsigned long *readcount,
00069 const struct JTYTABFILE *jtabf,const struct DATFILE *jtyf,const int verbose);
00070 DLLIMPORT int write_encimages_jtytab(const struct ENCIMAGELIST *images,unsigned long *writecount,
00071 struct JTYTABFILE *jtabf,struct DATFILE *jtyf);
00072 DLLIMPORT short free_dattab_encimages(struct ENCIMAGELIST *images);
00073 DLLIMPORT short switch_encimage_entries(struct ENCIMAGELIST *images,unsigned long idx1,unsigned long idx2);
00074
00075 #endif