mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-31 17:26:38 +00:00 
			
		
		
		
	Fixed some types removed useless header applied clang format fixed compile tests fixed clang tidy, and closer to logic before this MR Removed hardcoded refids unless there is a returned value we don't use static RefIds can use == between RefId and hardcoded string Fix clang format Fixed a few instances where std::string was used, when only const std::string& was needed removed unused variable
		
			
				
	
	
		
			45 lines
		
	
	
	
		
			1.3 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			45 lines
		
	
	
	
		
			1.3 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
| #ifndef OPENMW_ESM_STAT_H
 | |
| #define OPENMW_ESM_STAT_H
 | |
| 
 | |
| #include <string>
 | |
| 
 | |
| #include "components/esm/defs.hpp"
 | |
| #include "components/esm/refid.hpp"
 | |
| 
 | |
| namespace ESM
 | |
| {
 | |
| 
 | |
|     class ESMReader;
 | |
|     class ESMWriter;
 | |
| 
 | |
|     /*
 | |
|      * Definition of static object.
 | |
|      *
 | |
|      * A stat record is basically just a reference to a nif file. Some
 | |
|      * esps seem to contain copies of the STAT entries from the esms, and
 | |
|      * the esms themselves contain several identical entries. Perhaps all
 | |
|      * statics referenced in a file is also put in the file? Since we are
 | |
|      * only reading files it doesn't much matter to us, but it would if we
 | |
|      * were writing our own ESM/ESPs. You can check some files later when
 | |
|      * you decode the CELL blocks, if you want to test this hypothesis.
 | |
|      */
 | |
| 
 | |
|     struct Static
 | |
|     {
 | |
|         constexpr static RecNameInts sRecordId = REC_STAT;
 | |
| 
 | |
|         /// Return a string descriptor for this record type. Currently used for debugging / error logs only.
 | |
|         static std::string_view getRecordType() { return "Static"; }
 | |
| 
 | |
|         unsigned int mRecordFlags;
 | |
|         RefId mId;
 | |
|         std::string mModel;
 | |
| 
 | |
|         void load(ESMReader& esm, bool& isDeleted);
 | |
|         void save(ESMWriter& esm, bool isDeleted = false) const;
 | |
| 
 | |
|         void blank();
 | |
|         ///< Set record to default state (does not touch the ID).
 | |
|     };
 | |
| }
 | |
| #endif
 |