2012-09-23 22:11:08 +04:00
|
|
|
#ifndef OPENMW_ESM_LTEX_H
|
|
|
|
#define OPENMW_ESM_LTEX_H
|
2010-02-22 14:09:43 +01:00
|
|
|
|
2012-09-17 11:37:50 +04:00
|
|
|
#include <string>
|
|
|
|
|
2011-04-08 17:58:21 +04:00
|
|
|
namespace ESM
|
|
|
|
{
|
2010-02-22 14:09:43 +01:00
|
|
|
|
2012-10-01 00:51:54 +04:00
|
|
|
class ESMReader;
|
|
|
|
class ESMWriter;
|
|
|
|
|
2010-02-22 14:09:43 +01:00
|
|
|
/*
|
|
|
|
* Texture used for texturing landscape.
|
2019-03-11 15:05:43 +04:00
|
|
|
* They are indexed by 'num', but still use 'id' to override base records.
|
|
|
|
* Original editor even does not allow to create new records with existing ID's.
|
|
|
|
* TODO: currently OpenMW-CS does not allow to override LTEX records at all.
|
2010-02-22 14:09:43 +01:00
|
|
|
*/
|
|
|
|
|
2012-09-30 23:34:53 +04:00
|
|
|
struct LandTexture
|
2010-02-22 14:09:43 +01:00
|
|
|
{
|
2013-09-24 13:17:28 +02:00
|
|
|
static unsigned int sRecordId;
|
2015-06-14 02:31:00 +02:00
|
|
|
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
2021-10-12 00:18:23 +02:00
|
|
|
static std::string_view getRecordType() { return "LandTexture"; }
|
2013-09-24 13:17:28 +02:00
|
|
|
|
2017-08-25 19:51:30 -04:00
|
|
|
// mId is merely a user friendly name for the texture in the editor.
|
2012-09-30 23:34:53 +04:00
|
|
|
std::string mId, mTexture;
|
2012-09-17 11:37:50 +04:00
|
|
|
int mIndex;
|
2010-02-22 14:09:43 +01:00
|
|
|
|
2015-07-20 17:23:14 +03:00
|
|
|
void load(ESMReader &esm, bool &isDeleted);
|
|
|
|
void save(ESMWriter &esm, bool isDeleted = false) const;
|
2015-07-09 21:45:24 +03:00
|
|
|
|
2017-08-25 19:51:30 -04:00
|
|
|
/// Sets the record to the default state. Does not touch the index. Does touch mID.
|
2015-07-09 21:45:24 +03:00
|
|
|
void blank();
|
2010-02-22 14:09:43 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
#endif
|