ScummVM API documentation
decode.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 LURE_DECODE_H
23 #define LURE_DECODE_H
24 
25 
26 #include "lure/luredefs.h"
27 #include "lure/memory.h"
28 
29 namespace Lure {
30 
32 private:
33  MemoryBlock *dataIn;
34  uint32 BP;
35  uint32 dataPos, dataPos2;
36  uint32 outputOffset;
37  byte AL, AH;
38  byte CH, CL;
39 
40  void writeByte(MemoryBlock *dest, byte v);
41  void writeBytes(MemoryBlock *dest, byte v, uint16 numBytes);
42  byte DSSI(bool incr = true);
43  byte ESBX(bool incr = true);
44  void decrCtr();
45  bool shlCarry();
46 
47 public:
48  MemoryBlock *decode(MemoryBlock *src, uint32 maxOutputSize = SCREEN_SIZE + 1);
49  MemoryBlock *egaDecode(MemoryBlock *src, uint32 maxOutputSize);
50  MemoryBlock *vgaDecode(MemoryBlock *src, uint32 maxOutputSize);
51 };
52 
54 public:
55  static void rcl(uint16 &value, bool &carry);
56  static uint32 decode_data(MemoryBlock *src, MemoryBlock *dest, uint32 srcPos);
57  static void decode_data_2(MemoryBlock *src, byte *&pSrc, uint16 &currData,
58  uint16 &bitCtr, uint16 &dx, bool &carry);
59 };
60 
61 } // End of namespace Lure
62 
63 #endif
Definition: decode.h:53
Definition: decode.h:31
Definition: animseq.h:27
Definition: memory.h:31