summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLéo Lam <leo@leolam.fr>2021-04-23 19:45:14 +0200
committerLéo Lam <leo@leolam.fr>2021-04-23 19:45:14 +0200
commitc6630576bb64050852c3bef061ae815caab2aecb (patch)
treeff2758b3e6b6197318071dcb2a8b48ee32e2cc3a /src
parent97e9bad1af76c4acabb8a33404944ac1bc3d707a (diff)
Simplify agl::utl::IParameterObj::applyResParameterObj calls
Diffstat (limited to 'src')
-rw-r--r--src/KingSystem/Chemical/chmRoot.cpp2
-rw-r--r--src/KingSystem/Physics/Cloth/physClothParam.cpp2
-rw-r--r--src/KingSystem/Physics/RigidBody/physRigidBodyParam.cpp2
-rw-r--r--src/KingSystem/Physics/RigidBody/physRigidBodySetParam.cpp2
-rw-r--r--src/KingSystem/Physics/System/physCharacterControllerParam.cpp4
-rw-r--r--src/KingSystem/Physics/System/physContactInfoParam.cpp2
-rw-r--r--src/KingSystem/Physics/System/physShapeParam.cpp4
-rw-r--r--src/KingSystem/Resource/resResourceDrop.cpp4
-rw-r--r--src/KingSystem/Resource/resResourceLifeCondition.cpp10
-rw-r--r--src/KingSystem/Resource/resResourceRecipe.cpp4
-rw-r--r--src/KingSystem/Resource/resResourceShop.cpp4
11 files changed, 20 insertions, 20 deletions
diff --git a/src/KingSystem/Chemical/chmRoot.cpp b/src/KingSystem/Chemical/chmRoot.cpp
index f0ccc1d8..025a91e1 100644
--- a/src/KingSystem/Chemical/chmRoot.cpp
+++ b/src/KingSystem/Chemical/chmRoot.cpp
@@ -14,7 +14,7 @@ Root::~Root() {
void Root::parse(const agl::utl::ResParameterList& res_list, sead::Heap* heap) {
const auto header_obj = agl::utl::getResParameterObj(res_list, "chemical_header");
- chemical_header.applyResParameterObj(header_obj, nullptr);
+ chemical_header.applyResParameterObj(header_obj);
if (res_shape_num.ref() != 0) {
shapes.allocBufferAssert(res_shape_num.ref(), heap);
diff --git a/src/KingSystem/Physics/Cloth/physClothParam.cpp b/src/KingSystem/Physics/Cloth/physClothParam.cpp
index f8ec69aa..79acffb6 100644
--- a/src/KingSystem/Physics/Cloth/physClothParam.cpp
+++ b/src/KingSystem/Physics/Cloth/physClothParam.cpp
@@ -17,7 +17,7 @@ bool ClothSetParam::parse(const agl::utl::ResParameterList& res_list, sead::Heap
if (!res_list)
return false;
- cloth_header_obj.applyResParameterObj(res_list.getResParameterObj(0), nullptr);
+ cloth_header_obj.applyResParameterObj(res_list.getResParameterObj(0));
const int num_cloths = cloth_num.ref();
if (num_cloths <= 0)
diff --git a/src/KingSystem/Physics/RigidBody/physRigidBodyParam.cpp b/src/KingSystem/Physics/RigidBody/physRigidBodyParam.cpp
index 78b63c36..d506436a 100644
--- a/src/KingSystem/Physics/RigidBody/physRigidBodyParam.cpp
+++ b/src/KingSystem/Physics/RigidBody/physRigidBodyParam.cpp
@@ -50,7 +50,7 @@ bool RigidBodyParam::parse(const agl::utl::ResParameterList& res_list, sead::Hea
if (!res_list)
return false;
- info.applyResParameterObj(res_list.getResParameterObj(0), nullptr);
+ info.applyResParameterObj(res_list.getResParameterObj(0));
const int num_shapes = info.shape_num.ref();
if (num_shapes < 1)
diff --git a/src/KingSystem/Physics/RigidBody/physRigidBodySetParam.cpp b/src/KingSystem/Physics/RigidBody/physRigidBodySetParam.cpp
index 7d35ee00..a7ca5edb 100644
--- a/src/KingSystem/Physics/RigidBody/physRigidBodySetParam.cpp
+++ b/src/KingSystem/Physics/RigidBody/physRigidBodySetParam.cpp
@@ -16,7 +16,7 @@ bool RigidBodySetParam::parse(agl::utl::ResParameterList res_list, sead::Heap* h
if (!res_list)
return false;
- obj.applyResParameterObj(res_list.getResParameterObj(0), nullptr);
+ obj.applyResParameterObj(res_list.getResParameterObj(0));
if (*type == "from_shape_type")
type_val = Type::FromShapeType;
diff --git a/src/KingSystem/Physics/System/physCharacterControllerParam.cpp b/src/KingSystem/Physics/System/physCharacterControllerParam.cpp
index cb5311d8..64d3dc1b 100644
--- a/src/KingSystem/Physics/System/physCharacterControllerParam.cpp
+++ b/src/KingSystem/Physics/System/physCharacterControllerParam.cpp
@@ -46,7 +46,7 @@ bool CharacterControllerParam::parse(agl::utl::ResParameterList res_list, sead::
if (!res_list || res_list.getResParameterObjNum() < 1)
return false;
- obj.applyResParameterObj(res_list.getResParameterObj(0), nullptr);
+ obj.applyResParameterObj(res_list.getResParameterObj(0));
const int num_forms = *form_num;
if (num_forms < 0)
@@ -86,7 +86,7 @@ bool CharacterControllerParam::Form::parse(agl::utl::ResParameterList res_list,
if (!res_list || res_list.getResParameterObjNum() < 2)
return false;
- form_header_obj.applyResParameterObj(res_list.getResParameterObj(0), nullptr);
+ form_header_obj.applyResParameterObj(res_list.getResParameterObj(0));
const int num_shapes = *shape_num;
if (num_shapes < 1)
diff --git a/src/KingSystem/Physics/System/physContactInfoParam.cpp b/src/KingSystem/Physics/System/physContactInfoParam.cpp
index e7f13709..a7b3e69e 100644
--- a/src/KingSystem/Physics/System/physContactInfoParam.cpp
+++ b/src/KingSystem/Physics/System/physContactInfoParam.cpp
@@ -15,7 +15,7 @@ bool ContactInfoParam::parse(const agl::utl::ResParameterList& res_list, sead::H
if (!res_list || res_list.getResParameterObjNum() < 1)
return false;
- obj.applyResParameterObj(res_list.getResParameterObj(0), nullptr);
+ obj.applyResParameterObj(res_list.getResParameterObj(0));
const int num_contact_point_info = *contact_point_info_num;
const int num_collision_info = *collision_info_num;
diff --git a/src/KingSystem/Physics/System/physShapeParam.cpp b/src/KingSystem/Physics/System/physShapeParam.cpp
index 31a743d6..b6aae2a5 100644
--- a/src/KingSystem/Physics/System/physShapeParam.cpp
+++ b/src/KingSystem/Physics/System/physShapeParam.cpp
@@ -20,7 +20,7 @@ ShapeParam::~ShapeParam() {
bool ShapeParam::parse(const agl::utl::ResParameterObj& res_obj, sead::Heap* heap) {
vertices.freeBuffer();
- applyResParameterObj(res_obj, nullptr);
+ applyResParameterObj(res_obj);
const int num_vertices = vertex_num.ref();
if (num_vertices > 0) {
@@ -30,7 +30,7 @@ bool ShapeParam::parse(const agl::utl::ResParameterObj& res_obj, sead::Heap* hea
vertices[i].init(sead::Vector3f::zero, name, "頂点", this);
}
- applyResParameterObj(res_obj, nullptr);
+ applyResParameterObj(res_obj);
}
return true;
diff --git a/src/KingSystem/Resource/resResourceDrop.cpp b/src/KingSystem/Resource/resResourceDrop.cpp
index 329e0481..cf115b32 100644
--- a/src/KingSystem/Resource/resResourceDrop.cpp
+++ b/src/KingSystem/Resource/resResourceDrop.cpp
@@ -28,7 +28,7 @@ bool Drop::parse_(u8* data, size_t, sead::Heap* heap) {
mTables[i].name.init("", name, "テーブル名", &mObj);
}
- mObj.applyResParameterObj(header_obj, nullptr);
+ mObj.applyResParameterObj(header_obj);
for (s32 i = 0; i < num_tables; ++i) {
const auto obj = root.getResParameterObj(i + 1);
@@ -42,7 +42,7 @@ bool Drop::parse_(u8* data, size_t, sead::Heap* heap) {
addObj(&mTables[i].obj, mTables[i].name.ref());
applyResParameterArchive(agl::utl::ResParameterArchive{data});
- mTables[i].obj.applyResParameterObj(obj, nullptr);
+ mTables[i].obj.applyResParameterObj(obj);
if (mTables[i].column_num.ref() > 0) {
mTables[i].items.allocBufferAssert(mTables[i].column_num.ref(), heap);
diff --git a/src/KingSystem/Resource/resResourceLifeCondition.cpp b/src/KingSystem/Resource/resResourceLifeCondition.cpp
index 09a1bd91..7cdd45a0 100644
--- a/src/KingSystem/Resource/resResourceLifeCondition.cpp
+++ b/src/KingSystem/Resource/resResourceLifeCondition.cpp
@@ -25,7 +25,7 @@ bool LifeCondition::parse_(u8* data, size_t, sead::Heap* heap) {
if (display_distance_obj.ptr()) {
mDisplayDistance.init(0.0, "Item", "表示距離", &mDisplayDistanceObj);
addObj(&mDisplayDistanceObj, "DisplayDistance");
- mDisplayDistanceObj.applyResParameterObj(display_distance_obj, nullptr);
+ mDisplayDistanceObj.applyResParameterObj(display_distance_obj);
}
const auto auto_display_distance_algorithm_obj =
@@ -33,14 +33,14 @@ bool LifeCondition::parse_(u8* data, size_t, sead::Heap* heap) {
if (auto_display_distance_algorithm_obj.ptr()) {
mBoundingY.init("Bouding.Y", "Item", "自動距離算出アルゴリズム", &mBoundingYObj);
addObj(&mBoundingYObj, "AutoDisplayDistanceAlgorithm");
- mBoundingYObj.applyResParameterObj(auto_display_distance_algorithm_obj, nullptr);
+ mBoundingYObj.applyResParameterObj(auto_display_distance_algorithm_obj);
}
const auto y_limit_algorithm_obj = agl::utl::getResParameterObj(root, "YLimitAlgorithm");
if (y_limit_algorithm_obj.ptr()) {
mYLimitAlgorithm.init("NoLimit", "Item", "Y制限アルゴリズム", &mYLimitAlgorithmObj);
addObj(&mYLimitAlgorithmObj, "YLimitAlgorithm");
- mYLimitAlgorithmObj.applyResParameterObj(y_limit_algorithm_obj, nullptr);
+ mYLimitAlgorithmObj.applyResParameterObj(y_limit_algorithm_obj);
}
const auto delete_weathers_obj = agl::utl::getResParameterObj(root, "DeleteWeathers");
@@ -61,7 +61,7 @@ void LifeCondition::parseArray(const agl::utl::ResParameterObj* data, agl::utl::
const sead::SafeString& key, const sead::SafeString& desc,
sead::Heap* heap) {
addObj(obj, key);
- obj->applyResParameterObj(*data, nullptr);
+ obj->applyResParameterObj(*data);
auto count = data->mPtr->getNumParameters();
if (count == 0)
@@ -76,7 +76,7 @@ void LifeCondition::parseArray(const agl::utl::ResParameterObj* data, agl::utl::
(*buffer)[i].init("", s, desc, obj);
}
- obj->applyResParameterObj(*data, nullptr);
+ obj->applyResParameterObj(*data);
}
} // namespace ksys::res
diff --git a/src/KingSystem/Resource/resResourceRecipe.cpp b/src/KingSystem/Resource/resResourceRecipe.cpp
index 070ee84e..9beeb1dc 100644
--- a/src/KingSystem/Resource/resResourceRecipe.cpp
+++ b/src/KingSystem/Resource/resResourceRecipe.cpp
@@ -28,7 +28,7 @@ bool Recipe::parse_(u8* data, size_t, sead::Heap* heap) {
mTables[i].name.init("", name, "テーブル名", &mObj);
}
- mObj.applyResParameterObj(header_obj, nullptr);
+ mObj.applyResParameterObj(header_obj);
for (s32 i = 0; i < num_tables; ++i) {
const auto obj = root.getResParameterObj(i + 1);
@@ -36,7 +36,7 @@ bool Recipe::parse_(u8* data, size_t, sead::Heap* heap) {
addObj(&mTables[i].obj, mTables[i].name.ref());
applyResParameterArchive(agl::utl::ResParameterArchive{data});
- mTables[i].obj.applyResParameterObj(obj, nullptr);
+ mTables[i].obj.applyResParameterObj(obj);
if (mTables[i].column_num.ref() > 0) {
mTables[i].items.allocBufferAssert(mTables[i].column_num.ref(), heap);
diff --git a/src/KingSystem/Resource/resResourceShop.cpp b/src/KingSystem/Resource/resResourceShop.cpp
index 0fa43727..8a407062 100644
--- a/src/KingSystem/Resource/resResourceShop.cpp
+++ b/src/KingSystem/Resource/resResourceShop.cpp
@@ -27,7 +27,7 @@ bool Shop::parse_(u8* data, size_t, sead::Heap* heap) {
mTables[i].name.init("", name, "テーブル名", &mObj);
}
- mObj.applyResParameterObj(header_obj, nullptr);
+ mObj.applyResParameterObj(header_obj);
for (s32 i = 0; i < num_tables; ++i) {
const auto obj = root.getResParameterObj(i + 1);
@@ -35,7 +35,7 @@ bool Shop::parse_(u8* data, size_t, sead::Heap* heap) {
addObj(&mTables[i].obj, mTables[i].name.ref());
applyResParameterArchive(agl::utl::ResParameterArchive{data});
- mTables[i].obj.applyResParameterObj(obj, nullptr);
+ mTables[i].obj.applyResParameterObj(obj);
if (mTables[i].column_num.ref() > 0) {
mTables[i].items.allocBufferAssert(mTables[i].column_num.ref(), heap);