ScummVM API documentation
disk.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
#include "common/ptr.h"
23
#include "common/file.h"
24
#include "common/debug.h"
25
26
#include "common/formats/disk_image.h"
27
28
#ifndef ADL_DISK_H
29
#define ADL_DISK_H
30
31
namespace
Common
{
32
class
SeekableReadStream;
33
class
String;
34
}
35
36
namespace
Adl
{
37
38
// On the Apple II, sector headers contain a disk volume number. This number
39
// is used by ADL multi-disk games. The PC port has the disk volume number
40
// as the first data byte of every sector that contains game data. We need
41
// to skip this number as we read in the data. Additionally, the data is now
42
// prefixed with an uint16 containing the data size.
43
class
DataBlock_PC
:
public
Common::DataBlock
{
44
public
:
45
DataBlock_PC
(
Common::DiskImage
*disk, byte track, byte sector, uint16 offset = 0) :
46
_disk(disk),
47
_track(track),
48
_sector(sector),
49
_offset(offset) { }
50
51
~
DataBlock_PC
()
override
{ }
52
53
Common::SeekableReadStream
*createReadStream()
const override
;
54
55
private
:
56
void
read(
Common::SeekableReadStream
&stream, byte *
const
dataPtr,
const
uint32 size)
const
;
57
58
Common::DiskImage
*_disk;
59
byte _track, _sector;
60
uint16 _offset;
61
};
62
63
}
// End of namespace Adl
64
65
#endif
Adl
Definition:
adl.h:55
Common::SeekableReadStream
Definition:
stream.h:745
Common::DiskImage
Definition:
disk_image.h:110
Common
Definition:
algorithm.h:29
Common::DataBlock
Definition:
disk_image.h:73
Adl::DataBlock_PC
Definition:
disk.h:43
engines
adl
disk.h
Generated on Mon Dec 23 2024 09:08:45 for ScummVM API documentation by
1.8.13