Skip to content

Commit 791b812

Browse files
committed
chore: Reformat ActionScript code
Reformat AS code: fix .editorconfig violations, remove Adobe documentation, fix obvious formatting mistakes.
1 parent e4a5838 commit 791b812

File tree

113 files changed

+954
-1508
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+954
-1508
lines changed

core/src/avm2/globals/ReferenceError.as

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package {
22
public dynamic class ReferenceError extends Error {
33
ReferenceError.prototype.name = "ReferenceError";
4-
4+
55
public function ReferenceError(message:String = "", code:* = 0) {
66
super(message, code);
77
this.name = prototype.name;

core/src/avm2/globals/UninitializedError.as

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package {
22
public dynamic class UninitializedError extends Error {
33
UninitializedError.prototype.name = "UninitializedError";
4-
4+
55
public function UninitializedError(message:String = "", code:* = 0) {
66
super(message, code);
77
this.name = prototype.name;

core/src/avm2/globals/avmplus.as

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,4 +132,4 @@ package avmplus {
132132

133133
return xml;
134134
}
135-
}
135+
}
Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,20 @@
1-
// The initial version of this file was autogenerated from the official AS3 reference at
2-
// https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/accessibility/Accessibility.html
3-
// by https://github.com/golfinq/ActionScript_Event_Builder
4-
// It won't be regenerated in the future, so feel free to edit and/or fix
5-
6-
package flash.accessibility
7-
{
1+
package flash.accessibility {
82
import __ruffle__.stub_method;
93
import flash.display.DisplayObject;
104

11-
public final class Accessibility
12-
{
13-
// Indicates whether a screen reader is active and the application is communicating with it.
14-
private static var _active: Boolean;
5+
public final class Accessibility {
6+
private static var _active:Boolean;
157

16-
// Sends an event to the Microsoft Active Accessibility API.
17-
public static function sendEvent(source:DisplayObject, childID:uint, eventType:uint, nonHTML:Boolean = false):void
18-
{
8+
public static function sendEvent(source:DisplayObject, childID:uint, eventType:uint, nonHTML:Boolean = false):void {
199
stub_method("flash.accessibility.Accessibility", "sendEvent");
2010
}
2111

22-
// Tells Flash Player to apply any accessibility changes made by using the DisplayObject.accessibilityProperties property.
23-
public static function updateProperties():void
24-
{
12+
public static function updateProperties():void {
2513
stub_method("flash.accessibility.Accessibility", "updateProperties");
2614
}
2715

28-
public static function get active() : Boolean
29-
{
16+
public static function get active():Boolean {
3017
return _active;
3118
}
32-
3319
}
3420
}

core/src/avm2/globals/flash/accessibility/ISearchableText.as

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ package flash.accessibility {
22
public interface ISearchableText {
33
function get searchText():String;
44
}
5-
}
5+
}

core/src/avm2/globals/flash/accessibility/ISimpleTextSelection.as

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ package flash.accessibility {
33
function get selectionActiveIndex():int;
44
function get selectionAnchorIndex():int;
55
}
6-
}
6+
}

core/src/avm2/globals/flash/concurrent/Condition.as

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ package flash.concurrent {
55

66
public function Condition(mutex: Mutex) {}
77
}
8-
}
8+
}

core/src/avm2/globals/flash/concurrent/Mutex.as

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ package flash.concurrent {
44
public static function get isSupported():Boolean {
55
return false;
66
}
7-
7+
88
public function Mutex() {
99
throw new Error("Error #1520: Mutex cannot be initialized.", 1520);
1010
}

core/src/avm2/globals/flash/crypto.as

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ package flash.crypto {
22
import flash.utils.ByteArray;
33

44
public native function generateRandomBytes(numberRandomBytes:uint):ByteArray;
5-
}
5+
}

core/src/avm2/globals/flash/desktop/IFilePromise.as

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ package flash.desktop {
1111
function reportError(e:ErrorEvent):void
1212

1313
}
14-
}
14+
}

core/src/avm2/globals/flash/display/AVM1Movie.as

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ package flash.display {
66
public function AVM1Movie() {
77
// Should be inaccessible
88
}
9-
10-
public function call(functionName:String, ... rest):* {
9+
10+
public function call(functionName:String, ...rest):* {
1111
stub_method("flash.display.AVM1Movie", "call");
1212
return null;
1313
}
14-
14+
1515
public function addCallback(name:String, fn:Function):void {
1616
stub_method("flash.display.AVM1Movie", "addCallback");
1717
}

core/src/avm2/globals/flash/display/Bitmap.as

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ package flash.display {
1515

1616
private native function init(bitmapData:BitmapData, pixelSnapping:String, smoothing:Boolean):void;
1717
}
18-
}
18+
}
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
package flash.display {
2-
32
public final class GraphicsEndFill implements IGraphicsFill, IGraphicsData {
43
}
5-
6-
}
4+
}
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
package flash.display {
22
import flash.geom.Matrix;
3-
3+
44
public final class GraphicsShaderFill implements IGraphicsFill, IGraphicsData {
55
public var shader:Shader;
6-
6+
77
public var matrix:Matrix;
8-
8+
99
public function GraphicsShaderFill(shader:Shader = null, matrix:Matrix = null) {
1010
this.shader = shader;
1111
this.matrix = matrix;
1212
}
1313
}
1414
}
15-
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
package flash.display {
22
public interface IBitmapDrawable {}
3-
}
3+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
package flash.display {
22
public interface IGraphicsData {
33
}
4-
}
4+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
package flash.display {
22
public interface IGraphicsFill {
33
}
4-
}
4+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
package flash.display {
22
public interface IGraphicsPath {
33
}
4-
}
4+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
package flash.display {
22
public interface IGraphicsStroke {
33
}
4-
}
4+
}

core/src/avm2/globals/flash/display/MorphShape.as

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ package flash.display {
22
[Ruffle(Abstract)]
33
public final class MorphShape extends DisplayObject {
44
}
5-
}
5+
}

core/src/avm2/globals/flash/display/MovieClip.as

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ package flash.display {
2525
public native function prevScene():void;
2626
public native function nextScene():void;
2727
}
28-
}
28+
}
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
package flash.display
2-
{
1+
package flash.display {
32
[API("661")]
4-
public final class NativeWindowType
5-
{
3+
public final class NativeWindowType {
64
public static const LIGHTWEIGHT:String = "lightweight";
75
public static const NORMAL:String = "normal";
86
public static const UTILITY:String = "utility";
97
}
10-
}
8+
}
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package flash.display {
22
import flash.utils.ByteArray;
3-
3+
44
[Ruffle(InstanceAllocator)]
55
public final dynamic class ShaderData {
66
public function ShaderData(bytecode:ByteArray) {
@@ -10,4 +10,3 @@ package flash.display {
1010
private native function init(bytecode:ByteArray);
1111
}
1212
}
13-

core/src/avm2/globals/flash/display/ShaderJob.as

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ package flash.display {
1616

1717
[Ruffle(NativeAccessible)]
1818
private var _height:int;
19-
19+
2020
public function ShaderJob(shader:Shader = null, target:Object = null, width:int = 0, height:int = 0) {
2121
this._shader = shader;
2222
this._target = target;

core/src/avm2/globals/flash/display/SimpleButton.as

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ package flash.display {
55
import flash.geom.Matrix;
66
import flash.display.DisplayObject;
77
import flash.media.SoundTransform;
8-
8+
99
[Ruffle(InstanceAllocator)]
1010
public class SimpleButton extends InteractiveObject {
1111
public function SimpleButton(upState:DisplayObject = null, overState:DisplayObject = null, downState:DisplayObject = null, hitTestState:DisplayObject = null) {
@@ -38,4 +38,4 @@ package flash.display {
3838
public native function get soundTransform():SoundTransform;
3939
public native function set soundTransform(sndTransform:SoundTransform):void;
4040
}
41-
}
41+
}

core/src/avm2/globals/flash/display3D/Context3D.as

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ package flash.display3D {
1717
public native function createVertexBuffer(numVertices:int, data32PerVertex:int, bufferUsage:String = "staticDraw"):VertexBuffer3D;
1818
public native function configureBackBuffer(
1919
width:int, height:int, antiAlias:int, enableDepthAndStencil:Boolean = true, wantsBestResolution:Boolean = false, wantsBestResolutionOnBrowserZoom:Boolean = false
20-
):void;
20+
):void;
2121
public native function setVertexBufferAt(index:int, buffer:VertexBuffer3D, bufferOffset:int = 0, format:String = "float4"):void;
2222
public native function createProgram():Program3D;
2323
public native function setProgram(program:Program3D):void;
Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,14 @@
1-
// The initial version of this file was autogenerated from the official AS3 reference at
2-
// https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display3D/Context3DBlendFactor.html
3-
// by https://github.com/golfinq/ActionScript_Event_Builder
4-
// It won't be regenerated in the future, so feel free to edit and/or fix
5-
6-
package flash.display3D
7-
{
8-
9-
10-
public final class Context3DBlendFactor
11-
{
12-
// The blend factor is (Da,Da,Da,Da), where Da is the alpha component of the fragment color computed by the pixel program.
1+
package flash.display3D {
2+
public final class Context3DBlendFactor {
133
public static const DESTINATION_ALPHA:String = "destinationAlpha";
14-
15-
// The blend factor is (Dr,Dg,Db,Da), where Dr/g/b/a is the corresponding component of the current color in the color buffer.
164
public static const DESTINATION_COLOR:String = "destinationColor";
17-
18-
// The blend factor is (1,1,1,1).
195
public static const ONE:String = "one";
20-
21-
// The blend factor is (1-Da,1-Da,1-Da,1-Da), where Da is the alpha component of the current color in the color buffer.
226
public static const ONE_MINUS_DESTINATION_ALPHA:String = "oneMinusDestinationAlpha";
23-
24-
// The blend factor is (1-Dr,1-Dg,1-Db,1-Da), where Dr/g/b/a is the corresponding component of the current color in the color buffer.
257
public static const ONE_MINUS_DESTINATION_COLOR:String = "oneMinusDestinationColor";
26-
27-
// The blend factor is (1-Sa,1-Sa,1-Sa,1-Sa), where Sa is the alpha component of the fragment color computed by the pixel program.
288
public static const ONE_MINUS_SOURCE_ALPHA:String = "oneMinusSourceAlpha";
29-
30-
// The blend factor is (1-Sr,1-Sg,1-Sb,1-Sa), where Sr/g/b/a is the corresponding component of the fragment color computed by the pixel program.
319
public static const ONE_MINUS_SOURCE_COLOR:String = "oneMinusSourceColor";
32-
33-
// The blend factor is (Sa,Sa,Sa,Sa), where Sa is the alpha component of the fragment color computed by the pixel program.
3410
public static const SOURCE_ALPHA:String = "sourceAlpha";
35-
36-
// The blend factor is (Sr,Sg,Sb,Sa), where Sr/g/b/a is the corresponding component of the fragment color computed by the pixel program.
3711
public static const SOURCE_COLOR:String = "sourceColor";
38-
39-
// The blend factor is (0,0,0,0).
4012
public static const ZERO:String = "zero";
41-
42-
4313
}
4414
}
Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,7 @@
1-
// The initial version of this file was autogenerated from the official AS3 reference at
2-
// https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display3D/Context3DProgramType.html
3-
// by https://github.com/golfinq/ActionScript_Event_Builder
4-
// It won't be regenerated in the future, so feel free to edit and/or fix
5-
6-
package flash.display3D
7-
{
8-
1+
package flash.display3D {
92
[API("674")]
10-
public final class Context3DProgramType
11-
{
12-
// A fragment (or pixel) program.
3+
public final class Context3DProgramType {
134
public static const FRAGMENT:String = "fragment";
14-
15-
// A vertex program.
165
public static const VERTEX:String = "vertex";
17-
18-
196
}
207
}

core/src/avm2/globals/flash/display3D/IndexBuffer3D.as

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package flash.display3D {
22
import __ruffle__.stub_method;
33
import flash.utils.ByteArray;
4-
4+
55
[Ruffle(InstanceAllocator)]
66
[API("674")]
77
public final class IndexBuffer3D {
@@ -12,4 +12,4 @@ package flash.display3D {
1212
stub_method("flash.display3D.IndexBuffer3D", "dispose");
1313
}
1414
}
15-
}
15+
}

core/src/avm2/globals/flash/display3D/Program3D.as

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ package flash.display3D {
1010
stub_method("flash.display3D.Program3D", "dispose");
1111
}
1212
}
13-
}
13+
}

core/src/avm2/globals/flash/display3D/VertexBuffer3D.as

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package flash.display3D {
22
import __ruffle__.stub_method;
33
import flash.utils.ByteArray;
4-
4+
55
[Ruffle(InstanceAllocator)]
66
[API("674")]
77
public final class VertexBuffer3D {
@@ -12,4 +12,4 @@ package flash.display3D {
1212
stub_method("flash.display3D.VertexBuffer3D", "dispose");
1313
}
1414
}
15-
}
15+
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
package flash.display3D.textures {
1+
package flash.display3D.textures {
22
import flash.display.BitmapData;
33
import flash.utils.ByteArray;
4-
4+
55
public final class RectangleTexture extends TextureBase {
66
[API("690")]
77
public native function uploadFromBitmapData(source:BitmapData):void;
88
[API("690")]
99
public native function uploadFromByteArray(data:ByteArray, byteArrayOffset:uint):void;
1010
}
11-
}
11+
}

0 commit comments

Comments
 (0)