mirror of
https://github.com/OpenMW/openmw.git
synced 2025-10-15 20:16:34 +00:00
Merge branch 'rm_small_tu' into 'master'
Remove small translation units See merge request OpenMW/openmw!4895
This commit is contained in:
commit
a0863290be
31 changed files with 101 additions and 221 deletions
|
@ -17,7 +17,6 @@ set(ESSIMPORTER_FILES
|
|||
importscpt.cpp
|
||||
importproj.cpp
|
||||
importsplm.cpp
|
||||
importercontext.cpp
|
||||
converter.cpp
|
||||
convertacdt.cpp
|
||||
convertnpcc.cpp
|
||||
|
|
|
@ -23,14 +23,14 @@ opencs_units (model/world
|
|||
|
||||
|
||||
opencs_units (model/world
|
||||
universalid record commands columnbase columnimp scriptcontext cell refidcollection
|
||||
universalid commands columnbase columnimp scriptcontext refidcollection
|
||||
refiddata refidadapterimp ref collectionbase refcollection columns infocollection tablemimedata cellcoordinates cellselection resources resourcesmanager scope
|
||||
pathgrid land nestedtablewrapper nestedcollection nestedcoladapterimp nestedinfocollection
|
||||
pathgrid land nestedcollection nestedcoladapterimp nestedinfocollection
|
||||
idcompletionmanager metadata defaultgmsts infoselectwrapper commandmacro
|
||||
)
|
||||
|
||||
opencs_hdrs (model/world
|
||||
columnimp disabletag idcollection collection info subcellcollection
|
||||
columnimp disabletag idcollection collection info subcellcollection cell nestedtablewrapper record
|
||||
)
|
||||
|
||||
|
||||
|
@ -52,7 +52,7 @@ opencs_hdrs (model/tools
|
|||
|
||||
opencs_units (view/doc
|
||||
viewmanager view operations operation subview startup filedialog newgame
|
||||
filewidget adjusterwidget loader globaldebugprofilemenu runlogsubview sizehint
|
||||
filewidget adjusterwidget loader globaldebugprofilemenu runlogsubview
|
||||
)
|
||||
|
||||
|
||||
|
@ -61,7 +61,7 @@ opencs_units (view/doc
|
|||
)
|
||||
|
||||
opencs_hdrs (view/doc
|
||||
subviewfactoryimp
|
||||
subviewfactoryimp sizehint
|
||||
)
|
||||
|
||||
|
||||
|
@ -92,12 +92,12 @@ opencs_units (view/render
|
|||
)
|
||||
|
||||
opencs_units (view/render
|
||||
lighting lightingday lightingnight lightingbright object cell terrainstorage tagbase
|
||||
lighting lightingday lightingnight lightingbright object cell terrainstorage
|
||||
cellarrow cellmarker cellborder pathgrid
|
||||
)
|
||||
|
||||
opencs_hdrs (view/render
|
||||
mask
|
||||
mask tagbase
|
||||
)
|
||||
|
||||
|
||||
|
@ -123,7 +123,11 @@ opencs_units (model/prefs
|
|||
)
|
||||
|
||||
opencs_units (model/filter
|
||||
unarynode narynode leafnode booleannode parser andnode ornode notnode textnode valuenode
|
||||
unarynode narynode parser andnode ornode notnode textnode valuenode
|
||||
)
|
||||
|
||||
opencs_hdrs (model/filter
|
||||
leafnode booleannode
|
||||
)
|
||||
|
||||
opencs_units (view/filter
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
#include "booleannode.hpp"
|
||||
|
||||
namespace CSMWorld
|
||||
{
|
||||
class IdTableBase;
|
||||
}
|
||||
|
||||
CSMFilter::BooleanNode::BooleanNode(bool value)
|
||||
: mTrue(value)
|
||||
{
|
||||
}
|
||||
|
||||
bool CSMFilter::BooleanNode::test(const CSMWorld::IdTableBase& table, int row, const std::map<int, int>& columns) const
|
||||
{
|
||||
return mTrue;
|
||||
}
|
||||
|
||||
std::string CSMFilter::BooleanNode::toString(bool numericColumns) const
|
||||
{
|
||||
return mTrue ? "true" : "false";
|
||||
}
|
|
@ -18,13 +18,19 @@ namespace CSMFilter
|
|||
bool mTrue;
|
||||
|
||||
public:
|
||||
explicit BooleanNode(bool value);
|
||||
explicit BooleanNode(bool value)
|
||||
: mTrue(value)
|
||||
{
|
||||
}
|
||||
|
||||
bool test(const CSMWorld::IdTableBase& table, int row, const std::map<int, int>& columns) const override;
|
||||
bool test(const CSMWorld::IdTableBase& table, int row, const std::map<int, int>& columns) const override
|
||||
{
|
||||
return mTrue;
|
||||
}
|
||||
///< \return Can the specified table row pass through to filter?
|
||||
/// \param columns column ID to column index mapping
|
||||
|
||||
std::string toString(bool numericColumns) const override;
|
||||
std::string toString(bool numericColumns) const override { return mTrue ? "true" : "false"; }
|
||||
///< Return a string that represents this node.
|
||||
///
|
||||
/// \param numericColumns Use numeric IDs instead of string to represent columns.
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
#include "leafnode.hpp"
|
||||
|
||||
std::vector<int> CSMFilter::LeafNode::getReferencedColumns() const
|
||||
{
|
||||
return std::vector<int>();
|
||||
}
|
|
@ -10,7 +10,7 @@ namespace CSMFilter
|
|||
class LeafNode : public Node
|
||||
{
|
||||
public:
|
||||
std::vector<int> getReferencedColumns() const override;
|
||||
std::vector<int> getReferencedColumns() const override { return {}; }
|
||||
///< Return a list of the IDs of the columns referenced by this node. The column mapping
|
||||
/// passed into test as columns must contain all columns listed here.
|
||||
};
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
#include "cell.hpp"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
void CSMWorld::Cell::load(ESM::ESMReader& esm, bool& isDeleted)
|
||||
{
|
||||
ESM::Cell::load(esm, isDeleted, false);
|
||||
|
||||
mId = ESM::RefId::stringRefId(ESM::Cell::mId.toString());
|
||||
}
|
|
@ -1,8 +1,6 @@
|
|||
#ifndef CSM_WOLRD_CELL_H
|
||||
#define CSM_WOLRD_CELL_H
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <components/esm3/loadcell.hpp>
|
||||
|
||||
namespace ESM
|
||||
|
@ -20,7 +18,12 @@ namespace CSMWorld
|
|||
{
|
||||
ESM::RefId mId;
|
||||
|
||||
void load(ESM::ESMReader& esm, bool& isDeleted);
|
||||
void load(ESM::ESMReader& esm, bool& isDeleted)
|
||||
{
|
||||
ESM::Cell::load(esm, isDeleted, false);
|
||||
|
||||
mId = ESM::RefId::stringRefId(ESM::Cell::mId.toString());
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
#include "nestedtablewrapper.hpp"
|
||||
|
||||
int CSMWorld::NestedTableWrapperBase::size() const
|
||||
{
|
||||
return -5;
|
||||
}
|
|
@ -7,7 +7,7 @@ namespace CSMWorld
|
|||
{
|
||||
virtual ~NestedTableWrapperBase() = default;
|
||||
|
||||
virtual int size() const;
|
||||
virtual int size() const { return -5; }
|
||||
|
||||
NestedTableWrapperBase() = default;
|
||||
};
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
#include "record.hpp"
|
||||
|
||||
bool CSMWorld::RecordBase::isDeleted() const
|
||||
{
|
||||
return mState == State_Deleted || mState == State_Erased;
|
||||
}
|
||||
|
||||
bool CSMWorld::RecordBase::isErased() const
|
||||
{
|
||||
return mState == State_Erased;
|
||||
}
|
||||
|
||||
bool CSMWorld::RecordBase::isModified() const
|
||||
{
|
||||
return mState == State_Modified || mState == State_ModifiedOnly;
|
||||
}
|
|
@ -33,11 +33,11 @@ namespace CSMWorld
|
|||
virtual void assign(const RecordBase& record) = 0;
|
||||
///< Will throw an exception if the types don't match.
|
||||
|
||||
bool isDeleted() const;
|
||||
bool isDeleted() const { return mState == State_Deleted || mState == State_Erased; }
|
||||
|
||||
bool isErased() const;
|
||||
bool isErased() const { return mState == State_Erased; }
|
||||
|
||||
bool isModified() const;
|
||||
bool isModified() const { return mState == State_Modified || mState == State_ModifiedOnly; }
|
||||
};
|
||||
|
||||
template <typename ESXRecordT>
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
#include "sizehint.hpp"
|
||||
|
||||
CSVDoc::SizeHintWidget::SizeHintWidget(QWidget* parent)
|
||||
: QWidget(parent)
|
||||
{
|
||||
}
|
||||
|
||||
QSize CSVDoc::SizeHintWidget::sizeHint() const
|
||||
{
|
||||
return mSize;
|
||||
}
|
||||
|
||||
void CSVDoc::SizeHintWidget::setSizeHint(const QSize& size)
|
||||
{
|
||||
mSize = size;
|
||||
}
|
|
@ -11,11 +11,15 @@ namespace CSVDoc
|
|||
QSize mSize;
|
||||
|
||||
public:
|
||||
SizeHintWidget(QWidget* parent = nullptr);
|
||||
explicit SizeHintWidget(QWidget* parent = nullptr)
|
||||
: QWidget(parent)
|
||||
{
|
||||
}
|
||||
|
||||
~SizeHintWidget() override = default;
|
||||
|
||||
QSize sizeHint() const override;
|
||||
void setSizeHint(const QSize& size);
|
||||
QSize sizeHint() const override { return mSize; }
|
||||
void setSizeHint(const QSize& size) { mSize = size; }
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
#include "tagbase.hpp"
|
||||
|
||||
#include <apps/opencs/view/render/mask.hpp>
|
||||
|
||||
CSVRender::TagBase::TagBase(Mask mask)
|
||||
: mMask(mask)
|
||||
{
|
||||
}
|
||||
|
||||
CSVRender::Mask CSVRender::TagBase::getMask() const
|
||||
{
|
||||
return mMask;
|
||||
}
|
||||
|
||||
QString CSVRender::TagBase::getToolTip(bool hideBasics, const WorldspaceHitResult& /*hit*/) const
|
||||
{
|
||||
return "";
|
||||
}
|
|
@ -16,11 +16,14 @@ namespace CSVRender
|
|||
Mask mMask;
|
||||
|
||||
public:
|
||||
TagBase(Mask mask);
|
||||
explicit TagBase(Mask mask)
|
||||
: mMask(mask)
|
||||
{
|
||||
}
|
||||
|
||||
Mask getMask() const;
|
||||
Mask getMask() const { return mMask; }
|
||||
|
||||
virtual QString getToolTip(bool hideBasics, const WorldspaceHitResult& hit) const;
|
||||
virtual QString getToolTip(bool hideBasics, const WorldspaceHitResult& hit) const { return {}; }
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
#include "consoleextensions.hpp"
|
||||
|
||||
#include <components/interpreter/interpreter.hpp>
|
||||
|
||||
namespace MWScript
|
||||
{
|
||||
namespace Console
|
||||
{
|
||||
void installOpcodes(Interpreter::Interpreter& interpreter) {}
|
||||
}
|
||||
}
|
|
@ -16,7 +16,7 @@ namespace MWScript
|
|||
/// \brief Script functionality limited to the console
|
||||
namespace Console
|
||||
{
|
||||
void installOpcodes(Interpreter::Interpreter& interpreter);
|
||||
void installOpcodes(Interpreter::Interpreter& interpreter) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
#include "nullerrorhandler.hpp"
|
||||
|
||||
void Compiler::NullErrorHandler::report(const std::string& message, const TokenLoc& loc, Type type) {}
|
||||
|
||||
void Compiler::NullErrorHandler::report(const std::string& message, Type type) {}
|
|
@ -9,10 +9,10 @@ namespace Compiler
|
|||
|
||||
class NullErrorHandler : public ErrorHandler
|
||||
{
|
||||
void report(const std::string& message, const TokenLoc& loc, Type type) override;
|
||||
void report(const std::string& message, const TokenLoc& loc, Type type) override {}
|
||||
///< Report error to the user.
|
||||
|
||||
void report(const std::string& message, Type type) override;
|
||||
void report(const std::string& message, Type type) override {}
|
||||
///< Report a file related error
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
#include "opcodes.hpp"
|
||||
|
||||
namespace Compiler::Control
|
||||
{
|
||||
const char* controls[numberOfControls] = { "playercontrols", "playerfighting", "playerjumping", "playerlooking",
|
||||
"playermagic", "playerviewswitch", "vanitymode" };
|
||||
}
|
|
@ -115,7 +115,15 @@ namespace Compiler
|
|||
{
|
||||
const int numberOfControls = 7;
|
||||
|
||||
extern const char* controls[numberOfControls];
|
||||
inline constexpr const char* controls[numberOfControls] = {
|
||||
"playercontrols",
|
||||
"playerfighting",
|
||||
"playerjumping",
|
||||
"playerlooking",
|
||||
"playermagic",
|
||||
"playerviewswitch",
|
||||
"vanitymode",
|
||||
};
|
||||
|
||||
const int opcodeEnable = 0x200007e;
|
||||
const int opcodeDisable = 0x2000085;
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
std::string printName(const std::uint32_t typeId)
|
||||
{
|
||||
unsigned char typeName[4];
|
||||
typeName[0] = typeId & 0xff;
|
||||
typeName[1] = (typeId >> 8) & 0xff;
|
||||
typeName[2] = (typeId >> 16) & 0xff;
|
||||
typeName[3] = (typeId >> 24) & 0xff;
|
||||
|
||||
return std::string((char*)typeName, 4);
|
||||
}
|
||||
}
|
|
@ -42,7 +42,16 @@ namespace ESM
|
|||
std::uint64_t size;
|
||||
};
|
||||
|
||||
std::string printName(const std::uint32_t typeId);
|
||||
inline std::string printName(const std::uint32_t typeId)
|
||||
{
|
||||
unsigned char typeName[4];
|
||||
typeName[0] = typeId & 0xff;
|
||||
typeName[1] = (typeId >> 8) & 0xff;
|
||||
typeName[2] = (typeId >> 16) & 0xff;
|
||||
typeName[3] = (typeId >> 24) & 0xff;
|
||||
|
||||
return std::string(reinterpret_cast<char*>(typeName), 4);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // COMPONENT_ESM_COMMON_H
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
#include "containerstate.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
void ContainerState::load(ESMReader& esm)
|
||||
{
|
||||
ObjectState::load(esm);
|
||||
|
||||
mInventory.load(esm);
|
||||
}
|
||||
|
||||
void ContainerState::save(ESMWriter& esm, bool inInventory) const
|
||||
{
|
||||
ObjectState::save(esm, inInventory);
|
||||
|
||||
mInventory.save(esm);
|
||||
}
|
||||
|
||||
}
|
|
@ -12,8 +12,19 @@ namespace ESM
|
|||
{
|
||||
InventoryState mInventory;
|
||||
|
||||
void load(ESMReader& esm) override;
|
||||
void save(ESMWriter& esm, bool inInventory = false) const override;
|
||||
void load(ESMReader& esm) override
|
||||
{
|
||||
ObjectState::load(esm);
|
||||
|
||||
mInventory.load(esm);
|
||||
}
|
||||
|
||||
void save(ESMWriter& esm, bool inInventory = false) const override
|
||||
{
|
||||
ObjectState::save(esm, inInventory);
|
||||
|
||||
mInventory.save(esm);
|
||||
}
|
||||
|
||||
ContainerState& asContainerState() override { return *this; }
|
||||
const ContainerState& asContainerState() const override { return *this; }
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
#include <filesystem>
|
||||
|
||||
#include "constrainedfilestream.hpp"
|
||||
|
||||
namespace Files
|
||||
{
|
||||
IStreamPtr openConstrainedFileStream(const std::filesystem::path& filename, std::size_t start, std::size_t length)
|
||||
{
|
||||
return std::make_unique<ConstrainedFileStream>(
|
||||
std::make_unique<ConstrainedFileStreamBuf>(filename, start, length));
|
||||
}
|
||||
}
|
|
@ -5,8 +5,8 @@
|
|||
#include "istreamptr.hpp"
|
||||
#include "streamwithbuffer.hpp"
|
||||
|
||||
#include <filesystem>
|
||||
#include <limits>
|
||||
#include <string>
|
||||
|
||||
namespace Files
|
||||
{
|
||||
|
@ -14,9 +14,12 @@ namespace Files
|
|||
/// A file stream constrained to a specific region in the file, specified by the 'start' and 'length' parameters.
|
||||
using ConstrainedFileStream = StreamWithBuffer<ConstrainedFileStreamBuf>;
|
||||
|
||||
IStreamPtr openConstrainedFileStream(const std::filesystem::path& filename, std::size_t start = 0,
|
||||
std::size_t length = std::numeric_limits<std::size_t>::max());
|
||||
|
||||
inline IStreamPtr openConstrainedFileStream(const std::filesystem::path& filename, std::size_t start = 0,
|
||||
std::size_t length = std::numeric_limits<std::size_t>::max())
|
||||
{
|
||||
return std::make_unique<ConstrainedFileStream>(
|
||||
std::make_unique<ConstrainedFileStreamBuf>(filename, start, length));
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
#include "alignment.hpp"
|
||||
|
||||
namespace LuaUi
|
||||
{
|
||||
MyGUI::Align alignmentToMyGui(Alignment horizontal, Alignment vertical)
|
||||
{
|
||||
MyGUI::Align align(MyGUI::Align::Center);
|
||||
if (horizontal == Alignment::Start)
|
||||
align |= MyGUI::Align::Left;
|
||||
if (horizontal == Alignment::End)
|
||||
align |= MyGUI::Align::Right;
|
||||
if (vertical == Alignment::Start)
|
||||
align |= MyGUI::Align::Top;
|
||||
if (vertical == Alignment::End)
|
||||
align |= MyGUI::Align::Bottom;
|
||||
return align;
|
||||
}
|
||||
}
|
|
@ -12,7 +12,19 @@ namespace LuaUi
|
|||
End = 2
|
||||
};
|
||||
|
||||
MyGUI::Align alignmentToMyGui(Alignment horizontal, Alignment vertical);
|
||||
inline MyGUI::Align alignmentToMyGui(Alignment horizontal, Alignment vertical)
|
||||
{
|
||||
MyGUI::Align align(MyGUI::Align::Center);
|
||||
if (horizontal == Alignment::Start)
|
||||
align |= MyGUI::Align::Left;
|
||||
if (horizontal == Alignment::End)
|
||||
align |= MyGUI::Align::Right;
|
||||
if (vertical == Alignment::Start)
|
||||
align |= MyGUI::Align::Top;
|
||||
if (vertical == Alignment::End)
|
||||
align |= MyGUI::Align::Bottom;
|
||||
return align;
|
||||
}
|
||||
}
|
||||
|
||||
#endif // !OPENMW_LUAUI_PROPERTIES
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue