Converted first thing to shared pointers.

This commit is contained in:
2023-11-02 20:35:11 -05:00
parent 5547c7c236
commit 0beb1d9cb7
17 changed files with 37 additions and 67 deletions

View File

@ -78,7 +78,7 @@ namespace Dawn {
*
* @return List of assets required by this scene.
*/
virtual std::vector<Asset*> getRequiredAssets() = 0;
virtual std::vector<std::shared_ptr<Asset>> getRequiredAssets() = 0;
/**
* Method to begin the actual staging of the scene, typically called after

View File

@ -149,7 +149,7 @@ namespace Dawn {
while(transformsToCheck.size() > 0) {
Transform *tras = *transformsToCheck.begin();
vectorAppend(&transformsToCheck, tras->children);
vectorAppend(transformsToCheck, tras->children);
auto component = tras->item->getComponent<T>();
if(component != nullptr) itemsFound.push_back(component);
transformsToCheck.erase(transformsToCheck.begin());

View File

@ -17,7 +17,7 @@ namespace Dawn {
flag_t style = 0;
flag_t decorations = 0;
uint32_t size = 16;
TrueTypeAsset *font = nullptr;
std::shared_ptr<TrueTypeAsset> font;
};
struct UILabelText {

View File

@ -12,7 +12,7 @@ namespace Dawn {
// @optional
StateProperty<std::string> text;
// @optional
StateProperty<TrueTypeAsset*> font;
StateProperty<std::shared_ptr<TrueTypeAsset>> font;
// @optional
StateProperty<uint32_t> size;
// @optional