Browse files

[flash.filters] Correct super class for some stub classes

  • Loading branch information...
1 parent 521418d commit b2b1c48fa9ce943be76c4d7ee1ed7eef25bac8ab @aajanki aajanki committed Feb 28, 2013
Showing with 10 additions and 10 deletions.
  1. +8 −8 src/scripting/abc.cpp
  2. +2 −2 src/scripting/class.h
View
16 src/scripting/abc.cpp
@@ -272,21 +272,21 @@ void ABCVm::registerClasses()
builtin->registerBuiltin("DropShadowFilter","flash.filters",Class<DropShadowFilter>::getRef());
builtin->registerBuiltin("GlowFilter","flash.filters",Class<GlowFilter>::getRef());
builtin->registerBuiltin("GradientGlowFilter","flash.filters",
- Class<ASObject>::getStubClass(QName("GradientGlowFilter","flash.filters")));
+ Class<ASObject>::getStubClass(QName("GradientGlowFilter","flash.filters"), Class<BitmapFilter>::getRef()));
builtin->registerBuiltin("BevelFilter","flash.filters",
- Class<ASObject>::getStubClass(QName("BevelFilter","flash.filters")));
+ Class<ASObject>::getStubClass(QName("BevelFilter","flash.filters"), Class<BitmapFilter>::getRef()));
builtin->registerBuiltin("ColorMatrixFilter","flash.filters",
- Class<ASObject>::getStubClass(QName("ColorMatrixFilter","flash.filters")));
+ Class<ASObject>::getStubClass(QName("ColorMatrixFilter","flash.filters"), Class<BitmapFilter>::getRef()));
builtin->registerBuiltin("BlurFilter","flash.filters",
- Class<ASObject>::getStubClass(QName("BlurFilter","flash.filters")));
+ Class<ASObject>::getStubClass(QName("BlurFilter","flash.filters"), Class<BitmapFilter>::getRef()));
builtin->registerBuiltin("ConvolutionFilter","flash.filters",
- Class<ASObject>::getStubClass(QName("ConvolutionFilter","flash.filters")));
+ Class<ASObject>::getStubClass(QName("ConvolutionFilter","flash.filters"), Class<BitmapFilter>::getRef()));
builtin->registerBuiltin("DisplacementMapFilter","flash.filters",
- Class<ASObject>::getStubClass(QName("DisplacementMapFilter","flash.filters")));
+ Class<ASObject>::getStubClass(QName("DisplacementMapFilter","flash.filters"), Class<BitmapFilter>::getRef()));
builtin->registerBuiltin("GradientBevelFilter","flash.filters",
- Class<ASObject>::getStubClass(QName("GradientBevelFilter","flash.filters")));
+ Class<ASObject>::getStubClass(QName("GradientBevelFilter","flash.filters"), Class<BitmapFilter>::getRef()));
builtin->registerBuiltin("ShaderFilter","flash.filters",
- Class<ASObject>::getStubClass(QName("ShaderFilter","flash.filters")));
+ Class<ASObject>::getStubClass(QName("ShaderFilter","flash.filters"), Class<BitmapFilter>::getRef()));
builtin->registerBuiltin("AntiAliasType","flash.text",Class<AntiAliasType>::getRef());
builtin->registerBuiltin("Font","flash.text",Class<ASFont>::getRef());
View
4 src/scripting/class.h
@@ -243,12 +243,12 @@ class Class<ASObject>: public Class_base
/* This creates a stub class, i.e. a class with given name but without
* any implementation.
*/
- static _R<Class<ASObject>> getStubClass(const QName& name)
+ static _R<Class<ASObject>> getStubClass(const QName& name, _R<Class_base> superClass=Class<ASObject>::getRef())
{
MemoryAccount* memoryAccount = getSys()->allocateMemoryAccount(name.name);
Class<ASObject>* ret = new (getSys()->unaccountedMemory) Class<ASObject>(name, memoryAccount);
- ret->setSuper(Class<ASObject>::getRef());
+ ret->setSuper(superClass);
ret->prototype = _MNR(new_objectPrototype());
ret->prototype->prevPrototype=ret->super->prototype;
ret->incRef();

0 comments on commit b2b1c48

Please sign in to comment.