From f48da1bf4cb0744311cbc5d46a7346320938e182 Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Fri, 2 Oct 2026 06:39:08 -0500 Subject: [PATCH] Restore focus-object emission order and shared pane string for native linking --- configure.py | 2 +- include/math/iplMathTypes.h | 4 ++++ include/scene/board/iplFocusObject.h | 19 +--------------- src/scene/board/iplFocusObject.cpp | 33 +++++++++++++++++++++++++++- 4 files changed, 38 insertions(+), 20 deletions(-) diff --git a/configure.py b/configure.py index 9a016d4c..ec443b6e 100644 --- a/configure.py +++ b/configure.py @@ -742,7 +742,7 @@ config.libs = [ Object(Matching, "scene/board/iplBoardObject.cpp"), Object(Matching, "scene/board/iplBoardSD.cpp"), Object(Matching, "scene/board/iplUrlProcessor.cpp"), - Object(Equivalent, "scene/board/iplFocusObject.cpp"), + Object(Matching, "scene/board/iplFocusObject.cpp"), ] ), IPLSection("button", [ diff --git a/include/math/iplMathTypes.h b/include/math/iplMathTypes.h index 6dd4f212..fe2ea912 100644 --- a/include/math/iplMathTypes.h +++ b/include/math/iplMathTypes.h @@ -143,7 +143,11 @@ namespace ipl { #else VEC3 operator-(const VEC3& rhs) const { return VEC3(x - rhs.x, y - rhs.y, z - rhs.z); } #endif +#ifdef IPL_FOCUS_OBJECT_CPP + VEC3 operator*(f32 val) const; +#else VEC3 operator*(f32 val) const { return VEC3(x * val, y * val, z * val); } +#endif VEC3 operator*(f64 val) const { nw4r::math::VEC3 vecOut; VEC3Scale(&vecOut, this, (f32)val); diff --git a/include/scene/board/iplFocusObject.h b/include/scene/board/iplFocusObject.h index 08b677bb..1982a7e3 100644 --- a/include/scene/board/iplFocusObject.h +++ b/include/scene/board/iplFocusObject.h @@ -53,24 +53,7 @@ namespace ipl { mBScroller.init(); } - BOOL calc(bool canScroll) __attribute__((never_inline)) /*for now*/ { - BOOL result = FALSE; - - if (canScroll) { - if (mBScroller.calc()) { - result = TRUE; - } - } - - mScroller.calc(); - - f32 movable = mScroller.movable_pos(mBScroller.getSpeed()); - - mScroller.addScroll(movable); - mBScroller.addSoundFreq(movable); - - return result; - } + BOOL calc(bool canScroll); BOOL is_busy() const { BOOL result = TRUE; diff --git a/src/scene/board/iplFocusObject.cpp b/src/scene/board/iplFocusObject.cpp index 95d6a299..bbc5d42a 100644 --- a/src/scene/board/iplFocusObject.cpp +++ b/src/scene/board/iplFocusObject.cpp @@ -1,3 +1,4 @@ +#define IPL_FOCUS_OBJECT_CPP #include "scene/board/iplFocusObject.h" #include "scene/parentalDialog/iplParentalDialog.h" @@ -11,6 +12,8 @@ #include #include +extern char scPaneName_B_Stop[]; + namespace ipl { namespace math { static inline VEC3 addWeightedVectors(const VEC3& start, const VEC3& end) { @@ -357,6 +360,13 @@ namespace ipl { } } + } + namespace math { + inline VEC3 VEC3::operator*(f32 val) const { + return VEC3(x * val, y * val, z * val); + } + } + namespace scene { void focus_object::stt_normal() { Button* button = get_button(); @@ -2111,7 +2121,7 @@ namespace ipl { if (event == ::gui::EventHandler::ON_TRIG) { if (con->downTrg(controller::BTN_INTERACT)) { - if (strcmp(paneName, "B_Stop") == 0) { + if (strcmp(paneName, scPaneName_B_Stop) == 0) { if (mpInstance->mState == focus_object::STATE_NORMAL) { focus_object::get_button()->animation(Button::IDANIM_OPTOUT_SELECT); @@ -2132,3 +2142,24 @@ namespace ipl { } } // namespace scene } // namespace ipl + +char scPaneName_B_Stop[] = "B_Stop"; + +BOOL ipl::scene::scroller::calc(bool canScroll) { + BOOL result = FALSE; + + if (canScroll) { + if (mBScroller.calc()) { + result = TRUE; + } + } + + mScroller.calc(); + + f32 movable = mScroller.movable_pos(mBScroller.getSpeed()); + + mScroller.addScroll(movable); + mBScroller.addSoundFreq(movable); + + return result; +} -- 2.49.1