add CurrencyRewardLayer::create and its related enums

This commit is contained in:
HJfod 2023-03-06 19:52:49 +02:00
parent 4a15afc7a7
commit 2e485d88a9
3 changed files with 21 additions and 5 deletions
bindings
loader/include/Geode

View file

@ -878,6 +878,13 @@ class CurrencyRewardLayer : cocos2d::CCLayer {
inline CurrencyRewardLayer() {}
~CurrencyRewardLayer() = mac 0x447950, win 0x4ffb0;
virtual void update(float) = mac 0x44a5c0, win 0x52350;
static CurrencyRewardLayer* create(
int, int, int,
CurrencySpriteType, int,
CurrencySpriteType, int,
cocos2d::CCPoint, CurrencyRewardType, float
) = win 0x50050;
}
class CurrencyRewardDelegate {
@ -4284,7 +4291,7 @@ class PlayLayer : GJBaseGameLayer, CCCircleWaveDelegate, CurrencyRewardDelegate,
void shouldBlend(int) = mac 0x771b0;
void showCompleteEffect() = mac 0x738e0, win 0x1fe060;
void showCompleteText() = mac 0x73be0, win 0x1fda90;
void showEndLayer() = mac 0x74450;
void showEndLayer() = mac 0x74450, win 0x1ffd00;
void showHint() = mac 0x7deb0;
void showNewBest(bool, int, int, bool, bool, bool) = mac 0x74580, win 0x1fe3a0;
void showRetryLayer() = mac 0x75ba0;

View file

@ -122,6 +122,14 @@ enum class BoomListType {
Artist = 0x14,
};
enum class CurrencySpriteType {
// todo
};
enum class CurrencyRewardType {
// todo
};
enum class MenuAnimationType {
Scale = 0,
Move = 1,

View file

@ -8,6 +8,7 @@
#include <string_view>
#include <type_traits>
#include <variant>
#include <optional>
namespace geode {
namespace impl {
@ -209,7 +210,7 @@ namespace geode {
* Convert the result into an optional containing the value if Ok, and
* nullopt if Err
*/
[[nodiscard]] constexpr decltype(auto) ok() const& {
[[nodiscard]] constexpr std::optional<T> ok() const& {
if (this->isOk()) {
return std::optional(this->unwrap());
}
@ -220,7 +221,7 @@ namespace geode {
* Convert the result into an optional containing the value if Ok, and
* nullopt if Err
*/
[[nodiscard]] constexpr decltype(auto) ok() && {
[[nodiscard]] constexpr std::optional<T> ok() && {
if (this->isOk()) {
return std::optional(this->unwrap());
}
@ -231,7 +232,7 @@ namespace geode {
* Convert the result into an optional containing the error if Err, and
* nullopt if Ok
*/
[[nodiscard]] constexpr decltype(auto) err() const& {
[[nodiscard]] constexpr std::optional<E> err() const& {
if (this->isErr()) {
return std::optional(this->unwrapErr());
}
@ -242,7 +243,7 @@ namespace geode {
* Convert the result into an optional containing the error if Err, and
* nullopt if Ok
*/
[[nodiscard]] constexpr decltype(auto) err() && {
[[nodiscard]] constexpr std::optional<E> err() && {
if (this->isErr()) {
return std::optional(this->unwrapErr());
}