-
-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5815d9d
commit e15fb20
Showing
9 changed files
with
197 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#pragma once | ||
#include "RecordHeader.h" | ||
|
||
#pragma pack(push, 1) | ||
|
||
namespace espm { | ||
|
||
class SHOU final : public RecordHeader | ||
{ | ||
public: | ||
static constexpr auto kType = "SHOU"; | ||
|
||
struct Data | ||
{ | ||
// Assuming similar structure to SLGM for now | ||
float weight; | ||
}; | ||
|
||
Data GetData(CompressedFieldsCache& compressedFieldsCache) const; | ||
}; | ||
|
||
static_assert(sizeof(SHOU) == sizeof(RecordHeader)); | ||
|
||
} | ||
|
||
#pragma pack(pop) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#pragma once | ||
#include "RecordHeader.h" | ||
|
||
#pragma pack(push, 1) | ||
|
||
namespace espm { | ||
|
||
class WOOP final : public RecordHeader | ||
{ | ||
public: | ||
static constexpr auto kType = "WOOP"; | ||
|
||
struct Data | ||
{ | ||
// Assuming similar structure to SLGM for now | ||
float weight; | ||
}; | ||
|
||
Data GetData(CompressedFieldsCache& compressedFieldsCache) const; | ||
}; | ||
|
||
static_assert(sizeof(WOOP) == sizeof(RecordHeader)); | ||
|
||
} | ||
|
||
#pragma pack(pop) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#pragma once | ||
#include "RecordHeader.h" | ||
|
||
#pragma pack(push, 1) | ||
|
||
namespace espm { | ||
|
||
class WTHR final : public RecordHeader | ||
{ | ||
public: | ||
static constexpr auto kType = "WTHR"; | ||
|
||
struct Data | ||
{ | ||
// Assuming similar structure to SLGM for now | ||
float weight; | ||
}; | ||
|
||
Data GetData(CompressedFieldsCache& compressedFieldsCache) const; | ||
}; | ||
|
||
static_assert(sizeof(WTHR) == sizeof(RecordHeader)); | ||
|
||
} | ||
|
||
#pragma pack(pop) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include "libespm/SHOU.h" | ||
#include "libespm/CompressedFieldsCache.h" | ||
#include "libespm/RecordHeaderAccess.h" | ||
|
||
namespace espm { | ||
|
||
SHOU::Data SHOU::GetData(CompressedFieldsCache& cache) const | ||
{ | ||
Data res; | ||
RecordHeaderAccess::IterateFields( | ||
this, | ||
[&](const char* type, uint32_t size, const char* data) { | ||
if (!std::memcmp(type, "DATA", 4)) { | ||
res.weight = *reinterpret_cast<const float*>(data + 0x4); | ||
} | ||
}, | ||
cache); | ||
return res; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include "libespm/WOOP.h" | ||
#include "libespm/CompressedFieldsCache.h" | ||
#include "libespm/RecordHeaderAccess.h" | ||
|
||
namespace espm { | ||
|
||
WOOP::Data WOOP::GetData(CompressedFieldsCache& cache) const | ||
{ | ||
Data res; | ||
RecordHeaderAccess::IterateFields( | ||
this, | ||
[&](const char* type, uint32_t size, const char* data) { | ||
if (!std::memcmp(type, "DATA", 4)) { | ||
res.weight = *reinterpret_cast<const float*>(data + 0x4); | ||
} | ||
}, | ||
cache); | ||
return res; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include "libespm/WTHR.h" | ||
#include "libespm/CompressedFieldsCache.h" | ||
#include "libespm/RecordHeaderAccess.h" | ||
|
||
namespace espm { | ||
|
||
WTHR::Data WTHR::GetData(CompressedFieldsCache& cache) const | ||
{ | ||
Data res; | ||
RecordHeaderAccess::IterateFields( | ||
this, | ||
[&](const char* type, uint32_t size, const char* data) { | ||
if (!std::memcmp(type, "DATA", 4)) { | ||
res.weight = *reinterpret_cast<const float*>(data + 0x4); | ||
} | ||
}, | ||
cache); | ||
return res; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters