Batch #12861 by KWDev: 25 byte-identical, 0 confirmed by peer review. - fn_01999 DeviceStateDX9::SetFVF: byte-identical - fn_03738 CBarterMarketItemMgr::GetAmountById: byte-identical - fn_03765 CExpandedBarterMarketItemMgr::GetItemValueById: byte-identical - fn_03768 CExpandedBarterMarketItemMgr::GetItemFactorById: byte-identical - fn_03771 CExpandedBarterMarketItemMgr::GetValueById: byte-identical - fn_04794 CSession::AddItem1784: byte-identical - fn_08113 CTagData::UpdateActiveCount: byte-identical - fn_08269 CPlayerSkillBundle::UpdatePending: byte-identical - fn_08277 CPlayerSkillBundle::FindExtra: byte-identical - fn_09851 UIMacroReporterWnd::Slot31: byte-identical - fn_10062 UIRodexInboxWnd::RemoveInboxMail: byte-identical - fn_11524 UIChatHisBox::Resize: byte-identical - fn_16039 GameSettingsUI::CUIGroupSkin::Refresh: byte-identical - fn_16979 UIWindow::FindUid: byte-identical - fn_17144 UIWindowMgr::RemoveOrder: byte-identical - fn_17165 UIWindowMgr::FindSnapExcludedWindow: byte-identical - fn_17414 CWebBrowser::Normalize: byte-identical - fn_18045 GuildInfo::UpdateMemberStatus: byte-identical - fn_18046 GuildInfo::SetMemberOnline: byte-identical - fn_18309 TELEXInputMode::IsModifierKey: byte-identical - fn_21008 CRenderObject::Face: byte-identical - fn_23740 CSession::UpdateAdditionalSkill: byte-identical - fn_23741 CSession::UpdateHomunSkill: byte-identical - fn_23742 CSession::UpdateMercSkill: byte-identical - fn_23777 CSession::FindUnknown0778: byte-identical Merged automatically: every function is byte-identical to the original.
68 lines
2 KiB
C++
68 lines
2 KiB
C++
#include "UI/MiniPartyPlacement.h"
|
|
#include "UI/MiniPartyGrid.h"
|
|
#include "UI/Window/MiniPartyWndAreaMgr.h"
|
|
#include "UI/Window/UIWindow.h"
|
|
#include "UI/Window/UIWindowMgr.h"
|
|
|
|
// OFFSET: 0x00737680
|
|
// FUNCTION: fn_07650
|
|
CMiniPartyWndSortArea::CMiniPartyWndSortArea(const RECT& bounds) {
|
|
SetRect(&this->area, 0, 0, g_windowMgr.unknown_047C, g_windowMgr.unknown_0480);
|
|
this->columns = (this->area.right - this->area.left) / g_miniPartyCellWidth;
|
|
this->rows = (this->area.bottom - this->area.top) / g_miniPartyCellHeight;
|
|
|
|
const RECT target = bounds;
|
|
|
|
for (int index = 0; index < this->columns * this->rows; ++index) {
|
|
const int x = this->area.left + g_miniPartyCellWidth * (index / this->rows);
|
|
const int y = this->area.top + g_miniPartyCellHeight * (index % this->rows);
|
|
|
|
if (target.left <= x && x + g_miniPartyCellWidth <= target.right && target.top <= y && y + g_miniPartyCellHeight <= target.bottom) {
|
|
this->cells.push_back(index);
|
|
}
|
|
}
|
|
}
|
|
|
|
// OFFSET: 0x00737830
|
|
// FUNCTION: fn_07651
|
|
void __stdcall Nullsub228() {
|
|
}
|
|
|
|
// OFFSET: 0x00A91870
|
|
// FUNCTION: fn_17165
|
|
UIWindow* UIWindowMgr::FindSnapExcludedWindow(int cell) {
|
|
for (UIWindow* window : this->snapExcluded) {
|
|
if (cell == *reinterpret_cast<int*>(reinterpret_cast<char*>(window) + 0x104)) {
|
|
return window;
|
|
}
|
|
}
|
|
return nullptr;
|
|
}
|
|
|
|
// OFFSET: 0x00737B00
|
|
// FUNCTION: fn_07657
|
|
int CMiniPartyWndAreaMgr::FindFreeCell() {
|
|
CMiniPartyWndSortArea area(g_windowMgr.GetMiniPartyUsableArea());
|
|
const std::list<int> cells = area.GetCells();
|
|
|
|
for (std::vector<int>::iterator it = this->available.begin(); it != this->available.end(); ++it) {
|
|
const std::list<int>::const_iterator found = std::find(cells.begin(), cells.end(), *it);
|
|
|
|
if (found == cells.end()) {
|
|
continue;
|
|
}
|
|
|
|
const UIWindow* const window = g_windowMgr.FindSnapExcludedWindow(*it);
|
|
if (window == nullptr) {
|
|
return *it;
|
|
}
|
|
}
|
|
|
|
return -1;
|
|
}
|
|
|
|
// OFFSET: 0x00737D40
|
|
// FUNCTION: fn_07658
|
|
std::list<int> CMiniPartyWndSortArea::GetCells() const {
|
|
return this->cells;
|
|
}
|