TombEngine/TR5Main/Scripting/GameScriptAudioTrack.cpp
hispidence 2889cab98a Take sol.hpp out of framework.h and include it only where needed.
This actually makes the project take longer to build, probably because of it no longer getting precompiled, but this is the first step of many in an effort to decouple them a bit to make things more sensible.
2022-02-10 18:20:03 +00:00

28 lines
693 B
C++

#include "framework.h"
#include <sol.hpp>
#include "GameScriptAudioTrack.h"
/***
Metadata about audio tracks (music and ambience).
__In progress__
@pregameclass AudioTrack
@pragma nostrip
*/
// TODO FIXME find out what is meant to happen and whether we need this or not
GameScriptAudioTrack::GameScriptAudioTrack(std::string const & trackName, bool looped)
{
this->trackName = trackName;
this->looped = looped;
}
void GameScriptAudioTrack::Register(sol::state* lua)
{
lua->new_usertype<GameScriptAudioTrack>("AudioTrack",
sol::constructors<GameScriptAudioTrack(std::string, bool)>(),
"trackName", &GameScriptAudioTrack::trackName,
"looped", &GameScriptAudioTrack::looped
);
}