OpenGothic
Open source reimplementation of Gothic I and II
Loading...
Searching...
No Matches
info.cpp
Go to the documentation of this file.
1
#include "
info.h
"
2
3
#include <stdexcept>
4
5
using namespace
Dx8
;
6
7
Info::Info
(
Riff
& input) {
8
if
(!input.
is
(
"LIST"
))
9
throw
std::runtime_error(
"not a LIST"
);
10
input.
readListId
(
"INFO"
);
11
input.
read
([
this
](
Riff
& c){
12
implRead(c);
13
});
14
}
15
16
void
Info::implRead(
Riff
&input) {
17
if
(input.
is
(
"INAM"
))
18
input.
read
(
inam
);
19
}
20
21
22
Unfo::Unfo
(
Riff
& input) {
23
if
(!input.
is
(
"LIST"
))
24
throw
std::runtime_error(
"not a LIST"
);
25
input.
readListId
(
"UNFO"
);
26
input.
read
([
this
](
Riff
& c){
27
implRead(c);
28
});
29
}
30
31
void
Unfo::implRead(
Riff
&input) {
32
if
(input.
is
(
"UNAM"
))
33
input.
read
(
unam
);
34
}
Dx8::Info::Info
Info()=default
Dx8::Info::inam
std::string inam
Definition
info.h:12
Dx8::Riff
Definition
riff.h:12
Dx8::Riff::is
bool is(const char *idx) const
Definition
riff.h:19
Dx8::Riff::read
void read(std::u16string &str)
Definition
riff.cpp:29
Dx8::Riff::readListId
void readListId()
Definition
riff.cpp:13
Dx8::Unfo::Unfo
Unfo()=default
Dx8::Unfo::unam
std::u16string unam
Definition
info.h:23
info.h
Dx8
Definition
band.h:10
game
dmusic
info.cpp
Generated by
1.9.8