Files
wowdecomp/Engine/Source/Tempest/CRect.cpp
T
SatyandClaude Opus 5.5 34770ee7ab Frame: port Engine/Frame (waves 1-4), 1667 of 1669 functions
Core (CSimpleFrame + Lua, CSimpleTop/CFrameStrata/CSimpleRender/
CRenderBatch, CSimpleRegion/CBackdropGenerator/CScriptRegion), animation,
text (FontString/Font/Fontable), texture and model, buttons, EditBox,
MessageFrame/MessageScrollFrame, MovieFrame/ColorSelect/StatusBar,
Slider/ScrollFrame/HTML/HyperlinkedFrame, all Lua method tables and
RegisterScriptMethods. Layouts, vtables and sizes rebuilt from the
12340 ctors, vtables and allocator initializers; CScriptObject vtable
slots 5/6 fixed; CSimpleFontedFrame is a real secondary base. Lua error
paths return after luaL_error as in 12340 (209 sites; 5 fall through).
Binary quirks kept and documented in docs/.

Supporting additions: Event key/char/ime/focus/size event headers,
Scrn/Scrn.h (ScrnLayerCreate), DivxDecoder import declarations,
C2Vector/CRect helpers, CM2Light dtor, OsInputEnableSecureMode, stpl.h
instance addresses, FrameXML LoadXML_AnimGroup/Create_SimpleMovieFrame.
Engine->WoW includes where 12340 calls directly: CSimpleModelFFX,
StringToMouseButton, GetDeclinedWord, EmblemTextureUpdate.

Also drops stale VERIFY stamps found invalid by the harness recheck.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-27 15:32:18 +02:00

74 lines
2.0 KiB
C++

#include "Engine/Source/Tempest/C2Vector.h"
#include "Engine/Source/Tempest/CRect.h"
// VERIFY: 58e5bdcd auto
// OFFSET: 0x0047FC40
bool CRect::ContainsPoint(const C2Vector& point) const {
return this->minX < point.x && this->maxX > point.x && this->minY < point.y && this->maxY > point.y;
}
// VERIFY: 9e372182 manual
// OFFSET: 0x00488D40
bool CRect::IsPointInside(const C2Vector& point) const {
return this->minX <= point.x && this->maxX >= point.x && this->minY <= point.y && this->maxY >= point.y;
}
// VERIFY: e12283dd auto
// OFFSET: 0x0048EDE0
CRect CRect::operator&=(const CRect& r) {
*this = *this & r;
return *this;
}
// VERIFY: d0f2b73f auto
// OFFSET: 0x0048ED60
CRect operator&(const CRect& l, const CRect& r) {
float maxX = r.maxX <= l.maxX ? r.maxX : l.maxX;
float maxY = r.maxY <= l.maxY ? r.maxY : l.maxY;
float minX = r.minX >= l.minX ? r.minX : l.minX;
CRect result;
result.minY = r.minY >= l.minY ? r.minY : l.minY;
result.minX = minX;
result.maxY = maxY;
result.maxX = maxX;
return result;
}
// VERIFY: b5d6979a manual
// OFFSET: 0x0078F2F0
CRect operator|(const CRect& l, const CRect& r) {
float maxX = r.maxX >= l.maxX ? r.maxX : l.maxX;
float maxY = r.maxY >= l.maxY ? r.maxY : l.maxY;
float minX = r.minX <= l.minX ? r.minX : l.minX;
CRect result;
result.minY = r.minY <= l.minY ? r.minY : l.minY;
result.minX = minX;
result.maxY = maxY;
result.maxX = maxX;
return result;
}
// VERIFY: cb7d68e7 manual
// OFFSET: 0x007A6DA0
CRect operator+(const CRect& l, const CRect& r) {
CRect result;
result.minY = l.minY + r.minY;
result.minX = l.minX + r.minX;
result.maxY = l.maxY + r.maxY;
result.maxX = l.maxX + r.maxX;
return result;
}
// VERIFY: a12d3dd3 manual
// OFFSET: 0x007A6DD0
CRect operator/(const CRect& l, const CRect& r) {
CRect result;
result.minY = l.minY / r.minY;
result.minX = l.minX / r.minX;
result.maxY = l.maxY / r.maxY;
result.maxX = l.maxX / r.maxX;
return result;
}