ScummVM API documentation
res.h
1
2
/* ScummVM - Graphic Adventure Engine
3
*
4
* ScummVM is the legal property of its developers, whose names
5
* are too numerous to list here. Please refer to the COPYRIGHT
6
* file distributed with this source distribution.
7
*
8
* This program is free software: you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation, either version 3 of the License, or
11
* (at your option) any later version.
12
*
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License for more details.
17
*
18
* You should have received a copy of the GNU General Public License
19
* along with this program. If not, see <http://www.gnu.org/licenses/>.
20
*
21
*/
22
23
#ifndef BAGEL_BOFLIB_RES_H
24
#define BAGEL_BOFLIB_RES_H
25
26
#include "bagel/boflib/file.h"
27
#include "bagel/boflib/llist.h"
28
#include "bagel/boflib/object.h"
29
30
namespace
Bagel
{
31
32
class
CResString
:
public
CLList
,
public
CBofObject
{
33
public
:
34
CResString
(
int
nId,
const
char
*pszString) {
35
_nId = nId;
36
_pszString = pszString;
37
}
38
39
int
_nId;
40
const
char
*_pszString;
41
};
42
43
class
CBofStringTable
:
public
CBofFile
{
44
private
:
45
CResString
*_pStringTable =
nullptr
;
46
byte *_pBuf =
nullptr
;
47
uint32 _lBufSize = 0;
48
49
protected
:
55
ErrorCode load(
const
char
*pszFileName);
56
60
void
release();
61
66
ErrorCode buildTable();
67
71
void
killTable();
72
73
public
:
78
CBofStringTable
(
const
char
*pszFileName);
79
83
virtual
~
CBofStringTable
();
84
89
const
char
*getString(
int
nId);
90
};
91
92
}
// namespace Bagel
93
94
#endif
Bagel::CBofObject
Definition:
object.h:28
Bagel::CBofFile
Definition:
file.h:98
Bagel::CBofStringTable
Definition:
res.h:43
Bagel::CResString
Definition:
res.h:32
Bagel
Definition:
bagel.h:31
Bagel::CLList
Definition:
llist.h:31
engines
bagel
boflib
res.h
Generated on Sat Aug 31 2024 09:08:56 for ScummVM API documentation by
1.8.13