forked from zappatic/Spelunky2X64DbgPlugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add OnHeapPointer, EntityFactory, separate LiquidPhysics to it's own …
…window, some more GameAPI stuff
- Loading branch information
Showing
10 changed files
with
264 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#pragma once | ||
|
||
#include "Configuration.h" | ||
#include "QtHelpers/TreeViewMemoryFields.h" | ||
#include "Spelunky2.h" | ||
#include "ViewStruct.h" | ||
#include <QSize> | ||
#include <QWidget> | ||
|
||
namespace S2Plugin | ||
{ | ||
class ViewEntityFactory : public ViewStruct | ||
{ | ||
public: | ||
explicit ViewEntityFactory(QWidget* parent = nullptr) : ViewStruct(0, {}, "Entity Factory", parent) | ||
{ | ||
auto config = Configuration::get(); | ||
MemoryField dummy; | ||
dummy.type = MemoryFieldType::Dummy; | ||
dummy.name = "EntityDB here"; | ||
auto& entityDB = Spelunky2::get()->get_EntityDB(); | ||
auto address = entityDB.addressOfIndex(0); | ||
mMainTreeView->addMemoryField(dummy, {}, address, 0); | ||
auto offset = entityDB.entitySize() * (config->entityList().highestID() + 2); // +2 for the id 0 and one extra slot at the end | ||
mMainTreeView->addMemoryFields(config->typeFields(MemoryFieldType::EntityFactory), "EntityFactory", address + offset, offset); | ||
} | ||
|
||
protected: | ||
QSize sizeHint() const override | ||
{ | ||
return QSize(750, 200); | ||
} | ||
}; | ||
} // namespace S2Plugin |
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
Oops, something went wrong.