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
5using namespace Dx8;
6
7Info::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
16void Info::implRead(Riff &input) {
17 if(input.is("INAM"))
18 input.read(inam);
19 }
20
21
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
31void Unfo::implRead(Riff &input) {
32 if(input.is("UNAM"))
33 input.read(unam);
34 }
Info()=default
std::string inam
Definition info.h:12
bool is(const char *idx) const
Definition riff.h:19
void read(std::u16string &str)
Definition riff.cpp:29
void readListId()
Definition riff.cpp:13
Unfo()=default
std::u16string unam
Definition info.h:23
Definition band.h:10