-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #151 from Laupetin/fix/realloc-iw5-clipinfo
fix: not reallocating IW5 clipMap pInfo from temp block
- Loading branch information
Showing
9 changed files
with
136 additions
and
59 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
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
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
17 changes: 17 additions & 0 deletions
17
src/ZoneLoading/Game/IW5/XAssets/clipmap_t/clipmap_t_actions.cpp
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,17 @@ | ||
#include "clipmap_t_actions.h" | ||
|
||
#include <cassert> | ||
#include <cstring> | ||
|
||
using namespace IW5; | ||
|
||
Actions_clipMap_t::Actions_clipMap_t(Zone* zone) | ||
: AssetLoadingActions(zone) | ||
{ | ||
} | ||
|
||
void Actions_clipMap_t::ReallocClipInfo(ClipInfo* clipInfo, clipMap_t* clipMap) const | ||
{ | ||
clipMap->pInfo = static_cast<ClipInfo*>(m_zone->GetMemory()->Alloc(sizeof(ClipInfo))); | ||
memcpy(clipMap->pInfo, clipInfo, sizeof(ClipInfo)); | ||
} |
15 changes: 15 additions & 0 deletions
15
src/ZoneLoading/Game/IW5/XAssets/clipmap_t/clipmap_t_actions.h
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,15 @@ | ||
#pragma once | ||
|
||
#include "Game/IW5/IW5.h" | ||
#include "Loading/AssetLoadingActions.h" | ||
|
||
namespace IW5 | ||
{ | ||
class Actions_clipMap_t final : public AssetLoadingActions | ||
{ | ||
public: | ||
explicit Actions_clipMap_t(Zone* zone); | ||
|
||
void ReallocClipInfo(ClipInfo* clipInfo, clipMap_t* clipMap) const; | ||
}; | ||
} // namespace IW5 |
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