OpenGothic
Open source reimplementation of Gothic I and II
Loading...
Searching...
No Matches
vobbundle.cpp
Go to the documentation of this file.
1
#include "
vobbundle.h
"
2
3
#include "
world/world.h
"
4
#include "
resources.h
"
5
6
VobBundle::VobBundle
(
World
& owner, std::string_view filename,
Vob::Flags
flags) {
7
auto
* bundle =
Resources::loadVobBundle
(filename);
8
for
(
auto
& vob:*bundle)
9
rootVobs.emplace_back(
Vob::load
(
nullptr
,owner,*vob,(flags |
Vob::Startup
)));
10
}
11
12
void
VobBundle::setObjMatrix
(
const
Tempest::Matrix4x4& obj) {
13
for
(
auto
& i:rootVobs)
14
i->setLocalTransform(obj);
15
}
Resources::loadVobBundle
static const VobTree * loadVobBundle(std::string_view name)
Definition
resources.cpp:932
VobBundle::VobBundle
VobBundle()=default
VobBundle::setObjMatrix
void setObjMatrix(const Tempest::Matrix4x4 &obj)
Definition
vobbundle.cpp:12
Vob::Flags
Flags
Definition
vob.h:13
Vob::Startup
@ Startup
Definition
vob.h:15
Vob::load
static std::unique_ptr< Vob > load(Vob *parent, World &world, const zenkit::VirtualObject &vob, Flags flags)
Definition
vob.cpp:127
World
Definition
world.h:31
resources.h
vobbundle.h
world.h
game
world
objects
vobbundle.cpp
Generated by
1.9.8