Add AS3 DisplayObject compat properties: mouseEnable and backgroundAlpha#8
Merged
Merged
Conversation
…lpha WoWP and other BigWorld-based titles set these legacy properties on DisplayObject instances via ExternalInterface. Without them the AS3 runtime raises ReferenceError #1056 at startup. mouseEnable: stub getter (returns true) / setter (no-op), alias for the standard mouseEnabled property removed in 4.3. backgroundAlpha: stub getter (returns 1.0) / setter (no-op), a GFx extension property used for per-clip background transparency control. Both were present in the patched 4.2 SDK shipped with BigWorld and are restored here in 4.3 to maintain runtime compatibility. Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
WoWP and other BigWorld-based titles set
mouseEnableandbackgroundAlphaonDisplayObjectinstances via the C++ ExternalInterface / ExternalAPI mechanism. Without these properties the AS3 runtime throwsReferenceError #1056: Cannot create propertyat startup.Both were patched into the 4.2 SDK that shipped with BigWorld. This PR restores them in 4.3.
mouseEnable(bool, read/write onDisplayObject) — stub compat alias for the standardmouseEnabledproperty. Getter returnstrue, setter is a no-op. The property was onDisplayObjectin the old SDK rather thanInteractiveObjectto match BigWorld usage.backgroundAlpha(Number, read/write onDisplayObject) — GFx extension for per-clip background transparency control. Getter returns1.0, setter is a no-op (sufficient for startup compatibility).Changes
Src/GFx/AS3/Obj/Display/AS3_Obj_Display_DisplayObject.h: added 4mid_enum entries, 4 method declarations, bumpedThunkInfoNum62в†’66 andtit[]size 96в†’102.Src/GFx/AS3/Obj/Display/AS3_Obj_Display_DisplayObject.cpp: added ThunkFunc typedefs, template specialisations, 6tit[]type-info entries, 4ti[]thunk-table entries, and stub implementations.Test plan
libgfx_as3.libcompiles without errors on our changes (sample-app failures inApps/Samples/Common/FxRenderThread.hare pre-existing and unrelated)ReferenceError #1056: Cannot create property mouseEnableorbackgroundAlphawarnings at startup