mirror of https://github.com/zeldaret/botw.git
move ForestRenderer and ClusteredRenderer
This commit is contained in:
parent
4cba2eb093
commit
b74df64276
|
@ -73900,9 +73900,9 @@
|
||||||
0x0000007100d4e310,sub_7100D4E310,28,_ZN4ksys3map10ObjectLink14sub_7100D4E310ENS0_14MapLinkDefTypeE?
|
0x0000007100d4e310,sub_7100D4E310,28,_ZN4ksys3map10ObjectLink14sub_7100D4E310ENS0_14MapLinkDefTypeE?
|
||||||
0x0000007100d4e32c,isPlacementLODOrForSaleLink,24,_ZN4ksys3map10ObjectLink27isPlacementLODOrForSaleLinkENS0_14MapLinkDefTypeE
|
0x0000007100d4e32c,isPlacementLODOrForSaleLink,24,_ZN4ksys3map10ObjectLink27isPlacementLODOrForSaleLinkENS0_14MapLinkDefTypeE
|
||||||
0x0000007100d4e344,PlacementLinkData::ctor,44,_ZN4ksys3map14ObjectLinkDataC1Ev
|
0x0000007100d4e344,PlacementLinkData::ctor,44,_ZN4ksys3map14ObjectLinkDataC1Ev
|
||||||
0x0000007100d4e370,PlacementLinkData::deleteArrays,136,_ZN4ksys3map14ObjectLinkData12deleteArraysEv!
|
0x0000007100d4e370,PlacementLinkData::deleteArrays,136,_ZN4ksys3map14ObjectLinkData12deleteArraysEv
|
||||||
0x0000007100d4e3f8,PlacementLinkData::allocLinks,556,
|
0x0000007100d4e3f8,PlacementLinkData::allocLinks,556,
|
||||||
0x0000007100d4e624,PlacementLinkData::allocLinksToSelf,212,_ZN4ksys3map14ObjectLinkData16allocLinksToSelfEiPN4sead4HeapE!
|
0x0000007100d4e624,PlacementLinkData::allocLinksToSelf,212,_ZN4ksys3map14ObjectLinkData16allocLinksToSelfEiPN4sead4HeapE
|
||||||
0x0000007100d4e6f8,PlacementLinkData::dtor,292,
|
0x0000007100d4e6f8,PlacementLinkData::dtor,292,
|
||||||
0x0000007100d4e81c,PlacementObj::x,256,
|
0x0000007100d4e81c,PlacementObj::x,256,
|
||||||
0x0000007100d4e91c,PlacementLinkData::addLink,440,
|
0x0000007100d4e91c,PlacementLinkData::addLink,440,
|
||||||
|
|
Can't render this file because it is too large.
|
|
@ -86,6 +86,8 @@ target_sources(uking PRIVATE
|
||||||
actBaseProcMgr.h
|
actBaseProcMgr.h
|
||||||
actBaseProcUnit.cpp
|
actBaseProcUnit.cpp
|
||||||
actBaseProcUnit.h
|
actBaseProcUnit.h
|
||||||
|
actClusteredRenderer.cpp
|
||||||
|
actClusteredRenderer.h
|
||||||
actDebug.cpp
|
actDebug.cpp
|
||||||
actDebug.h
|
actDebug.h
|
||||||
actGlobalParameter.cpp
|
actGlobalParameter.cpp
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
#include "KingSystem/ActorSystem/actClusteredRenderer.h"
|
|
@ -1,10 +1,10 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
namespace ksys::map {
|
namespace ksys::act {
|
||||||
|
|
||||||
class ClusteredRenderer {
|
class ClusteredRenderer {
|
||||||
public:
|
public:
|
||||||
void startThread();
|
void startThread();
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace ksys::map
|
} // namespace ksys::act
|
|
@ -9,6 +9,7 @@ add_subdirectory(Ecosystem)
|
||||||
add_subdirectory(Effect)
|
add_subdirectory(Effect)
|
||||||
add_subdirectory(Event)
|
add_subdirectory(Event)
|
||||||
add_subdirectory(Framework)
|
add_subdirectory(Framework)
|
||||||
|
add_subdirectory(Graphics)
|
||||||
add_subdirectory(Map)
|
add_subdirectory(Map)
|
||||||
add_subdirectory(Mii)
|
add_subdirectory(Mii)
|
||||||
add_subdirectory(Physics)
|
add_subdirectory(Physics)
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
target_sources(uking PRIVATE
|
||||||
|
gfxForestRenderer.cpp
|
||||||
|
gfxForestRenderer.h
|
||||||
|
)
|
|
@ -0,0 +1 @@
|
||||||
|
#include "KingSystem/Graphics/gfxForestRenderer.h"
|
|
@ -0,0 +1,12 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <math/seadVector.h>
|
||||||
|
|
||||||
|
namespace ksys::gfx {
|
||||||
|
|
||||||
|
class ForestRenderer {
|
||||||
|
public:
|
||||||
|
s32 x_7(const sead::Vector3f& vec);
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace ksys::gfx
|
|
@ -1,6 +1,4 @@
|
||||||
target_sources(uking PRIVATE
|
target_sources(uking PRIVATE
|
||||||
mapClusteredRenderer.cpp
|
|
||||||
mapClusteredRenderer.h
|
|
||||||
mapTypes.h
|
mapTypes.h
|
||||||
mapDebug.cpp
|
mapDebug.cpp
|
||||||
mapDebug.h
|
mapDebug.h
|
||||||
|
@ -18,6 +16,8 @@ target_sources(uking PRIVATE
|
||||||
mapPlacementMgr.h
|
mapPlacementMgr.h
|
||||||
mapPlacementTree.cpp
|
mapPlacementTree.cpp
|
||||||
mapPlacementTree.h
|
mapPlacementTree.h
|
||||||
|
mapRail.cpp
|
||||||
|
mapRail.h
|
||||||
mapStagePreActorCache.cpp
|
mapStagePreActorCache.cpp
|
||||||
mapStagePreActorCache.h
|
mapStagePreActorCache.h
|
||||||
)
|
)
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
#include "KingSystem/Map/mapClusteredRenderer.h"
|
|
|
@ -2,6 +2,7 @@
|
||||||
#include "KingSystem/ActorSystem/actBaseProcMgr.h"
|
#include "KingSystem/ActorSystem/actBaseProcMgr.h"
|
||||||
#include "KingSystem/ActorSystem/actInfoData.h"
|
#include "KingSystem/ActorSystem/actInfoData.h"
|
||||||
#include "KingSystem/GameData/gdtManager.h"
|
#include "KingSystem/GameData/gdtManager.h"
|
||||||
|
#include "KingSystem/Graphics/gfxForestRenderer.h"
|
||||||
#include "KingSystem/Map/mapObjectLink.h"
|
#include "KingSystem/Map/mapObjectLink.h"
|
||||||
#include "KingSystem/Map/mapPlacementMgr.h"
|
#include "KingSystem/Map/mapPlacementMgr.h"
|
||||||
#include "KingSystem/Map/mapStagePreActorCache.h"
|
#include "KingSystem/Map/mapStagePreActorCache.h"
|
||||||
|
@ -430,7 +431,7 @@ bool Object::setupTargetLinks(Object* src, ObjectLink* link, sead::Heap* heap) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mLinkData->mLinksToSelf.links != nullptr)
|
if (mLinkData->mLinksToSelf.links.isBufferReady())
|
||||||
return mLinkData->sub_7100D4EC40(src, link, this);
|
return mLinkData->sub_7100D4EC40(src, link, this);
|
||||||
|
|
||||||
if (!mLinkData->allocLinksToSelf(mNumLinksPointingToMe, heap))
|
if (!mLinkData->allocLinksToSelf(mNumLinksPointingToMe, heap))
|
||||||
|
@ -498,7 +499,7 @@ void* Object::getRails() const {
|
||||||
void* Object::getRails_0() const {
|
void* Object::getRails_0() const {
|
||||||
if (mLinkData == nullptr)
|
if (mLinkData == nullptr)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
return mLinkData->mRails;
|
return mLinkData->mRail;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Object::allocLinkData(sead::Heap* heap) {
|
bool Object::allocLinkData(sead::Heap* heap) {
|
||||||
|
|
|
@ -138,44 +138,24 @@ bool ObjectLink::getObjectProcWithAccessor(act::ActorLinkConstDataAccess& access
|
||||||
ObjectLinkData::ObjectLinkData() = default;
|
ObjectLinkData::ObjectLinkData() = default;
|
||||||
|
|
||||||
void ObjectLinkData::deleteArrays() {
|
void ObjectLinkData::deleteArrays() {
|
||||||
if (mRails) {
|
if (mRail) {
|
||||||
delete mRails;
|
delete mRail;
|
||||||
mRails = nullptr;
|
mRail = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mLinksOther.links) {
|
mLinksOther.links.freeBuffer();
|
||||||
delete mLinksOther.links;
|
mLinksCs.links.freeBuffer();
|
||||||
mLinksOther.links = nullptr;
|
mObjects.freeBuffer();
|
||||||
mLinksOther.num_links = 0;
|
mLinksToSelf.links.freeBuffer();
|
||||||
}
|
|
||||||
|
|
||||||
if (mLinksCs.links) {
|
|
||||||
delete mLinksCs.links;
|
|
||||||
mLinksCs.links = nullptr;
|
|
||||||
mLinksCs.num_links = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mLinksReference) {
|
|
||||||
delete mLinksReference;
|
|
||||||
mLinksReference = nullptr;
|
|
||||||
mNumLinksReference = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mLinksToSelf.links) {
|
|
||||||
delete mLinksToSelf.links;
|
|
||||||
mLinksToSelf.links = nullptr;
|
|
||||||
mLinksToSelf.num_links = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ObjectLinkData::allocLinksToSelf(s32 num_links, sead::Heap* heap) {
|
bool ObjectLinkData::allocLinksToSelf(s32 num_links, sead::Heap* heap) {
|
||||||
if (num_links < 1)
|
if (num_links >= 1) {
|
||||||
return true;
|
mLinksToSelf.links.tryAllocBuffer(num_links, heap);
|
||||||
|
if (!mLinksToSelf.links.isBufferReady())
|
||||||
mLinksToSelf.links = new (heap, std::nothrow_t()) ObjectLink[num_links]();
|
return false;
|
||||||
mLinksToSelf.num_links = num_links;
|
}
|
||||||
|
return true;
|
||||||
return mLinksToSelf.links != nullptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ObjectLink* ObjectLinkData::findLinkWithType(MapLinkDefType t) {
|
ObjectLink* ObjectLinkData::findLinkWithType(MapLinkDefType t) {
|
||||||
|
@ -241,7 +221,7 @@ ObjectLink* ObjectLinkArray::findLinkWithType(MapLinkDefType type) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ObjectLink* ObjectLinkArray::findLinkWithType_0(MapLinkDefType type) {
|
ObjectLink* ObjectLinkArray::findLinkWithType_0(MapLinkDefType type) {
|
||||||
for (int i = 0; i != num_links; ++i) {
|
for (int i = 0; i < links.size(); ++i) {
|
||||||
if (links[i].type == type)
|
if (links[i].type == type)
|
||||||
return &links[i];
|
return &links[i];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <basis/seadTypes.h>
|
#include <basis/seadTypes.h>
|
||||||
|
#include <container/seadBuffer.h>
|
||||||
#include "KingSystem/Map/mapMubinIter.h"
|
#include "KingSystem/Map/mapMubinIter.h"
|
||||||
#include "KingSystem/Utils/Types.h"
|
#include "KingSystem/Utils/Types.h"
|
||||||
|
|
||||||
|
@ -13,6 +14,7 @@ namespace ksys::map {
|
||||||
|
|
||||||
class GenGroup;
|
class GenGroup;
|
||||||
class Object;
|
class Object;
|
||||||
|
class Rail;
|
||||||
|
|
||||||
enum class MapLinkDefType {
|
enum class MapLinkDefType {
|
||||||
BasicSig = 0,
|
BasicSig = 0,
|
||||||
|
@ -61,6 +63,7 @@ enum class MapLinkDefType {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ObjectLink {
|
struct ObjectLink {
|
||||||
|
~ObjectLink() {}
|
||||||
act::Actor* getObjectActor() const;
|
act::Actor* getObjectActor() const;
|
||||||
bool getObjectProcWithAccessor(act::ActorLinkConstDataAccess& accessor) const;
|
bool getObjectProcWithAccessor(act::ActorLinkConstDataAccess& accessor) const;
|
||||||
const char* getDescription() const;
|
const char* getDescription() const;
|
||||||
|
@ -81,8 +84,7 @@ struct ObjectLinkArray {
|
||||||
ObjectLink* findLinkWithType(MapLinkDefType type);
|
ObjectLink* findLinkWithType(MapLinkDefType type);
|
||||||
ObjectLink* findLinkWithType_0(MapLinkDefType type);
|
ObjectLink* findLinkWithType_0(MapLinkDefType type);
|
||||||
|
|
||||||
s32 num_links = 0;
|
sead::Buffer<ObjectLink> links;
|
||||||
ObjectLink* links = nullptr;
|
|
||||||
};
|
};
|
||||||
KSYS_CHECK_SIZE_NX150(ObjectLinkArray, 0x10);
|
KSYS_CHECK_SIZE_NX150(ObjectLinkArray, 0x10);
|
||||||
|
|
||||||
|
@ -112,9 +114,8 @@ public:
|
||||||
|
|
||||||
Object* mCreateLinksSrcObj = nullptr;
|
Object* mCreateLinksSrcObj = nullptr;
|
||||||
Object* mDeleteLinksSrcObj = nullptr;
|
Object* mDeleteLinksSrcObj = nullptr;
|
||||||
u32 mNumLinksReference = 0;
|
|
||||||
|
|
||||||
void* mLinksReference = nullptr;
|
sead::Buffer<Object*> mObjects;
|
||||||
ObjectLinkArray mLinksOther{};
|
ObjectLinkArray mLinksOther{};
|
||||||
ObjectLinkArray mLinksCs{};
|
ObjectLinkArray mLinksCs{};
|
||||||
ObjectLinkArray mLinksToSelf{};
|
ObjectLinkArray mLinksToSelf{};
|
||||||
|
@ -126,7 +127,7 @@ public:
|
||||||
bool field_57 = false;
|
bool field_57 = false;
|
||||||
|
|
||||||
GenGroup* mGenGroup = nullptr;
|
GenGroup* mGenGroup = nullptr;
|
||||||
void* mRails = nullptr;
|
Rail* mRail = nullptr;
|
||||||
};
|
};
|
||||||
KSYS_CHECK_SIZE_NX150(ObjectLinkData, 0x68);
|
KSYS_CHECK_SIZE_NX150(ObjectLinkData, 0x68);
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
#include "KingSystem/Map/mapPlacementMgr.h"
|
#include "KingSystem/Map/mapPlacementMgr.h"
|
||||||
#include <thread/seadThreadUtil.h>
|
#include <thread/seadThreadUtil.h>
|
||||||
#include "KingSystem/ActorSystem/actActorCreator.h"
|
#include "KingSystem/ActorSystem/actActorCreator.h"
|
||||||
|
#include "KingSystem/ActorSystem/actClusteredRenderer.h"
|
||||||
#include "KingSystem/ActorSystem/actInfoData.h"
|
#include "KingSystem/ActorSystem/actInfoData.h"
|
||||||
#include "KingSystem/ActorSystem/actInstParamPack.h"
|
#include "KingSystem/ActorSystem/actInstParamPack.h"
|
||||||
#include "KingSystem/Map/mapClusteredRenderer.h"
|
|
||||||
#include "KingSystem/Map/mapObject.h"
|
#include "KingSystem/Map/mapObject.h"
|
||||||
#include "KingSystem/Map/mapPlacementActors.h"
|
#include "KingSystem/Map/mapPlacementActors.h"
|
||||||
#include "KingSystem/Map/mapPlacementTree.h"
|
#include "KingSystem/Map/mapPlacementTree.h"
|
||||||
|
|
|
@ -7,12 +7,12 @@
|
||||||
#include "KingSystem/ActorSystem/actActor.h"
|
#include "KingSystem/ActorSystem/actActor.h"
|
||||||
|
|
||||||
namespace ksys::act {
|
namespace ksys::act {
|
||||||
|
class ClusteredRenderer;
|
||||||
class InstParamPack;
|
class InstParamPack;
|
||||||
}
|
} // namespace ksys::act
|
||||||
|
|
||||||
namespace ksys::map {
|
namespace ksys::map {
|
||||||
|
|
||||||
class ClusteredRenderer;
|
|
||||||
class Object;
|
class Object;
|
||||||
class PlacementTree;
|
class PlacementTree;
|
||||||
class PlacementActors;
|
class PlacementActors;
|
||||||
|
@ -131,7 +131,7 @@ public:
|
||||||
PlacementTree* mPlacementTree = nullptr;
|
PlacementTree* mPlacementTree = nullptr;
|
||||||
u32 _7a8;
|
u32 _7a8;
|
||||||
void* mMassRenderer = nullptr;
|
void* mMassRenderer = nullptr;
|
||||||
ClusteredRenderer* mClusteredRenderer = nullptr;
|
act::ClusteredRenderer* mClusteredRenderer = nullptr;
|
||||||
void* mPlacementNavi = nullptr;
|
void* mPlacementNavi = nullptr;
|
||||||
u32 mMassRendererReqCount = 0;
|
u32 mMassRendererReqCount = 0;
|
||||||
u32 mMassRendererStatus = 0;
|
u32 mMassRendererStatus = 0;
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
#include "KingSystem/Map/mapRail.h"
|
|
@ -0,0 +1,7 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace ksys::map {
|
||||||
|
|
||||||
|
class Rail {};
|
||||||
|
|
||||||
|
} // namespace ksys::map
|
|
@ -3,12 +3,11 @@
|
||||||
#include <heap/seadDisposer.h>
|
#include <heap/seadDisposer.h>
|
||||||
#include <math/seadVector.h>
|
#include <math/seadVector.h>
|
||||||
|
|
||||||
namespace ksys::map {
|
namespace ksys::gfx {
|
||||||
|
class ForestRenderer;
|
||||||
|
}
|
||||||
|
|
||||||
class ForestRenderer {
|
namespace ksys::map {
|
||||||
public:
|
|
||||||
s32 x_7(const sead::Vector3f& vec);
|
|
||||||
};
|
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
class StagePreActorCache {
|
class StagePreActorCache {
|
||||||
|
@ -19,7 +18,7 @@ public:
|
||||||
auto* getForestRenderer() { return mForestRenderer; }
|
auto* getForestRenderer() { return mForestRenderer; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ForestRenderer* mForestRenderer;
|
gfx::ForestRenderer* mForestRenderer;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace ksys::map
|
} // namespace ksys::map
|
||||||
|
|
Loading…
Reference in New Issue