- Field names from the 12340 type library (x/y/z/w, a0..d3, minY/minX/maxY/maxX, b/t, c/r, n/d, origin/dir) - Files renamed to match their class; CRay -> C3Ray; C3Segment, CRect, CiRect, C2iVector, C3iVector split out - MouseEventData, CharacterInfo, M2Bounds moved out of Tempest headers - 107 functions: C2/C3/C4Vector, C33/C34/C44Matrix, C4Quaternion, C4Plane, CAaBox, CAaSphere, C3Ray, CRect, CiRect, CImVector, NTempest - 0x4C1C40 is cdecl (q, out): ported as static C44Matrix::FromQuaternion (guessed) Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
25 lines
639 B
C++
25 lines
639 B
C++
#include "Engine/Source/Tempest/CiRect.h"
|
|
|
|
// VERIFY: 224583e3 manual
|
|
// OFFSET: 0x00683A20
|
|
CiRect operator&(const CiRect& l, const CiRect& r) {
|
|
int32_t maxX = l.maxX >= r.maxX ? r.maxX : l.maxX;
|
|
int32_t maxY = l.maxY >= r.maxY ? r.maxY : l.maxY;
|
|
int32_t minX = l.minX <= r.minX ? r.minX : l.minX;
|
|
int32_t minY = l.minY > r.minY ? l.minY : r.minY;
|
|
|
|
CiRect result;
|
|
result.minX = minX;
|
|
result.minY = minY;
|
|
result.maxY = maxY;
|
|
result.maxX = maxX;
|
|
return result;
|
|
}
|
|
|
|
// VERIFY: 3daad48c manual
|
|
// OFFSET: 0x00683A80
|
|
CiRect CiRect::operator&=(const CiRect& r) {
|
|
*this = *this & r;
|
|
return *this;
|
|
}
|