Import project

Original repository: https://github.com/encounter/ww
This commit is contained in:
Luke Street
2023-09-10 00:42:26 -04:00
parent 81ac53f131
commit adb95b135c
3731 changed files with 481532 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
//
// Generated by dtk
// Translation Unit: c_m2d_g_box.cpp
//
#include "SSystem/SComponent/c_m2d_g_box.h"
#include "MSL_C/math.h"
#include "dolphin/types.h"
/* 8024A0E0-8024A104 .text Set__8cM2dGBoxFR3cXyR3cXy */
void cM2dGBox::Set(cXy& p0, cXy& p1) {
mP0 = p0;
mP1 = p1;
}
/* 8024A104-8024A400 .text GetLen__8cM2dGBoxCFRC3cXy */
f32 cM2dGBox::GetLen(const cXy& p) const {
// inside the box
if (p.x >= mP0.x && p.x <= mP1.x && p.y >= mP0.y && p.y <= mP1.y)
return 0.0f;
// TODO: other checks
float distX = abs(mP0.x - p.x);
float distY = abs(mP0.y - p.y);
return distX < distY ? distX : distY;
}