Decompile fn_13667 (NormalItemSlotWindow::IsValid)
Batch #12260 by cremane: 0 byte-identical, 1 confirmed by peer review. - fn_13667 NormalItemSlotWindow::IsValid: logic confirmed by peer review Peer-reviewed-by: Yommy, dori, codeplay Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
parent
e1f4be4caa
commit
8bfebeaa17
3 changed files with 7 additions and 7 deletions
|
|
@ -25,13 +25,13 @@ void NormalItemSlotWindow::Reset() {
|
|||
|
||||
// OFFSET: 0x009A6000
|
||||
// FUNCTION: fn_13667
|
||||
bool NormalItemSlotWindow::IsValid(int screenWidth, int screenHeight, bool active) const {
|
||||
if (this->width != 290 || this->height < 43 || this->height > 175 || (this->height - 10) % 33 != 0 || (this->height == 175 && !active)) {
|
||||
return false;
|
||||
int NormalItemSlotWindow::IsValid() const {
|
||||
if (this->width != 290 || this->height > 175 || this->height < 43 || (this->height - 10) % 33 != 0 || (this->height == 175 && !g_session.ItemSlotActive())) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
const int maxX = screenWidth - 290;
|
||||
const int maxY = screenHeight - this->height;
|
||||
const int maxX = g_renderer->viewport.width - 290;
|
||||
const int maxY = g_renderer->viewport.height - this->height;
|
||||
return this->x >= 0 && this->x <= maxX && this->y >= 0 && this->y <= maxY;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue