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/madsv2/core/general.h"
26 
27 namespace MADS {
28 namespace MADSV2 {
29 
30 #define CMP_BINARY 0
31 #define CMP_ASCII 1
32 
33 #define CMP_NO_ERROR 0
34 #define CMP_INVALID_DICTSIZE 1
35 #define CMP_INVALID_MODE 2
36 #define CMP_BAD_DATA 3
37 #define CMP_ABORT 4
38 
39 
40 /*
41  * Public API: pFABcomp
42  *
43  * @param read_buff
44  * @param write_buff
45  * @param work_buff
46  * @param type
47  * @param dsize
48  * @return
49  */
50 extern word pFABcomp(
51  word (*read_buff)(char *buffer, word *size),
52  word (*write_buff)(char *buffer, word *size),
53  char *work_buff,
54  word *type,
55  word *dsize);
56 
57 extern word pFABexp0(
58  word (*read_buff)(char *buffer, word *size),
59  word (*write_buff)(char *buffer, word *size),
60  char *work_buff);
61 
62 extern word pFABexp1(
63  word (*read_buff)(char *buffer, word *size),
64  char *write_buf,
65  char *work_buff);
66 
67 /*
68  * pFABexp2 -- memory-to-memory decompressor (PFABEXP2.ASM)
69  * read_buf points to compressed data.
70  * write_buf points to destination buffer (must be large enough).
71  * work_buff must be at least 4 bytes (for the output length result),
72  * or NULL to query required size.
73  * Returns 0 on success. Decompressed byte count stored at work_buff[0..3].
74  *
75  * @param read_buf
76  * @param write_buf
77  * @param work_buff
78  * @return
79  */
80 extern word pFABexp2(
81  byte *read_buf,
82  byte *write_buf,
83  char *work_buff);
84 
85 } // namespace MADSV2
86 } // namespace MADS
87 
88 #endif
Definition: sound_manager.h:38