Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Box Expansion #102

Merged
merged 13 commits into from
Jun 11, 2024
7 changes: 7 additions & 0 deletions src/mod/externals/Dpr/Box/BoxWork.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#pragma once

#include "externals/il2cpp-api.h"

struct BoxWork : ILClass<BoxWork> {

};
35 changes: 35 additions & 0 deletions src/mod/externals/Dpr/UI/BoxInfinityScroll.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#pragma once

#include "externals/il2cpp-api.h"
#include "externals/UnityEngine/MonoBehaviour.h"
#include "externals/UnityEngine/UI/ScrollRect.h"
#include "externals/UnityEngine/UI/HorizontalOrVerticalLayoutGroup.h"
#include "externals/UnityEngine/Events/UnityAction.h"
#include "externals/Dpr/UI/BoxInfinityScrollItem.h"

namespace Dpr::UI {
struct BoxInfinityScroll : ILClass<BoxInfinityScroll> {
struct _OpSetup_d__16 : ILClass<_OpSetup_d__16>{
struct Fields {
int32_t __1__state;
Il2CppObject* __2__current;
BoxInfinityScroll::Object* __4__this;
void* baseParams;
UnityEngine::RectTransform::Object* _contents_5__2;
};
};
struct Fields : UnityEngine::MonoBehaviour::Fields {
Dpr::UI::BoxInfinityScrollItem::Object* _prefab;
int32_t _showItemNum;
int32_t _outsideItemNum;
UnityEngine::UI::ScrollRect::Object* _scrollRect;
UnityEngine::UI::HorizontalOrVerticalLayoutGroup _layoutGroup;
void* _params;
int32_t _itemNum;
int32_t _paramIndex;
bool _isMoving;
bool _isTeam;
UnityEngine::Events::UnityAction::Object* onSelectChanged;
};
};
}
19 changes: 19 additions & 0 deletions src/mod/externals/Dpr/UI/BoxInfinityScrollItem.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#pragma once
#include "externals/il2cpp-api.h"
#include "externals/UnityEngine/MonoBehaviour.h"

namespace Dpr::UI {
struct BoxInfinityScrollItem : ILClass<BoxInfinityScrollItem> {
struct BaseParam : ILClass<BaseParam> {
struct Fields {
int32_t paramIndex;
void* itemParams;
int32_t displayMode;
};
};

struct Fields : UnityEngine::MonoBehaviour::Fields {

};
};
}
20 changes: 20 additions & 0 deletions src/mod/externals/Dpr/UI/BoxListNavigate.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#pragma once

#include "externals/il2cpp-api.h"
#include "externals/UnityEngine/MonoBehaviour.h"
#include "externals/UnityEngine/UI/GridLayoutGroup.h"

namespace Dpr::UI {
struct BoxListNavigate : ILClass<BoxListNavigate> {
struct Fields : UnityEngine::MonoBehaviour::Fields {
int32_t _arrayWidth;
int32_t _arrayHeight;
UnityEngine::UI::GridLayoutGroup::Object* _layout;
void* _leftTop;
void* _rightTop;
void* _leftBottom;
void* _rightBottom;
void* _NavigatorList_k__BackingField;
};
};
}
21 changes: 21 additions & 0 deletions src/mod/externals/Dpr/UI/BoxListPanel.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#pragma once
#include "externals/il2cpp-api.h"
#include "externals/UnityEngine/MonoBehaviour.h"
#include "externals/UnityEngine/UI/GridLayoutGroup.h"
#include "externals/System/Primitives.h"

namespace Dpr::UI {
struct BoxListPanel : ILClass<BoxListPanel> {
struct Fields : UnityEngine::MonoBehaviour::Fields {
void* _canvasGroup;
UnityEngine::UI::GridLayoutGroup::Object* _grid;
void* _naviSteps;
void* _boxes;
int32_t _step;
float _openPosX;
float _closePosX;
System::Single_array* _boxItemScales;
int32_t _SelectedIndex_k__BackingField;
};
};
}
25 changes: 25 additions & 0 deletions src/mod/externals/Dpr/UI/BoxTray.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#pragma once
#include "externals/il2cpp-api.h"
#include "externals/Dpr/UI/BoxInfinityScrollItem.h"
#include "externals/Dpr/UI/UIText.h"
#include "externals/UnityEngine/UI/Image.h"
#include "externals/UnityEngine/RectTransform.h"
#include "externals/UnityEngine/Events/UnityAction.h"

namespace Dpr::UI {
struct BoxTray : ILClass<BoxTray> {
struct BoxTrayParam : ILClass <BoxTrayParam> {
struct Fields : BoxInfinityScrollItem::BaseParam::Fields {
UnityEngine::Events::UnityAction::Object* setupAction;
};
};
struct Fields : BoxInfinityScrollItem::Fields {
Dpr::UI::UIText::Object* _title;
UnityEngine::UI::Image::Object* _boxTitleImage;
UnityEngine::UI::Image::Object* _boxBgImage;
UnityEngine::RectTransform::Object* _contents;
Dpr::UI::BoxTray::BoxTrayParam::Object* _param;
void* _items;
};
};
}
158 changes: 158 additions & 0 deletions src/mod/externals/Dpr/UI/BoxWindow.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
#pragma once
#include "externals/il2cpp-api.h"
#include "externals/Dpr/UI/UIWindow.h"
#include "BoxStatusPanel.h"
#include "BoxTray.h"
#include "externals/DG/Tweening/Tween.h"
#include "externals/System/Action.h"

namespace Dpr::UI {
struct BoxWindow : ILClass<BoxWindow> {
struct __c__DisplayClass200_0 : ILClass<__c__DisplayClass200_0> {
struct Fields {
BoxWindow::Object* __4__this;
int32_t trayNum;
UnityEngine::Events::UnityAction::Object* __9__11;
};
};

struct __OpOpen_d__200 : ILClass<__OpOpen_d__200> {
struct Fields {
int32_t __1__state;
Il2CppObject* __2__current;
BoxWindow::Object* __4__this;
int32_t prevWindowId;
__c__DisplayClass200_0::Object* __8__1;
};
};

struct Fields : Dpr::UI::UIWindow::Fields {
UnityEngine::UI::Image::Object* _displayTitle; // 0x70
UIText::Object* _displayModeText; // 0x78
UnityEngine::UI::Image::Object* _operationTitle; // 0x80
UIText::Object* _operationTypeText; // 0x88
UnityEngine::Color32::Array* _operationTypeColors; // 0x90
UnityEngine::RectTransform::Object* _partyTrayRoot; // 0x98
void* _partyTrayCanvasGroup; // 0xA0
UnityEngine::UI::Image::Array* _partyArrows; // 0xA8
void* _partyNormal; // 0xB0 // Todo Implement Dpr::UI::BoxParty::Object*
void* _battleTeamScroll; // 0xB8 // Todo Implement Dpr::UI::BoxInfinityScroll::Object*
UnityEngine::RectTransform::Object* _boxTrayRoot; // 0xC0
void* _boxTrayCanvasGroup; // 0xC8
UnityEngine::UI::Image::Array* _trayArrows; // 0xD0
void* _trayScroll; // 0xD8 // Todo Implement Dpr::UI::BoxInfinityScroll::Object*
UnityEngine::RectTransform::Object* _naviPartyRoot; // 0xE0
UnityEngine::RectTransform::Object* _naviTrayRoot; // 0xE8
void* _multiNavis; // 0xF0
void* _naviPartySelect; // 0xF8
UIText::Array* _leftButtonTexts; // 0x100
UnityEngine::UI::Image::Object* _searchButtunImage; // 0x108
UnityEngine::UI::Image::Object* _searchIconImage; // 0x110
UnityEngine::UI::Image::Object* _boxButtunImage; // 0x118
UnityEngine::UI::Image::Object* _boxIconImage; // 0x120
void* _boxListPanel; // 0x128 // Todo Implement Dpr::UI::BoxListPanel::Object*
void* _swapRootPrefab; // 0x130
UnityEngine::RectTransform::Object* _contextMenuRoot; // 0x138
void* _cursor; // 0x140
UnityEngine::Transform::Object* _cursorBody; // 0x148
UnityEngine::UI::Image::Object* _rangeCursor; // 0x150
UnityEngine::UI::Image::Object* _rangePlate; // 0x158
void* _cursorCanvas; // 0x160
void* _modelViewSide; // 0x168
void* _modelViewTrade; // 0x170
UnityEngine::RectTransform::Object* _modelSideRoot; // 0x178
UnityEngine::RectTransform::Object* _modelTradeRoot; // 0x180
void* _searchPanel; // 0x188
void* _searchSubPanel; // 0x190
void* _searchDescription; // 0x198
UnityEngine::GameObject::Object* _tradeInfo; // 0x1A0
UIText::Object* _traderName; // 0x1A8
void* _namePlate; // 0x1B0
void* _numberPlate; // 0x1B8
BoxStatusPanel::Object* _statusPanel; // 0x1C0
void* _markSettingPanel; // 0x1C8
UnityEngine::GameObject::Object* _selectCountPlate; // 0x1D0
UIText::Object* _selectCountText; // 0x1D8
void* _wallPaperSelector; // 0x1E0
void* _topCanvasGroup; // 0x1E8
void* _bottomCanvasGroup; // 0x1F0
UnityEngine::UI::Image::Object* _darkScreen; // 0x1F8
UnityEngine::Transform::Object* _effectRoot; // 0x200
int32_t _animStateIn; // 0x208
int32_t _animStateOut; // 0x20C
int32_t _controlType; // 0x210
int32_t _operationType; // 0x214
int32_t _displayMode; // 0x218
int32_t _statusType; // 0x21C
void* _battleTeam; // 0x220
BoxTray::Object* _boxTray; // 0x228
void* _navigator; // 0x230
void* _swapIcon; // 0x238
void* _currentPokeParam; // 0x240
System::String::Object* _currentMsgID; // 0x248
int32_t _currentTrayIndex; // 0x250
int32_t _currentTeamIndex; // 0x254
int32_t _wallNo; // 0x258
void* _lastNaviBoxTrayItem; // 0x260
void* _fromNavigator; // 0x268
void* _returnNavigator; // 0x270
int32_t _fromTrayIndex; // 0x278
int32_t _fromTeamIndex; // 0x27C
BoxInfinityScrollItem::Object* _fromTray; // 0x280
void* _hideIconIndexes; // 0x288
void* _effectIndexes; // 0x290
bool _isRepeatCancel; // 0x298
int32_t _rangeX; // 0x29C
int32_t _rangeY; // 0x2A0
int32_t _rangeWidth; // 0x2A4
int32_t _rangeHeight; // 0x2A8
void* _rangeBeginNavigator; // 0x2B0
void* _swapIcons; // 0x2B8
void* _fromNavigators; // 0x2C0
void* _toNavigators; // 0x2C8
void* _existSwapIndexes; // 0x2D0
int32_t _searchType; // 0x2D8
void* _searchData; // 0x2E0
bool _isDuckOn; // 0x2E8
void* _param; // 0x2F0
void* _selected; // 0x2F8
System::Action::Object* _onSelected; // 0x300
System::Action::Object* _onDecide; // 0x308
System::Action::Object* _onConfirm; // 0x310
System::Action::Object* _onComplete; // 0x318
System::Action::Object* _onCancelSelect; // 0x320
int32_t _targetLangId; // 0x328
UnityEngine::Coroutine::Object* _coOpen; // 0x330
UnityEngine::Coroutine::Object* _coClose; // 0x338
void* _modelView; // 0x340
void* _messageParam; // 0x348
void* _keyguideParam; // 0x350
UnityEngine::Material::Object* _matSearchButton; // 0x358
UnityEngine::Material::Object* _matBoxButton; // 0x360
void* _twSequence; // 0x368
void* _contextMenu; // 0x370
float _waitSave; // 0x378
void* _formChangeEffectInstance; // 0x380
bool isCancelFormChange; // 0x388
void* _tradeParam; // 0x390
void* _tradeInfoCanvasGroup; // 0x398
void* _networkDialog; // 0x3A0
bool _isPhaseProcDone; // 0x3A8
bool _isTradeInfoEnable; // 0x3A9
float _tradeTimeoutCount; // 0x3AC
bool _isTradeCheckIllegal; // 0x3B0
float _modelOpenPosX; // 0x3B4
float _modelClosePosX; // 0x3B8
float _modelTradeOpenPosX; // 0x3BC
float _modelTradeClosePosX; // 0x3C0
float _partyOpenPosX; // 0x3C4
float _partyClosePosX; // 0x3C8
float _boxTrayPosX; // 0x3CC
float _boxTraySlideX; // 0x3D0
float _trayCellSizeX; // 0x3D4
float _trayCellSizeY; // 0x3D8
bool _isControlEnable; // 0x3DC
bool _isForceClosing; // 0x3DD
};
};
}
9 changes: 7 additions & 2 deletions src/mod/externals/PlayerWork.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,11 @@
#include "externals/Pml/PokePara/SavePokeParty.h"
#include "externals/Pml/PokeParty.h"
#include "externals/ReBuffnameData.h"
#include "externals/SmartPoint/Components/PlayerPrefsProvider_PlayerWork_.h"
#include "externals/SmartPoint/Components/PlayerPrefsProvider.h"
#include "externals/System/Nullable.h"
#include "externals/System/Primitives.h"
#include "externals/System/String.h"
#include "externals/Dpr/Box/SaveBoxData.h"

struct PlayerWork : ILClass<PlayerWork, 0x04c59b58> {
struct SaveData : ILStruct<SaveData> {
Expand Down Expand Up @@ -167,7 +168,7 @@ struct PlayerWork : ILClass<PlayerWork, 0x04c59b58> {

static_assert(offsetof(StaticFields, _SafariBallNum_k__BackingField) == 72);

struct Fields : SmartPoint::Components::PlayerPrefsProvider_PlayerWork_::Fields {
struct Fields : SmartPoint::Components::PlayerPrefsProvider<PlayerWork>::Fields {
PlayerWork::SaveData::Object _saveData;
int32_t _transitionZoneID;
int32_t _locatorIndex;
Expand Down Expand Up @@ -294,4 +295,8 @@ struct PlayerWork : ILClass<PlayerWork, 0x04c59b58> {
static inline int32_t get_supportPokeType() {
return external<int32_t>(0x02cf1910);
}

static inline Dpr::Box::SaveBoxData::Object* GetBoxData() {
return external<Dpr::Box::SaveBoxData::Object*>(0x02cf0180);
}
};
5 changes: 5 additions & 0 deletions src/mod/externals/Pml/PokePara/SerializedPokemonFull.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,14 @@ namespace Pml::PokePara {
static long GetByteCount() {
return sizeof(System::Byte) * 0x158;
}

inline void CreateWorkIfNeed() {
external<void>(0x020558c0, this);
}
};

static Il2CppClass* SerializedPokemonFull_array_TypeInfo() {
return *reinterpret_cast<Il2CppClass**>(exl::util::modules::GetTargetOffset(0x04c59c08));
}

}
23 changes: 23 additions & 0 deletions src/mod/externals/SmartPoint/Components/PlayerPrefsProvider.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#pragma once

#include "externals/il2cpp-api.h"


// Forward declaration to avoid circular dependencies
struct PlayerWork;

namespace SmartPoint::Components {
template <typename T>
struct PlayerPrefsProvider : ILClass<T> {
struct Fields {
bool _loaded;
};

static inline StaticILMethod<0x04c90330, PlayerWork>
Method$SmartPoint_Components_PlayerPrefsProvider_PlayerWork_get_instance;

static inline typename T::Object* get_Instance(ILMethod<T>& method) {
return ILClass<T>::template external<typename T::Object*>(0x02324910, *method);
}
};
}

This file was deleted.

2 changes: 2 additions & 0 deletions src/mod/externals/System/Primitives.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ namespace System {
typedef int32_t Int32;
typedef uint32_t UInt32;
typedef int64_t Int64;
typedef float Single;

PRIMITIVE_ARRAY(Boolean);
static Il2CppClass* Boolean_array_TypeInfo() {
Expand All @@ -28,4 +29,5 @@ namespace System {
}
PRIMITIVE_ARRAY(UInt32);
PRIMITIVE_ARRAY(Int64);
PRIMITIVE_ARRAY(Single);
}
Loading