-
Notifications
You must be signed in to change notification settings - Fork 4
Level Editor, DvScene Editor, Debug Rendering and GOCPlayerBlackboard additions #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Ashrindy
wants to merge
28
commits into
HE2-SDK:main
Choose a base branch
from
Ashrindy:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
6eca7d7
rangers: Add an inspector for GOCHsm2
Ashrindy b3d103b
Merge branch 'HE2-SDK:main' into main
Ashrindy 9ad5574
Level Editor: Add support for unparenting objects
Ashrindy a2248e0
DvScene Editor: Fix for gizmo being broken on DvElements
Ashrindy a682a89
DvScene Editor: Small bug fix for DvNodeElement creation
Ashrindy bbb8d16
[miller] Add a basic GOCPlayerBlackboard inspector
Ashrindy de03209
[rangers] Update BossGiant inspector
Ashrindy c7c003c
[rangers] Add a GOCMeshCollider debug renderer
Ashrindy f5dbc75
Add RecastNavigation for NavMesh
Ashrindy c751e62
[rangers] Added NavMesh Debug Rendering (WIP)
Ashrindy bbc9b1e
[Level Editor] Add an option to Export All layers (#26) & (#42)
Ashrindy cbe778c
[DvScene Editor] Uses new overrides instead of manual Alloc functions
Ashrindy 7dc25ea
[DvScene Editor] DvNodeBaseAnimationModel now show an AABB visual
Ashrindy e16817f
[DvScene Editor] Trying to play an inexisting cutscene won't softlock…
Ashrindy c16eba6
[SurfRide Editor] Add the option to add layers, edit layer names
Ashrindy 2ae47fd
Update several editors to sdks
Ashrindy 25ec570
[Object Inspection] Add Boss, Health and HitStop GOC inspectors
Ashrindy 9929f19
[ResVibrationEditor] Remove manual alloc functions
Ashrindy 8d66c22
[ResObjectWorldEditor] Made object name editable
Ashrindy 8989623
[Level Editor] Added an option to objects context menu to delete
Ashrindy 0ab3ec5
[DvScene Editor] Memory leak fix (now actually free's the parsed scene)
Ashrindy 42ec662
[PointcloudModel Editor] Instances now update in realtime when moving…
Ashrindy d9673fd
[ResVibrationEditor] Update editor to newest ucsl
Ashrindy cb88270
[DvScene Editor] Fixed Level checker
Ashrindy 422320c
[ResVibrationEditor] Updated the ImPlotLine
Ashrindy eb70187
[ResVibrationEditor] Remove unnecessary line
Ashrindy ff7cd0d
[PointCloud Editor] Miller fix
Ashrindy 3c8a262
Update DvNode and BossGiant to newer sdk
Ashrindy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
Submodule miller-sdk
updated
from f6e351 to 93647c
Submodule rangers-sdk
updated
from 3d7d09 to 712574
Submodule wars-sdk
updated
from 87e02e to 2c4549
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,72 @@ | ||
| #ifdef DEVTOOLS_TARGET_SDK_rangers | ||
| #include "NavMesh.h" | ||
| #include <DetourNavMesh.h> | ||
|
|
||
| namespace devtools::debug_rendering::renderables { | ||
| void NavMesh::RenderIngameDebugVisuals(hh::gfnd::DrawContext& ctx) | ||
| { | ||
| if (!enabled) | ||
| return; | ||
|
|
||
| auto* gameManager = hh::game::GameManager::GetInstance(); | ||
| if (!gameManager) | ||
| return; | ||
|
|
||
| if (auto* navmeshMgr = gameManager->GetService<hh::navmesh::NavMeshManager>()) { | ||
| auto impl = navmeshMgr->implementation; | ||
| for (auto& tile : impl->tiles) { | ||
| auto* resTile = tile.resTile; | ||
| char* binaryData = (char*)resTile->unpackedBinaryData; | ||
|
|
||
| unsigned char* vandData = (unsigned char*)&binaryData[0x18]; | ||
| int vandSize = static_cast<int>(resTile->size - 0x18); | ||
|
|
||
| dtMeshHeader* header = reinterpret_cast<dtMeshHeader*>(vandData); | ||
| if (header->magic != DT_NAVMESH_MAGIC || header->version != DT_NAVMESH_VERSION) | ||
| continue; | ||
|
|
||
| float* verts = (float*)(vandData + sizeof(dtMeshHeader)); | ||
| dtPoly* polys = (dtPoly*)((unsigned char*)verts + sizeof(float) * header->vertCount * 3); | ||
| dtLink* links = (dtLink*)((unsigned char*)polys + sizeof(dtPoly) * header->polyCount); | ||
| dtPolyDetail* details = (dtPolyDetail*)((unsigned char*)links + (sizeof(dtLink) + 4) * header->maxLinkCount); | ||
| float* detailVerts = (float*)((unsigned char*)details + sizeof(dtPolyDetail) * header->detailMeshCount); | ||
| unsigned char* detailTris = (unsigned char*)(detailVerts + header->detailVertCount * 3); | ||
|
|
||
| auto* allocator = hh::fnd::MemoryRouter::GetModuleAllocator(); | ||
| csl::ut::MoveArray<hh::gfnd::DrawVertex> objVerts{ allocator }; | ||
| csl::ut::MoveArray<unsigned short> objIndices{ allocator }; | ||
|
|
||
| for (int i = 0; i < header->polyCount; ++i) { | ||
| const dtPoly& poly = polys[i]; | ||
| const dtPolyDetail& detail = details[i]; | ||
|
|
||
| for (int j = 0; j < detail.triCount; ++j) { | ||
| const unsigned char* tri = &detailTris[(detail.triBase + j) * 4]; | ||
|
|
||
| for (int k = 0; k < 3; ++k) { | ||
| int index = tri[k]; | ||
| const float* v = nullptr; | ||
|
|
||
| if (index < poly.vertCount) | ||
| v = &verts[poly.verts[index] * 3]; | ||
| else | ||
| v = &detailVerts[(detail.vertBase + (index - poly.vertCount)) * 3]; | ||
|
|
||
| size_t base = objVerts.size(); | ||
| objVerts.push_back(hh::gfnd::DrawVertex{ | ||
| .x = v[0], | ||
| .y = v[1], | ||
| .z = v[2], | ||
| .color = 0x6400FF00 | ||
| }); | ||
| objIndices.push_back(base - 1); | ||
| } | ||
| } | ||
| } | ||
|
|
||
| ctx.DrawPrimitive(hh::gfnd::PrimitiveType::LINE_STRIP, objVerts.begin(), objIndices.begin(), objIndices.size()); | ||
| } | ||
| } | ||
| } | ||
| } | ||
| #endif |
This file contains hidden or 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,11 @@ | ||
| #pragma once | ||
| #include <debug-rendering/DebugRenderable.h> | ||
|
|
||
| namespace devtools::debug_rendering::renderables { | ||
| class NavMesh : public OptionalDebugRenderable { | ||
| public: | ||
| bool enabled{}; | ||
|
|
||
| virtual void RenderIngameDebugVisuals(hh::gfnd::DrawContext& ctx) override; | ||
| }; | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| #pragma once | ||
|
|
||
| bool Editor(const char* label, hh::game::ObjectTransformData& obj); | ||
| bool Editor(const char* label, hh::game::ObjectData& obj); | ||
| bool Editor(const char* label, hh::game::ObjectData& obj, hh::game::ResObjectWorld* objectWorld = nullptr); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.