mirror of
https://github.com/zeldaret/botw
synced 2026-06-05 19:27:26 -04:00
Decompiled aoc3/ChampionBalladManager
Change getBlightRematchCount to s8 Fixing review messages Decompiled aoc3/ChampionBalladManager
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
target_sources(uking PRIVATE
|
||||
aocChampionBalladManager.cpp
|
||||
aocChampionBalladManager.h
|
||||
aocHardModeManager.cpp
|
||||
aocHardModeManager.h
|
||||
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
|
||||
Reference in New Issue
Block a user