ksys/act: Start adding actInfoCommon

This commit is contained in:
Léo Lam 2021-01-09 16:59:00 +01:00
parent 9069c4e9f8
commit 8569722db6
No known key found for this signature in database
GPG Key ID: 0DF30F9081000741
6 changed files with 205 additions and 37 deletions

View File

@ -73240,34 +73240,34 @@
0x0000007100d2d4c4,DamageMgrBase::callDamageCallbacks,152,
0x0000007100d2d55c,DamageMgrBase::addDamageCallback,80,_ZN4ksys3dmg17DamageManagerBase17addDamageCallbackEiPNS0_14DamageCallbackE
0x0000007100d2d5ac,DamageMgrBase::removeDamageCallback,220,_ZN4ksys3dmg17DamageManagerBase20removeDamageCallbackEPNS0_14DamageCallbackE
0x0000007100d2d688,sub_7100D2D688,20,
0x0000007100d2d69c,act::getSystemIsGetItemSelf,20,
0x0000007100d2d6b0,ActorInfoData::getGeneralLife,20,
0x0000007100d2d6c4,act::getGeneralLife,20,
0x0000007100d2d6d8,ActorInfoData::getEnemyRank,20,
0x0000007100d2d6ec,ActorInfoData::getAttackPower,20,
0x0000007100d2d700,ActorInfoData::getWeaponCommonGuardPower,20,
0x0000007100d2d714,ActorInfoData::getWeaponCommonSharpWeaponPer,20,
0x0000007100d2d728,act::getWeaponCommonSharpWeaponAddAtkMin,20,
0x0000007100d2d73c,act::getWeaponCommonSharpWeaponAddAtkMax,20,
0x0000007100d2d750,act::getWeaponCommonSharpWeaponAddLifeMin,20,
0x0000007100d2d764,act::getWeaponCommonSharpWeaponAddLifeMax,20,
0x0000007100d2d778,act::getWeaponCommonSharpWeaponAddCrit,20,
0x0000007100d2d78c,act::getWeaponCommonSharpWeaponAddGuardMin,20,
0x0000007100d2d7a0,act::getWeaponCommonSharpWeaponAddGuardMax,20,
0x0000007100d2d7b4,act::getWeaponCommonPoweredSharpAddAtkMin,20,
0x0000007100d2d7c8,act::getWeaponCommonPoweredSharpAddAtkMax,20,
0x0000007100d2d7dc,act::getWeaponCommonPoweredSharpAddLifeMin,20,
0x0000007100d2d7f0,act::getWeaponCommonPoweredSharpAddLifeMax,20,
0x0000007100d2d804,act::getWeaponCommonPoweredSharpAddGuardMin,20,
0x0000007100d2d818,act::getWeaponCommonPoweredSharpAddGuardMax,20,
0x0000007100d2d82c,act::getWeaponCommonPoweredSharpAddThrowMin,20,
0x0000007100d2d840,act::getWeaponCommonPoweredSharpAddThrowMax,20,
0x0000007100d2d854,act::getWeaponCommonPoweredSharpAddSpreadFire,20,
0x0000007100d2d868,act::getWeaponCommonPoweredSharpAddZoomRapid,20,
0x0000007100d2d87c,act::getWeaponCommonPoweredSharpAddRapidFireMin,20,
0x0000007100d2d890,act::getWeaponCommonPoweredSharpAddRapidFireMax,20,
0x0000007100d2d8a4,act::getWeaponCommonPoweredSharpAddSurfMaster,20,
0x0000007100d2d688,sub_7100D2D688,20,_ZN4ksys3act22getSystemIsGetItemSelfEPNS0_8InfoDataEPKc
0x0000007100d2d69c,act::getSystemIsGetItemSelf,20,_ZN4ksys3act22getSystemIsGetItemSelfERKN2al9ByamlIterE
0x0000007100d2d6b0,ActorInfoData::getGeneralLife,20,_ZN4ksys3act14getGeneralLifeEPNS0_8InfoDataEPKc
0x0000007100d2d6c4,act::getGeneralLife,20,_ZN4ksys3act14getGeneralLifeERKN2al9ByamlIterE
0x0000007100d2d6d8,ActorInfoData::getEnemyRank,20,_ZN4ksys3act12getEnemyRankEPNS0_8InfoDataEPKc
0x0000007100d2d6ec,ActorInfoData::getAttackPower,20,_ZN4ksys3act14getAttackPowerEPNS0_8InfoDataEPKc
0x0000007100d2d700,ActorInfoData::getWeaponCommonGuardPower,20,_ZN4ksys3act25getWeaponCommonGuardPowerEPNS0_8InfoDataEPKc
0x0000007100d2d714,ActorInfoData::getWeaponCommonSharpWeaponPer,20,_ZN4ksys3act29getWeaponCommonSharpWeaponPerEPNS0_8InfoDataEPKc
0x0000007100d2d728,act::getWeaponCommonSharpWeaponAddAtkMin,20,_ZN4ksys3act35getWeaponCommonSharpWeaponAddAtkMinERKN2al9ByamlIterE
0x0000007100d2d73c,act::getWeaponCommonSharpWeaponAddAtkMax,20,_ZN4ksys3act35getWeaponCommonSharpWeaponAddAtkMaxERKN2al9ByamlIterE
0x0000007100d2d750,act::getWeaponCommonSharpWeaponAddLifeMin,20,_ZN4ksys3act36getWeaponCommonSharpWeaponAddLifeMinERKN2al9ByamlIterE
0x0000007100d2d764,act::getWeaponCommonSharpWeaponAddLifeMax,20,_ZN4ksys3act36getWeaponCommonSharpWeaponAddLifeMaxERKN2al9ByamlIterE
0x0000007100d2d778,act::getWeaponCommonSharpWeaponAddCrit,20,_ZN4ksys3act33getWeaponCommonSharpWeaponAddCritERKN2al9ByamlIterE
0x0000007100d2d78c,act::getWeaponCommonSharpWeaponAddGuardMin,20,_ZN4ksys3act37getWeaponCommonSharpWeaponAddGuardMinERKN2al9ByamlIterE
0x0000007100d2d7a0,act::getWeaponCommonSharpWeaponAddGuardMax,20,_ZN4ksys3act37getWeaponCommonSharpWeaponAddGuardMaxERKN2al9ByamlIterE
0x0000007100d2d7b4,act::getWeaponCommonPoweredSharpAddAtkMin,20,_ZN4ksys3act36getWeaponCommonPoweredSharpAddAtkMinERKN2al9ByamlIterE
0x0000007100d2d7c8,act::getWeaponCommonPoweredSharpAddAtkMax,20,_ZN4ksys3act36getWeaponCommonPoweredSharpAddAtkMaxERKN2al9ByamlIterE
0x0000007100d2d7dc,act::getWeaponCommonPoweredSharpAddLifeMin,20,_ZN4ksys3act37getWeaponCommonPoweredSharpAddLifeMinERKN2al9ByamlIterE
0x0000007100d2d7f0,act::getWeaponCommonPoweredSharpAddLifeMax,20,_ZN4ksys3act37getWeaponCommonPoweredSharpAddLifeMaxERKN2al9ByamlIterE
0x0000007100d2d804,act::getWeaponCommonPoweredSharpAddGuardMin,20,_ZN4ksys3act38getWeaponCommonPoweredSharpAddGuardMinERKN2al9ByamlIterE
0x0000007100d2d818,act::getWeaponCommonPoweredSharpAddGuardMax,20,_ZN4ksys3act38getWeaponCommonPoweredSharpAddGuardMaxERKN2al9ByamlIterE
0x0000007100d2d82c,act::getWeaponCommonPoweredSharpAddThrowMin,20,_ZN4ksys3act38getWeaponCommonPoweredSharpAddThrowMinERKN2al9ByamlIterE
0x0000007100d2d840,act::getWeaponCommonPoweredSharpAddThrowMax,20,_ZN4ksys3act38getWeaponCommonPoweredSharpAddThrowMaxERKN2al9ByamlIterE
0x0000007100d2d854,act::getWeaponCommonPoweredSharpAddSpreadFire,20,_ZN4ksys3act40getWeaponCommonPoweredSharpAddSpreadFireERKN2al9ByamlIterE
0x0000007100d2d868,act::getWeaponCommonPoweredSharpAddZoomRapid,20,_ZN4ksys3act39getWeaponCommonPoweredSharpAddZoomRapidERKN2al9ByamlIterE
0x0000007100d2d87c,act::getWeaponCommonPoweredSharpAddRapidFireMin,20,_ZN4ksys3act42getWeaponCommonPoweredSharpAddRapidFireMinERKN2al9ByamlIterE
0x0000007100d2d890,act::getWeaponCommonPoweredSharpAddRapidFireMax,20,_ZN4ksys3act42getWeaponCommonPoweredSharpAddRapidFireMaxERKN2al9ByamlIterE
0x0000007100d2d8a4,act::getWeaponCommonPoweredSharpAddSurfMaster,20,_ZN4ksys3act40getWeaponCommonPoweredSharpAddSurfMasterERKN2al9ByamlIterE
0x0000007100d2d8b8,ActorInfoData::getBowArrowName,24,
0x0000007100d2d8d0,act::getBowIsLeadShot,20,
0x0000007100d2d8e4,act::getBowLeadShotNum,20,
@ -73362,7 +73362,7 @@
0x0000007100d2e880,ActorInfoData::getActorDataIter,208,_ZNK4ksys3act8InfoData12getActorIterEPN2al9ByamlIterEPKcb
0x0000007100d2e950,ActorInfoData::isNotMergedGrudgeOrArmor50OrWeaponSwordDemoCheck,348,_ZNK4ksys3act8InfoData10logFailureERKN4sead14SafeStringBaseIcEE
0x0000007100d2eaac,ActorInfoData::x,1484,_ZNK4ksys3act8InfoData13getRecipeInfoEPKcRNS1_10RecipeInfoE
0x0000007100d2f078,act::getActorInfoInt,56,_ZN4ksys3act8InfoData11getIntByKeyERKN2al9ByamlIterEPKci
0x0000007100d2f078,act::getActorInfoInt,56,_ZN4ksys3act8InfoData11getIntByKeyERKN2al9ByamlIterEPKcib
0x0000007100d2f0b0,bymlGetString,84,_ZN4ksys3act8InfoData14getStringByKeyERKN2al9ByamlIterEPKcRKN4sead14SafeStringBaseIcEE
0x0000007100d2f104,sub_7100D2F104,608,_ZNK4ksys3act8InfoData11getLocatorsEPKcRNS1_8LocatorsE
0x0000007100d2f364,sub_7100D2F364,348,_ZNK4ksys3act8InfoData12getHomeAreasEPKcRNS1_9HomeAreasE
@ -73385,8 +73385,8 @@
0x0000007100d30394,ActorInfoData::getActorInt,252,_ZNK4ksys3act8InfoData6getIntEPKcS3_ib
0x0000007100d30490,ActorInfoData::getActorFloat,252,_ZNK4ksys3act8InfoData8getFloatEPKcS3_fb
0x0000007100d3058c,ActorInfoData::getBool,260,_ZNK4ksys3act8InfoData7getBoolEPKcS3_bb
0x0000007100d30690,act::getBymlPropertyFloat,56,_ZN4ksys3act8InfoData13getFloatByKeyERKN2al9ByamlIterEPKcf
0x0000007100d306c8,act::getBymlPropertyBool,68,_ZN4ksys3act8InfoData12getBoolByKeyERKN2al9ByamlIterEPKcb
0x0000007100d30690,act::getBymlPropertyFloat,56,_ZN4ksys3act8InfoData13getFloatByKeyERKN2al9ByamlIterEPKcfb
0x0000007100d306c8,act::getBymlPropertyBool,68,_ZN4ksys3act8InfoData12getBoolByKeyERKN2al9ByamlIterEPKcbb
0x0000007100d3070c,ActorInfoData::getActorIterByHash,168,_ZNK4ksys3act8InfoData12getActorIterEPN2al9ByamlIterEjb
0x0000007100d307b4,sub_7100D307B4,104,_ZN4ksys3act8InfoData16hasBurnableParamERKN2al9ByamlIterE
0x0000007100d3081c,sub_7100D3081C,252,_ZNK4ksys3act8InfoData17hasCapaciterParamEPKc

Can't render this file because it is too large.

View File

@ -66,6 +66,8 @@ target_sources(uking PRIVATE
actBaseProcUnit.h
actDebug.cpp
actDebug.h
actInfoCommon.cpp
actInfoCommon.h
actInfoData.cpp
actInfoData.h
actInstParamPack.cpp

View File

@ -0,0 +1,118 @@
#include "KingSystem/ActorSystem/actInfoCommon.h"
#include "KingSystem/ActorSystem/actInfoData.h"
namespace ksys::act {
bool getSystemIsGetItemSelf(InfoData* data, const char* actor) {
return data->getBool(actor, "systemIsGetItemSelf");
}
bool getSystemIsGetItemSelf(const al::ByamlIter& iter) {
return InfoData::getBoolByKey(iter, "systemIsGetItemSelf");
}
int getGeneralLife(InfoData* data, const char* actor) {
return data->getInt(actor, "generalLife", 100);
}
int getGeneralLife(const al::ByamlIter& iter) {
return InfoData::getIntByKey(iter, "generalLife", 100);
}
int getEnemyRank(InfoData* data, const char* actor) {
return data->getInt(actor, "enemyRank");
}
int getAttackPower(InfoData* data, const char* actor) {
return data->getInt(actor, "attackPower");
}
int getWeaponCommonGuardPower(InfoData* data, const char* actor) {
return data->getInt(actor, "weaponCommonGuardPower");
}
float getWeaponCommonSharpWeaponPer(InfoData* data, const char* actor) {
return data->getFloat(actor, "weaponCommonSharpWeaponPer", 10.0);
}
int getWeaponCommonSharpWeaponAddAtkMin(const al::ByamlIter& iter) {
return InfoData::getIntByKey(iter, "weaponCommonSharpWeaponAddAtkMin");
}
int getWeaponCommonSharpWeaponAddAtkMax(const al::ByamlIter& iter) {
return InfoData::getIntByKey(iter, "weaponCommonSharpWeaponAddAtkMax");
}
int getWeaponCommonSharpWeaponAddLifeMin(const al::ByamlIter& iter) {
return InfoData::getIntByKey(iter, "weaponCommonSharpWeaponAddLifeMin");
}
int getWeaponCommonSharpWeaponAddLifeMax(const al::ByamlIter& iter) {
return InfoData::getIntByKey(iter, "weaponCommonSharpWeaponAddLifeMax");
}
bool getWeaponCommonSharpWeaponAddCrit(const al::ByamlIter& iter) {
return InfoData::getBoolByKey(iter, "weaponCommonSharpWeaponAddCrit");
}
int getWeaponCommonSharpWeaponAddGuardMin(const al::ByamlIter& iter) {
return InfoData::getIntByKey(iter, "weaponCommonSharpWeaponAddGuardMin");
}
int getWeaponCommonSharpWeaponAddGuardMax(const al::ByamlIter& iter) {
return InfoData::getIntByKey(iter, "weaponCommonSharpWeaponAddGuardMax");
}
int getWeaponCommonPoweredSharpAddAtkMin(const al::ByamlIter& iter) {
return InfoData::getIntByKey(iter, "weaponCommonPoweredSharpAddAtkMin");
}
int getWeaponCommonPoweredSharpAddAtkMax(const al::ByamlIter& iter) {
return InfoData::getIntByKey(iter, "weaponCommonPoweredSharpAddAtkMax");
}
int getWeaponCommonPoweredSharpAddLifeMin(const al::ByamlIter& iter) {
return InfoData::getIntByKey(iter, "weaponCommonPoweredSharpAddLifeMin");
}
int getWeaponCommonPoweredSharpAddLifeMax(const al::ByamlIter& iter) {
return InfoData::getIntByKey(iter, "weaponCommonPoweredSharpAddLifeMax");
}
int getWeaponCommonPoweredSharpAddGuardMin(const al::ByamlIter& iter) {
return InfoData::getIntByKey(iter, "weaponCommonPoweredSharpAddGuardMin");
}
int getWeaponCommonPoweredSharpAddGuardMax(const al::ByamlIter& iter) {
return InfoData::getIntByKey(iter, "weaponCommonPoweredSharpAddGuardMax");
}
float getWeaponCommonPoweredSharpAddThrowMin(const al::ByamlIter& iter) {
return InfoData::getFloatByKey(iter, "weaponCommonPoweredSharpAddThrowMin", 1.0);
}
float getWeaponCommonPoweredSharpAddThrowMax(const al::ByamlIter& iter) {
return InfoData::getFloatByKey(iter, "weaponCommonPoweredSharpAddThrowMax", 1.0);
}
bool getWeaponCommonPoweredSharpAddSpreadFire(const al::ByamlIter& iter) {
return InfoData::getBoolByKey(iter, "weaponCommonPoweredSharpAddSpreadFire");
}
bool getWeaponCommonPoweredSharpAddZoomRapid(const al::ByamlIter& iter) {
return InfoData::getBoolByKey(iter, "weaponCommonPoweredSharpAddZoomRapid");
}
float getWeaponCommonPoweredSharpAddRapidFireMin(const al::ByamlIter& iter) {
return InfoData::getFloatByKey(iter, "weaponCommonPoweredSharpAddRapidFireMin", 1.0);
}
float getWeaponCommonPoweredSharpAddRapidFireMax(const al::ByamlIter& iter) {
return InfoData::getFloatByKey(iter, "weaponCommonPoweredSharpAddRapidFireMax", 1.0);
}
bool getWeaponCommonPoweredSharpAddSurfMaster(const al::ByamlIter& iter) {
return InfoData::getBoolByKey(iter, "weaponCommonPoweredSharpAddSurfMaster");
}
} // namespace ksys::act

View File

@ -0,0 +1,45 @@
#pragma once
namespace al {
class ByamlIter;
}
namespace ksys::act {
class InfoData;
bool getSystemIsGetItemSelf(InfoData* data, const char* actor);
bool getSystemIsGetItemSelf(const al::ByamlIter& iter);
int getGeneralLife(InfoData* data, const char* actor);
int getGeneralLife(const al::ByamlIter& iter);
int getEnemyRank(InfoData* data, const char* actor);
int getAttackPower(InfoData* data, const char* actor);
int getWeaponCommonGuardPower(InfoData* data, const char* actor);
float getWeaponCommonSharpWeaponPer(InfoData* data, const char* actor);
int getWeaponCommonSharpWeaponAddAtkMin(const al::ByamlIter& iter);
int getWeaponCommonSharpWeaponAddAtkMax(const al::ByamlIter& iter);
int getWeaponCommonSharpWeaponAddLifeMin(const al::ByamlIter& iter);
int getWeaponCommonSharpWeaponAddLifeMax(const al::ByamlIter& iter);
bool getWeaponCommonSharpWeaponAddCrit(const al::ByamlIter& iter);
int getWeaponCommonSharpWeaponAddGuardMin(const al::ByamlIter& iter);
int getWeaponCommonSharpWeaponAddGuardMax(const al::ByamlIter& iter);
int getWeaponCommonPoweredSharpAddAtkMin(const al::ByamlIter& iter);
int getWeaponCommonPoweredSharpAddAtkMax(const al::ByamlIter& iter);
int getWeaponCommonPoweredSharpAddLifeMin(const al::ByamlIter& iter);
int getWeaponCommonPoweredSharpAddLifeMax(const al::ByamlIter& iter);
int getWeaponCommonPoweredSharpAddGuardMin(const al::ByamlIter& iter);
int getWeaponCommonPoweredSharpAddGuardMax(const al::ByamlIter& iter);
float getWeaponCommonPoweredSharpAddThrowMin(const al::ByamlIter& iter);
float getWeaponCommonPoweredSharpAddThrowMax(const al::ByamlIter& iter);
bool getWeaponCommonPoweredSharpAddSpreadFire(const al::ByamlIter& iter);
bool getWeaponCommonPoweredSharpAddZoomRapid(const al::ByamlIter& iter);
float getWeaponCommonPoweredSharpAddRapidFireMin(const al::ByamlIter& iter);
float getWeaponCommonPoweredSharpAddRapidFireMax(const al::ByamlIter& iter);
bool getWeaponCommonPoweredSharpAddSurfMaster(const al::ByamlIter& iter);
} // namespace ksys::act

View File

@ -204,7 +204,7 @@ void InfoData::getRecipeInfo(const char* actor, InfoData::RecipeInfo& info) cons
}
}
s32 InfoData::getIntByKey(const al::ByamlIter& iter, const char* key, s32 default_) {
s32 InfoData::getIntByKey(const al::ByamlIter& iter, const char* key, s32 default_, bool) {
s32 value;
return iter.tryGetIntByKey(&value, key) ? value : default_;
}
@ -511,12 +511,12 @@ bool InfoData::getBool(const char* actor, const char* key, bool default_, bool x
return getBoolByKey(iter, key, default_);
}
f32 InfoData::getFloatByKey(const al::ByamlIter& iter, const char* key, f32 default_) {
f32 InfoData::getFloatByKey(const al::ByamlIter& iter, const char* key, f32 default_, bool) {
f32 value;
return iter.tryGetFloatByKey(&value, key) ? value : default_;
}
bool InfoData::getBoolByKey(const al::ByamlIter& iter, const char* key, bool default_) {
bool InfoData::getBoolByKey(const al::ByamlIter& iter, const char* key, bool default_, bool) {
bool value;
return iter.tryGetBoolByKey(&value, key) ? value != 0 : default_;
}

View File

@ -133,9 +133,12 @@ public:
f32 getFloat(const char* actor, const char* key, f32 default_ = 0, bool x = true) const;
bool getBool(const char* actor, const char* key, bool default_ = false, bool x = true) const;
static s32 getIntByKey(const al::ByamlIter& iter, const char* key, s32 default_ = 0);
static f32 getFloatByKey(const al::ByamlIter& iter, const char* key, f32 default_ = 0);
static bool getBoolByKey(const al::ByamlIter& iter, const char* key, bool default_ = false);
static s32 getIntByKey(const al::ByamlIter& iter, const char* key, s32 default_ = 0,
bool x = true);
static f32 getFloatByKey(const al::ByamlIter& iter, const char* key, f32 default_ = 0,
bool x = true);
static bool getBoolByKey(const al::ByamlIter& iter, const char* key, bool default_ = false,
bool x = true);
static const char* getStringByKey(const al::ByamlIter& iter, const char* key,
const sead::SafeString& default_);