ScummVM API documentation
pfab.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef MADS_CORE_PFAB_H
23 #define MADS_CORE_PFAB_H
24 
25 #include "mads/core/general.h"
26 
27 namespace MADS {
28 
29 #define CMP_BINARY 0
30 #define CMP_ASCII 1
31 
32 #define CMP_NO_ERROR 0
33 #define CMP_INVALID_DICTSIZE 1
34 #define CMP_INVALID_MODE 2
35 #define CMP_BAD_DATA 3
36 #define CMP_ABORT 4
37 
38 
39 /*
40  * Public API: pFABcomp
41  *
42  * @param read_buff
43  * @param write_buff
44  * @param work_buff
45  * @param type
46  * @param dsize
47  * @return
48  */
49 extern word pFABcomp(
50  word (*read_buff)(char *buffer, word *size),
51  word (*write_buff)(char *buffer, word *size),
52  char *work_buff,
53  word *type,
54  word *dsize);
55 
56 extern word pFABexp0(
57  word (*read_buff)(char *buffer, word *size),
58  word (*write_buff)(char *buffer, word *size),
59  char *work_buff);
60 
61 extern word pFABexp1(
62  word (*read_buff)(char *buffer, word *size),
63  char *write_buf,
64  char *work_buff);
65 
66 /*
67  * pFABexp2 -- memory-to-memory decompressor (PFABEXP2.ASM)
68  * read_buf points to compressed data.
69  * write_buf points to destination buffer (must be large enough).
70  * work_buff must be at least 4 bytes (for the output length result),
71  * or NULL to query required size.
72  * Returns 0 on success. Decompressed byte count stored at work_buff[0..3].
73  *
74  * @param read_buf
75  * @param write_buf
76  * @param work_buff
77  * @return
78  */
79 extern word pFABexp2(
80  byte *read_buf,
81  byte *write_buf,
82  char *work_buff);
83 
84 } // namespace MADS
85 
86 #endif
Definition: anim_timer.h:27