ScummVM API documentation
drives.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
* CD/drive handling functions
21
*/
22
23
#ifndef TINSEL_DRIVES_H
24
#define TINSEL_DRIVES_H
25
26
#include "common/coroutines.h"
27
#include "common/stream.h"
28
#include "tinsel/dw.h"
29
30
namespace
Common
{
31
class
Path
;
32
}
33
34
namespace
Tinsel
{
35
36
// flags2
37
#define fCd1 0x00000001L
38
#define fCd2 0x00000002L
39
#define fCd3 0x00000004L
40
#define fCd4 0x00000008L
41
#define fCd5 0x00000010L
42
#define fCd6 0x00000020L
43
#define fCd7 0x00000040L
44
#define fCd8 0x00000080L
45
46
#define fAllCds (fCd1|fCd2|fCd3|fCd4|fCd5|fCd6|fCd7|fCd8)
47
48
void
DoCdChange();
49
50
void
CdCD(
CORO_PARAM
);
51
52
int
GetCurrentCD();
53
54
void
SetCD(
int
flags);
55
56
int
GetCD(
int
flags);
57
58
void
SetNextCD(
int
cdNumber);
59
60
bool
GotoCD();
61
62
class
TinselFile
:
public
Common::SeekableReadStream
,
public
Common::ReadStreamEndian
{
63
private
:
64
static
bool
_warningShown;
65
Common::SeekableReadStream
*_stream;
66
bool
openInternal(
const
Common::Path
&filename);
67
public
:
68
// This constructor is only used for _sampleStream inside sound.h
69
TinselFile
();
70
TinselFile
(
bool
bigEndian);
71
~
TinselFile
()
override
;
72
bool
open(
const
Common::String
&filename);
73
void
close();
74
char
getCdNumber();
75
76
bool
err()
const override
;
77
void
clearErr()
override
;
78
79
bool
eos()
const override
;
80
uint32 read(
void
*dataPtr, uint32 dataSize)
override
;
81
82
int64 pos()
const override
;
83
int64 size()
const override
;
84
bool
seek(int64 offset,
int
whence = SEEK_SET)
override
;
85
};
86
87
88
}
// End of namespace Tinsel
89
90
#endif
/* TINSEL_DRIVES_H */
Common::ReadStreamEndian
Definition:
stream.h:854
Common::String
Definition:
str.h:59
Tinsel::TinselFile
Definition:
drives.h:62
Common::Path
Definition:
path.h:52
Common::SeekableReadStream
Definition:
stream.h:745
Hugo::Path
Path
Definition:
game.h:75
CORO_PARAM
#define CORO_PARAM
Definition:
coroutines.h:107
Common
Definition:
algorithm.h:29
Tinsel
Definition:
actors.h:36
engines
tinsel
drives.h
Generated on Sun Dec 22 2024 09:19:50 for ScummVM API documentation by
1.8.13