Skip to content
This repository has been archived by the owner on Sep 5, 2020. It is now read-only.

Commit

Permalink
(#6) LookupStrings was moved to TES5File
Browse files Browse the repository at this point in the history
Modified implementation of code that required access to the
LookupStrings to use the new location, by accessing it from the parent
ModFile.

NOTE: I left some code commented for now since I don't want to lose it,
but I didn't see it used from anywhere, so I don't know yet the proper place
where to move them. I supposed the logical place should also be the game's
ModFile class.
  • Loading branch information
leandor committed Nov 3, 2016
1 parent 9e1c172 commit 1241b53
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 6 deletions.
10 changes: 10 additions & 0 deletions src/common/TES4Record.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,16 @@ void TES4Record::IsESM(bool value)
SETBIT(flags, fIsESM, value);
}

// bool TES4Record::IsLookupStrings() const
// {
// // fIsTurnOffFire = LookupStrings
// return IsLoaded() ? (flags & fIsTurnOffFire) != 0 : false;
// }

// void TES4Record::IsLookupStrings(bool value)
// {
// SETBIT(flags, fIsTurnOffFire, value);
// }

uint32_t TES4Record::GetType()
{
Expand Down
2 changes: 1 addition & 1 deletion src/game/Skyrim/Records/ACTIRecord.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ int32_t ACTIRecord::ParseRecord(unsigned char *buffer, unsigned char *end_buffer
{
uint32_t subType = 0;
uint32_t subSize = 0;
StringLookups *LookupStrings = GetParentMod()->TES4.LookupStrings;
auto LookupStrings = GetParentMod()->LookupStrings();
while(buffer < end_buffer)
{
subType = *(uint32_t *)buffer;
Expand Down
2 changes: 1 addition & 1 deletion src/game/Skyrim/Records/ALCHRecord.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ int32_t ALCHRecord::ParseRecord(unsigned char *buffer, unsigned char *end_buffer
{
uint32_t subType = 0;
uint32_t subSize = 0;
StringLookups *LookupStrings = GetParentMod()->TES4.LookupStrings;
auto LookupStrings = GetParentMod()->LookupStrings();
while(buffer < end_buffer)
{
subType = *(uint32_t *)buffer;
Expand Down
2 changes: 1 addition & 1 deletion src/game/Skyrim/Records/APPARecord.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ int32_t APPARecord::ParseRecord(unsigned char *buffer, unsigned char *end_buffer
{
uint32_t subType = 0;
uint32_t subSize = 0;
StringLookups *LookupStrings = GetParentMod()->TES4.LookupStrings;
auto LookupStrings = GetParentMod()->LookupStrings();
while(buffer < end_buffer)
{
subType = *(uint32_t *)buffer;
Expand Down
2 changes: 1 addition & 1 deletion src/game/Skyrim/Records/COLLRecord.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ int32_t COLLRecord::ParseRecord(unsigned char *buffer, unsigned char *end_buffer
{
uint32_t subType = 0;
uint32_t subSize = 0;
StringLookups *LookupStrings = GetParentMod()->TES4.LookupStrings;
auto LookupStrings = GetParentMod()->LookupStrings();
while(buffer < end_buffer)
{
subType = *(uint32_t *)buffer;
Expand Down
2 changes: 1 addition & 1 deletion src/game/Skyrim/Records/SHOURecord.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ int32_t SHOURecord::ParseRecord(unsigned char *buffer, unsigned char *end_buffer
{
uint32_t subType = 0;
uint32_t subSize = 0;
StringLookups *LookupStrings = GetParentMod()->TES4.LookupStrings;
auto LookupStrings = GetParentMod()->LookupStrings();
while(buffer < end_buffer)
{
subType = *(uint32_t *)buffer;
Expand Down
2 changes: 1 addition & 1 deletion src/game/Skyrim/Records/WOOPRecord.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ int32_t WOOPRecord::ParseRecord(unsigned char *buffer, unsigned char *end_buffer
{
uint32_t subType = 0;
uint32_t subSize = 0;
StringLookups *LookupStrings = GetParentMod()->TES4.LookupStrings;
auto LookupStrings = GetParentMod()->LookupStrings();
while(buffer < end_buffer)
{
subType = *(uint32_t *)buffer;
Expand Down

0 comments on commit 1241b53

Please sign in to comment.