@@ -34,7 +34,7 @@ idSWFScriptObject* GetMouseEventDispatcher( idSWFScriptObject* object )
3434 idSWFScriptObject* dispatcher = nullptr ;
3535 if ( object->HasValidProperty ( " __eventDispatcher__" ) )
3636 {
37- dispatcher = object->Get ( " __eventDispatcher__" ).GetObject ( );
37+ dispatcher = object->Get ( " __eventDispatcher__" ).GetObject ();
3838 if ( dispatcher->HasValidProperty ( " click" )
3939 || dispatcher->HasValidProperty ( " contextMenu" )
4040 || dispatcher->HasValidProperty ( " doubleClick" )
@@ -327,34 +327,34 @@ bool idSWF::HandleEvent( const sysEvent_t* event )
327327
328328 if ( !eventDispatcher.IsUndefined () && !var.IsFunction () )
329329 {
330- var = eventDispatcher.GetObject ( )->Get ( " click" );
331- if ( !var.IsFunction ( ) )
330+ var = eventDispatcher.GetObject ()->Get ( " click" );
331+ if ( !var.IsFunction () )
332332 {
333- var = eventDispatcher.GetObject ( )->Get ( " mouseDown" );
333+ var = eventDispatcher.GetObject ()->Get ( " mouseDown" );
334334 }
335335 }
336- if ( var.IsFunction ( ) )
336+ if ( var.IsFunction () )
337337 {
338338 idSWFScriptVar eventArg;
339- auto * eventObj = globals->Get ( " EventDispatcher" ).GetObject ( )
340- ->Get ( " MouseEvent" ).GetObject ( )
341- ->Get ( " [MouseEvent]" ).GetObject ( );
342- eventArg.SetObject ( idSWFScriptObject::Alloc ( ) );
343- eventArg.GetObject ( )->DeepCopy ( eventObj );
339+ auto * eventObj = globals->Get ( " EventDispatcher" ).GetObject ()
340+ ->Get ( " MouseEvent" ).GetObject ()
341+ ->Get ( " [MouseEvent]" ).GetObject ();
342+ eventArg.SetObject ( idSWFScriptObject::Alloc () );
343+ eventArg.GetObject ()->DeepCopy ( eventObj );
344344 idSWFParmList parms;
345345 parms.Append ( eventArg );
346346 parms.Append ( event->inputDevice );
347- if ( !( ( idSWFScriptFunction_Script* ) var.GetFunction ( ) )->GetScope ( )->Num ( ) )
347+ if ( !( ( idSWFScriptFunction_Script* ) var.GetFunction () )->GetScope ()->Num () )
348348 {
349- ( ( idSWFScriptFunction_Script* ) var.GetFunction ( ) )->GetScope ( )->Append ( globals );
349+ ( ( idSWFScriptFunction_Script* ) var.GetFunction () )->GetScope ()->Append ( globals );
350350 }
351- var.GetFunction ( )->Call ( hitObject, parms );
352- parms.Clear ( );
351+ var.GetFunction ()->Call ( hitObject, parms );
352+ parms.Clear ();
353353 return true ;
354354 }
355355
356356 var = hitObject->Get ( " onPress" );
357- if ( var.IsFunction ( ) )
357+ if ( var.IsFunction () )
358358 {
359359 idSWFParmList parms;
360360 parms.Append ( event->inputDevice );
@@ -387,27 +387,27 @@ bool idSWF::HandleEvent( const sysEvent_t* event )
387387 {
388388 eventDispatcher = mouseObject->Get ( " __eventDispatcher__" );
389389
390- if ( !eventDispatcher.IsUndefined ( ) && !var.IsFunction ( ) )
390+ if ( !eventDispatcher.IsUndefined () && !var.IsFunction () )
391391 {
392- var = eventDispatcher.GetObject ( )->Get ( " mouseUp" );
392+ var = eventDispatcher.GetObject ()->Get ( " mouseUp" );
393393 }
394- if ( var.IsFunction ( ) )
394+ if ( var.IsFunction () )
395395 {
396396 idSWFScriptVar eventArg;
397- auto * eventObj = globals->Get ( " EventDispatcher" ).GetObject ( )
398- ->Get ( " MouseEvent" ).GetObject ( )
399- ->Get ( " [MouseEvent]" ).GetObject ( );
400- eventArg.SetObject ( idSWFScriptObject::Alloc ( ) );
401- eventArg.GetObject ( )->DeepCopy ( eventObj );
397+ auto * eventObj = globals->Get ( " EventDispatcher" ).GetObject ()
398+ ->Get ( " MouseEvent" ).GetObject ()
399+ ->Get ( " [MouseEvent]" ).GetObject ();
400+ eventArg.SetObject ( idSWFScriptObject::Alloc () );
401+ eventArg.GetObject ()->DeepCopy ( eventObj );
402402 idSWFParmList parms;
403403 parms.Append ( eventArg );
404- if ( !( ( idSWFScriptFunction_Script* ) var.GetFunction ( ) )->GetScope ( )->Num ( ) )
404+ if ( !( ( idSWFScriptFunction_Script* ) var.GetFunction () )->GetScope ()->Num () )
405405 {
406- ( ( idSWFScriptFunction_Script* ) var.GetFunction ( ) )->GetScope ( )->Append ( globals );
406+ ( ( idSWFScriptFunction_Script* ) var.GetFunction () )->GetScope ()->Append ( globals );
407407 }
408- var.GetFunction ( )->Call ( mouseObject, parms );
409- parms.Clear ( );
410- mouseObject->Release ( );
408+ var.GetFunction ()->Call ( mouseObject, parms );
409+ parms.Clear ();
410+ mouseObject->Release ();
411411 mouseObject = NULL ;
412412 return true ;
413413 }
@@ -608,31 +608,31 @@ bool idSWF::HandleEvent( const sysEvent_t* event )
608608 idSWFScriptVar var = hoverObject->Get ( " onRollOut" );
609609
610610 eventDispatcher = hoverObject->Get ( " __eventDispatcher__" );
611- if ( !eventDispatcher.IsUndefined ( ) && !var.IsFunction ( ) )
611+ if ( !eventDispatcher.IsUndefined () && !var.IsFunction () )
612612 {
613- var = eventDispatcher.GetObject ( )->Get ( " mouseOut" );
614- if ( var.IsFunction ( ) )
613+ var = eventDispatcher.GetObject ()->Get ( " mouseOut" );
614+ if ( var.IsFunction () )
615615 {
616616 idSWFScriptVar eventArg;
617- auto * eventObj = globals->Get ( " EventDispatcher" ).GetObject ( )
618- ->Get ( " MouseEvent" ).GetObject ( )
619- ->Get ( " [MouseEvent]" ).GetObject ( );
620- eventArg.SetObject ( idSWFScriptObject::Alloc ( ) );
621- eventArg.GetObject ( )->DeepCopy ( eventObj );
617+ auto * eventObj = globals->Get ( " EventDispatcher" ).GetObject ()
618+ ->Get ( " MouseEvent" ).GetObject ()
619+ ->Get ( " [MouseEvent]" ).GetObject ();
620+ eventArg.SetObject ( idSWFScriptObject::Alloc () );
621+ eventArg.GetObject ()->DeepCopy ( eventObj );
622622 idSWFParmList parms;
623623 parms.Append ( eventArg );
624- if ( !( ( idSWFScriptFunction_Script* ) var.GetFunction ( ) )->GetScope ( )->Num ( ) )
624+ if ( !( ( idSWFScriptFunction_Script* ) var.GetFunction () )->GetScope ()->Num () )
625625 {
626- ( ( idSWFScriptFunction_Script* ) var.GetFunction ( ) )->GetScope ( )->Append ( globals );
626+ ( ( idSWFScriptFunction_Script* ) var.GetFunction () )->GetScope ()->Append ( globals );
627627 }
628- var.GetFunction ( )->Call ( hoverObject, parms );
629- parms.Clear ( );
628+ var.GetFunction ()->Call ( hoverObject, parms );
629+ parms.Clear ();
630630 retVal = true ;
631631 }
632632 }
633- else if ( var.IsFunction ( ) )
633+ else if ( var.IsFunction () )
634634 {
635- var.GetFunction ( )->Call ( hoverObject, idSWFParmList ( ) );
635+ var.GetFunction ()->Call ( hoverObject, idSWFParmList () );
636636 retVal = true ;
637637 }
638638 hoverObject->Release ();
@@ -646,31 +646,31 @@ bool idSWF::HandleEvent( const sysEvent_t* event )
646646 idSWFScriptVar var = hitObject->Get ( " onRollOver" );
647647
648648 eventDispatcher = hoverObject->Get ( " __eventDispatcher__" );
649- if ( !eventDispatcher.IsUndefined ( ) && !var.IsFunction ( ) )
649+ if ( !eventDispatcher.IsUndefined () && !var.IsFunction () )
650650 {
651- var = eventDispatcher.GetObject ( )->Get ( " mouseOver" );
651+ var = eventDispatcher.GetObject ()->Get ( " mouseOver" );
652652 if ( var.IsFunction () )
653653 {
654654 idSWFScriptVar eventArg;
655- auto * eventObj = globals->Get ( " EventDispatcher" ).GetObject ( )
656- ->Get ( " MouseEvent" ).GetObject ( )
657- ->Get ( " [MouseEvent]" ).GetObject ( );
658- eventArg.SetObject ( idSWFScriptObject::Alloc ( ) );
659- eventArg.GetObject ( )->DeepCopy ( eventObj );
655+ auto * eventObj = globals->Get ( " EventDispatcher" ).GetObject ()
656+ ->Get ( " MouseEvent" ).GetObject ()
657+ ->Get ( " [MouseEvent]" ).GetObject ();
658+ eventArg.SetObject ( idSWFScriptObject::Alloc () );
659+ eventArg.GetObject ()->DeepCopy ( eventObj );
660660 idSWFParmList parms;
661661 parms.Append ( eventArg );
662- if ( !( ( idSWFScriptFunction_Script* ) var.GetFunction ( ) )->GetScope ( )->Num ( ) )
662+ if ( !( ( idSWFScriptFunction_Script* ) var.GetFunction () )->GetScope ()->Num () )
663663 {
664- ( ( idSWFScriptFunction_Script* ) var.GetFunction ( ) )->GetScope ( )->Append ( globals );
664+ ( ( idSWFScriptFunction_Script* ) var.GetFunction () )->GetScope ()->Append ( globals );
665665 }
666- var.GetFunction ( )->Call ( hoverObject, parms );
667- parms.Clear ( );
666+ var.GetFunction ()->Call ( hoverObject, parms );
667+ parms.Clear ();
668668 retVal = true ;
669669 }
670670 }
671- else if ( var.IsFunction ( ) )
671+ else if ( var.IsFunction () )
672672 {
673- var.GetFunction ( )->Call ( hitObject, idSWFParmList ( ) );
673+ var.GetFunction ()->Call ( hitObject, idSWFParmList () );
674674 retVal = true ;
675675 }
676676 }
0 commit comments