'ifnot' template property + hpp
This commit is contained in:
parent
8b1c102cfe
commit
9ea67deb13
@ -64,7 +64,6 @@ function check_dependencies(packinfo)
|
||||
local depid = dep:sub(2,-1)
|
||||
if dep:sub(1,1) == '!' then
|
||||
if not table.has(packs_all, depid) then
|
||||
packinfo.description = ""
|
||||
return string.format(
|
||||
"%s (%s)", gui.str("error.dependency-not-found"), depid
|
||||
)
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
%{creator}
|
||||
</label>
|
||||
<label if='%{error}' pos='80,28' size='355,50' multiline='true' color='#FF4040'>%{error}</label>
|
||||
<label pos='80,28' size='355,50' multiline='true' color='#FFFFFFB2'>
|
||||
<label ifnot='%{error}' pos='80,28' size='355,50' multiline='true' color='#FFFFFFB2'>
|
||||
%{description}
|
||||
</label>
|
||||
<image pos='8,8' src='%{icon}' size='64'/>
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
#include "Assets.h"
|
||||
|
||||
#include "../audio/audio.h"
|
||||
#include "../audio/audio.hpp"
|
||||
#include "../graphics/core/Texture.hpp"
|
||||
#include "../graphics/core/Shader.hpp"
|
||||
#include "../graphics/core/Atlas.hpp"
|
||||
#include "../graphics/core/Font.hpp"
|
||||
#include "../frontend/UiDocument.h"
|
||||
#include "../frontend/UiDocument.hpp"
|
||||
#include "../logic/scripting/scripting.h"
|
||||
|
||||
Assets::~Assets() {
|
||||
|
||||
@ -1,13 +1,8 @@
|
||||
#include "AssetsLoader.h"
|
||||
|
||||
#include "Assets.h"
|
||||
|
||||
#include "assetload_funcs.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
|
||||
#include "assetload_funcs.hpp"
|
||||
#include "../util/ThreadPool.hpp"
|
||||
|
||||
#include "../constants.h"
|
||||
#include "../data/dynamic.h"
|
||||
#include "../debug/Logger.hpp"
|
||||
@ -19,6 +14,9 @@
|
||||
#include "../graphics/core/Texture.hpp"
|
||||
#include "../logic/scripting/scripting.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
|
||||
static debug::Logger logger("assets-loader");
|
||||
|
||||
AssetsLoader::AssetsLoader(Assets* assets, const ResPaths* paths)
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
#include "assetload_funcs.h"
|
||||
#include "assetload_funcs.hpp"
|
||||
|
||||
#include "Assets.h"
|
||||
#include "AssetsLoader.h"
|
||||
#include "../audio/audio.h"
|
||||
#include "../audio/audio.hpp"
|
||||
#include "../files/files.h"
|
||||
#include "../files/engine_paths.h"
|
||||
#include "../coders/imageio.hpp"
|
||||
@ -13,7 +14,7 @@
|
||||
#include "../graphics/core/Atlas.hpp"
|
||||
#include "../graphics/core/Font.hpp"
|
||||
#include "../graphics/core/TextureAnimation.hpp"
|
||||
#include "../frontend/UiDocument.h"
|
||||
#include "../frontend/UiDocument.hpp"
|
||||
|
||||
#include <iostream>
|
||||
#include <stdexcept>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#ifndef ASSETS_ASSET_LOADERS_H_
|
||||
#define ASSETS_ASSET_LOADERS_H_
|
||||
#ifndef ASSETS_ASSET_LOADERS_HPP_
|
||||
#define ASSETS_ASSET_LOADERS_HPP_
|
||||
|
||||
#include "Assets.h"
|
||||
|
||||
@ -59,4 +59,4 @@ namespace assetload {
|
||||
);
|
||||
}
|
||||
|
||||
#endif // ASSETS_ASSET_LOADERS_H_
|
||||
#endif // ASSETS_ASSET_LOADERS_HPP_
|
||||
@ -1,10 +1,11 @@
|
||||
#include "ALAudio.h"
|
||||
#include "alutil.h"
|
||||
#include "ALAudio.hpp"
|
||||
|
||||
#include "alutil.hpp"
|
||||
#include "../../debug/Logger.hpp"
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
#include "../../debug/Logger.hpp"
|
||||
|
||||
static debug::Logger logger("al-audio");
|
||||
|
||||
using namespace audio;
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
#ifndef SRC_AUDIO_AUDIO_H_
|
||||
#define SRC_AUDIO_AUDIO_H_
|
||||
#ifndef SRC_AUDIO_AUDIO_HPP_
|
||||
#define SRC_AUDIO_AUDIO_HPP_
|
||||
|
||||
#include "../audio.hpp"
|
||||
#include "../../typedefs.h"
|
||||
|
||||
#include <queue>
|
||||
#include <vector>
|
||||
@ -15,9 +18,6 @@
|
||||
#include <AL/alc.h>
|
||||
#endif
|
||||
|
||||
#include "../audio.h"
|
||||
#include "../../typedefs.h"
|
||||
|
||||
namespace audio {
|
||||
struct ALBuffer;
|
||||
class ALAudio;
|
||||
@ -168,4 +168,4 @@ namespace audio {
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* SRC_AUDIO_AUDIO_H_ */
|
||||
#endif // SRC_AUDIO_AUDIO_HPP_
|
||||
@ -1,4 +1,4 @@
|
||||
#include "alutil.h"
|
||||
#include "alutil.hpp"
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
#ifndef SRC_AUDIO_AUDIOUTIL_H_
|
||||
#define SRC_AUDIO_AUDIOUTIL_H_
|
||||
#ifndef AUDIO_AUDIOUTIL_HPP_
|
||||
#define AUDIO_AUDIOUTIL_HPP_
|
||||
|
||||
#include "../../typedefs.h"
|
||||
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
@ -12,7 +14,6 @@
|
||||
#endif
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include "../../typedefs.h"
|
||||
|
||||
#define AL_CHECK(STATEMENT) STATEMENT; AL::check_errors(__FILE__, __LINE__)
|
||||
#define AL_GET_ERROR() AL::check_errors(__FILE__, __LINE__)
|
||||
@ -80,4 +81,4 @@ namespace AL {
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* SRC_AUDIO_AUDIOUTIL_H_ */
|
||||
#endif // AUDIO_AUDIOUTIL_HPP_
|
||||
@ -1,4 +1,4 @@
|
||||
#include "NoAudio.h"
|
||||
#include "NoAudio.hpp"
|
||||
|
||||
using namespace audio;
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#ifndef AUDIO_NOAUDIO_H_
|
||||
#define AUDIO_NOAUDIO_H_
|
||||
#ifndef AUDIO_NOAUDIO_HPP_
|
||||
#define AUDIO_NOAUDIO_HPP_
|
||||
|
||||
#include "audio.h"
|
||||
#include "audio.hpp"
|
||||
|
||||
namespace audio {
|
||||
class NoSound : public Sound {
|
||||
@ -85,4 +85,4 @@ namespace audio {
|
||||
};
|
||||
}
|
||||
|
||||
#endif // AUDIO_NOAUDIO_H_
|
||||
#endif // AUDIO_NOAUDIO_HPP_
|
||||
@ -1,14 +1,14 @@
|
||||
#include "audio.h"
|
||||
#include "audio.hpp"
|
||||
|
||||
#include "NoAudio.hpp"
|
||||
#include "AL/ALAudio.hpp"
|
||||
|
||||
#include "../coders/wav.hpp"
|
||||
#include "../coders/ogg.hpp"
|
||||
|
||||
#include <iostream>
|
||||
#include <stdexcept>
|
||||
|
||||
#include "NoAudio.h"
|
||||
#include "AL/ALAudio.h"
|
||||
|
||||
#include "../coders/wav.h"
|
||||
#include "../coders/ogg.h"
|
||||
|
||||
namespace audio {
|
||||
static speakerid_t nextId = 1;
|
||||
static Backend* backend;
|
||||
|
||||
@ -1,11 +1,12 @@
|
||||
#ifndef AUDIO_AUDIO_H_
|
||||
#define AUDIO_AUDIO_H_
|
||||
#ifndef AUDIO_AUDIO_HPP_
|
||||
#define AUDIO_AUDIO_HPP_
|
||||
|
||||
#include "../typedefs.h"
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include <filesystem>
|
||||
#include <glm/glm.hpp>
|
||||
#include "../typedefs.h"
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
@ -512,4 +513,4 @@ namespace audio {
|
||||
void close();
|
||||
};
|
||||
|
||||
#endif // AUDIO_AUDIO_H_
|
||||
#endif // AUDIO_AUDIO_HPP_
|
||||
@ -1,12 +1,14 @@
|
||||
#include "ogg.h"
|
||||
#include "ogg.hpp"
|
||||
|
||||
#include "../debug/Logger.hpp"
|
||||
#include "../audio/audio.hpp"
|
||||
#include "../typedefs.h"
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <vorbis/codec.h>
|
||||
#include <vorbis/vorbisfile.h>
|
||||
|
||||
#include "../audio/audio.h"
|
||||
#include "../typedefs.h"
|
||||
static debug::Logger logger("ogg");
|
||||
|
||||
using namespace audio;
|
||||
|
||||
@ -56,7 +58,7 @@ audio::PCM* ogg::load_pcm(const std::filesystem::path& file, bool headerOnly) {
|
||||
if (ret == 0) {
|
||||
eof = true;
|
||||
} else if (ret < 0) {
|
||||
std::cerr << "ogg::load_pcm: " << vorbis_error_message(ret) << std::endl;
|
||||
logger.error() << "ogg::load_pcm: " << vorbis_error_message(ret);
|
||||
} else {
|
||||
data.insert(data.end(), std::begin(buffer), std::begin(buffer)+ret);
|
||||
}
|
||||
@ -98,7 +100,7 @@ public:
|
||||
int bitstream = 0;
|
||||
long bytes = ov_read(&vf, buffer, bufferSize, 0, 2, true, &bitstream);
|
||||
if (bytes < 0) {
|
||||
std::cerr << "ogg::load_pcm: " << vorbis_error_message(bytes) << " " << bytes << std::endl;
|
||||
logger.error() << "ogg::load_pcm: " << vorbis_error_message(bytes) << " " << bytes;
|
||||
return PCMStream::ERROR;
|
||||
}
|
||||
return bytes;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#ifndef CODERS_OGG_H_
|
||||
#define CODERS_OGG_H_
|
||||
#ifndef CODERS_OGG_HPP_
|
||||
#define CODERS_OGG_HPP_
|
||||
|
||||
#include <filesystem>
|
||||
|
||||
@ -13,4 +13,4 @@ namespace ogg {
|
||||
extern audio::PCMStream* create_stream(const std::filesystem::path& file);
|
||||
}
|
||||
|
||||
#endif // CODERS_OGG_H_
|
||||
#endif // CODERS_OGG_HPP_
|
||||
@ -1,4 +1,6 @@
|
||||
#include "wav.h"
|
||||
#include "wav.hpp"
|
||||
|
||||
#include "../audio/audio.hpp"
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
@ -7,8 +9,6 @@
|
||||
#include <iostream>
|
||||
#include <stdexcept>
|
||||
|
||||
#include "../audio/audio.h"
|
||||
|
||||
bool is_big_endian() {
|
||||
uint32_t ui32_v = 0x01020304;
|
||||
char bytes[sizeof(uint32_t)];
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#ifndef CODERS_WAV_H_
|
||||
#define CODERS_WAV_H_
|
||||
#ifndef CODERS_WAV_HPP_
|
||||
#define CODERS_WAV_HPP_
|
||||
|
||||
#include <filesystem>
|
||||
|
||||
@ -13,4 +13,4 @@ namespace wav {
|
||||
extern audio::PCMStream* create_stream(const std::filesystem::path& file);
|
||||
}
|
||||
|
||||
#endif // CODERS_WAV_H_
|
||||
#endif // CODERS_WAV_HPP_
|
||||
@ -1,9 +1,10 @@
|
||||
#include "xml.h"
|
||||
#include "xml.hpp"
|
||||
|
||||
#include "../util/stringutil.h"
|
||||
|
||||
#include <charconv>
|
||||
#include <stdexcept>
|
||||
#include <sstream>
|
||||
#include "../util/stringutil.h"
|
||||
|
||||
using namespace xml;
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#ifndef CODERS_XML_H_
|
||||
#define CODERS_XML_H_
|
||||
#ifndef CODERS_XML_HPP_
|
||||
#define CODERS_XML_HPP_
|
||||
|
||||
#include <string>
|
||||
#include <memory>
|
||||
@ -141,4 +141,4 @@ namespace xml {
|
||||
extern xmldocument parse(std::string filename, std::string source);
|
||||
}
|
||||
|
||||
#endif // CODERS_XML_H_
|
||||
#endif // CODERS_XML_HPP_
|
||||
@ -4,7 +4,7 @@
|
||||
|
||||
#include "debug/Logger.hpp"
|
||||
#include "assets/AssetsLoader.h"
|
||||
#include "audio/audio.h"
|
||||
#include "audio/audio.hpp"
|
||||
#include "coders/GLSLExtension.h"
|
||||
#include "coders/imageio.hpp"
|
||||
#include "coders/json.h"
|
||||
@ -42,8 +42,6 @@
|
||||
|
||||
static debug::Logger logger("engine");
|
||||
|
||||
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
void addWorldGenerators() {
|
||||
@ -64,7 +62,6 @@ Engine::Engine(EngineSettings& settings, SettingsHandler& settingsHandler, Engin
|
||||
: settings(settings), settingsHandler(settingsHandler), paths(paths)
|
||||
{
|
||||
corecontent::setup_bindings();
|
||||
|
||||
loadSettings();
|
||||
|
||||
controller = std::make_unique<EngineController>(this);
|
||||
|
||||
@ -1,6 +1,4 @@
|
||||
#include "ContentGfxCache.h"
|
||||
|
||||
#include <string>
|
||||
#include "ContentGfxCache.hpp"
|
||||
|
||||
#include "../assets/Assets.h"
|
||||
#include "../content/Content.h"
|
||||
@ -9,7 +7,9 @@
|
||||
#include "../graphics/core/Atlas.hpp"
|
||||
#include "../maths/UVRegion.hpp"
|
||||
#include "../voxels/Block.h"
|
||||
#include "UiDocument.h"
|
||||
#include "UiDocument.hpp"
|
||||
|
||||
#include <string>
|
||||
|
||||
ContentGfxCache::ContentGfxCache(const Content* content, Assets* assets) : content(content) {
|
||||
auto indices = content->getIndices();
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#ifndef FRONTEND_BLOCKS_GFX_CACHE_H_
|
||||
#define FRONTEND_BLOCKS_GFX_CACHE_H_
|
||||
#ifndef FRONTEND_BLOCKS_GFX_CACHE_HPP_
|
||||
#define FRONTEND_BLOCKS_GFX_CACHE_HPP_
|
||||
|
||||
#include "../typedefs.h"
|
||||
|
||||
@ -24,4 +24,4 @@ public:
|
||||
const Content* getContent() const;
|
||||
};
|
||||
|
||||
#endif // FRONTEND_BLOCKS_GFX_CACHE_H_
|
||||
#endif // FRONTEND_BLOCKS_GFX_CACHE_HPP_
|
||||
@ -1,7 +1,7 @@
|
||||
#include "LevelFrontend.h"
|
||||
|
||||
#include "../assets/Assets.h"
|
||||
#include "../audio/audio.h"
|
||||
#include "../audio/audio.hpp"
|
||||
#include "../content/Content.h"
|
||||
#include "../graphics/core/Atlas.hpp"
|
||||
#include "../graphics/render/BlocksPreview.hpp"
|
||||
@ -9,7 +9,7 @@
|
||||
#include "../logic/PlayerController.h"
|
||||
#include "../voxels/Block.h"
|
||||
#include "../world/Level.h"
|
||||
#include "ContentGfxCache.h"
|
||||
#include "ContentGfxCache.hpp"
|
||||
|
||||
LevelFrontend::LevelFrontend(LevelController* controller, Assets* assets)
|
||||
: level(controller->getLevel()),
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "UiDocument.h"
|
||||
#include "UiDocument.hpp"
|
||||
|
||||
#include "../files/files.h"
|
||||
#include "../graphics/ui/elements/UINode.hpp"
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#ifndef FRONTEND_UI_DOCUMENT_H_
|
||||
#define FRONTEND_UI_DOCUMENT_H_
|
||||
#ifndef FRONTEND_UI_DOCUMENT_HPP_
|
||||
#define FRONTEND_UI_DOCUMENT_HPP_
|
||||
|
||||
#include "../typedefs.h"
|
||||
|
||||
@ -50,4 +50,4 @@ public:
|
||||
static std::shared_ptr<gui::UINode> readElement(fs::path file);
|
||||
};
|
||||
|
||||
#endif // FRONTEND_UI_DOCUMENT_H_
|
||||
#endif // FRONTEND_UI_DOCUMENT_HPP_
|
||||
@ -1,8 +1,4 @@
|
||||
#include <string>
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
|
||||
#include "../audio/audio.h"
|
||||
#include "../audio/audio.hpp"
|
||||
#include "../delegates.h"
|
||||
#include "../engine.h"
|
||||
#include "../graphics/core/Mesh.hpp"
|
||||
@ -20,6 +16,10 @@
|
||||
#include "../world/Level.h"
|
||||
#include "../world/World.h"
|
||||
|
||||
#include <string>
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
|
||||
using namespace gui;
|
||||
|
||||
static std::shared_ptr<Label> create_label(wstringsupplier supplier) {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "hud.h"
|
||||
#include "hud.hpp"
|
||||
|
||||
#include "../assets/Assets.h"
|
||||
#include "../content/Content.h"
|
||||
@ -39,9 +39,9 @@
|
||||
#include "../window/Window.hpp"
|
||||
#include "../world/Level.h"
|
||||
#include "../world/World.h"
|
||||
#include "ContentGfxCache.h"
|
||||
#include "ContentGfxCache.hpp"
|
||||
#include "LevelFrontend.h"
|
||||
#include "UiDocument.h"
|
||||
#include "UiDocument.hpp"
|
||||
|
||||
#include <assert.h>
|
||||
#include <memory>
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#ifndef FRONTEND_HUD_H_
|
||||
#define FRONTEND_HUD_H_
|
||||
#ifndef FRONTEND_HUD_HPP_
|
||||
#define FRONTEND_HUD_HPP_
|
||||
|
||||
#include "../typedefs.h"
|
||||
#include "../util/ObjectsKeeper.hpp"
|
||||
@ -164,4 +164,4 @@ public:
|
||||
std::shared_ptr<Inventory> getBlockInventory();
|
||||
};
|
||||
|
||||
#endif // FRONTEND_HUD_H_
|
||||
#endif // FRONTEND_HUD_HPP_
|
||||
@ -17,7 +17,7 @@
|
||||
#include "../util/stringutil.h"
|
||||
#include "../window/Window.hpp"
|
||||
#include "locale/langs.h"
|
||||
#include "UiDocument.h"
|
||||
#include "UiDocument.hpp"
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
using namespace gui;
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
#include "LevelScreen.hpp"
|
||||
|
||||
#include "../hud.h"
|
||||
#include "../hud.hpp"
|
||||
#include "../LevelFrontend.h"
|
||||
#include "../../debug/Logger.hpp"
|
||||
#include "../../audio/audio.h"
|
||||
#include "../../audio/audio.hpp"
|
||||
#include "../../coders/imageio.hpp"
|
||||
#include "../../graphics/core/PostProcessing.h"
|
||||
#include "../../graphics/core/DrawContext.hpp"
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
#include "BlocksPreview.hpp"
|
||||
|
||||
#include "../../assets/Assets.h"
|
||||
#include "../../constants.h"
|
||||
#include "../../content/Content.h"
|
||||
#include "../../frontend/ContentGfxCache.h"
|
||||
#include "../../frontend/ContentGfxCache.hpp"
|
||||
#include "../../voxels/Block.h"
|
||||
#include "../../window/Camera.hpp"
|
||||
#include "../../window/Window.hpp"
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#include "BlocksRenderer.hpp"
|
||||
|
||||
#include "../core/Mesh.hpp"
|
||||
#include "../../maths/UVRegion.hpp"
|
||||
#include "../../constants.h"
|
||||
@ -8,7 +9,7 @@
|
||||
#include "../../voxels/VoxelsVolume.h"
|
||||
#include "../../voxels/ChunksStorage.h"
|
||||
#include "../../lighting/Lightmap.h"
|
||||
#include "../../frontend/ContentGfxCache.h"
|
||||
#include "../../frontend/ContentGfxCache.hpp"
|
||||
#include "../../settings.h"
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
#include <algorithm>
|
||||
|
||||
#include "../../assets/Assets.h"
|
||||
#include "../../frontend/UiDocument.h"
|
||||
#include "../../frontend/UiDocument.hpp"
|
||||
#include "../../graphics/core/Batch2D.hpp"
|
||||
#include "../../graphics/core/Shader.hpp"
|
||||
#include "../../graphics/core/DrawContext.hpp"
|
||||
|
||||
@ -533,9 +533,13 @@ void UiXmlReader::addIgnore(const std::string& tag) {
|
||||
std::shared_ptr<UINode> UiXmlReader::readUINode(xml::xmlelement element) {
|
||||
if (element->has("if")) {
|
||||
const auto& cond = element->attr("if").getText();
|
||||
if (cond.empty() || cond == "false" || cond == "nil") {
|
||||
if (cond.empty() || cond == "false" || cond == "nil")
|
||||
return nullptr;
|
||||
}
|
||||
if (element->has("ifnot")) {
|
||||
const auto& cond = element->attr("ifnot").getText();
|
||||
if (!(cond.empty() || cond == "false" || cond == "nil"))
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
const std::string& tag = element->getTag();
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
#ifndef FRONTEND_GUI_GUI_XML_HPP_
|
||||
#define FRONTEND_GUI_GUI_XML_HPP_
|
||||
|
||||
#include "GUI.hpp"
|
||||
#include "../../coders/xml.hpp"
|
||||
|
||||
#include <memory>
|
||||
#include <stack>
|
||||
#include <unordered_set>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "GUI.hpp"
|
||||
#include "../../coders/xml.h"
|
||||
|
||||
namespace gui {
|
||||
class UiXmlReader;
|
||||
|
||||
|
||||
@ -1,11 +1,12 @@
|
||||
#include "LuaState.h"
|
||||
#include "LuaState.hpp"
|
||||
|
||||
#include "lua_util.hpp"
|
||||
#include "api_lua.hpp"
|
||||
#include "../../../debug/Logger.hpp"
|
||||
#include "../../../util/stringutil.h"
|
||||
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
#include "lua_util.h"
|
||||
#include "api_lua.h"
|
||||
#include "../../../debug/Logger.hpp"
|
||||
#include "../../../util/stringutil.h"
|
||||
|
||||
inline std::string LAMBDAS_TABLE = "$L";
|
||||
|
||||
|
||||
@ -1,9 +1,7 @@
|
||||
#ifndef LOGIC_SCRIPTING_LUA_STATE_H_
|
||||
#define LOGIC_SCRIPTING_LUA_STATE_H_
|
||||
#ifndef LOGIC_SCRIPTING_LUA_STATE_HPP_
|
||||
#define LOGIC_SCRIPTING_LUA_STATE_HPP_
|
||||
|
||||
#include "lua_commons.h"
|
||||
#include <string>
|
||||
#include <stdexcept>
|
||||
#include "lua_commons.hpp"
|
||||
|
||||
#include "../../../data/dynamic.h"
|
||||
#include "../../../delegates.h"
|
||||
@ -12,6 +10,9 @@
|
||||
#error LuaJIT required
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
#include <stdexcept>
|
||||
|
||||
namespace lua {
|
||||
class luaerror : public std::runtime_error {
|
||||
public:
|
||||
@ -76,4 +77,4 @@ namespace lua {
|
||||
};
|
||||
}
|
||||
|
||||
#endif // LOGIC_SCRIPTING_LUA_STATE_H_
|
||||
#endif // LOGIC_SCRIPTING_LUA_STATE_HPP_
|
||||
@ -1,8 +1,9 @@
|
||||
#ifndef LOGIC_SCRIPTING_API_LUA_H_
|
||||
#define LOGIC_SCRIPTING_API_LUA_H_
|
||||
#ifndef LOGIC_SCRIPTING_API_LUA_HPP_
|
||||
#define LOGIC_SCRIPTING_API_LUA_HPP_
|
||||
|
||||
#include "lua_commons.hpp"
|
||||
|
||||
#include <exception>
|
||||
#include "lua_commons.h"
|
||||
|
||||
// Libraries
|
||||
extern const luaL_Reg audiolib [];
|
||||
@ -23,4 +24,4 @@ extern const luaL_Reg inputlib [];
|
||||
// Lua Overrides
|
||||
extern int l_print(lua_State* L);
|
||||
|
||||
#endif // LOGIC_SCRIPTING_API_LUA_H_
|
||||
#endif // LOGIC_SCRIPTING_API_LUA_HPP_
|
||||
@ -1,8 +1,8 @@
|
||||
#include "api_lua.h"
|
||||
#include "lua_commons.h"
|
||||
#include "lua_util.h"
|
||||
#include "api_lua.hpp"
|
||||
#include "lua_commons.hpp"
|
||||
#include "lua_util.hpp"
|
||||
|
||||
#include "../../../audio/audio.h"
|
||||
#include "../../../audio/audio.hpp"
|
||||
#include "../../../engine.h"
|
||||
#include "../scripting.h"
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#include "lua_commons.h"
|
||||
#include "api_lua.h"
|
||||
#include "lua_util.h"
|
||||
#include "lua_commons.hpp"
|
||||
#include "api_lua.hpp"
|
||||
#include "lua_util.hpp"
|
||||
#include "../scripting.h"
|
||||
#include "../../../world/Level.h"
|
||||
#include "../../../voxels/Chunks.h"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#include "lua_commons.h"
|
||||
#include "api_lua.h"
|
||||
#include "LuaState.h"
|
||||
#include "lua_commons.hpp"
|
||||
#include "api_lua.hpp"
|
||||
#include "LuaState.hpp"
|
||||
|
||||
#include "../../../engine.h"
|
||||
#include "../../../files/settings_io.hpp"
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#include "lua_commons.h"
|
||||
#include "api_lua.h"
|
||||
#include "lua_commons.hpp"
|
||||
#include "api_lua.hpp"
|
||||
#include "../scripting.h"
|
||||
#include "../../../engine.h"
|
||||
#include "../../../files/files.h"
|
||||
|
||||
@ -1,11 +1,9 @@
|
||||
#include "lua_commons.h"
|
||||
#include "api_lua.h"
|
||||
#include "lua_commons.hpp"
|
||||
#include "api_lua.hpp"
|
||||
#include "lua_util.hpp"
|
||||
#include "LuaState.hpp"
|
||||
|
||||
#include <iostream>
|
||||
#include "../scripting.h"
|
||||
#include "lua_util.h"
|
||||
#include "LuaState.h"
|
||||
|
||||
#include "../../../engine.h"
|
||||
#include "../../../assets/Assets.h"
|
||||
#include "../../../items/Inventories.h"
|
||||
@ -18,7 +16,7 @@
|
||||
#include "../../../graphics/ui/elements/Panel.hpp"
|
||||
#include "../../../graphics/ui/elements/Menu.hpp"
|
||||
#include "../../../graphics/ui/elements/InventoryView.hpp"
|
||||
#include "../../../frontend/UiDocument.h"
|
||||
#include "../../../frontend/UiDocument.hpp"
|
||||
#include "../../../frontend/locale/langs.h"
|
||||
#include "../../../util/stringutil.h"
|
||||
#include "../../../world/Level.h"
|
||||
|
||||
@ -1,11 +1,12 @@
|
||||
#include "lua_commons.h"
|
||||
#include "api_lua.h"
|
||||
#include "LuaState.h"
|
||||
#include "lua_commons.hpp"
|
||||
#include "api_lua.hpp"
|
||||
#include "LuaState.hpp"
|
||||
|
||||
#include "../../../assets/Assets.h"
|
||||
#include "../../../content/Content.h"
|
||||
#include "../../../engine.h"
|
||||
#include "../../../frontend/hud.h"
|
||||
#include "../../../frontend/UiDocument.h"
|
||||
#include "../../../frontend/hud.hpp"
|
||||
#include "../../../frontend/UiDocument.hpp"
|
||||
#include "../../../graphics/ui/elements/InventoryView.hpp"
|
||||
#include "../../../items/Inventories.h"
|
||||
#include "../../../logic/BlocksController.h"
|
||||
|
||||
@ -1,15 +1,14 @@
|
||||
#include "api_lua.h"
|
||||
#include "lua_commons.h"
|
||||
#include "api_lua.hpp"
|
||||
#include "lua_commons.hpp"
|
||||
#include "LuaState.hpp"
|
||||
#include "../scripting.h"
|
||||
|
||||
#include "../../../window/input.hpp"
|
||||
#include "../../../window/Events.hpp"
|
||||
#include "../../../frontend/screens/Screen.hpp"
|
||||
#include "../../../frontend/hud.h"
|
||||
#include "../../../frontend/hud.hpp"
|
||||
#include "../../../engine.h"
|
||||
|
||||
#include "LuaState.h"
|
||||
|
||||
namespace scripting {
|
||||
extern lua::LuaState* state;
|
||||
extern Hud* hud;
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
#include "lua_commons.h"
|
||||
#include "api_lua.h"
|
||||
|
||||
#include "lua_util.h"
|
||||
#include "lua_commons.hpp"
|
||||
#include "api_lua.hpp"
|
||||
#include "lua_util.hpp"
|
||||
#include "../scripting.h"
|
||||
#include "../../../content/Content.h"
|
||||
#include "../../../world/Level.h"
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#include "lua_commons.h"
|
||||
#include "api_lua.h"
|
||||
#include "lua_commons.hpp"
|
||||
#include "api_lua.hpp"
|
||||
#include "../scripting.h"
|
||||
#include "../../../content/Content.h"
|
||||
#include "../../../items/ItemDef.h"
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
#include "api_lua.h"
|
||||
#include "lua_commons.h"
|
||||
|
||||
#include "LuaState.h"
|
||||
#include "api_lua.hpp"
|
||||
#include "lua_commons.hpp"
|
||||
#include "LuaState.hpp"
|
||||
|
||||
#include "../../../coders/json.h"
|
||||
#include "../../../data/dynamic.h"
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#include "api_lua.h"
|
||||
#include "lua_commons.h"
|
||||
#include "api_lua.hpp"
|
||||
#include "lua_commons.hpp"
|
||||
#include "../scripting.h"
|
||||
#include "../../../engine.h"
|
||||
#include "../../../assets/AssetsLoader.h"
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#include "lua_commons.h"
|
||||
#include "api_lua.h"
|
||||
#include "lua_commons.hpp"
|
||||
#include "api_lua.hpp"
|
||||
#include "../scripting.h"
|
||||
#include "../../../world/Level.h"
|
||||
#include "../../../objects/Player.h"
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#include "api_lua.h"
|
||||
#include "lua_commons.h"
|
||||
#include "api_lua.hpp"
|
||||
#include "lua_commons.hpp"
|
||||
#include "../scripting.h"
|
||||
#include "../../../engine.h"
|
||||
#include "../../../window/Window.hpp"
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#include "lua_commons.h"
|
||||
#include "api_lua.h"
|
||||
#include "lua_commons.hpp"
|
||||
#include "api_lua.hpp"
|
||||
#include "../scripting.h"
|
||||
#include "../../../assets/Assets.h"
|
||||
#include "../../../assets/AssetsLoader.h"
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#ifndef LOGIC_SCRIPTING_LUA_H_
|
||||
#define LOGIC_SCRIPTING_LUA_H_
|
||||
#ifndef LOGIC_SCRIPTING_LUA_HPP_
|
||||
#define LOGIC_SCRIPTING_LUA_HPP_
|
||||
|
||||
#ifdef __linux__
|
||||
#include <luajit-2.1/luaconf.h>
|
||||
@ -30,4 +30,4 @@ template <lua_CFunction func> int lua_wrap_errors(lua_State *L) {
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif // LOGIC_SCRIPTING_LUA_H_
|
||||
#endif // LOGIC_SCRIPTING_LUA_HPP_
|
||||
@ -1,5 +1,5 @@
|
||||
#include "api_lua.h"
|
||||
#include "lua_commons.h"
|
||||
#include "api_lua.hpp"
|
||||
#include "lua_commons.hpp"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
#ifndef LOGIC_SCRIPTING_LUA_UTIL_H_
|
||||
#define LOGIC_SCRIPTING_LUA_UTIL_H_
|
||||
|
||||
#include "LuaState.hpp"
|
||||
|
||||
#ifdef __linux__
|
||||
#include <luajit-2.1/luaconf.h>
|
||||
#include <luajit-2.1/lua.hpp>
|
||||
@ -8,7 +10,6 @@
|
||||
#include <lua.hpp>
|
||||
#endif
|
||||
#include <glm/glm.hpp>
|
||||
#include "LuaState.h"
|
||||
|
||||
namespace lua {
|
||||
inline int pushivec3(lua_State* L, luaint x, luaint y, luaint z) {
|
||||
@ -1,26 +1,26 @@
|
||||
#include "scripting.h"
|
||||
|
||||
#include "../../content/ContentPack.h"
|
||||
#include "../../debug/Logger.hpp"
|
||||
#include "../../engine.h"
|
||||
#include "../../files/engine_paths.h"
|
||||
#include "../../files/files.h"
|
||||
#include "../../frontend/UiDocument.hpp"
|
||||
#include "../../items/Inventory.h"
|
||||
#include "../../items/ItemDef.h"
|
||||
#include "../../logic/BlocksController.h"
|
||||
#include "../../logic/LevelController.h"
|
||||
#include "../../objects/Player.h"
|
||||
#include "../../util/stringutil.h"
|
||||
#include "../../util/timeutil.h"
|
||||
#include "../../util/timeutil.h"
|
||||
#include "../../voxels/Block.h"
|
||||
#include "../../world/Level.h"
|
||||
#include "lua/LuaState.hpp"
|
||||
|
||||
#include <iostream>
|
||||
#include <stdexcept>
|
||||
|
||||
#include "../../debug/Logger.hpp"
|
||||
#include "../../content/ContentPack.h"
|
||||
#include "../../files/engine_paths.h"
|
||||
#include "../../files/files.h"
|
||||
#include "../../util/timeutil.h"
|
||||
#include "../../world/Level.h"
|
||||
#include "../../objects/Player.h"
|
||||
#include "../../voxels/Block.h"
|
||||
#include "../../items/ItemDef.h"
|
||||
#include "../../items/Inventory.h"
|
||||
#include "../../logic/BlocksController.h"
|
||||
#include "../../logic/LevelController.h"
|
||||
#include "../../frontend/UiDocument.h"
|
||||
#include "../../engine.h"
|
||||
#include "lua/LuaState.h"
|
||||
#include "../../util/stringutil.h"
|
||||
#include "../../util/timeutil.h"
|
||||
|
||||
using namespace scripting;
|
||||
|
||||
namespace scripting {
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
#include "scripting_functional.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include "lua/LuaState.h"
|
||||
#include "lua/LuaState.hpp"
|
||||
#include "../../debug/Logger.hpp"
|
||||
#include "../../util/stringutil.h"
|
||||
|
||||
|
||||
@ -1,17 +1,15 @@
|
||||
#include "scripting_hud.hpp"
|
||||
#include "scripting.h"
|
||||
|
||||
#include "lua/api_lua.h"
|
||||
#include "lua/LuaState.h"
|
||||
#include "lua/api_lua.hpp"
|
||||
#include "lua/LuaState.hpp"
|
||||
|
||||
#include "../../debug/Logger.hpp"
|
||||
#include "../../frontend/hud.h"
|
||||
#include "../../frontend/hud.hpp"
|
||||
#include "../../objects/Player.h"
|
||||
#include "../../files/files.h"
|
||||
#include "../../engine.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
namespace scripting {
|
||||
extern lua::LuaState* state;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user