mirror of https://github.com/zeldaret/botw.git
Decompiled aoc3/ChampionBalladManager
Change getBlightRematchCount to s8 Fixing review messages Decompiled aoc3/ChampionBalladManager
This commit is contained in:
parent
3c01b50afc
commit
0e4c71bfd8
|
@ -40397,15 +40397,15 @@
|
||||||
0x000000710067ef10,sub_710067EF10,472,
|
0x000000710067ef10,sub_710067EF10,472,
|
||||||
0x000000710067f0e8,j__ZdlPv_290,4,
|
0x000000710067f0e8,j__ZdlPv_290,4,
|
||||||
0x000000710067f0ec,sub_710067F0EC,8,
|
0x000000710067f0ec,sub_710067F0EC,8,
|
||||||
0x000000710067f0f4,_ZN3agl6detail9FileIOMgr18SingletonDisposer_D1Ev,100,
|
0x000000710067f0f4,aoc3::SingletonDisposer::~SingletonDisposer,100,_ZN5uking21ChampionBalladManager18SingletonDisposer_D1Ev
|
||||||
0x000000710067f158,sub_710067F158,108,
|
0x000000710067f158,aoc3::SingletonDisposer::~SingletonDisposer,108,_ZN5uking21ChampionBalladManager18SingletonDisposer_D0Ev
|
||||||
0x000000710067f1c4,aoc3::createInstance,144,
|
0x000000710067f1c4,aoc3::createInstance,144,_ZN5uking21ChampionBalladManager14createInstanceEPN4sead4HeapE
|
||||||
0x000000710067f254,nullsub_2172,4,
|
0x000000710067f254,aoc3::~aoc3,4,_ZN5uking21ChampionBalladManagerD2Ev
|
||||||
0x000000710067f258,j__ZdlPv_291,4,
|
0x000000710067f258,aoc3::~aoc3,4,_ZN5uking21ChampionBalladManagerD0Ev
|
||||||
0x000000710067f25c,aoc3::init,8,
|
0x000000710067f25c,aoc3::init,8,_ZN5uking21ChampionBalladManager4initEv
|
||||||
0x000000710067f264,aoc3::setBlightRematchCount,40,
|
0x000000710067f264,aoc3::setBlightRematchCount,40,_ZN5uking21ChampionBalladManager21setBlightRematchCountEaNS_10BlightTypeE
|
||||||
0x000000710067f28c,aoc3::incrementBlightRematchCount,48,
|
0x000000710067f28c,aoc3::incrementBlightRematchCount,48,_ZN5uking21ChampionBalladManager27incrementBlightRematchCountENS_10BlightTypeE
|
||||||
0x000000710067f2bc,aoc3::getBlightRematchCount,28,
|
0x000000710067f2bc,aoc3::getBlightRematchCount,28,_ZNK5uking21ChampionBalladManager21getBlightRematchCountENS_10BlightTypeE
|
||||||
0x000000710067f2d8,StasisMgr::deleteInstance,100,
|
0x000000710067f2d8,StasisMgr::deleteInstance,100,
|
||||||
0x000000710067f33c,StasisMgr::deleteInstanceDelete,108,
|
0x000000710067f33c,StasisMgr::deleteInstanceDelete,108,
|
||||||
0x000000710067f3a8,StasisMgr::createInstance,136,
|
0x000000710067f3a8,StasisMgr::createInstance,136,
|
||||||
|
|
Can't render this file because it is too large.
|
|
@ -1,4 +1,6 @@
|
||||||
target_sources(uking PRIVATE
|
target_sources(uking PRIVATE
|
||||||
|
aocChampionBalladManager.cpp
|
||||||
|
aocChampionBalladManager.h
|
||||||
aocHardModeManager.cpp
|
aocHardModeManager.cpp
|
||||||
aocHardModeManager.h
|
aocHardModeManager.h
|
||||||
aocManager.cpp
|
aocManager.cpp
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
#include "Game/DLC/aocChampionBalladManager.h"
|
||||||
|
|
||||||
|
namespace uking {
|
||||||
|
|
||||||
|
SEAD_SINGLETON_DISPOSER_IMPL(ChampionBalladManager)
|
||||||
|
|
||||||
|
void ChampionBalladManager::init() {
|
||||||
|
mBlightCounts = {};
|
||||||
|
}
|
||||||
|
|
||||||
|
void ChampionBalladManager::setBlightRematchCount(s8 count, BlightType blight_type) {
|
||||||
|
if (count >= 0 && blight_type <= BlightType::Water) {
|
||||||
|
if (count >= 30) {
|
||||||
|
count = 30;
|
||||||
|
}
|
||||||
|
mBlightCounts[u32(blight_type)] = count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ChampionBalladManager::incrementBlightRematchCount(BlightType blight_type) {
|
||||||
|
if (blight_type <= BlightType::Water) {
|
||||||
|
s8 count = mBlightCounts[u32(blight_type)] + 1;
|
||||||
|
setBlightRematchCount(count, blight_type);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
s8 ChampionBalladManager::getBlightRematchCount(BlightType blight_type) const {
|
||||||
|
if (blight_type <= BlightType::Water)
|
||||||
|
return mBlightCounts[u32(blight_type)];
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
} // namespace uking
|
|
@ -0,0 +1,26 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <array>
|
||||||
|
#include <container/seadSafeArray.h>
|
||||||
|
#include <heap/seadDisposer.h>
|
||||||
|
|
||||||
|
namespace uking {
|
||||||
|
|
||||||
|
enum class BlightType : u32 { Wind, Electric, Fire, Water };
|
||||||
|
|
||||||
|
class ChampionBalladManager {
|
||||||
|
SEAD_SINGLETON_DISPOSER(ChampionBalladManager)
|
||||||
|
ChampionBalladManager() = default;
|
||||||
|
virtual ~ChampionBalladManager() = default;
|
||||||
|
|
||||||
|
public:
|
||||||
|
void init();
|
||||||
|
void setBlightRematchCount(s8 count, BlightType blight_type);
|
||||||
|
void incrementBlightRematchCount(BlightType blight_type);
|
||||||
|
s8 getBlightRematchCount(BlightType blight_type) const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
sead::SafeArray<u8, 4> mBlightCounts;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace uking
|
Loading…
Reference in New Issue