From 92f6717b1c7209c339a05139adc2e8543332720b Mon Sep 17 00:00:00 2001 From: NeeEoo Date: Thu, 11 Apr 2024 04:03:01 +0200 Subject: [PATCH 1/3] Remove old files that are now in fork --- source/away3d/extrusions/PathExtrude.hx | 1372 ----------------- .../materials/methods/LightMapMethod.hx | 127 -- 2 files changed, 1499 deletions(-) delete mode 100644 source/away3d/extrusions/PathExtrude.hx delete mode 100644 source/away3d/materials/methods/LightMapMethod.hx diff --git a/source/away3d/extrusions/PathExtrude.hx b/source/away3d/extrusions/PathExtrude.hx deleted file mode 100644 index 2666c1ba..00000000 --- a/source/away3d/extrusions/PathExtrude.hx +++ /dev/null @@ -1,1372 +0,0 @@ -package away3d.extrusions; - -import away3d.bounds.BoundingVolumeBase; -import away3d.core.base.Geometry; -import away3d.core.base.SubGeometry; -import away3d.core.base.SubMesh; -import away3d.core.base.data.UV; -import away3d.core.base.data.Vertex; -import away3d.core.math.Vector3DUtils; -import away3d.entities.Mesh; -import away3d.extrusions.data.SubGeometryList; -import away3d.materials.MaterialBase; -import away3d.paths.IPath; -import away3d.paths.IPathSegment; -import away3d.tools.helpers.MeshHelper; - -import openfl.errors.Error; -import openfl.geom.Matrix3D; -import openfl.geom.Vector3D; -import openfl.Vector; - -class PathExtrude extends Mesh -{ - public var upAxis(get, set):Vector3D; - public var centerMesh(get, set):Bool; - public var distributeU(get, set):Bool; - public var path(get, set):IPath; - public var profile(get, set):Vector; - public var scales(get, set):Vector; - public var rotations(get, set):Vector; - public var materials(get, set):Vector; - public var subdivision(get, set):Int; - public var coverAll(get, set):Bool; - public var distribute(get, set):Bool; - public var smoothSurface(get, set):Bool; - public var coverSegment(get, set):Bool; - public var mapFit(get, set):Bool; - public var flip(get, set):Bool; - public var closePath(get, set):Bool; - public var aligntoPath(get, never):Bool; - public var alignToPath(never, set):Bool; - public var smoothScale(get, set):Bool; - public var keepExtremes(get, set):Bool; - public var startProfile(get, never):Vector; - public var endProfile(get, never):Vector; - - private var _varr:Vector; - private var _doubles:Vector = new Vector(); - private var _upAxis:Vector3D = new Vector3D(0, 1, 0); - private var _trans:Matrix3D = new Matrix3D(); - - private static inline var LIMIT:Int = 196605; - private static inline var MAXRAD:Float = 1.2; - private var _path:IPath; - private var _profile:Vector; - private var _centerMesh:Bool; - private var _scales:Vector; - private var _rotations:Vector; - private var _materials:Vector; - private var _activeMaterial:MaterialBase; - private var _subdivision:Int; - private var _coverAll:Bool; - private var _coverSegment:Bool; - private var _flip:Bool; - private var _mapFit:Bool; - private var _closePath:Bool; - private var _alignToPath:Bool; - private var _smoothScale:Bool; - private var _smoothSurface:Bool; - private var _isClosedProfile:Bool; - private var _maxIndProfile:Int; - private var _matIndex:Int = 0; - private var _segv:Float; - private var _geomDirty:Bool = true; - private var _subGeometry:SubGeometry; - private var _MaterialsSubGeometries:Vector = new Vector(); - private var _uva:UV; - private var _uvb:UV; - private var _uvc:UV; - private var _uvd:UV; - private var _uvs:Vector; - private var _vertices:Vector; - private var _indices:Vector; - private var _normals:Vector; - private var _normalTmp:Vector3D; - private var _normal0:Vector3D; - private var _normal1:Vector3D; - private var _normal2:Vector3D; - private var _keepExtremes:Bool; - private var _distribute:Bool; - private var _distributeU:Bool; - private var _distributedU:Vector; - private var _startPoints:Vector; - private var _endPoints:Vector; - - /** - * Creates a new PathExtrude - * - * @param material [optional] MaterialBase. The PathExtrude (Mesh) material. Optional in constructor, material must be set before PathExtrude object is rendered. Required for the class to work. - * @param path [optional] Path. Defines the Path object representing path to extrude along. Required for the class to work. - * @param profile [optional] Vector.<Vector3D>. Defines an Vector.<Vector3D> of Vector3D objects representing the profile information to be projected along the Path object. Required for the class to work. - * @param subdivision [optional] uint. Howmany steps between each PathSegment. If the path holds curves, the higher this value, the higher the curve fidelity. Default and minimum is 2; - * @param coverall [optional] Boolean. Defines the uv mapping, when true a unique material is stretched along the entire path/shape. Default is true. - * @param coverSegment [optional] Boolean. Defines the uv mapping, when true and coverall is false a unique material is stretched along one PathSegment. Default is false. - * @param alignToPath [optional] Boolean. If the profile must follow the path or keep its original orientation. - * @param centerMesh [optional] Boolean. If the geometry needs to be recentered in its own object space. If the position after generation is set to 0,0,0, the object would be centered in worldspace. Default is false. - * @param mapFit [optional] Boolean. The UV mapping is percentually spreaded over the width of the path, making texture looking nicer and edits for applications such as a race track, road, more easy. Affects the uv's u values and set distributeU to false. Default is false. - * @param flip [optional] Boolean. If the faces must be reversed depending on Vector3D's orientation. Default is false. - * @param closePath [optional] Boolean. If the last PathSegment entered must be welded back to first one. Executed in a straight manner, its recommanded to pass the first entry to the Path again, as last entry if curves are involved. - * @param materials [optional] Vector.<MaterialBase>. An optional Vector.<MaterialBase> of different materials that can be alternated along the path if coverAll is false. - * @param scales [optional] An optional Vector.<Vector3D> of Vector3D objects that defines a series of scales to be set on each PathSegment. - * @param smoothScale [optional] Boolean. Defines if the scale must be interpolated between values or keep their full aspect on each PathSegment. - * @param rotations [optional] An optional Vector.<Vector3D> of Vector3D objects that defines a series of rotations to be set on each PathSegment. - * @param smoothSurface [optional] An optional Boolean. Defines if the surface of the mesh must be smoothed or not. Default is true. - * @param distribute [optional] Boolean. If the mesh subdivision is evenly spreaded over the entire mesh. Depending on path definition, segments are possibly not having the same amount of subdivision. - * @param distributeU [optional] Boolean. If the mesh uv' u value is procentually spreaded over the entire mesh surface. Prevents the source map to be stretched. Default is true. - * @param keepExtremes [optional] Boolean. If the the first and last profile coordinates must be kept accessible, in order to feed classes such as DelaunayMesh. Default is false; - */ - public function new(material:MaterialBase = null, path:IPath = null, profile:Vector = null, subdivision:Int = 2, coverAll:Bool = true, coverSegment:Bool = false, alignToPath:Bool = true, centerMesh:Bool = false, mapFit:Bool = false, flip:Bool = false, closePath:Bool = false, materials:Vector = null, scales:Vector = null, smoothScale:Bool = true, rotations:Vector = null, smoothSurface:Bool = true, distribute:Bool = false, distributeU:Bool = true, keepExtremes:Bool = false) - { - var geom:Geometry = new Geometry(); - _subGeometry = new SubGeometry(); - super(geom, material); - - _activeMaterial = this.material; - _path = path; - this.profile = profile; - this.subdivision = subdivision; - _coverSegment = coverSegment; - _coverAll = (_coverSegment)? false : coverAll; - _alignToPath = alignToPath; - _centerMesh = centerMesh; - _mapFit = mapFit; - _flip = flip; - _closePath = closePath; - _materials = (materials != null)? materials : new Vector(); - _scales = scales; - _smoothScale = smoothScale; - _rotations = rotations; - _smoothSurface = smoothSurface; - _distributeU = distributeU; - _keepExtremes = keepExtremes; - } - - private function get_upAxis():Vector3D - { - return _upAxis; - } - - private function set_upAxis(value:Vector3D):Vector3D - { - _upAxis = value; - return value; - } - - /** - * @inheritDoc - */ - override private function get_bounds():BoundingVolumeBase - { - if (_geomDirty) - buildExtrude(); - - return super.bounds; - } - - /** - * @inheritDoc - */ - override private function get_geometry():Geometry - { - if (_geomDirty) - buildExtrude(); - - return super.geometry; - } - - /** - * @inheritDoc - */ - override private function get_subMeshes():Vector - { - if (_geomDirty) - buildExtrude(); - - return super.subMeshes; - } - - /** - * Defines whether the mesh is recentered of not after generation - */ - private function get_centerMesh():Bool - { - return _centerMesh; - } - - private function set_centerMesh(val:Bool):Bool - { - if (_centerMesh == val) - return val; - - _centerMesh = val; - - if (_centerMesh && this.geometry.subGeometries.length > 0) - MeshHelper.recenter(this); - else - invalidateGeometry(); - return val; - } - - /** - * Defines the uv's u values are spreaded procentually over the entire surface to prevent the maps to be stretched. - */ - private function get_distributeU():Bool - { - return _distributeU; - } - - private function set_distributeU(val:Bool):Bool - { - if (_distributeU == val) - return val; - - _distributeU = val; - - if (val && _mapFit) - _mapFit = false; - if (!val && _distributedU != null) - _distributedU = null; - - invalidateGeometry(); - return val; - } - - /** - * Invalidates the geometry, causing it to be rebuillded when requested. - */ - private function invalidateGeometry():Void - { - _geomDirty = true; - invalidateBounds(); - } - - /** - * Defines the Path object representing path to extrude along. Required. - */ - private function get_path():IPath - { - return _path; - } - - private function set_path(val:IPath):IPath - { - _path = val; - _geomDirty = true; - return val; - } - - /** - * Defines a Vector.<Vector3D> of Vector3D objects representing the profile information to be projected along the Path object. Required. - */ - private function get_profile():Vector - { - return _profile; - } - - private function set_profile(val:Vector):Vector - { - _profile = val; - - if (_profile != null) - _isClosedProfile = (_profile[0].x == _profile[_profile.length - 1].x && _profile[0].y == _profile[_profile.length - 1].y && _profile[0].z == _profile[_profile.length - 1].z); - - _geomDirty = true; - return val; - } - - /** - * An optional Vector.<Vector3D> of Vector3D objects that defines a series of scales to be set on each PathSegment. - */ - private function get_scales():Vector - { - return _scales; - } - - private function set_scales(val:Vector):Vector - { - _scales = val; - _geomDirty = true; - return val; - } - - /** - * An optional Vector.<Vector3D> of Vector3D objects that defines a series of rotations to be set on each PathSegment. - */ - private function get_rotations():Vector - { - return _rotations; - } - - private function set_rotations(val:Vector):Vector - { - _rotations = val; - _geomDirty = true; - return val; - } - - /** - * An optional Vector.<MaterialBase>. It defines a series of materials to be set on each PathSegment if coverAll is set to false. - */ - private function get_materials():Vector - { - return _materials; - } - - private function set_materials(val:Vector):Vector - { - if (val == null) - return val; - _materials = val; - _geomDirty = true; - return val; - } - - /** - * Defines the subdivisions created in the mesh for each PathSegment. Defaults to 2, minimum 2. - */ - private function get_subdivision():Int - { - return _subdivision; - } - - private function set_subdivision(val:Int):Int - { - val = (val < 2)? 2 : val; - - if (_subdivision == val) - return val; - - _subdivision = val; - _geomDirty = true; - return val; - } - - /** - * Defines if the texture(s) should be stretched to cover the entire mesh or per step between segments. Defaults to true. - */ - private function get_coverAll():Bool - { - return _coverAll; - } - - private function set_coverAll(val:Bool):Bool - { - if (_coverAll == val) - return val; - - _coverAll = val; - _geomDirty = true; - return val; - } - - /** - * Defines if the mesh subdivision is spread evenly over the entire geometry. Possibly resulting in uneven subdivision per segments. - * Uv mapping is less distorted on complex shapes once applied. Depending on Path length, extra construct time might be significant. - * Defaults to false. - */ - private function get_distribute():Bool - { - return _distribute; - } - - private function set_distribute(val:Bool):Bool - { - if (_distribute == val) - return val; - - _distribute = val; - _geomDirty = true; - return val; - } - - /** - * Defines if the surface of the mesh must be smoothed or not. - */ - private function get_smoothSurface():Bool - { - return _smoothSurface; - } - - private function set_smoothSurface(val:Bool):Bool - { - if (_smoothSurface == val) - return val; - - _smoothSurface = val; - _geomDirty = true; - return val; - } - - /** - * Defines if the texture(s) should applied per segment. Default false. - */ - private function set_coverSegment(b:Bool):Bool - { - _coverSegment = b; - return b; - } - - private function get_coverSegment():Bool - { - return _coverSegment; - } - - /** - * Defines if the texture(s) should be projected on the geometry evenly spreaded over the source bitmapdata or using distance/percent. Default is false. - * The mapping considers first and last profile points are the most distant from each other. Most left and most right on the map. - * Note that it is NOT suitable for most cases. It is helpfull for roads definition, usually seen from above with simple profile. It prevents then distorts and eases map designs. - */ - private function get_mapFit():Bool - { - return _mapFit; - } - - private function set_mapFit(val:Bool):Bool - { - if (_mapFit == val) - return val; - - if (val && _distributeU) - _distributeU = false; - - _mapFit = val; - _geomDirty = true; - return val; - } - - /** - * Defines if the generated faces should be inversed. Default false. - */ - private function get_flip():Bool - { - return _flip; - } - - private function set_flip(val:Bool):Bool - { - if (_flip == val) - return val; - - _flip = val; - _geomDirty = true; - return val; - } - - /** - * Defines if the last PathSegment should join the first one and close the loop. Defaults to false. - */ - private function get_closePath():Bool - { - return _closePath; - } - - private function set_closePath(val:Bool):Bool - { - if (_closePath == val) - return val; - - _closePath = val; - _geomDirty = true; - return val; - } - - /** - * Defines if the array of profile points should be orientated on path or not. Default true. Note that Path object's worldaxis property might need to be changed. default = 0,1,0. - * - * @see #profile - */ - private function get_aligntoPath():Bool - { - return _alignToPath; - } - - private function set_alignToPath(val:Bool):Bool - { - if (_alignToPath == val) - return val; - - _alignToPath = val; - _geomDirty = true; - return val; - } - - /** - * Defines if a scaling of a PathSegment defined from the scales array of Vector3D objects should affect the whole PathSegment evenly or be smoothly interpolated from previous PathSegment scale. Defaults to true. - */ - private function get_smoothScale():Bool - { - return _smoothScale; - } - - private function set_smoothScale(val:Bool):Bool - { - if (_smoothScale == val) - return val; - - _smoothScale = val; - _geomDirty = true; - return val; - } - - /** - * Defines if the first and last transformed vector3d's of the profile are kept. - * For instance to be able to pass these coordinates to DelaunayMesh class, to close the extrude, if it was a tube. - * @see getStartProfile - * @see getEndProfile - */ - private function get_keepExtremes():Bool - { - return _keepExtremes; - } - - private function set_keepExtremes(b:Bool):Bool - { - _keepExtremes = b; - return b; - } - - /** - * returns a vector of vector3d's representing the transformed profile coordinates at the start of the extrude shape - * null if "keepExtremes" is false or if the extrusion has not been builded yet. - */ - private function get_startProfile():Vector - { - if (_path == null || _startPoints == null) - return null; - - return _startPoints; - } - - /** - * returns a vector of vector3d's representing the transformed profile coordinates at the end of the extrude shape - * null if "keepExtremes" is false or if the extrusion has not been builded yet. - */ - private function get_endProfile():Vector - { - if (_path == null || _endPoints == null) - return null; - - return _endPoints; - } - - private function orientateAt(target:Vector3D, position:Vector3D):Void - { - var xAxis:Vector3D; - var yAxis:Vector3D; - var zAxis:Vector3D = target.subtract(position); - - zAxis.normalize(); - - if (zAxis.length > 0.1) { - xAxis = _upAxis.crossProduct(zAxis); - xAxis.normalize(); - - yAxis = xAxis.crossProduct(zAxis); - yAxis.normalize(); - - var rawData:Vector = _trans.rawData; - - rawData[0] = xAxis.x; - rawData[1] = xAxis.y; - rawData[2] = xAxis.z; - - rawData[4] = -yAxis.x; - rawData[5] = -yAxis.y; - rawData[6] = -yAxis.z; - - rawData[8] = zAxis.x; - rawData[9] = zAxis.y; - rawData[10] = zAxis.z; - - _trans.rawData = rawData; - } - } - - private function generate(points:Vector>, offsetV:Int = 0, closedata:Bool = false):Void - { - var uvlength:Int = (points.length - 1) + offsetV; - var offset:Int; - - for (i in 0...points.length - 1) { - _varr = new Vector(); - offset = (closedata)? i + uvlength : i; - - extrudePoints(points[i], points[i + 1], (1/uvlength)*offset, uvlength, offset/(_subdivision - 1)); - - if (i == 0 && _isClosedProfile) - _doubles = _varr.concat(); - } - _varr = _doubles = null; - } - - private function extrudePoints(points1:Vector, points2:Vector, vscale:Float, indexv:Int, indexp:Float):Void - { - var i:Int; - var j:Int; - - var stepx:Float; - var stepy:Float; - var stepz:Float; - - var va:Vertex; - var vb:Vertex; - var vc:Vertex; - var vd:Vertex; - - var u1:Float; - var u2:Float; - var index:Int = 0; - - var v1:Float = 0; - var v2:Float = 0; - - var countloop:Int = points1.length; - - var mat:MaterialBase; - - var dist:Float = 0; - var tdist:Float; - var bleft:Vector3D = null; - var bu:Float = 0; - var bincu:Float = 0; - - if (_mapFit) { - for (i in 0...countloop) { - for (j in 0...countloop) { - if (i != j) { - tdist = Vector3D.distance(points1[i], points1[j]); - if (tdist > dist) { - dist = tdist; - bleft = points1[i]; - } - } - } - } - - } else { - bincu = 1/(countloop - 1); - } - - function getDouble(x:Float, y:Float, z:Float):Vertex - { - for (i in 0..._doubles.length) { - if (_doubles[i].x == x && _doubles[i].y == y && _doubles[i].z == z) { - return _doubles[i]; - } - } - return new Vertex(x, y, z); - } - - for (i in 0...countloop) { - stepx = points2[i].x - points1[i].x; - stepy = points2[i].y - points1[i].y; - stepz = points2[i].z - points1[i].z; - - for (j in 0...2) { - if (_isClosedProfile && _doubles.length > 0) - _varr.push(getDouble(points1[i].x + (stepx*j), points1[i].y + (stepy*j), points1[i].z + (stepz*j))); - else - _varr.push(new Vertex(points1[i].x + (stepx*j), points1[i].y + (stepy*j), points1[i].z + (stepz*j))); - } - } - - var floored:Int = (_coverSegment) ? Std.int(indexp) : 0; - - if (_materials != null && _materials.length > 0) { - - if (_coverSegment && indexp - floored == 0) - _matIndex = (_matIndex + 1 > _materials.length - 1)? 0 : _matIndex + 1; - else if (!coverAll && !_coverSegment) - _matIndex = (_matIndex + 1 > _materials.length - 1)? 0 : _matIndex + 1; - } - - mat = (_coverAll || _materials == null || _materials.length == 0)? this.material : _materials[_matIndex]; - - var covSub:Bool = _coverAll && _subdivision > 1; - var cosegSub:Bool = _coverSegment && _subdivision > 1; - - for (i in 0...countloop) { - - if (_distributeU) { - u1 = _distributedU[i]; - u2 = _distributedU[i + 1]; - } else if (_mapFit) { - u1 = 1 - Vector3D.distance(points1[i], bleft)/dist; - u2 = 1 - Vector3D.distance(points1[i + 1], bleft)/dist; - } else { - u1 = 1 - bu; - bu += bincu; - u2 = 1 - bu; - } - - v1 = ((covSub)) ? vscale : (((cosegSub)) ? indexp - floored : 0); - v2 = ((covSub)) ? vscale + (1 / indexv) : (((cosegSub)) ? v1 + _segv : 1); - - _uva.u = u1; - _uva.v = v1; - _uvb.u = u1; - _uvb.v = v2; - _uvc.u = u2; - _uvc.v = v2; - _uvd.u = u2; - _uvd.v = v1; - - va = _varr[index]; - vb = _varr[index + 1]; - vc = _varr[index + 3]; - vd = _varr[index + 2]; - - if (_flip) { - addFace(vb, va, vc, _uvb, _uva, _uvc, mat); - addFace(vc, va, vd, _uvc, _uva, _uvd, mat); - - } else { - addFace(va, vb, vc, _uva, _uvb, _uvc, mat); - addFace(va, vc, vd, _uva, _uvc, _uvd, mat); - } - - if (_mapFit) - u1 = u2; - - index += 2; - } - } - - private function initHolders():Void - { - if (_uva == null) { - _uva = new UV(0, 0); - _uvb = new UV(0, 0); - _uvc = new UV(0, 0); - _uvd = new UV(0, 0); - _normal0 = new Vector3D(0.0, 0.0, 0.0); - _normal1 = new Vector3D(0.0, 0.0, 0.0); - _normal2 = new Vector3D(0.0, 0.0, 0.0); - _normalTmp = new Vector3D(0.0, 0.0, 0.0); - } - - if (_materials != null && _materials.length > 0) { - var sglist:SubGeometryList = new SubGeometryList(); - _MaterialsSubGeometries.push(sglist); - sglist.subGeometry = new SubGeometry(); - _subGeometry = sglist.subGeometry; - - sglist.uvs = _uvs = new Vector(); - sglist.vertices = _vertices = new Vector(); - if (_smoothSurface) - sglist.normals = _normals = new Vector(); - sglist.indices = _indices = new Vector(); - sglist.material = this.material; - if (sglist.material.name == null) - sglist.material.name = "baseMaterial"; - - _matIndex = _materials.length; - - } else { - _uvs = new Vector(); - _vertices = new Vector(); - _indices = new Vector(); - if (_smoothSurface) - _normals = new Vector() - else - _subGeometry.autoDeriveVertexNormals = true; - _subGeometry.autoDeriveVertexTangents = true; - } - } - - private function getSubGeometryListFromMaterial(mat:MaterialBase):SubGeometryList - { - var sglist:SubGeometryList = null; - - for (i in 0..._MaterialsSubGeometries.length) { - if (_MaterialsSubGeometries[i].material == mat) { - sglist = _MaterialsSubGeometries[i]; - break; - } - } - - if (sglist == null) { - sglist = new SubGeometryList(); - _MaterialsSubGeometries.push(sglist); - sglist.subGeometry = new SubGeometry(); - sglist.uvs = new Vector(); - sglist.vertices = new Vector(); - sglist.indices = new Vector(); - sglist.material = mat; - if (_smoothSurface) - sglist.normals = new Vector(); - } - - return sglist; - } - - private function calcNormal(v0:Vertex, v1:Vertex, v2:Vertex):Void - { - var dx1:Float = v2.x - v0.x; - var dy1:Float = v2.y - v0.y; - var dz1:Float = v2.z - v0.z; - var dx2:Float = v1.x - v0.x; - var dy2:Float = v1.y - v0.y; - var dz2:Float = v1.z - v0.z; - - var cx:Float = dz1 * dy2 - dy1 * dz2; - var cy:Float = dx1 * dz2 - dz1 * dx2; - var cz:Float = dy1 * dx2 - dx1 * dy2; - var d:Float = 1/Math.sqrt(cx * cx + cy * cy + cz * cz); - - _normal0.x = _normal1.x = _normal2.x = cx*d; - _normal0.y = _normal1.y = _normal2.y = cy*d; - _normal0.z = _normal1.z = _normal2.z = cz*d; - } - - private function addFace(v0:Vertex, v1:Vertex, v2:Vertex, uv0:UV, uv1:UV, uv2:UV, mat:MaterialBase):Void - { - var subGeom:SubGeometry; - var uvs:Vector; - var vertices:Vector; - var normals:Vector; - var indices:Vector; - var sglist:SubGeometryList; - var startMat:Bool = false; - - if (_activeMaterial != mat && _materials != null && _materials.length > 0) { - _activeMaterial = mat; - sglist = getSubGeometryListFromMaterial(mat); - _subGeometry = subGeom = sglist.subGeometry; - _uvs = uvs = sglist.uvs; - _vertices = vertices = sglist.vertices; - _indices = indices = sglist.indices; - _normals = normals = sglist.normals; - startMat = true; - - } else { - subGeom = _subGeometry; - uvs = _uvs; - vertices = _vertices; - indices = _indices; - normals = _normals; - } - - if (vertices.length + 9 > LIMIT) { - subGeom.updateVertexData(vertices); - subGeom.updateIndexData(indices); - subGeom.updateUVData(uvs); - if (_smoothSurface) - subGeom.updateVertexNormalData(normals); - - this.geometry.addSubGeometry(subGeom); - this.subMeshes[this.subMeshes.length - 1].material = mat; - - subGeom = new SubGeometry(); - subGeom.autoDeriveVertexTangents = true; - if (!_smoothSurface) - subGeom.autoDeriveVertexNormals = true; - - if (_MaterialsSubGeometries != null && _MaterialsSubGeometries.length > 1) { - - sglist = getSubGeometryListFromMaterial(mat); - sglist.subGeometry = _subGeometry = subGeom; - sglist.uvs = _uvs = uvs = new Vector(); - sglist.vertices = _vertices = vertices = new Vector(); - sglist.indices = _indices = indices = new Vector(); - if (_smoothSurface) - sglist.normals = _normals = normals = new Vector(); - - } else { - - _subGeometry = subGeom; - uvs = _uvs = new Vector(); - vertices = _vertices = new Vector(); - indices = _indices = new Vector(); - normals = _normals = new Vector(); - } - } - - var bv0:Bool = false; - var bv1:Bool = false; - var bv2:Bool = false; - - var ind0:Int = 0; - var ind1:Int = 0; - var ind2:Int = 0; - - if (_smoothSurface && !startMat) { - var uvind:Int; - var uvindV:Int; - var vind:Int; - var vindy:Int; - var vindz:Int; - var ind:Int; - var indlength:Int = indices.length; - calcNormal(v0, v1, v2); - var ab:Float; - - if (indlength > 0) { - var back:Float = indlength - _maxIndProfile; - var limitBack:Int = ((back < 0)) ? 0 : Std.int(back); - - var i:Int = indlength - 1; - while (i > limitBack) { - ind = indices[i]; - vind = ind*3; - vindy = vind + 1; - vindz = vind + 2; - uvind = ind*2; - uvindV = uvind + 1; - - if (bv0 && bv1 && bv2) - break; - - if (!bv0 && vertices[vind] == v0.x && vertices[vindy] == v0.y && vertices[vindz] == v0.z) { - - _normalTmp.x = normals[vind]; - _normalTmp.y = normals[vindy]; - _normalTmp.z = normals[vindz]; - ab = Vector3D.angleBetween(_normalTmp, _normal0); - - if (ab < MAXRAD) { - _normal0.x = (_normalTmp.x + _normal0.x)*.5; - _normal0.y = (_normalTmp.y + _normal0.y)*.5; - _normal0.z = (_normalTmp.z + _normal0.z)*.5; - - if (_coverAll || uvs[uvind] == uv0.u && uvs[uvindV] == uv0.v) { - bv0 = true; - ind0 = ind; - --i; - continue; - } - } - } - - if (!bv1 && vertices[vind] == v1.x && vertices[vindy] == v1.y && vertices[vindz] == v1.z) { - - _normalTmp.x = normals[vind]; - _normalTmp.y = normals[vindy]; - _normalTmp.z = normals[vindz]; - ab = Vector3D.angleBetween(_normalTmp, _normal1); - - if (ab < MAXRAD) { - _normal1.x = (_normalTmp.x + _normal1.x)*.5; - _normal1.y = (_normalTmp.y + _normal1.y)*.5; - _normal1.z = (_normalTmp.z + _normal1.z)*.5; - - if (_coverAll || uvs[uvind] == uv1.u && uvs[uvindV] == uv1.v) { - bv1 = true; - ind1 = ind; - --i; - continue; - } - } - } - - if (!bv2 && vertices[vind] == v2.x && vertices[vindy] == v2.y && vertices[vindz] == v2.z) { - - _normalTmp.x = normals[vind]; - _normalTmp.y = normals[vindy]; - _normalTmp.z = normals[vindz]; - ab = Vector3D.angleBetween(_normalTmp, _normal2); - - if (ab < MAXRAD) { - _normal2.x = (_normalTmp.x + _normal2.x)*.5; - _normal2.y = (_normalTmp.y + _normal2.y)*.5; - _normal2.z = (_normalTmp.z + _normal2.z)*.5; - - if (_coverAll || uvs[uvind] == uv2.u && uvs[uvindV] == uv2.v) { - bv2 = true; - ind2 = ind; - --i; - continue; - } - } - - } - --i; - } - } - } - - if (!bv0) { - ind0 = Std.int(vertices.length / 3); - vertices.push(v0.x); - vertices.push(v0.y); - vertices.push(v0.z); - uvs.push(uv0.u); - uvs.push(uv0.v); - if (_smoothSurface) { - normals.push(_normal0.x); - normals.push(_normal0.y); - normals.push(_normal0.z); - } - } - - if (!bv1) { - ind1 = Std.int(vertices.length / 3); - vertices.push(v1.x); - vertices.push(v1.y); - vertices.push(v1.z); - uvs.push(uv1.u); - uvs.push(uv1.v); - if (_smoothSurface) { - normals.push(_normal1.x); - normals.push(_normal1.y); - normals.push(_normal1.z); - } - } - - if (!bv2) { - ind2 = Std.int(vertices.length / 3); - vertices.push(v2.x); - vertices.push(v2.y); - vertices.push(v2.z); - uvs.push(uv2.u); - uvs.push(uv2.v); - if (_smoothSurface) { - normals.push(_normal2.x); - normals.push(_normal2.y); - normals.push(_normal2.z); - } - } - - indices.push(ind0); - indices.push(ind1); - indices.push(ind2); - } - - private function distributeVectors():Vector> - { - var segs:Vector> = _path.getPointsOnCurvePerSegment(_subdivision); - var nSegs:Vector> = new Vector>(); - - var seg:Vector; - var j:Int = 0; - var estLength:Float = 0; - var vCount:Int = 0; - - var v:Vector3D; - var tmpV:Vector3D = new Vector3D(); - var prevV:Vector3D = null; - - for (i in 0...segs.length) { - seg = segs[i]; - for (j in 0..._subdivision) { - if (prevV != null) - estLength += Vector3D.distance(prevV, seg[j]); - prevV = seg[j]; - vCount++; - } - } - var step:Float = estLength/vCount; - var tPrecision:Float = 0.001; - var t:Float = 0; - var ps:IPathSegment; - - var tmpVDist:Float = 0; - var diff:Float = 0; - var ignore:Bool; - - for (i in 0...segs.length) { - ps = _path.getSegmentAt(i); - ignore = false; - t = diff; - seg = new Vector(); - - while (t < 1) { - - if (segs.length == 0) { - v = segs[i][0]; - seg.push(v); - prevV = v; - continue; - } - - tmpVDist = 0; - while (tmpVDist < step) { - t += tPrecision; - if (t > 1 && i < segs.length - 1) { - ignore = true; - break; - } else { - tmpV = ps.getPointOnSegment(t, tmpV); - tmpVDist = Vector3D.distance(prevV, tmpV); - } - } - - diff = 1 - t; - if (!ignore) { - v = new Vector3D(tmpV.x, tmpV.y, tmpV.z); - prevV = v; - seg.push(v); - } - } - - nSegs.push(seg); - } - - segs = null; - - return nSegs; - } - - private function generateUlist():Void - { - _distributedU = Vector.ofArray(cast [0]); - var tdist:Float = 0; - var dist:Float = 0; - var tmpDists:Vector = new Vector(); - for (i in 0..._profile.length - 1) { - tmpDists[i] = Vector3D.distance(_profile[i], _profile[i + 1]); - tdist += tmpDists[i]; - } - for (i in 1..._profile.length) { - _distributedU[i] = (tmpDists[i - 1] + dist)/tdist; - dist += tmpDists[i - 1]; - } - - tmpDists = null; - } - - private function buildExtrude():Void - { - if (_path == null || _path.numSegments == 0 || _profile == null || _profile.length < 2) - throw new Error("PathExtrude error: invalid Path or profile with unsufficient data"); - - _geomDirty = false; - initHolders(); - - _maxIndProfile = _profile.length*9; - - var vSegPts:Vector> = null; - - if (_distribute) - vSegPts = distributeVectors(); - else - vSegPts = _path.getPointsOnCurvePerSegment(_subdivision); - - if (_distributeU) - generateUlist(); - - var vPtsList:Vector = new Vector(); - var vSegResults:Vector> = new Vector>(); - var atmp:Vector = null; - var tmppt:Vector3D = new Vector3D(0, 0, 0); - - var i:Int = 0; - var j:Int = 0; - var k:Int = 0; - - var nextpt:Vector3D = null; - if (_coverSegment) - _segv = 1 / (_subdivision - 1); - - var lastP:Vector = null; - if (_closePath) - lastP = new Vector(); - - var rescale:Bool = (_scales != null); - var lastscale:Vector3D = null; - if (rescale) - lastscale = ((_scales[0] == null)) ? new Vector3D(1, 1, 1) : _scales[0]; - - var rotate:Bool = (_rotations != null); - - var lastrotate:Vector3D = null; - var nextrotate:Vector3D = null; - var rotation:Vector = null ; - var tweenrot:Vector3D = null; - var nextscale:Vector3D = null; - var vScales:Vector = null; - - if (rotate && _rotations.length > 0) { - lastrotate = _rotations[0]; - rotation = new Vector(); - } - - if (_smoothScale && rescale) { - nextscale = new Vector3D(1, 1, 1); - vScales = Vector.ofArray(cast [lastscale]); - if (_scales.length != _path.numSegments + 2) { - var lastScl:Vector3D = _scales[_scales.length - 1]; - while (_scales.length != _path.numSegments + 2) - _scales.push(lastScl); - } - } - - var tmploop:Int = _profile.length; - for (i in 0...vSegPts.length) { - if (rotate) { - lastrotate = ((_rotations[i] == null)) ? lastrotate : _rotations[i]; - nextrotate = ((_rotations[i + 1] == null)) ? lastrotate : _rotations[i + 1]; - rotation = Vector.ofArray(cast [lastrotate]); - rotation = rotation.concat(Vector3DUtils.subdivide(lastrotate, nextrotate, _subdivision)); - } - - if (rescale) - lastscale = ((_scales[i] == null)) ? lastscale : _scales[i]; - - if (_smoothScale && rescale) { - nextscale = ((_scales[i + 1] == null)) ? ((_scales[i] == null)) ? lastscale : _scales[i] : _scales[i + 1]; - vScales = vScales.concat(Vector3DUtils.subdivide(lastscale, nextscale, _subdivision)); - } - - for (j in 0...vSegPts[i].length) { - - atmp = new Vector(); - atmp = atmp.concat(_profile); - vPtsList = new Vector(); - - if (rotate) - tweenrot = rotation[j]; - - if (_alignToPath) { - _trans = new Matrix3D(); - if (i == vSegPts.length - 1 && j == vSegPts[i].length - 1) { - - if (_closePath) { - nextpt = vSegPts[0][0]; - orientateAt(nextpt, vSegPts[i][j]); - } else { - nextpt = vSegPts[i][j - 1]; - orientateAt(vSegPts[i][j], nextpt); - } - - } else { - nextpt = ((j < vSegPts[i].length - 1)) ? vSegPts[i][j + 1] : vSegPts[i + 1][0]; - orientateAt(nextpt, vSegPts[i][j]); - } - - } - - for (k in 0...tmploop) { - - if (rescale && !_smoothScale) { - atmp[k].x *= lastscale.x; - atmp[k].y *= lastscale.y; - atmp[k].z *= lastscale.z; - } - - if (_alignToPath) { - tmppt = new Vector3D(); - - tmppt.x = atmp[k].x * _trans.rawData[0] + atmp[k].y * _trans.rawData[4] + atmp[k].z * _trans.rawData[8] + _trans.rawData[12]; - tmppt.y = atmp[k].x * _trans.rawData[1] + atmp[k].y * _trans.rawData[5] + atmp[k].z * _trans.rawData[9] + _trans.rawData[13]; - tmppt.z = atmp[k].x * _trans.rawData[2] + atmp[k].y * _trans.rawData[6] + atmp[k].z * _trans.rawData[10] + _trans.rawData[14]; - - if (rotate) - tmppt = Vector3DUtils.rotatePoint(tmppt, tweenrot); - - tmppt.x += vSegPts[i][j].x; - tmppt.y += vSegPts[i][j].y; - tmppt.z += vSegPts[i][j].z; - - } else - tmppt = new Vector3D(atmp[k].x + vSegPts[i][j].x, atmp[k].y + vSegPts[i][j].y, atmp[k].z + vSegPts[i][j].z); - - vPtsList.push(tmppt); - } - - if (_closePath && i == vSegPts.length - 1 && j == vSegPts[i].length - 1) - break; - - if (_closePath) - lastP = vPtsList; - - vSegResults.push(vPtsList); - - } - } - - if (rescale && _smoothScale) { - for (i in 0...vScales.length) { - for (j in 0...vSegResults[i].length) { - vSegResults[i][j].x *= vScales[i].x; - vSegResults[i][j].y *= vScales[i].y; - vSegResults[i][j].z *= vScales[i].z; - } - } - vScales = null; - } - - if (rotate) - rotation = null; - - if (_closePath) { - var stepx:Float; - var stepy:Float; - var stepz:Float; - var c:Vector; - var c2:Vector> = new Vector>(); - - for (i in 1..._subdivision + 1) { - c = new Vector(); - for (j in 0...lastP.length) { - stepx = (vSegResults[0][j].x - lastP[j].x) / _subdivision; - stepy = (vSegResults[0][j].y - lastP[j].y) / _subdivision; - stepz = (vSegResults[0][j].z - lastP[j].z) / _subdivision; - c.push(new Vector3D(lastP[j].x + (stepx * i), lastP[j].y + (stepy * i), lastP[j].z + (stepz * i))); - } - c2.push(c); - } - - c2[0] = lastP; - generate(c2, (_coverAll)? vSegResults.length : 0, _coverAll); - c = null; - c2 = null; - } - - if (_keepExtremes) { - _startPoints = new Vector(); - _endPoints = new Vector(); - var offsetEnd:Int = vSegResults.length - 1; - - for (i in 0...tmploop) { - _startPoints[i] = vSegResults[0][i]; - _endPoints[i] = vSegResults[offsetEnd][i]; - } - - } else if (_startPoints != null) { - - for (i in 0...tmploop) - _startPoints[i] = _endPoints[i] = null; - _startPoints = _endPoints = null; - } - - generate(vSegResults, (_closePath && _coverAll)? 1 : 0, (_closePath && !_coverAll)); - - vSegPts = null; - _varr = null; - - if (_MaterialsSubGeometries != null && _MaterialsSubGeometries.length > 0) { - var sglist:SubGeometryList; - var sg:SubGeometry; - for (i in 0..._MaterialsSubGeometries.length) { - sglist = _MaterialsSubGeometries[i]; - sg = sglist.subGeometry; - if (sg != null && sglist.vertices.length > 0) { - this.geometry.addSubGeometry(sg); - this.subMeshes[this.subMeshes.length - 1].material = sglist.material; - sg.updateVertexData(sglist.vertices); - sg.updateIndexData(sglist.indices); - sg.updateUVData(sglist.uvs); - - if (_smoothSurface) - sg.updateVertexNormalData(sglist.normals); - } - } - - } else { - - _subGeometry.updateVertexData(_vertices); - _subGeometry.updateIndexData(_indices); - _subGeometry.updateUVData(_uvs); - - if (_smoothSurface) - _subGeometry.updateVertexNormalData(_normals); - - this.geometry.addSubGeometry(_subGeometry); - } - - if (_centerMesh) - MeshHelper.recenter(this); - } -} \ No newline at end of file diff --git a/source/away3d/materials/methods/LightMapMethod.hx b/source/away3d/materials/methods/LightMapMethod.hx deleted file mode 100644 index 4ac81fb6..00000000 --- a/source/away3d/materials/methods/LightMapMethod.hx +++ /dev/null @@ -1,127 +0,0 @@ -package away3d.materials.methods; - -import away3d.core.managers.Stage3DProxy; -import away3d.materials.compilation.ShaderRegisterCache; -import away3d.materials.compilation.ShaderRegisterElement; -import away3d.textures.Texture2DBase; - -import openfl.display.BlendMode; -import openfl.errors.Error; - -/** - * LightMapMethod provides a method that allows applying a light map texture to the calculated pixel colour. - * It is different from LightMapDiffuseMethod in that the latter only modulates the diffuse shading value rather - * than the whole pixel colour. - */ -class LightMapMethod extends EffectMethodBase -{ - public var blendMode(get, set):BlendMode; - public var texture(get, set):Texture2DBase; - - /** - * Indicates the light map should be multiplied with the calculated shading result. - */ - public static inline var MULTIPLY:BlendMode = BlendMode.MULTIPLY; - - /** - * Indicates the light map should be added into the calculated shading result. - */ - public static var ADD:BlendMode = BlendMode.ADD; - - private var _texture:Texture2DBase; - - private var _blendMode:BlendMode; - private var _useSecondaryUV:Bool; - - /** - * Creates a new LightMapMethod object. - * @param texture The texture containing the light map. - * @param blendMode The blend mode with which the light map should be applied to the lighting result. - * @param useSecondaryUV Indicates whether the secondary UV set should be used to map the light map. - */ - public function new(texture:Texture2DBase, blendMode:BlendMode = MULTIPLY, useSecondaryUV:Bool = false) - { - super(); - _useSecondaryUV = useSecondaryUV; - _texture = texture; - this.blendMode = blendMode; - } - - /** - * @inheritDoc - */ - override private function initVO(vo:MethodVO):Void - { - vo.needsUV = !_useSecondaryUV; - vo.needsSecondaryUV = _useSecondaryUV; - } - - /** - * The blend mode with which the light map should be applied to the lighting result. - * - * @see LightMapMethod.ADD - * @see LightMapMethod.MULTIPLY - */ - private function get_blendMode():BlendMode - { - return _blendMode; - } - - private function set_blendMode(value:BlendMode):BlendMode - { - if (value != ADD && value != MULTIPLY) - throw new Error("Unknown blendmode!"); - if (_blendMode == value) - return value; - _blendMode = value; - invalidateShaderProgram(); - return value; - } - - /** - * The texture containing the light map. - */ - private function get_texture():Texture2DBase - { - return _texture; - } - - private function set_texture(value:Texture2DBase):Texture2DBase - { - if (value.hasMipMaps != _texture.hasMipMaps || value.format != _texture.format) - invalidateShaderProgram(); - _texture = value; - return value; - } - - /** - * @inheritDoc - */ - override private function activate(vo:MethodVO, stage3DProxy:Stage3DProxy):Void - { - stage3DProxy._context3D.setTextureAt(vo.texturesIndex, _texture.getTextureForStage3D(stage3DProxy)); - super.activate(vo, stage3DProxy); - } - - /** - * @inheritDoc - */ - override private function getFragmentCode(vo:MethodVO, regCache:ShaderRegisterCache, targetReg:ShaderRegisterElement):String - { - var code:String; - var lightMapReg:ShaderRegisterElement = regCache.getFreeTextureReg(); - var temp:ShaderRegisterElement = regCache.getFreeFragmentVectorTemp(); - vo.texturesIndex = lightMapReg.index; - - code = getTex2DSampleCode(vo, temp, lightMapReg, _texture, _useSecondaryUV? _sharedRegisters.secondaryUVVarying : _sharedRegisters.uvVarying); - - switch (_blendMode) { - case BlendMode.MULTIPLY: - code += "mul " + targetReg + ", " + targetReg + ", " + temp + "\n"; - case BlendMode.ADD: - code += "add " + targetReg + ", " + targetReg + ", " + temp + "\n"; - default: - } - return code; - } -} \ No newline at end of file From d17ea72c74bbbadac0bb00e11868dddf6aebd346 Mon Sep 17 00:00:00 2001 From: NeeEoo Date: Thu, 11 Apr 2024 14:23:02 +0200 Subject: [PATCH 2/3] Organize Imports and remove unused Imports --- source/flx3d/Flx3DCamera.hx | 33 +++++++--------- source/flx3d/Flx3DView.hx | 39 ++++++++----------- source/funkin/backend/FlxAnimate.hx | 9 ++--- source/funkin/backend/FunkinSprite.hx | 16 ++++---- source/funkin/backend/FunkinText.hx | 2 +- source/funkin/backend/MusicBeatState.hx | 12 +++--- source/funkin/backend/MusicBeatSubstate.hx | 8 ++-- source/funkin/backend/MusicBeatTransition.hx | 2 +- source/funkin/backend/chart/Chart.hx | 6 +-- source/funkin/backend/chart/EventsData.hx | 10 ++--- source/funkin/backend/chart/PsychParser.hx | 2 +- .../funkin/backend/scripting/GlobalScript.hx | 4 +- source/funkin/backend/scripting/HScript.hx | 3 +- source/funkin/backend/scripting/Script.hx | 5 +-- source/funkin/backend/shaders/CustomShader.hx | 2 - source/funkin/backend/shaders/FunkinShader.hx | 10 +---- source/funkin/backend/system/Conductor.hx | 4 +- source/funkin/backend/system/Controls.hx | 2 - source/funkin/backend/system/Logs.hx | 4 +- source/funkin/backend/system/Main.hx | 35 ++++++++--------- source/funkin/backend/system/MainState.hx | 8 ++-- .../backend/system/OptimizedBitmapData.hx | 4 +- .../system/framerate/CodenameBuildField.hx | 4 +- .../backend/system/framerate/ConductorInfo.hx | 1 - .../backend/system/framerate/Framerate.hx | 5 +-- .../system/framerate/FramerateCategory.hx | 2 +- .../system/framerate/FramerateCounter.hx | 2 +- .../backend/system/framerate/MemoryCounter.hx | 2 +- .../backend/system/framerate/SystemInfo.hx | 4 +- source/funkin/backend/system/github/GitHub.hx | 2 +- .../backend/system/github/GitHubUser.hx | 1 - .../backend/system/modules/AudioSwitchFix.hx | 4 +- .../backend/system/modules/CrashHandler.hx | 10 ++--- .../backend/system/modules/FunkinCache.hx | 2 +- .../backend/system/updating/AsyncUpdater.hx | 14 +++---- .../system/updating/UpdateAvailableScreen.hx | 10 ++--- .../backend/system/updating/UpdateScreen.hx | 6 +-- .../backend/system/updating/UpdateUtil.hx | 6 +-- source/funkin/backend/utils/BitmapUtil.hx | 2 +- source/funkin/backend/utils/CoolUtil.hx | 32 +++++++-------- source/funkin/backend/utils/DiscordUtil.hx | 14 +++---- source/funkin/backend/utils/EngineUtil.hx | 2 +- .../backend/utils/FunkinParentDisabler.hx | 2 +- source/funkin/backend/utils/IniUtil.hx | 1 - source/funkin/backend/utils/MarkdownUtil.hx | 2 +- source/funkin/backend/utils/NdllUtil.hx | 2 - source/funkin/backend/utils/SysZip.hx | 2 +- source/funkin/backend/utils/XMLUtil.hx | 8 ++-- source/funkin/backend/utils/ZipUtil.hx | 10 ++--- source/funkin/editors/DebugOptions.hx | 4 +- source/funkin/editors/EditorPicker.hx | 2 +- source/funkin/editors/EditorTreeMenu.hx | 2 +- source/funkin/editors/UIDebugState.hx | 2 +- .../editors/character/CharacterAnimButtons.hx | 2 +- .../editors/character/CharacterAnimScreen.hx | 2 +- .../editors/character/CharacterEditor.hx | 8 ++-- .../character/CharacterGhostsHandler.hx | 2 +- .../editors/character/CharacterInfoScreen.hx | 4 +- .../editors/character/CharacterSelection.hx | 9 ++--- .../editors/charter/ChartCreationScreen.hx | 5 +-- .../funkin/editors/charter/ChartDataScreen.hx | 4 +- source/funkin/editors/charter/Charter.hx | 27 +++++-------- .../editors/charter/CharterAutoSaveUI.hx | 4 +- .../editors/charter/CharterBackdropGroup.hx | 2 +- source/funkin/editors/charter/CharterEvent.hx | 6 +-- .../editors/charter/CharterEventGroup.hx | 2 +- .../editors/charter/CharterEventScreen.hx | 6 +-- source/funkin/editors/charter/CharterNote.hx | 5 +-- .../editors/charter/CharterSelection.hx | 10 ++--- .../editors/charter/CharterStrumLineGroup.hx | 2 +- .../editors/charter/CharterStrumline.hx | 8 ++-- .../editors/charter/CharterStrumlineButton.hx | 2 +- .../editors/charter/CharterStrumlineScreen.hx | 3 +- .../editors/charter/CharterWaveformHandler.hx | 4 +- .../editors/charter/SongCreationScreen.hx | 2 +- source/funkin/editors/import.hx | 2 +- source/funkin/editors/ui/IUIFocusable.hx | 2 +- source/funkin/editors/ui/UIAudioPlayer.hx | 6 +-- .../editors/ui/UIAutoCompleteTextBox.hx | 2 +- source/funkin/editors/ui/UIButtonList.hx | 2 +- source/funkin/editors/ui/UIColorwheel.hx | 2 +- source/funkin/editors/ui/UIContextMenu.hx | 3 +- source/funkin/editors/ui/UISlider.hx | 3 +- source/funkin/editors/ui/UIState.hx | 10 ++--- source/funkin/editors/ui/UISubstateWindow.hx | 2 +- source/funkin/editors/ui/UITextBox.hx | 2 +- source/funkin/editors/ui/UIWarningSubstate.hx | 4 +- source/funkin/game/Character.hx | 20 +++++----- source/funkin/game/GameOverSubstate.hx | 12 +++--- source/funkin/game/HudCamera.hx | 1 - source/funkin/game/Note.hx | 4 +- source/funkin/game/PlayState.hx | 39 +++++++++---------- source/funkin/game/SplashHandler.hx | 1 - source/funkin/game/Stage.hx | 10 ++--- source/funkin/game/StrumLine.hx | 7 ++-- .../funkin/game/cutscenes/DialogueCutscene.hx | 10 ++--- .../funkin/game/cutscenes/ScriptedCutscene.hx | 1 - source/funkin/game/cutscenes/VideoCutscene.hx | 14 +++---- .../game/cutscenes/dialogue/DialogueBox.hx | 13 +++---- .../cutscenes/dialogue/DialogueCharacter.hx | 5 +-- source/funkin/menus/BetaWarningState.hx | 2 +- source/funkin/menus/FreeplayState.hx | 9 ++--- source/funkin/menus/MainMenuState.hx | 10 ++--- source/funkin/menus/ModSwitchMenu.hx | 6 +-- source/funkin/menus/PauseSubState.hx | 16 ++++---- .../menus/PlaytestingWarningSubstate.hx | 6 +-- source/funkin/menus/StoryMenuState.hx | 10 ++--- source/funkin/menus/TitleState.hx | 8 ++-- .../funkin/menus/credits/CreditsCodename.hx | 4 +- source/funkin/menus/credits/CreditsMain.hx | 2 +- source/funkin/menus/ui/Alphabet.hx | 10 ++--- source/funkin/options/Options.hx | 4 +- source/funkin/options/OptionsMenu.hx | 6 +-- source/funkin/options/PlayerSettings.hx | 4 +- source/funkin/options/TreeMenu.hx | 6 +-- .../funkin/options/type/GithubIconOption.hx | 4 +- source/funkin/options/type/OptionType.hx | 2 +- source/funkin/savedata/FunkinSave.hx | 2 +- 118 files changed, 358 insertions(+), 431 deletions(-) diff --git a/source/flx3d/Flx3DCamera.hx b/source/flx3d/Flx3DCamera.hx index e6e10079..7f21f846 100644 --- a/source/flx3d/Flx3DCamera.hx +++ b/source/flx3d/Flx3DCamera.hx @@ -1,32 +1,29 @@ package flx3d; #if THREE_D_SUPPORT -import away3d.entities.SegmentSet; import away3d.cameras.Camera3D; -import away3d.entities.TextureProjector; -import away3d.primitives.SkyBox; -import away3d.lights.LightBase; import away3d.containers.ObjectContainer3D; -import away3d.library.Asset3DLibraryBundle; +import away3d.containers.View3D; +import away3d.entities.Mesh; +import away3d.entities.SegmentSet; +import away3d.entities.TextureProjector; +import away3d.events.Asset3DEvent; import away3d.events.LoaderEvent; -import away3d.loaders.AssetLoader; +import away3d.library.Asset3DLibrary; +import away3d.library.Asset3DLibraryBundle; +import away3d.library.assets.Asset3DType; +import away3d.lights.LightBase; +import away3d.loaders.misc.AssetLoaderContext; import away3d.loaders.misc.AssetLoaderToken; -import funkin.backend.system.Logs; +import away3d.loaders.parsers.*; +import away3d.materials.TextureMaterial; +import away3d.primitives.SkyBox; +import away3d.utils.Cast; import flixel.FlxG; import flx3d.Flx3DUtil; -import away3d.library.assets.Asset3DType; -import away3d.library.Asset3DLibrary; -import away3d.events.Asset3DEvent; -import away3d.loaders.parsers.*; -import away3d.utils.Cast; -import away3d.materials.TextureMaterial; import haxe.io.Path; -import away3d.loaders.misc.AssetLoaderContext; import openfl.Assets; -import away3d.entities.Mesh; -import away3d.loaders.Loader3D; -import funkin.backend.utils.NativeAPI.ConsoleColor; -import away3d.containers.View3D; + #end import flixel.FlxCamera; diff --git a/source/flx3d/Flx3DView.hx b/source/flx3d/Flx3DView.hx index 24763bac..88e8a8ae 100644 --- a/source/flx3d/Flx3DView.hx +++ b/source/flx3d/Flx3DView.hx @@ -1,31 +1,26 @@ package flx3d; #if THREE_D_SUPPORT -import away3d.entities.SegmentSet; import away3d.cameras.Camera3D; -import away3d.entities.TextureProjector; -import away3d.primitives.SkyBox; -import away3d.lights.LightBase; import away3d.containers.ObjectContainer3D; -import away3d.library.Asset3DLibraryBundle; -import away3d.events.LoaderEvent; -import away3d.loaders.AssetLoader; -import away3d.loaders.misc.AssetLoaderToken; -import funkin.backend.system.Logs; -import flixel.FlxG; -import flx3d.Flx3DUtil; -import away3d.library.assets.Asset3DType; -import away3d.library.Asset3DLibrary; -import away3d.events.Asset3DEvent; -import away3d.loaders.parsers.*; -import away3d.utils.Cast; -import away3d.materials.TextureMaterial; -import haxe.io.Path; -import away3d.loaders.misc.AssetLoaderContext; -import openfl.Assets; import away3d.entities.Mesh; -import away3d.loaders.Loader3D; -import funkin.backend.utils.NativeAPI.ConsoleColor; +import away3d.entities.SegmentSet; +import away3d.entities.TextureProjector; +import away3d.events.Asset3DEvent; +import away3d.events.LoaderEvent; +import away3d.library.Asset3DLibrary; +import away3d.library.Asset3DLibraryBundle; +import away3d.library.assets.Asset3DType; +import away3d.lights.LightBase; +import away3d.loaders.misc.AssetLoaderContext; +import away3d.loaders.misc.AssetLoaderToken; +import away3d.loaders.parsers.*; +import away3d.materials.TextureMaterial; +import away3d.primitives.SkyBox; +import away3d.utils.Cast; +import flx3d.Flx3DUtil; +import haxe.io.Path; +import openfl.Assets; #end // FlxView3D with helpers for easier updating diff --git a/source/funkin/backend/FlxAnimate.hx b/source/funkin/backend/FlxAnimate.hx index c6559dfd..c2b6e8c6 100644 --- a/source/funkin/backend/FlxAnimate.hx +++ b/source/funkin/backend/FlxAnimate.hx @@ -1,12 +1,9 @@ package funkin.backend; -import flixel.graphics.frames.FlxFramesCollection; -import openfl.geom.ColorTransform; -import flixel.math.FlxMatrix; -import flixel.math.FlxAngle; -import flixel.math.FlxRect; import flixel.graphics.frames.FlxFrame; -import flixel.math.FlxPoint; +import flixel.math.FlxAngle; +import flixel.math.FlxMatrix; +import openfl.geom.ColorTransform; class FlxAnimate extends flxanimate.FlxAnimate { static var rMatrix = new FlxMatrix(); diff --git a/source/funkin/backend/FunkinSprite.hx b/source/funkin/backend/FunkinSprite.hx index e4672c6f..f67ee922 100644 --- a/source/funkin/backend/FunkinSprite.hx +++ b/source/funkin/backend/FunkinSprite.hx @@ -1,17 +1,17 @@ package funkin.backend; -import funkin.backend.utils.XMLUtil.BeatAnim; -import funkin.backend.utils.XMLUtil.AnimData; -import funkin.backend.utils.XMLUtil.IXMLEvents; -import flixel.system.FlxAssets.FlxGraphicAsset; import flixel.addons.effects.FlxSkewedSprite; -import haxe.io.Path; -import funkin.backend.scripting.events.PlayAnimEvent.PlayAnimContext; -import funkin.backend.system.interfaces.IOffsetCompatible; import flixel.math.FlxMatrix; -import flixel.math.FlxRect; import flixel.math.FlxPoint; +import flixel.math.FlxRect; +import flixel.system.FlxAssets.FlxGraphicAsset; +import funkin.backend.scripting.events.PlayAnimEvent.PlayAnimContext; import funkin.backend.system.interfaces.IBeatReceiver; +import funkin.backend.system.interfaces.IOffsetCompatible; +import funkin.backend.utils.XMLUtil.AnimData; +import funkin.backend.utils.XMLUtil.BeatAnim; +import funkin.backend.utils.XMLUtil.IXMLEvents; +import haxe.io.Path; enum abstract XMLAnimType(Int) { diff --git a/source/funkin/backend/FunkinText.hx b/source/funkin/backend/FunkinText.hx index 5b2c3280..aa3728ea 100644 --- a/source/funkin/backend/FunkinText.hx +++ b/source/funkin/backend/FunkinText.hx @@ -1,7 +1,7 @@ package funkin.backend; -import flixel.util.FlxColor; import flixel.text.FlxText; +import flixel.util.FlxColor; class FunkinText extends FlxText { public function new(X:Float = 0, Y:Float = 0, FieldWidth:Float = 0, ?Text:String, Size:Int = 16, Border:Bool = true) { diff --git a/source/funkin/backend/MusicBeatState.hx b/source/funkin/backend/MusicBeatState.hx index 35b684e5..e519ed0e 100644 --- a/source/funkin/backend/MusicBeatState.hx +++ b/source/funkin/backend/MusicBeatState.hx @@ -1,16 +1,16 @@ package funkin.backend; -import funkin.backend.system.framerate.Framerate; -import funkin.backend.system.GraphicCacheSprite; -import funkin.backend.system.Controls; -import funkin.backend.scripting.DummyScript; import flixel.FlxState; import flixel.FlxSubState; -import funkin.backend.scripting.events.*; +import funkin.backend.scripting.DummyScript; import funkin.backend.scripting.Script; import funkin.backend.scripting.ScriptPack; -import funkin.backend.system.interfaces.IBeatReceiver; +import funkin.backend.scripting.events.*; import funkin.backend.system.Conductor; +import funkin.backend.system.Controls; +import funkin.backend.system.GraphicCacheSprite; +import funkin.backend.system.framerate.Framerate; +import funkin.backend.system.interfaces.IBeatReceiver; import funkin.options.PlayerSettings; class MusicBeatState extends FlxState implements IBeatReceiver diff --git a/source/funkin/backend/MusicBeatSubstate.hx b/source/funkin/backend/MusicBeatSubstate.hx index e2bbb312..d8ee8076 100644 --- a/source/funkin/backend/MusicBeatSubstate.hx +++ b/source/funkin/backend/MusicBeatSubstate.hx @@ -1,15 +1,15 @@ package funkin.backend; import flixel.FlxState; -import funkin.backend.scripting.events.*; +import flixel.FlxSubState; +import funkin.backend.scripting.DummyScript; import funkin.backend.scripting.Script; import funkin.backend.scripting.ScriptPack; -import funkin.backend.scripting.DummyScript; -import funkin.backend.system.interfaces.IBeatReceiver; +import funkin.backend.scripting.events.*; import funkin.backend.system.Conductor; import funkin.backend.system.Controls; +import funkin.backend.system.interfaces.IBeatReceiver; import funkin.options.PlayerSettings; -import flixel.FlxSubState; class MusicBeatSubstate extends FlxSubState implements IBeatReceiver { diff --git a/source/funkin/backend/MusicBeatTransition.hx b/source/funkin/backend/MusicBeatTransition.hx index 34b02388..7bb1805d 100644 --- a/source/funkin/backend/MusicBeatTransition.hx +++ b/source/funkin/backend/MusicBeatTransition.hx @@ -1,7 +1,7 @@ package funkin.backend; -import flixel.tweens.FlxTween; import flixel.FlxState; +import flixel.tweens.FlxTween; import funkin.backend.utils.FunkinParentDisabler; class MusicBeatTransition extends MusicBeatSubstate { diff --git a/source/funkin/backend/chart/Chart.hx b/source/funkin/backend/chart/Chart.hx index 7a35c2ba..0ff0634c 100644 --- a/source/funkin/backend/chart/Chart.hx +++ b/source/funkin/backend/chart/Chart.hx @@ -1,13 +1,11 @@ package funkin.backend.chart; -import funkin.backend.system.Conductor; -import funkin.backend.chart.ChartData; import flixel.util.FlxColor; -import haxe.io.Path; +import funkin.backend.chart.ChartData; import haxe.Json; +import haxe.io.Path; #if sys -import sys.io.File; import sys.FileSystem; #end diff --git a/source/funkin/backend/chart/EventsData.hx b/source/funkin/backend/chart/EventsData.hx index 16551cb7..e801f18f 100644 --- a/source/funkin/backend/chart/EventsData.hx +++ b/source/funkin/backend/chart/EventsData.hx @@ -1,11 +1,11 @@ package funkin.backend.chart; -import hscript.Parser; -import hscript.Interp; -import haxe.Json; -import openfl.Assets; -import haxe.io.Path; import funkin.backend.assets.Paths; +import haxe.Json; +import haxe.io.Path; +import hscript.Interp; +import hscript.Parser; +import openfl.Assets; using StringTools; diff --git a/source/funkin/backend/chart/PsychParser.hx b/source/funkin/backend/chart/PsychParser.hx index 1af9962a..2d5a8b7b 100644 --- a/source/funkin/backend/chart/PsychParser.hx +++ b/source/funkin/backend/chart/PsychParser.hx @@ -1,7 +1,7 @@ package funkin.backend.chart; -import funkin.backend.chart.FNFLegacyParser.SwagSection; import funkin.backend.chart.ChartData.ChartEvent; +import funkin.backend.chart.FNFLegacyParser.SwagSection; import funkin.backend.chart.FNFLegacyParser.SwagSong; import funkin.backend.system.Conductor; diff --git a/source/funkin/backend/scripting/GlobalScript.hx b/source/funkin/backend/scripting/GlobalScript.hx index 5c037aec..d2d9323f 100644 --- a/source/funkin/backend/scripting/GlobalScript.hx +++ b/source/funkin/backend/scripting/GlobalScript.hx @@ -1,9 +1,9 @@ package funkin.backend.scripting; -import funkin.backend.scripting.events.CancellableEvent; -import funkin.backend.system.Conductor; import flixel.FlxState; import funkin.backend.assets.ModsFolder; +import funkin.backend.scripting.events.CancellableEvent; +import funkin.backend.system.Conductor; #if GLOBAL_SCRIPT /** * Class for THE Global Script, aka script that runs in the background at all times. diff --git a/source/funkin/backend/scripting/HScript.hx b/source/funkin/backend/scripting/HScript.hx index 37aaaa95..962db9e2 100644 --- a/source/funkin/backend/scripting/HScript.hx +++ b/source/funkin/backend/scripting/HScript.hx @@ -1,10 +1,9 @@ package funkin.backend.scripting; -import haxe.io.Path; +import hscript.*; import hscript.Expr.Error; import hscript.Parser; import openfl.Assets; -import hscript.*; class HScript extends Script { public var interp:Interp; diff --git a/source/funkin/backend/scripting/Script.hx b/source/funkin/backend/scripting/Script.hx index 7d141349..1ea7e123 100644 --- a/source/funkin/backend/scripting/Script.hx +++ b/source/funkin/backend/scripting/Script.hx @@ -1,10 +1,9 @@ package funkin.backend.scripting; -import lime.app.Application; import flixel.util.FlxDestroyUtil.IFlxDestroyable; -import haxe.io.Path; -import hscript.IHScriptCustomConstructor; import flixel.util.FlxStringUtil; +import haxe.io.Path; +import lime.app.Application; @:allow(funkin.backend.scripting.ScriptPack) /** diff --git a/source/funkin/backend/shaders/CustomShader.hx b/source/funkin/backend/shaders/CustomShader.hx index 7ea07c7e..93d480c6 100644 --- a/source/funkin/backend/shaders/CustomShader.hx +++ b/source/funkin/backend/shaders/CustomShader.hx @@ -1,8 +1,6 @@ package funkin.backend.shaders; -import haxe.Exception; import openfl.Assets; -import hscript.IHScriptCustomBehaviour; /** * Class for custom shaders. diff --git a/source/funkin/backend/shaders/FunkinShader.hx b/source/funkin/backend/shaders/FunkinShader.hx index 8002d9fd..612411e9 100644 --- a/source/funkin/backend/shaders/FunkinShader.hx +++ b/source/funkin/backend/shaders/FunkinShader.hx @@ -2,22 +2,16 @@ package funkin.backend.shaders; import haxe.Exception; import hscript.IHScriptCustomBehaviour; -import flixel.graphics.tile.FlxGraphicsShader; -import openfl.display3D.Program3D; import flixel.system.FlxAssets.FlxShader; -import openfl.display.BitmapData; -import openfl.display.ShaderParameter; -import openfl.display.ShaderParameterType; -import openfl.display.ShaderInput; import lime.utils.Float32Array; -using StringTools; - +import openfl.display.ShaderParameterType; import openfl.display.ShaderParameter; import openfl.display.BitmapData; import openfl.display.ShaderInput; +using StringTools; @:access(openfl.display3D.Context3D) @:access(openfl.display3D.Program3D) @:access(openfl.display.ShaderInput) diff --git a/source/funkin/backend/system/Conductor.hx b/source/funkin/backend/system/Conductor.hx index 8db60b36..21680774 100644 --- a/source/funkin/backend/system/Conductor.hx +++ b/source/funkin/backend/system/Conductor.hx @@ -1,9 +1,9 @@ package funkin.backend.system; -import funkin.backend.chart.ChartData; import flixel.FlxState; -import funkin.backend.system.interfaces.IBeatReceiver; import flixel.util.FlxSignal.FlxTypedSignal; +import funkin.backend.chart.ChartData; +import funkin.backend.system.interfaces.IBeatReceiver; typedef BPMChangeEvent = { diff --git a/source/funkin/backend/system/Controls.hx b/source/funkin/backend/system/Controls.hx index 76c50d14..e70648cb 100644 --- a/source/funkin/backend/system/Controls.hx +++ b/source/funkin/backend/system/Controls.hx @@ -3,10 +3,8 @@ package funkin.backend.system; import flixel.input.FlxInput; import flixel.input.actions.FlxAction; import flixel.input.actions.FlxActionInput; -import flixel.input.actions.FlxActionInputDigital; import flixel.input.actions.FlxActionManager; import flixel.input.actions.FlxActionSet; -import flixel.input.gamepad.FlxGamepadButton; import flixel.input.gamepad.FlxGamepadInputID; import flixel.input.keyboard.FlxKey; diff --git a/source/funkin/backend/system/Logs.hx b/source/funkin/backend/system/Logs.hx index ab317835..1f083324 100644 --- a/source/funkin/backend/system/Logs.hx +++ b/source/funkin/backend/system/Logs.hx @@ -2,9 +2,9 @@ package funkin.backend.system; import flixel.system.debug.log.LogStyle; import flixel.system.frontEnds.LogFrontEnd; -import haxe.Log; -import funkin.backend.utils.NativeAPI; import funkin.backend.utils.NativeAPI.ConsoleColor; +import funkin.backend.utils.NativeAPI; +import haxe.Log; class Logs { private static var __showing:Bool = false; diff --git a/source/funkin/backend/system/Main.hx b/source/funkin/backend/system/Main.hx index a874ed80..7ff01ee7 100644 --- a/source/funkin/backend/system/Main.hx +++ b/source/funkin/backend/system/Main.hx @@ -1,29 +1,26 @@ package funkin.backend.system; -import funkin.editors.SaveWarning; -import funkin.backend.assets.AssetsLibraryList; -import funkin.backend.system.framerate.SystemInfo; -import openfl.utils.AssetLibrary; -import openfl.text.TextFormat; +import flixel.addons.transition.FlxTransitionSprite.GraphicTransTileDiamond; +import flixel.addons.transition.FlxTransitionableState; +import flixel.addons.transition.TransitionData; +import flixel.graphics.FlxGraphic; +import flixel.math.FlxPoint; +import flixel.math.FlxRect; import flixel.system.ui.FlxSoundTray; +import funkin.backend.assets.AssetsLibraryList; +import funkin.backend.assets.ModsFolder; +import funkin.backend.system.framerate.SystemInfo; +import funkin.backend.system.modules.*; +import funkin.editors.SaveWarning; import openfl.Assets; import openfl.Lib; import openfl.display.Sprite; -import flixel.graphics.FlxGraphic; -import flixel.addons.transition.FlxTransitionableState; -import flixel.addons.transition.FlxTransitionSprite.GraphicTransTileDiamond; -import flixel.addons.transition.TransitionData; -import flixel.math.FlxPoint; -import flixel.math.FlxRect; -import funkin.backend.system.modules.*; +import openfl.text.TextFormat; +import openfl.utils.AssetLibrary; #if ALLOW_MULTITHREADING import sys.thread.Thread; #end -#if sys -import sys.io.File; -#end -import funkin.backend.assets.ModsFolder; #if android import android.content.Context; import android.os.Build; @@ -213,9 +210,9 @@ class Main extends Sprite public static var noCwdFix:Bool = false; public static function fixWorkingDirectory() { #if windows - if (!noCwdFix && !sys.FileSystem.exists('manifest/default.json')) { - Sys.setCwd(haxe.io.Path.directory(Sys.programPath())); - } + if (!noCwdFix && !sys.FileSystem.exists('manifest/default.json')) { + Sys.setCwd(haxe.io.Path.directory(Sys.programPath())); + } #elseif android Sys.setCwd(Path.addTrailingSlash(VERSION.SDK_INT > 30 ? Context.getObbDir() : Context.getExternalFilesDir())); #elseif (ios || switch) diff --git a/source/funkin/backend/system/MainState.hx b/source/funkin/backend/system/MainState.hx index 885da7b0..32a75569 100644 --- a/source/funkin/backend/system/MainState.hx +++ b/source/funkin/backend/system/MainState.hx @@ -3,11 +3,11 @@ package funkin.backend.system; #if MOD_SUPPORT import sys.FileSystem; #end -import funkin.backend.assets.ModsFolder; -import funkin.menus.TitleState; -import funkin.menus.BetaWarningState; -import funkin.backend.chart.EventsData; import flixel.FlxState; +import funkin.backend.assets.ModsFolder; +import funkin.backend.chart.EventsData; +import funkin.menus.BetaWarningState; +import funkin.menus.TitleState; /** * Simple state used for loading the game diff --git a/source/funkin/backend/system/OptimizedBitmapData.hx b/source/funkin/backend/system/OptimizedBitmapData.hx index d79f6ad1..f6cf1117 100644 --- a/source/funkin/backend/system/OptimizedBitmapData.hx +++ b/source/funkin/backend/system/OptimizedBitmapData.hx @@ -1,9 +1,9 @@ package funkin.backend.system; import lime.graphics.Image; -import openfl.geom.Rectangle; -import openfl.display.BitmapData; import lime.graphics.cairo.CairoImageSurface; +import openfl.display.BitmapData; +import openfl.geom.Rectangle; class OptimizedBitmapData extends BitmapData { @SuppressWarnings("checkstyle:Dynamic") diff --git a/source/funkin/backend/system/framerate/CodenameBuildField.hx b/source/funkin/backend/system/framerate/CodenameBuildField.hx index 2cef4a26..3175a01e 100644 --- a/source/funkin/backend/system/framerate/CodenameBuildField.hx +++ b/source/funkin/backend/system/framerate/CodenameBuildField.hx @@ -1,9 +1,7 @@ package funkin.backend.system.framerate; -import openfl.text.TextFormat; -import openfl.display.Sprite; -import openfl.text.TextField; import funkin.backend.system.macros.GitCommitMacro; +import openfl.text.TextField; class CodenameBuildField extends TextField { public function new() { diff --git a/source/funkin/backend/system/framerate/ConductorInfo.hx b/source/funkin/backend/system/framerate/ConductorInfo.hx index 96f4e39d..c13e026f 100644 --- a/source/funkin/backend/system/framerate/ConductorInfo.hx +++ b/source/funkin/backend/system/framerate/ConductorInfo.hx @@ -1,6 +1,5 @@ package funkin.backend.system.framerate; - class ConductorInfo extends FramerateCategory { public function new() { super("Conductor Info"); diff --git a/source/funkin/backend/system/framerate/Framerate.hx b/source/funkin/backend/system/framerate/Framerate.hx index e2e565b0..8faa09ee 100644 --- a/source/funkin/backend/system/framerate/Framerate.hx +++ b/source/funkin/backend/system/framerate/Framerate.hx @@ -1,12 +1,11 @@ package funkin.backend.system.framerate; +import flixel.math.FlxPoint; import openfl.display.Bitmap; import openfl.display.BitmapData; -import flixel.math.FlxPoint; -import openfl.events.KeyboardEvent; import openfl.display.DisplayObject; import openfl.display.Sprite; -import openfl.text.TextField; +import openfl.events.KeyboardEvent; import openfl.text.TextFormat; import openfl.ui.Keyboard; diff --git a/source/funkin/backend/system/framerate/FramerateCategory.hx b/source/funkin/backend/system/framerate/FramerateCategory.hx index fcc44fde..f1125eb4 100644 --- a/source/funkin/backend/system/framerate/FramerateCategory.hx +++ b/source/funkin/backend/system/framerate/FramerateCategory.hx @@ -1,9 +1,9 @@ package funkin.backend.system.framerate; import openfl.display.Bitmap; -import openfl.text.TextFormat; import openfl.display.Sprite; import openfl.text.TextField; +import openfl.text.TextFormat; class FramerateCategory extends Sprite { public var title:TextField; diff --git a/source/funkin/backend/system/framerate/FramerateCounter.hx b/source/funkin/backend/system/framerate/FramerateCounter.hx index 55cc0f97..0b3ed07b 100644 --- a/source/funkin/backend/system/framerate/FramerateCounter.hx +++ b/source/funkin/backend/system/framerate/FramerateCounter.hx @@ -1,8 +1,8 @@ package funkin.backend.system.framerate; -import openfl.text.TextFormat; import openfl.display.Sprite; import openfl.text.TextField; +import openfl.text.TextFormat; class FramerateCounter extends Sprite { public var fpsNum:TextField; diff --git a/source/funkin/backend/system/framerate/MemoryCounter.hx b/source/funkin/backend/system/framerate/MemoryCounter.hx index 01321f0d..33efff59 100644 --- a/source/funkin/backend/system/framerate/MemoryCounter.hx +++ b/source/funkin/backend/system/framerate/MemoryCounter.hx @@ -1,8 +1,8 @@ package funkin.backend.system.framerate; -import openfl.text.TextFormat; import openfl.display.Sprite; import openfl.text.TextField; +import openfl.text.TextFormat; class MemoryCounter extends Sprite { public var memoryText:TextField; diff --git a/source/funkin/backend/system/framerate/SystemInfo.hx b/source/funkin/backend/system/framerate/SystemInfo.hx index 0d2bc73a..a815e3b5 100644 --- a/source/funkin/backend/system/framerate/SystemInfo.hx +++ b/source/funkin/backend/system/framerate/SystemInfo.hx @@ -1,8 +1,8 @@ package funkin.backend.system.framerate; -import funkin.backend.utils.native.HiddenProcess; -import funkin.backend.utils.MemoryUtil; import funkin.backend.system.Logs; +import funkin.backend.utils.MemoryUtil; +import funkin.backend.utils.native.HiddenProcess; using StringTools; diff --git a/source/funkin/backend/system/github/GitHub.hx b/source/funkin/backend/system/github/GitHub.hx index 27ba825b..778bb447 100644 --- a/source/funkin/backend/system/github/GitHub.hx +++ b/source/funkin/backend/system/github/GitHub.hx @@ -1,8 +1,8 @@ package funkin.backend.system.github; #if GITHUB_API -import haxe.Json; import haxe.Exception; +import haxe.Json; #end // TODO: Document further and perhaps make this a Haxelib. diff --git a/source/funkin/backend/system/github/GitHubUser.hx b/source/funkin/backend/system/github/GitHubUser.hx index e0dc15bc..f9e71d39 100644 --- a/source/funkin/backend/system/github/GitHubUser.hx +++ b/source/funkin/backend/system/github/GitHubUser.hx @@ -1,6 +1,5 @@ package funkin.backend.system.github; - typedef GitHubUser = { /** * Username of the user. diff --git a/source/funkin/backend/system/modules/AudioSwitchFix.hx b/source/funkin/backend/system/modules/AudioSwitchFix.hx index db8360c1..232c1eb8 100644 --- a/source/funkin/backend/system/modules/AudioSwitchFix.hx +++ b/source/funkin/backend/system/modules/AudioSwitchFix.hx @@ -1,9 +1,9 @@ package funkin.backend.system.modules; -import lime.media.AudioManager; -import flixel.sound.FlxSound; import flixel.FlxState; +import flixel.sound.FlxSound; import funkin.backend.utils.NativeAPI; +import lime.media.AudioManager; /** * if youre stealing this keep this comment at least please lol diff --git a/source/funkin/backend/system/modules/CrashHandler.hx b/source/funkin/backend/system/modules/CrashHandler.hx index 19c18316..124b915c 100644 --- a/source/funkin/backend/system/modules/CrashHandler.hx +++ b/source/funkin/backend/system/modules/CrashHandler.hx @@ -1,13 +1,11 @@ package funkin.backend.system.modules; -import lime.system.System; import funkin.backend.utils.NativeAPI; -import openfl.Lib; -import openfl.events.UncaughtErrorEvent; -import openfl.events.ErrorEvent; -import openfl.errors.Error; -import openfl.events.UncaughtErrorEvent; import haxe.CallStack; +import openfl.Lib; +import openfl.errors.Error; +import openfl.events.ErrorEvent; +import openfl.events.UncaughtErrorEvent; class CrashHandler { public static function init() { diff --git a/source/funkin/backend/system/modules/FunkinCache.hx b/source/funkin/backend/system/modules/FunkinCache.hx index a7559281..e1d82834 100644 --- a/source/funkin/backend/system/modules/FunkinCache.hx +++ b/source/funkin/backend/system/modules/FunkinCache.hx @@ -1,9 +1,9 @@ package funkin.backend.system.modules; -import openfl.utils.AssetCache; import openfl.display.BitmapData; import openfl.media.Sound; import openfl.text.Font; +import openfl.utils.AssetCache; #if lime import lime.utils.Assets as LimeAssets; #end diff --git a/source/funkin/backend/system/updating/AsyncUpdater.hx b/source/funkin/backend/system/updating/AsyncUpdater.hx index 04dbafe8..ac31b044 100644 --- a/source/funkin/backend/system/updating/AsyncUpdater.hx +++ b/source/funkin/backend/system/updating/AsyncUpdater.hx @@ -1,19 +1,17 @@ package funkin.backend.system.updating; -import openfl.Lib; -import sys.io.Process; -import haxe.zip.Reader; +import funkin.backend.system.github.GitHubRelease; import funkin.backend.utils.ZipUtil; import haxe.io.Path; -import openfl.utils.ByteArray; -import sys.io.File; -import sys.io.FileOutput; +import openfl.Lib; import openfl.events.Event; import openfl.events.ProgressEvent; -import openfl.net.URLRequest; import openfl.net.URLLoader; +import openfl.net.URLRequest; +import openfl.utils.ByteArray; import sys.FileSystem; -import funkin.backend.system.github.GitHubRelease; +import sys.io.File; +import sys.io.FileOutput; class AsyncUpdater { // NON ASYNC STUFF diff --git a/source/funkin/backend/system/updating/UpdateAvailableScreen.hx b/source/funkin/backend/system/updating/UpdateAvailableScreen.hx index d3a3869a..8814dcec 100644 --- a/source/funkin/backend/system/updating/UpdateAvailableScreen.hx +++ b/source/funkin/backend/system/updating/UpdateAvailableScreen.hx @@ -1,13 +1,11 @@ package funkin.backend.system.updating; +import flixel.addons.transition.FlxTransitionableState; +import flixel.math.FlxPoint; +import funkin.backend.FunkinText; +import funkin.backend.system.updating.UpdateUtil.UpdateCheckCallback; import funkin.backend.utils.MarkdownUtil; import funkin.menus.MainMenuState; -import flixel.math.FlxPoint; -import funkin.backend.system.updating.UpdateUtil.UpdateCheckCallback; -import funkin.backend.FunkinText; -import flixel.text.FlxText; -import flixel.addons.transition.FlxTransitionableState; -import flixel.tweens.FlxTween; class UpdateAvailableScreen extends MusicBeatState { public var bg:FlxSprite; diff --git a/source/funkin/backend/system/updating/UpdateScreen.hx b/source/funkin/backend/system/updating/UpdateScreen.hx index 323fda09..d7da6539 100644 --- a/source/funkin/backend/system/updating/UpdateScreen.hx +++ b/source/funkin/backend/system/updating/UpdateScreen.hx @@ -1,12 +1,12 @@ package funkin.backend.system.updating; -import funkin.backend.shaders.CustomShader; -import funkin.backend.FunkinText; -import funkin.menus.TitleState; import flixel.math.FlxRect; import flixel.sound.FlxSound; import flixel.ui.FlxBar; +import funkin.backend.FunkinText; +import funkin.backend.shaders.CustomShader; import funkin.backend.system.updating.UpdateUtil.UpdateCheckCallback; +import funkin.menus.TitleState; class UpdateScreen extends MusicBeatState { public var updater:AsyncUpdater; diff --git a/source/funkin/backend/system/updating/UpdateUtil.hx b/source/funkin/backend/system/updating/UpdateUtil.hx index f8268b93..9515b990 100644 --- a/source/funkin/backend/system/updating/UpdateUtil.hx +++ b/source/funkin/backend/system/updating/UpdateUtil.hx @@ -1,10 +1,10 @@ package funkin.backend.system.updating; -import sys.FileSystem; -import haxe.io.Path; -import funkin.backend.system.github.GitHubRelease; import funkin.backend.system.github.GitHub; +import funkin.backend.system.github.GitHubRelease; +import haxe.io.Path; import lime.app.Application; +import sys.FileSystem; using funkin.backend.system.github.GitHub; diff --git a/source/funkin/backend/utils/BitmapUtil.hx b/source/funkin/backend/utils/BitmapUtil.hx index 367d0123..776e9330 100644 --- a/source/funkin/backend/utils/BitmapUtil.hx +++ b/source/funkin/backend/utils/BitmapUtil.hx @@ -1,7 +1,7 @@ package funkin.backend.utils; -import openfl.display.BitmapData; import flixel.util.FlxColor; +import openfl.display.BitmapData; class BitmapUtil { /** diff --git a/source/funkin/backend/utils/CoolUtil.hx b/source/funkin/backend/utils/CoolUtil.hx index 58bf7bae..c441ebe0 100644 --- a/source/funkin/backend/utils/CoolUtil.hx +++ b/source/funkin/backend/utils/CoolUtil.hx @@ -1,24 +1,24 @@ package funkin.backend.utils; -import flixel.text.FlxText; -import funkin.backend.utils.XMLUtil.TextFormat; -import flixel.util.typeLimit.OneOfTwo; -import flixel.tweens.FlxTween; -import flixel.system.frontEnds.SoundFrontEnd; -import flixel.sound.FlxSound; -import funkin.backend.system.Conductor; -import flixel.sound.FlxSoundGroup; -import haxe.Json; -import haxe.io.Path; -import haxe.io.Bytes; -import haxe.xml.Access; -import flixel.input.keyboard.FlxKey; -import lime.utils.Assets; import flixel.animation.FlxAnimation; -import flixel.util.FlxColor; +import flixel.input.keyboard.FlxKey; +import flixel.sound.FlxSound; +import flixel.sound.FlxSoundGroup; +import flixel.system.frontEnds.SoundFrontEnd; +import flixel.text.FlxText; +import flixel.tweens.FlxTween; import flixel.util.FlxAxes; -import openfl.geom.ColorTransform; +import flixel.util.FlxColor; +import flixel.util.typeLimit.OneOfTwo; +import funkin.backend.system.Conductor; +import funkin.backend.utils.XMLUtil.TextFormat; import haxe.CallStack; +import haxe.Json; +import haxe.io.Bytes; +import haxe.io.Path; +import haxe.xml.Access; +import lime.utils.Assets; +import openfl.geom.ColorTransform; using StringTools; diff --git a/source/funkin/backend/utils/DiscordUtil.hx b/source/funkin/backend/utils/DiscordUtil.hx index a4c63f4f..154a3758 100644 --- a/source/funkin/backend/utils/DiscordUtil.hx +++ b/source/funkin/backend/utils/DiscordUtil.hx @@ -1,19 +1,19 @@ package funkin.backend.utils; -import funkin.backend.scripting.events.DiscordPresenceUpdateEvent; -import funkin.backend.scripting.events.CancellableEvent; -import funkin.backend.scripting.*; // lazy +import flixel.sound.FlxSound; import flixel.util.typeLimit.OneOfTwo; -import openfl.display.BitmapData; +import funkin.backend.scripting.*; // lazy +import funkin.backend.scripting.events.CancellableEvent; +import funkin.backend.scripting.events.DiscordPresenceUpdateEvent; import funkin.backend.system.macros.Utils; import haxe.Json; -import flixel.sound.FlxSound; +import openfl.display.BitmapData; #if DISCORD_RPC +import Sys; import hxdiscord_rpc.Discord; import hxdiscord_rpc.Types; -import sys.thread.Thread; -import Sys; import lime.app.Application; +import sys.thread.Thread; #end class DiscordUtil diff --git a/source/funkin/backend/utils/EngineUtil.hx b/source/funkin/backend/utils/EngineUtil.hx index d3d9b561..9f0e9157 100644 --- a/source/funkin/backend/utils/EngineUtil.hx +++ b/source/funkin/backend/utils/EngineUtil.hx @@ -1,7 +1,7 @@ package funkin.backend.utils; -import funkin.backend.scripting.Script; import funkin.backend.scripting.MultiThreadedScript; +import funkin.backend.scripting.Script; class EngineUtil { /** diff --git a/source/funkin/backend/utils/FunkinParentDisabler.hx b/source/funkin/backend/utils/FunkinParentDisabler.hx index 37d96277..4a7efc3b 100644 --- a/source/funkin/backend/utils/FunkinParentDisabler.hx +++ b/source/funkin/backend/utils/FunkinParentDisabler.hx @@ -1,8 +1,8 @@ package funkin.backend.utils; import flixel.sound.FlxSound; -import flixel.util.FlxTimer; import flixel.tweens.FlxTween; +import flixel.util.FlxTimer; /** * FlxBasic allowing you to disable those elements from the parent state while this substate is opened diff --git a/source/funkin/backend/utils/IniUtil.hx b/source/funkin/backend/utils/IniUtil.hx index 7f090554..d7b5738e 100644 --- a/source/funkin/backend/utils/IniUtil.hx +++ b/source/funkin/backend/utils/IniUtil.hx @@ -1,6 +1,5 @@ package funkin.backend.utils; - /** * DOESNT SUPPORT CATEGORIES YET!! */ diff --git a/source/funkin/backend/utils/MarkdownUtil.hx b/source/funkin/backend/utils/MarkdownUtil.hx index 7ba67558..c3692f38 100644 --- a/source/funkin/backend/utils/MarkdownUtil.hx +++ b/source/funkin/backend/utils/MarkdownUtil.hx @@ -1,7 +1,7 @@ package funkin.backend.utils; -import flixel.util.FlxColor; import flixel.text.FlxText; +import flixel.util.FlxColor; class MarkdownUtil { public static function applyMarkdownText(text:FlxText, str:String) { diff --git a/source/funkin/backend/utils/NdllUtil.hx b/source/funkin/backend/utils/NdllUtil.hx index 24493c58..97ab5d3e 100644 --- a/source/funkin/backend/utils/NdllUtil.hx +++ b/source/funkin/backend/utils/NdllUtil.hx @@ -1,7 +1,5 @@ package funkin.backend.utils; -import lime.app.Application; - /** * Small util that allows you to load any function from ndlls via `getFunction`. * diff --git a/source/funkin/backend/utils/SysZip.hx b/source/funkin/backend/utils/SysZip.hx index 717773f8..b1c013fb 100644 --- a/source/funkin/backend/utils/SysZip.hx +++ b/source/funkin/backend/utils/SysZip.hx @@ -3,10 +3,10 @@ package funkin.backend.utils; #if sys import haxe.io.Input; import haxe.zip.Entry; +import haxe.zip.InflateImpl; import haxe.zip.Reader; import sys.io.File; import sys.io.FileInput; -import haxe.zip.InflateImpl; /** * Class that extends Reader allowing you to load ZIP entries without blowing your RAM up!! diff --git a/source/funkin/backend/utils/XMLUtil.hx b/source/funkin/backend/utils/XMLUtil.hx index 2f314e78..d382869c 100644 --- a/source/funkin/backend/utils/XMLUtil.hx +++ b/source/funkin/backend/utils/XMLUtil.hx @@ -1,12 +1,12 @@ package funkin.backend.utils; +import flixel.util.FlxColor; +import flixel.util.typeLimit.OneOfTwo; +import funkin.backend.FunkinSprite.XMLAnimType; import funkin.backend.FunkinSprite; import funkin.backend.system.ErrorCode; -import funkin.backend.FunkinSprite.XMLAnimType; -import flixel.util.FlxColor; -import haxe.xml.Access; -import flixel.util.typeLimit.OneOfTwo; import funkin.backend.system.interfaces.IOffsetCompatible; +import haxe.xml.Access; using StringTools; diff --git a/source/funkin/backend/utils/ZipUtil.hx b/source/funkin/backend/utils/ZipUtil.hx index eef06a6d..16a353c2 100644 --- a/source/funkin/backend/utils/ZipUtil.hx +++ b/source/funkin/backend/utils/ZipUtil.hx @@ -8,12 +8,12 @@ import openfl.display.BitmapData; import haxe.Exception; import haxe.Json; import haxe.crypto.Crc32; -import haxe.zip.Writer; -import haxe.zip.Tools; -import haxe.zip.Entry; -import haxe.zip.Uncompress; -import haxe.zip.Reader; import haxe.zip.Compress; +import haxe.zip.Entry; +import haxe.zip.Reader; +import haxe.zip.Tools; +import haxe.zip.Uncompress; +import haxe.zip.Writer; import sys.FileSystem; import sys.io.File; import sys.thread.Thread; diff --git a/source/funkin/editors/DebugOptions.hx b/source/funkin/editors/DebugOptions.hx index 8dcfeda7..7f5201b9 100644 --- a/source/funkin/editors/DebugOptions.hx +++ b/source/funkin/editors/DebugOptions.hx @@ -1,9 +1,9 @@ package funkin.editors; -import funkin.options.type.*; +import funkin.backend.utils.NativeAPI; import funkin.options.OptionsScreen; import funkin.options.TreeMenu; -import funkin.backend.utils.NativeAPI; +import funkin.options.type.*; class DebugOptions extends TreeMenu { public override function create() { diff --git a/source/funkin/editors/EditorPicker.hx b/source/funkin/editors/EditorPicker.hx index 7056305f..8a2ebd89 100644 --- a/source/funkin/editors/EditorPicker.hx +++ b/source/funkin/editors/EditorPicker.hx @@ -1,7 +1,7 @@ package funkin.editors; -import flixel.math.FlxPoint; import flixel.effects.FlxFlicker; +import flixel.math.FlxPoint; class EditorPicker extends MusicBeatSubstate { public var bg:FlxSprite; diff --git a/source/funkin/editors/EditorTreeMenu.hx b/source/funkin/editors/EditorTreeMenu.hx index f65cd4bf..543b0555 100644 --- a/source/funkin/editors/EditorTreeMenu.hx +++ b/source/funkin/editors/EditorTreeMenu.hx @@ -1,7 +1,7 @@ package funkin.editors; -import funkin.menus.MainMenuState; import flixel.addons.display.FlxBackdrop; +import funkin.menus.MainMenuState; import funkin.options.*; class EditorTreeMenu extends TreeMenu { diff --git a/source/funkin/editors/UIDebugState.hx b/source/funkin/editors/UIDebugState.hx index dd74c90e..3a0bf57f 100644 --- a/source/funkin/editors/UIDebugState.hx +++ b/source/funkin/editors/UIDebugState.hx @@ -1,7 +1,7 @@ package funkin.editors; -import funkin.editors.ui.*; import flixel.tweens.FlxTween; +import funkin.editors.ui.*; class UIDebugState extends UIState { public override function create() { diff --git a/source/funkin/editors/character/CharacterAnimButtons.hx b/source/funkin/editors/character/CharacterAnimButtons.hx index 106f589f..c80913cd 100644 --- a/source/funkin/editors/character/CharacterAnimButtons.hx +++ b/source/funkin/editors/character/CharacterAnimButtons.hx @@ -1,7 +1,7 @@ package funkin.editors.character; -import flixel.util.FlxColor; import flixel.math.FlxPoint; +import flixel.util.FlxColor; class CharacterAnimButtons extends UIButton { public var anim:String = ""; diff --git a/source/funkin/editors/character/CharacterAnimScreen.hx b/source/funkin/editors/character/CharacterAnimScreen.hx index 1b64907f..8d691c42 100644 --- a/source/funkin/editors/character/CharacterAnimScreen.hx +++ b/source/funkin/editors/character/CharacterAnimScreen.hx @@ -1,7 +1,7 @@ package funkin.editors.character; -import flixel.math.FlxPoint; import flixel.animation.FlxAnimation; +import flixel.math.FlxPoint; import funkin.backend.utils.XMLUtil.AnimData; class CharacterAnimScreen extends UISubstateWindow { diff --git a/source/funkin/editors/character/CharacterEditor.hx b/source/funkin/editors/character/CharacterEditor.hx index 10fa4efa..a5646b89 100644 --- a/source/funkin/editors/character/CharacterEditor.hx +++ b/source/funkin/editors/character/CharacterEditor.hx @@ -1,12 +1,12 @@ package funkin.editors.character; -import funkin.backend.system.framerate.Framerate; -import haxe.xml.Printer; -import haxe.xml.Access; -import funkin.backend.utils.XMLUtil.AnimData; import flixel.math.FlxPoint; +import funkin.backend.system.framerate.Framerate; +import funkin.backend.utils.XMLUtil.AnimData; import funkin.editors.ui.UIContextMenu.UIContextMenuOption; import funkin.game.Character; +import haxe.xml.Access; +import haxe.xml.Printer; class CharacterEditor extends UIState { static var __character:String; diff --git a/source/funkin/editors/character/CharacterGhostsHandler.hx b/source/funkin/editors/character/CharacterGhostsHandler.hx index 62a44c9f..fe823898 100644 --- a/source/funkin/editors/character/CharacterGhostsHandler.hx +++ b/source/funkin/editors/character/CharacterGhostsHandler.hx @@ -1,8 +1,8 @@ package funkin.editors.character; -import haxe.xml.Access; import flixel.math.FlxPoint; import funkin.game.Character; +import haxe.xml.Access; class CharacterGhostsHandler extends FlxTypedGroup { public var character:Character; diff --git a/source/funkin/editors/character/CharacterInfoScreen.hx b/source/funkin/editors/character/CharacterInfoScreen.hx index 28425c2e..de3dac36 100644 --- a/source/funkin/editors/character/CharacterInfoScreen.hx +++ b/source/funkin/editors/character/CharacterInfoScreen.hx @@ -1,9 +1,9 @@ package funkin.editors.character; import flixel.math.FlxPoint; -import haxe.xml.Access; -import funkin.game.Character; import funkin.editors.extra.PropertyButton; +import funkin.game.Character; +import haxe.xml.Access; class CharacterInfoScreen extends UISubstateWindow { public var character:Character; diff --git a/source/funkin/editors/character/CharacterSelection.hx b/source/funkin/editors/character/CharacterSelection.hx index 817acf29..eb9a1e3a 100644 --- a/source/funkin/editors/character/CharacterSelection.hx +++ b/source/funkin/editors/character/CharacterSelection.hx @@ -1,13 +1,10 @@ package funkin.editors.character; -import funkin.options.type.OptionType; -import funkin.options.type.NewOption; -import flixel.util.FlxColor; import funkin.game.Character; -import funkin.backend.chart.Chart; -import funkin.options.type.TextOption; -import funkin.options.type.IconOption; import funkin.options.OptionsScreen; +import funkin.options.type.IconOption; +import funkin.options.type.NewOption; +import funkin.options.type.OptionType; class CharacterSelection extends EditorTreeMenu { diff --git a/source/funkin/editors/charter/ChartCreationScreen.hx b/source/funkin/editors/charter/ChartCreationScreen.hx index c89835f9..78983762 100644 --- a/source/funkin/editors/charter/ChartCreationScreen.hx +++ b/source/funkin/editors/charter/ChartCreationScreen.hx @@ -2,12 +2,11 @@ package funkin.editors.charter; import flixel.text.FlxText.FlxTextFormat; import flixel.text.FlxText.FlxTextFormatMarkerPair; +import funkin.backend.chart.ChartData; import funkin.backend.shaders.CustomShader; import funkin.game.Character; -import funkin.game.Stage; import funkin.game.HealthIcon; -import funkin.backend.chart.ChartData; -import haxe.io.Bytes; +import funkin.game.Stage; class ChartCreationScreen extends UISubstateWindow { private var onSave:(String, ChartData) -> Void = null; diff --git a/source/funkin/editors/charter/ChartDataScreen.hx b/source/funkin/editors/charter/ChartDataScreen.hx index b4592d05..bc0762ad 100644 --- a/source/funkin/editors/charter/ChartDataScreen.hx +++ b/source/funkin/editors/charter/ChartDataScreen.hx @@ -1,9 +1,9 @@ package funkin.editors.charter; -import funkin.game.Stage; -import funkin.backend.chart.ChartData; import flixel.math.FlxPoint; import funkin.backend.chart.ChartData.ChartMetaData; +import funkin.backend.chart.ChartData; +import funkin.game.Stage; using StringTools; diff --git a/source/funkin/editors/charter/Charter.hx b/source/funkin/editors/charter/Charter.hx index c20382d8..acaf9367 100644 --- a/source/funkin/editors/charter/Charter.hx +++ b/source/funkin/editors/charter/Charter.hx @@ -1,30 +1,21 @@ package funkin.editors.charter; // ! FUCK YOU CHUF (your biggest fan -lunar) <3 -import flixel.input.FlxPointer; -import openfl.geom.Point; -import openfl.geom.Rectangle; -import flixel.graphics.FlxGraphic; -import flixel.addons.display.FlxTiledSprite; -import funkin.editors.ui.UIContextMenu.UIContextMenuOptionSpr; -import funkin.editors.ui.UITopMenu.UITopMenuButton; -import funkin.editors.charter.CharterStrumline; -import funkin.editors.charter.CharterBackdropGroup.EventBackdrop; -import funkin.backend.system.framerate.Framerate; -import haxe.Json; import flixel.input.keyboard.FlxKey; -import flixel.sound.FlxSound; import flixel.math.FlxPoint; -import funkin.editors.charter.CharterBackdropGroup.CharterBackdropDummy; -import funkin.backend.system.Conductor; +import flixel.sound.FlxSound; import funkin.backend.chart.*; import funkin.backend.chart.ChartData; -import flixel.addons.display.FlxBackdrop; +import funkin.backend.system.Conductor; +import funkin.backend.system.framerate.Framerate; +import funkin.editors.charter.CharterBackdropGroup.CharterBackdropDummy; +import funkin.editors.charter.CharterBackdropGroup.EventBackdrop; +import funkin.editors.charter.CharterStrumline; import funkin.editors.ui.UIContextMenu.UIContextMenuOption; +import funkin.editors.ui.UIContextMenu.UIContextMenuOptionSpr; import funkin.editors.ui.UIState; -import flixel.util.FlxColor; -import openfl.display.BitmapData; -import funkin.backend.shaders.CustomShader; +import funkin.editors.ui.UITopMenu.UITopMenuButton; +import haxe.Json; class Charter extends UIState { public static var __song:String; diff --git a/source/funkin/editors/charter/CharterAutoSaveUI.hx b/source/funkin/editors/charter/CharterAutoSaveUI.hx index 5f3ed9b8..81f207ad 100644 --- a/source/funkin/editors/charter/CharterAutoSaveUI.hx +++ b/source/funkin/editors/charter/CharterAutoSaveUI.hx @@ -1,8 +1,8 @@ package funkin.editors.charter; -import flixel.util.FlxTimer; -import flixel.tweens.FlxTween; import flixel.math.FlxRect; +import flixel.tweens.FlxTween; +import flixel.util.FlxTimer; using flixel.util.FlxSpriteUtil; diff --git a/source/funkin/editors/charter/CharterBackdropGroup.hx b/source/funkin/editors/charter/CharterBackdropGroup.hx index 21eeb90f..481bd76b 100644 --- a/source/funkin/editors/charter/CharterBackdropGroup.hx +++ b/source/funkin/editors/charter/CharterBackdropGroup.hx @@ -1,9 +1,9 @@ package funkin.editors.charter; +import flixel.addons.display.FlxBackdrop; import flixel.graphics.FlxGraphic; import funkin.backend.system.Conductor; import openfl.geom.Rectangle; -import flixel.addons.display.FlxBackdrop; class CharterBackdropGroup extends FlxTypedGroup { public var strumLineGroup:CharterStrumLineGroup; diff --git a/source/funkin/editors/charter/CharterEvent.hx b/source/funkin/editors/charter/CharterEvent.hx index 89a5d0d9..af8996a4 100644 --- a/source/funkin/editors/charter/CharterEvent.hx +++ b/source/funkin/editors/charter/CharterEvent.hx @@ -1,11 +1,11 @@ package funkin.editors.charter; -import funkin.editors.charter.Charter.ICharterSelectable; import flixel.math.FlxPoint; +import funkin.backend.chart.ChartData.ChartEvent; +import funkin.editors.charter.Charter.ICharterSelectable; +import funkin.editors.charter.CharterBackdropGroup.EventBackdrop; import funkin.game.Character; import funkin.game.HealthIcon; -import funkin.editors.charter.CharterBackdropGroup.EventBackdrop; -import funkin.backend.chart.ChartData.ChartEvent; class CharterEvent extends UISliceSprite implements ICharterSelectable { public var events:Array; diff --git a/source/funkin/editors/charter/CharterEventGroup.hx b/source/funkin/editors/charter/CharterEventGroup.hx index aab06d18..b81ee554 100644 --- a/source/funkin/editors/charter/CharterEventGroup.hx +++ b/source/funkin/editors/charter/CharterEventGroup.hx @@ -1,7 +1,7 @@ package funkin.editors.charter; -import funkin.editors.charter.CharterBackdropGroup.EventBackdrop; import flixel.util.FlxSort; +import funkin.editors.charter.CharterBackdropGroup.EventBackdrop; class CharterEventGroup extends FlxTypedGroup { public var eventsBackdrop:EventBackdrop; diff --git a/source/funkin/editors/charter/CharterEventScreen.hx b/source/funkin/editors/charter/CharterEventScreen.hx index 31d62580..ec9ce660 100644 --- a/source/funkin/editors/charter/CharterEventScreen.hx +++ b/source/funkin/editors/charter/CharterEventScreen.hx @@ -1,10 +1,10 @@ package funkin.editors.charter; -import funkin.backend.chart.ChartData.ChartEvent; -import funkin.backend.system.Conductor; import flixel.group.FlxGroup; -import funkin.backend.chart.EventsData; import flixel.util.FlxColor; +import funkin.backend.chart.ChartData.ChartEvent; +import funkin.backend.chart.EventsData; +import funkin.backend.system.Conductor; using StringTools; diff --git a/source/funkin/editors/charter/CharterNote.hx b/source/funkin/editors/charter/CharterNote.hx index 1d130842..bc214209 100644 --- a/source/funkin/editors/charter/CharterNote.hx +++ b/source/funkin/editors/charter/CharterNote.hx @@ -1,11 +1,10 @@ package funkin.editors.charter; import flixel.math.FlxPoint; -import funkin.editors.charter.Charter.ICharterSelectable; -import funkin.backend.system.Conductor; import flixel.tweens.FlxTween; -import funkin.backend.shaders.CustomShader; import flixel.util.FlxColor; +import funkin.backend.system.Conductor; +import funkin.editors.charter.Charter.ICharterSelectable; class CharterNote extends UISprite implements ICharterSelectable { var angleTween:FlxTween; diff --git a/source/funkin/editors/charter/CharterSelection.hx b/source/funkin/editors/charter/CharterSelection.hx index 6fd97bdc..24fe55f4 100644 --- a/source/funkin/editors/charter/CharterSelection.hx +++ b/source/funkin/editors/charter/CharterSelection.hx @@ -1,15 +1,15 @@ package funkin.editors.charter; -import funkin.backend.chart.ChartData; import funkin.backend.chart.ChartData.ChartMetaData; -import haxe.Json; -import funkin.editors.charter.SongCreationScreen.SongCreationData; -import funkin.options.type.NewOption; +import funkin.backend.chart.ChartData; import funkin.backend.system.framerate.Framerate; -import funkin.menus.FreeplayState.FreeplaySonglist; import funkin.editors.EditorTreeMenu; +import funkin.editors.charter.SongCreationScreen.SongCreationData; +import funkin.menus.FreeplayState.FreeplaySonglist; import funkin.options.*; import funkin.options.type.*; +import funkin.options.type.NewOption; +import haxe.Json; using StringTools; diff --git a/source/funkin/editors/charter/CharterStrumLineGroup.hx b/source/funkin/editors/charter/CharterStrumLineGroup.hx index 483b62ce..296cffaa 100644 --- a/source/funkin/editors/charter/CharterStrumLineGroup.hx +++ b/source/funkin/editors/charter/CharterStrumLineGroup.hx @@ -1,7 +1,7 @@ package funkin.editors.charter; -import funkin.backend.chart.EventsData; import flixel.util.FlxSort; +import funkin.backend.chart.EventsData; class CharterStrumLineGroup extends FlxTypedGroup { var __pastStrumlines:Array; diff --git a/source/funkin/editors/charter/CharterStrumline.hx b/source/funkin/editors/charter/CharterStrumline.hx index 3850c2fa..c7b332e3 100644 --- a/source/funkin/editors/charter/CharterStrumline.hx +++ b/source/funkin/editors/charter/CharterStrumline.hx @@ -1,12 +1,12 @@ package funkin.editors.charter; import flixel.group.FlxSpriteGroup; -import funkin.game.Character; -import funkin.editors.ui.UITopMenu.UITopMenuButton; -import funkin.game.HealthIcon; +import flixel.sound.FlxSound; import funkin.backend.chart.ChartData.ChartStrumLine; import funkin.backend.shaders.CustomShader; -import flixel.sound.FlxSound; +import funkin.editors.ui.UITopMenu.UITopMenuButton; +import funkin.game.Character; +import funkin.game.HealthIcon; class CharterStrumline extends UISprite { public var strumLine:ChartStrumLine; diff --git a/source/funkin/editors/charter/CharterStrumlineButton.hx b/source/funkin/editors/charter/CharterStrumlineButton.hx index c5619330..a0a8c7df 100644 --- a/source/funkin/editors/charter/CharterStrumlineButton.hx +++ b/source/funkin/editors/charter/CharterStrumlineButton.hx @@ -1,7 +1,7 @@ package funkin.editors.charter; -import flixel.tweens.FlxTween; import flixel.math.FlxPoint; +import flixel.tweens.FlxTween; class CharterStrumlineButton extends UISprite { public var button:UISprite; diff --git a/source/funkin/editors/charter/CharterStrumlineScreen.hx b/source/funkin/editors/charter/CharterStrumlineScreen.hx index 26696251..ad8f9972 100644 --- a/source/funkin/editors/charter/CharterStrumlineScreen.hx +++ b/source/funkin/editors/charter/CharterStrumlineScreen.hx @@ -1,10 +1,9 @@ package funkin.editors.charter; import flixel.math.FlxPoint; -import funkin.game.Note; +import funkin.backend.chart.ChartData.ChartStrumLine; import funkin.game.Character; import funkin.game.HealthIcon; -import funkin.backend.chart.ChartData.ChartStrumLine; class CharterStrumlineScreen extends UISubstateWindow { public var strumLineID:Int = -1; diff --git a/source/funkin/editors/charter/CharterWaveformHandler.hx b/source/funkin/editors/charter/CharterWaveformHandler.hx index 44ef5ee9..f6c5ba28 100644 --- a/source/funkin/editors/charter/CharterWaveformHandler.hx +++ b/source/funkin/editors/charter/CharterWaveformHandler.hx @@ -1,9 +1,9 @@ package funkin.editors.charter; -import flixel.util.FlxColor; -import funkin.backend.system.Conductor; import flixel.sound.FlxSound; +import flixel.util.FlxColor; import funkin.backend.shaders.CustomShader; +import funkin.backend.system.Conductor; import openfl.display.BitmapData; class CharterWaveformHandler extends FlxBasic { diff --git a/source/funkin/editors/charter/SongCreationScreen.hx b/source/funkin/editors/charter/SongCreationScreen.hx index fdd9cf1e..95c682ce 100644 --- a/source/funkin/editors/charter/SongCreationScreen.hx +++ b/source/funkin/editors/charter/SongCreationScreen.hx @@ -1,8 +1,8 @@ package funkin.editors.charter; +import flixel.group.FlxGroup; import flixel.text.FlxText.FlxTextFormat; import flixel.text.FlxText.FlxTextFormatMarkerPair; -import flixel.group.FlxGroup; import funkin.backend.chart.ChartData.ChartMetaData; import haxe.io.Bytes; diff --git a/source/funkin/editors/import.hx b/source/funkin/editors/import.hx index 75250a63..3d64ccc2 100644 --- a/source/funkin/editors/import.hx +++ b/source/funkin/editors/import.hx @@ -1,8 +1,8 @@ #if !macro package funkin.editors; -import funkin.editors.ui.*; import flixel.math.FlxPoint; +import funkin.editors.ui.*; using funkin.editors.ui.UIUtil; #end \ No newline at end of file diff --git a/source/funkin/editors/ui/IUIFocusable.hx b/source/funkin/editors/ui/IUIFocusable.hx index b2285a76..e5bd0838 100644 --- a/source/funkin/editors/ui/IUIFocusable.hx +++ b/source/funkin/editors/ui/IUIFocusable.hx @@ -1,7 +1,7 @@ package funkin.editors.ui; -import lime.ui.KeyModifier; import lime.ui.KeyCode; +import lime.ui.KeyModifier; interface IUIFocusable { public function onKeyDown(e:KeyCode, modifier:KeyModifier):Void; diff --git a/source/funkin/editors/ui/UIAudioPlayer.hx b/source/funkin/editors/ui/UIAudioPlayer.hx index b6b95448..c0f49d90 100644 --- a/source/funkin/editors/ui/UIAudioPlayer.hx +++ b/source/funkin/editors/ui/UIAudioPlayer.hx @@ -1,13 +1,13 @@ package funkin.editors.ui; import flixel.math.FlxRect; -import flixel.util.FlxColor; -import flixel.ui.FlxBar; import flixel.sound.FlxSound; +import flixel.ui.FlxBar; +import flixel.util.FlxColor; +import flixel.util.FlxStringUtil; import haxe.io.Bytes; import lime.media.AudioBuffer; import openfl.media.Sound; -import flixel.util.FlxStringUtil; using flixel.util.FlxSpriteUtil; diff --git a/source/funkin/editors/ui/UIAutoCompleteTextBox.hx b/source/funkin/editors/ui/UIAutoCompleteTextBox.hx index 938a2384..556e5522 100644 --- a/source/funkin/editors/ui/UIAutoCompleteTextBox.hx +++ b/source/funkin/editors/ui/UIAutoCompleteTextBox.hx @@ -1,7 +1,7 @@ package funkin.editors.ui; -import lime.ui.KeyModifier; import lime.ui.KeyCode; +import lime.ui.KeyModifier; class UIAutoCompleteTextBox extends UITextBox { public var suggestionText:UIText; diff --git a/source/funkin/editors/ui/UIButtonList.hx b/source/funkin/editors/ui/UIButtonList.hx index f6fbc3a1..ec8385e5 100644 --- a/source/funkin/editors/ui/UIButtonList.hx +++ b/source/funkin/editors/ui/UIButtonList.hx @@ -1,9 +1,9 @@ package funkin.editors.ui; import flixel.FlxCamera; +import flixel.math.FlxMath; import flixel.math.FlxPoint; import flixel.util.FlxSort; -import flixel.math.FlxMath; class UIButtonList extends UIWindow { public var buttons:FlxTypedGroup = new FlxTypedGroup(); diff --git a/source/funkin/editors/ui/UIColorwheel.hx b/source/funkin/editors/ui/UIColorwheel.hx index d19db808..5607853b 100644 --- a/source/funkin/editors/ui/UIColorwheel.hx +++ b/source/funkin/editors/ui/UIColorwheel.hx @@ -1,8 +1,8 @@ package funkin.editors.ui; import flixel.math.FlxPoint; -import funkin.backend.shaders.CustomShader; import flixel.util.FlxColor; +import funkin.backend.shaders.CustomShader; using flixel.util.FlxSpriteUtil; diff --git a/source/funkin/editors/ui/UIContextMenu.hx b/source/funkin/editors/ui/UIContextMenu.hx index d10b3fd9..8cc5bcb0 100644 --- a/source/funkin/editors/ui/UIContextMenu.hx +++ b/source/funkin/editors/ui/UIContextMenu.hx @@ -1,8 +1,7 @@ package funkin.editors.ui; -import flixel.util.FlxColor; -import flixel.util.typeLimit.OneOfTwo; import flixel.input.keyboard.FlxKey; +import flixel.util.FlxColor; class UIContextMenu extends MusicBeatSubstate { public var options:Array; diff --git a/source/funkin/editors/ui/UISlider.hx b/source/funkin/editors/ui/UISlider.hx index 277c7b95..d07bb915 100644 --- a/source/funkin/editors/ui/UISlider.hx +++ b/source/funkin/editors/ui/UISlider.hx @@ -1,8 +1,9 @@ package funkin.editors.ui; import flixel.util.FlxColor; -using flixel.util.FlxSpriteUtil; + using StringTools; +using flixel.util.FlxSpriteUtil; typedef SliderSegement = { var start:Float; diff --git a/source/funkin/editors/ui/UIState.hx b/source/funkin/editors/ui/UIState.hx index 077750f3..1c32fad6 100644 --- a/source/funkin/editors/ui/UIState.hx +++ b/source/funkin/editors/ui/UIState.hx @@ -1,14 +1,14 @@ package funkin.editors.ui; -import lime.ui.KeyModifier; -import lime.ui.KeyCode; +import flixel.math.FlxPoint; +import flixel.math.FlxRect; import funkin.backend.system.framerate.Framerate; import funkin.editors.ui.UIContextMenu.UIContextMenuCallback; -import openfl.ui.Mouse; import funkin.editors.ui.UIContextMenu.UIContextMenuOption; -import flixel.math.FlxPoint; +import lime.ui.KeyCode; +import lime.ui.KeyModifier; +import openfl.ui.Mouse; import openfl.ui.MouseCursor; -import flixel.math.FlxRect; class UIState extends MusicBeatState { public var curContextMenu:UIContextMenu = null; diff --git a/source/funkin/editors/ui/UISubstateWindow.hx b/source/funkin/editors/ui/UISubstateWindow.hx index b17afbba..f99e184b 100644 --- a/source/funkin/editors/ui/UISubstateWindow.hx +++ b/source/funkin/editors/ui/UISubstateWindow.hx @@ -1,8 +1,8 @@ package funkin.editors.ui; -import openfl.filters.ShaderFilter; import flixel.tweens.FlxTween; import funkin.backend.shaders.CustomShader; +import openfl.filters.ShaderFilter; // TODO: make UIWarningSubstate extend this class UISubstateWindow extends MusicBeatSubstate { diff --git a/source/funkin/editors/ui/UITextBox.hx b/source/funkin/editors/ui/UITextBox.hx index 3aa97fd2..ffc20c49 100644 --- a/source/funkin/editors/ui/UITextBox.hx +++ b/source/funkin/editors/ui/UITextBox.hx @@ -1,8 +1,8 @@ package funkin.editors.ui; import flixel.math.FlxPoint; -import lime.ui.KeyModifier; import lime.ui.KeyCode; +import lime.ui.KeyModifier; import openfl.desktop.Clipboard; import openfl.geom.Rectangle; diff --git a/source/funkin/editors/ui/UIWarningSubstate.hx b/source/funkin/editors/ui/UIWarningSubstate.hx index 2d652f6b..84edf922 100644 --- a/source/funkin/editors/ui/UIWarningSubstate.hx +++ b/source/funkin/editors/ui/UIWarningSubstate.hx @@ -1,9 +1,9 @@ package funkin.editors.ui; -import openfl.filters.ShaderFilter; -import flixel.tweens.FlxTween; import flixel.tweens.FlxEase; +import flixel.tweens.FlxTween; import funkin.backend.shaders.CustomShader; +import openfl.filters.ShaderFilter; class UIWarningSubstate extends MusicBeatSubstate { var camShaders:Array = []; diff --git a/source/funkin/game/Character.hx b/source/funkin/game/Character.hx index 2f6d0a7e..747f898d 100644 --- a/source/funkin/game/Character.hx +++ b/source/funkin/game/Character.hx @@ -1,22 +1,22 @@ package funkin.game; -import flixel.util.FlxColor; -import funkin.backend.FunkinSprite; import flixel.graphics.frames.FlxFrame; import flixel.math.FlxPoint; -import funkin.backend.system.interfaces.IBeatReceiver; -import funkin.backend.system.interfaces.IOffsetCompatible; -import funkin.backend.utils.XMLUtil; import flixel.math.FlxRect; -import haxe.xml.Access; -import haxe.Exception; -import haxe.io.Path; -import funkin.backend.system.Conductor; -import openfl.geom.ColorTransform; +import flixel.util.FlxColor; +import funkin.backend.FunkinSprite; import funkin.backend.scripting.DummyScript; import funkin.backend.scripting.Script; import funkin.backend.scripting.events.*; import funkin.backend.scripting.events.PlayAnimEvent.PlayAnimContext; +import funkin.backend.system.Conductor; +import funkin.backend.system.interfaces.IBeatReceiver; +import funkin.backend.system.interfaces.IOffsetCompatible; +import funkin.backend.utils.XMLUtil; +import haxe.Exception; +import haxe.io.Path; +import haxe.xml.Access; +import openfl.geom.ColorTransform; using StringTools; diff --git a/source/funkin/game/GameOverSubstate.hx b/source/funkin/game/GameOverSubstate.hx index 4868b130..af36ff29 100644 --- a/source/funkin/game/GameOverSubstate.hx +++ b/source/funkin/game/GameOverSubstate.hx @@ -1,15 +1,15 @@ package funkin.game; -import funkin.editors.charter.Charter; -import funkin.backend.scripting.events.GameOverCreationEvent; -import funkin.backend.scripting.events.CancellableEvent; -import funkin.backend.scripting.Script; import flixel.sound.FlxSound; import flixel.util.FlxColor; import flixel.util.FlxTimer; -import funkin.menus.StoryMenuState; -import funkin.menus.FreeplayState; +import funkin.backend.scripting.Script; +import funkin.backend.scripting.events.CancellableEvent; +import funkin.backend.scripting.events.GameOverCreationEvent; import funkin.backend.system.Conductor; +import funkin.editors.charter.Charter; +import funkin.menus.FreeplayState; +import funkin.menus.StoryMenuState; class GameOverSubstate extends MusicBeatSubstate { diff --git a/source/funkin/game/HudCamera.hx b/source/funkin/game/HudCamera.hx index accd5f30..ba7b5a83 100644 --- a/source/funkin/game/HudCamera.hx +++ b/source/funkin/game/HudCamera.hx @@ -1,6 +1,5 @@ package funkin.game; -import flixel.math.FlxMatrix; import flixel.math.FlxPoint; class HudCamera extends FlxCamera { diff --git a/source/funkin/game/Note.hx b/source/funkin/game/Note.hx index d541015d..b7251a13 100644 --- a/source/funkin/game/Note.hx +++ b/source/funkin/game/Note.hx @@ -1,10 +1,10 @@ package funkin.game; -import funkin.backend.chart.ChartData; import flixel.math.FlxPoint; import flixel.math.FlxRect; -import funkin.backend.system.Conductor; +import funkin.backend.chart.ChartData; import funkin.backend.scripting.events.*; +import funkin.backend.system.Conductor; using StringTools; diff --git a/source/funkin/game/PlayState.hx b/source/funkin/game/PlayState.hx index a3908317..c4022b10 100644 --- a/source/funkin/game/PlayState.hx +++ b/source/funkin/game/PlayState.hx @@ -1,22 +1,8 @@ package funkin.game; -import funkin.editors.charter.CharterSelection; import flixel.FlxState; -import funkin.editors.SaveWarning; -import funkin.backend.chart.EventsData; -import funkin.backend.system.RotatingSpriteGroup; -import funkin.editors.charter.Charter; -import funkin.savedata.FunkinSave; -import flixel.graphics.FlxGraphic; -import funkin.backend.chart.Chart; -import funkin.backend.chart.ChartData; -import funkin.game.SplashHandler; -import funkin.backend.scripting.DummyScript; -import funkin.menus.StoryMenuState.WeekData; -import funkin.backend.FunkinText; -import funkin.backend.scripting.Script; -import funkin.backend.scripting.ScriptPack; import flixel.FlxSubState; +import flixel.graphics.FlxGraphic; import flixel.math.FlxPoint; import flixel.sound.FlxSound; import flixel.text.FlxText; @@ -25,12 +11,25 @@ import flixel.ui.FlxBar; import flixel.util.FlxColor; import flixel.util.FlxSort; import flixel.util.FlxTimer; -import haxe.io.Path; -import funkin.backend.system.Conductor; -import funkin.game.cutscenes.*; - -import funkin.menus.*; +import funkin.backend.FunkinText; +import funkin.backend.chart.Chart; +import funkin.backend.chart.ChartData; +import funkin.backend.chart.EventsData; +import funkin.backend.scripting.DummyScript; +import funkin.backend.scripting.Script; +import funkin.backend.scripting.ScriptPack; import funkin.backend.scripting.events.*; +import funkin.backend.system.Conductor; +import funkin.backend.system.RotatingSpriteGroup; +import funkin.editors.SaveWarning; +import funkin.editors.charter.Charter; +import funkin.editors.charter.CharterSelection; +import funkin.game.SplashHandler; +import funkin.game.cutscenes.*; +import funkin.menus.*; +import funkin.menus.StoryMenuState.WeekData; +import funkin.savedata.FunkinSave; +import haxe.io.Path; using StringTools; diff --git a/source/funkin/game/SplashHandler.hx b/source/funkin/game/SplashHandler.hx index d7bc4e46..dc6f7533 100644 --- a/source/funkin/game/SplashHandler.hx +++ b/source/funkin/game/SplashHandler.hx @@ -1,6 +1,5 @@ package funkin.game; - class SplashHandler extends FlxTypedGroup { /** * Map containing all of the splashes group. diff --git a/source/funkin/game/Stage.hx b/source/funkin/game/Stage.hx index af36d445..0c98960d 100644 --- a/source/funkin/game/Stage.hx +++ b/source/funkin/game/Stage.hx @@ -1,13 +1,13 @@ package funkin.game; -import funkin.backend.scripting.events.StageXMLEvent; -import funkin.backend.scripting.events.StageNodeEvent; -import flixel.math.FlxPoint; import flixel.FlxState; -import haxe.xml.Access; -import funkin.backend.system.interfaces.IBeatReceiver; +import flixel.math.FlxPoint; import funkin.backend.scripting.Script; +import funkin.backend.scripting.events.StageNodeEvent; +import funkin.backend.scripting.events.StageXMLEvent; +import funkin.backend.system.interfaces.IBeatReceiver; import haxe.io.Path; +import haxe.xml.Access; using StringTools; diff --git a/source/funkin/game/StrumLine.hx b/source/funkin/game/StrumLine.hx index 68320514..037f9744 100644 --- a/source/funkin/game/StrumLine.hx +++ b/source/funkin/game/StrumLine.hx @@ -1,14 +1,13 @@ package funkin.game; import flixel.math.FlxPoint; +import flixel.sound.FlxSound; +import flixel.tweens.FlxTween; import flixel.util.FlxSignal.FlxTypedSignal; - +import funkin.backend.chart.ChartData; import funkin.backend.scripting.events.*; import funkin.backend.system.Conductor; -import funkin.backend.chart.ChartData; import funkin.backend.system.Controls; -import flixel.tweens.FlxTween; -import flixel.sound.FlxSound; class StrumLine extends FlxTypedGroup { /** diff --git a/source/funkin/game/cutscenes/DialogueCutscene.hx b/source/funkin/game/cutscenes/DialogueCutscene.hx index 656df6f2..b3b16c8e 100644 --- a/source/funkin/game/cutscenes/DialogueCutscene.hx +++ b/source/funkin/game/cutscenes/DialogueCutscene.hx @@ -1,14 +1,14 @@ package funkin.game.cutscenes; -import funkin.backend.utils.FunkinParentDisabler; -import funkin.backend.scripting.events.dialogue.*; +import flixel.sound.FlxSound; +import funkin.backend.scripting.Script; import funkin.backend.scripting.events.CancellableEvent; import funkin.backend.scripting.events.DynamicEvent; -import funkin.backend.scripting.Script; -import flixel.sound.FlxSound; +import funkin.backend.scripting.events.dialogue.*; +import funkin.backend.utils.FunkinParentDisabler; import funkin.game.cutscenes.dialogue.*; -import haxe.xml.Access; import haxe.io.Path; +import haxe.xml.Access; /** * Substate made for dialogue cutscenes. To use it in a scripted cutscene, call `startDialogue`. diff --git a/source/funkin/game/cutscenes/ScriptedCutscene.hx b/source/funkin/game/cutscenes/ScriptedCutscene.hx index 3f36f1af..b305cca0 100644 --- a/source/funkin/game/cutscenes/ScriptedCutscene.hx +++ b/source/funkin/game/cutscenes/ScriptedCutscene.hx @@ -1,7 +1,6 @@ package funkin.game.cutscenes; import funkin.backend.scripting.DummyScript; -import flixel.addons.transition.FlxTransitionableState; import funkin.backend.scripting.Script; /** diff --git a/source/funkin/game/cutscenes/VideoCutscene.hx b/source/funkin/game/cutscenes/VideoCutscene.hx index 8e290631..f9834cbf 100644 --- a/source/funkin/game/cutscenes/VideoCutscene.hx +++ b/source/funkin/game/cutscenes/VideoCutscene.hx @@ -1,16 +1,16 @@ package funkin.game.cutscenes; -import flixel.util.FlxColor; -import haxe.io.Path; import flixel.addons.display.FlxBackdrop; +import flixel.util.FlxColor; +import flixel.util.FlxTimer; +import funkin.backend.FunkinText; +import haxe.Int64; +import haxe.io.FPHelper; +import haxe.io.Path; +import haxe.xml.Access; #if sys import sys.io.File; #end -import funkin.backend.FunkinText; -import haxe.io.FPHelper; -import haxe.xml.Access; -import haxe.Int64; -import flixel.util.FlxTimer; #if VIDEO_CUTSCENES import hxvlc.flixel.FlxVideo; #end diff --git a/source/funkin/game/cutscenes/dialogue/DialogueBox.hx b/source/funkin/game/cutscenes/dialogue/DialogueBox.hx index caf45949..47f2a58e 100644 --- a/source/funkin/game/cutscenes/dialogue/DialogueBox.hx +++ b/source/funkin/game/cutscenes/dialogue/DialogueBox.hx @@ -1,14 +1,11 @@ package funkin.game.cutscenes.dialogue; -import funkin.backend.scripting.events.dialogue.*; -import funkin.backend.scripting.events.PlayAnimEvent; -import funkin.backend.scripting.events.PlayAnimEvent.PlayAnimContext; -import funkin.backend.scripting.events.CancellableEvent; -import funkin.backend.scripting.Script; -import flixel.sound.FlxSound; import flixel.addons.text.FlxTypeText; -import flixel.math.FlxPoint; -import flixel.util.FlxColor; +import flixel.sound.FlxSound; +import funkin.backend.scripting.Script; +import funkin.backend.scripting.events.PlayAnimEvent.PlayAnimContext; +import funkin.backend.scripting.events.PlayAnimEvent; +import funkin.backend.scripting.events.dialogue.*; import haxe.xml.Access; class DialogueBox extends FunkinSprite { diff --git a/source/funkin/game/cutscenes/dialogue/DialogueCharacter.hx b/source/funkin/game/cutscenes/dialogue/DialogueCharacter.hx index 97701e1f..502b1a83 100644 --- a/source/funkin/game/cutscenes/dialogue/DialogueCharacter.hx +++ b/source/funkin/game/cutscenes/dialogue/DialogueCharacter.hx @@ -1,10 +1,9 @@ package funkin.game.cutscenes.dialogue; +import flixel.tweens.FlxTween; +import funkin.backend.scripting.Script; import funkin.backend.scripting.events.PlayAnimEvent; import funkin.backend.scripting.events.dialogue.*; -import funkin.backend.scripting.events.CancellableEvent; -import funkin.backend.scripting.Script; -import flixel.tweens.FlxTween; import haxe.xml.Access; class DialogueCharacter extends FunkinSprite { diff --git a/source/funkin/menus/BetaWarningState.hx b/source/funkin/menus/BetaWarningState.hx index 16201454..d436138f 100644 --- a/source/funkin/menus/BetaWarningState.hx +++ b/source/funkin/menus/BetaWarningState.hx @@ -1,7 +1,7 @@ package funkin.menus; -import flixel.util.FlxColor; import flixel.text.FlxText; +import flixel.util.FlxColor; import funkin.backend.FunkinText; class BetaWarningState extends MusicBeatState { diff --git a/source/funkin/menus/FreeplayState.hx b/source/funkin/menus/FreeplayState.hx index 7ca66b02..7eeef342 100644 --- a/source/funkin/menus/FreeplayState.hx +++ b/source/funkin/menus/FreeplayState.hx @@ -1,15 +1,12 @@ package funkin.menus; -import funkin.backend.chart.Chart; -import funkin.backend.chart.ChartData.ChartMetaData; -import haxe.io.Path; -import openfl.text.TextField; import flixel.text.FlxText; import flixel.util.FlxColor; -import lime.utils.Assets; +import funkin.backend.chart.Chart; +import funkin.backend.chart.ChartData.ChartMetaData; +import funkin.backend.scripting.events.*; import funkin.game.HealthIcon; import funkin.savedata.FunkinSave; -import funkin.backend.scripting.events.*; using StringTools; diff --git a/source/funkin/menus/MainMenuState.hx b/source/funkin/menus/MainMenuState.hx index b17e9db6..171f7959 100644 --- a/source/funkin/menus/MainMenuState.hx +++ b/source/funkin/menus/MainMenuState.hx @@ -1,17 +1,13 @@ package funkin.menus; -import haxe.Json; -import funkin.backend.FunkinText; -import funkin.menus.credits.CreditsMain; import flixel.FlxState; import flixel.effects.FlxFlicker; -import flixel.text.FlxText; import flixel.tweens.FlxTween; -import flixel.util.FlxColor; -import lime.app.Application; +import funkin.backend.FunkinText; import funkin.backend.scripting.events.*; - +import funkin.menus.credits.CreditsMain; import funkin.options.OptionsMenu; +import lime.app.Application; using StringTools; diff --git a/source/funkin/menus/ModSwitchMenu.hx b/source/funkin/menus/ModSwitchMenu.hx index 1b23b9d2..eb14ddcd 100644 --- a/source/funkin/menus/ModSwitchMenu.hx +++ b/source/funkin/menus/ModSwitchMenu.hx @@ -1,10 +1,10 @@ package funkin.menus; #if MOD_SUPPORT -import haxe.io.Path; -import funkin.backend.assets.ModsFolder; -import sys.FileSystem; import flixel.tweens.FlxTween; +import funkin.backend.assets.ModsFolder; +import haxe.io.Path; +import sys.FileSystem; class ModSwitchMenu extends MusicBeatSubstate { var mods:Array = []; diff --git a/source/funkin/menus/PauseSubState.hx b/source/funkin/menus/PauseSubState.hx index edc0cb61..870725bd 100644 --- a/source/funkin/menus/PauseSubState.hx +++ b/source/funkin/menus/PauseSubState.hx @@ -1,18 +1,18 @@ package funkin.menus; -import funkin.editors.charter.Charter; -import funkin.backend.scripting.events.MenuChangeEvent; -import funkin.options.OptionsMenu; -import funkin.backend.scripting.events.PauseCreationEvent; -import funkin.backend.scripting.events.NameEvent; -import funkin.backend.scripting.Script; import flixel.sound.FlxSound; import flixel.text.FlxText; import flixel.tweens.FlxTween; import flixel.util.FlxColor; -import funkin.options.keybinds.KeybindsOptions; -import funkin.menus.StoryMenuState; +import funkin.backend.scripting.Script; +import funkin.backend.scripting.events.MenuChangeEvent; +import funkin.backend.scripting.events.NameEvent; +import funkin.backend.scripting.events.PauseCreationEvent; import funkin.backend.utils.FunkinParentDisabler; +import funkin.editors.charter.Charter; +import funkin.menus.StoryMenuState; +import funkin.options.OptionsMenu; +import funkin.options.keybinds.KeybindsOptions; class PauseSubState extends MusicBeatSubstate { diff --git a/source/funkin/menus/PlaytestingWarningSubstate.hx b/source/funkin/menus/PlaytestingWarningSubstate.hx index e366bf9f..32859705 100644 --- a/source/funkin/menus/PlaytestingWarningSubstate.hx +++ b/source/funkin/menus/PlaytestingWarningSubstate.hx @@ -1,11 +1,11 @@ package funkin.menus; -import flixel.tweens.FlxTween; -import funkin.editors.ui.UIWarningSubstate.WarningButton; -import flixel.util.FlxColor; import flixel.text.FlxText.FlxTextFormat; import flixel.text.FlxText.FlxTextFormatMarkerPair; +import flixel.tweens.FlxTween; +import flixel.util.FlxColor; import funkin.backend.FunkinText; +import funkin.editors.ui.UIWarningSubstate.WarningButton; class PlaytestingWarningSubstate extends MusicBeatSubstate { diff --git a/source/funkin/menus/StoryMenuState.hx b/source/funkin/menus/StoryMenuState.hx index 384118e5..e8ab5c25 100644 --- a/source/funkin/menus/StoryMenuState.hx +++ b/source/funkin/menus/StoryMenuState.hx @@ -1,15 +1,15 @@ package funkin.menus; -import funkin.savedata.FunkinSave; -import haxe.io.Path; -import funkin.backend.scripting.events.*; -import flixel.util.FlxTimer; import flixel.math.FlxPoint; +import flixel.text.FlxText; import flixel.tweens.FlxTween; import flixel.util.FlxColor; +import flixel.util.FlxTimer; import funkin.backend.FunkinText; +import funkin.backend.scripting.events.*; +import funkin.savedata.FunkinSave; +import haxe.io.Path; import haxe.xml.Access; -import flixel.text.FlxText; class StoryMenuState extends MusicBeatState { public var characters:Map = []; diff --git a/source/funkin/menus/TitleState.hx b/source/funkin/menus/TitleState.hx index 4aca30db..edf5dd26 100644 --- a/source/funkin/menus/TitleState.hx +++ b/source/funkin/menus/TitleState.hx @@ -1,14 +1,14 @@ package funkin.menus; -import funkin.backend.MusicBeatGroup; -import funkin.backend.utils.XMLUtil; -import flixel.util.typeLimit.OneOfTwo; import flixel.group.FlxGroup; import flixel.input.gamepad.FlxGamepad; import flixel.util.FlxColor; import flixel.util.FlxTimer; -import openfl.Assets; +import flixel.util.typeLimit.OneOfTwo; +import funkin.backend.MusicBeatGroup; +import funkin.backend.utils.XMLUtil; import haxe.xml.Access; +import openfl.Assets; using StringTools; diff --git a/source/funkin/menus/credits/CreditsCodename.hx b/source/funkin/menus/credits/CreditsCodename.hx index 579360ed..54071446 100644 --- a/source/funkin/menus/credits/CreditsCodename.hx +++ b/source/funkin/menus/credits/CreditsCodename.hx @@ -1,10 +1,10 @@ package funkin.menus.credits; -import funkin.options.PlayerSettings; +import flixel.text.FlxText; import flixel.util.FlxColor; import funkin.backend.system.github.GitHub; +import funkin.options.PlayerSettings; import funkin.options.type.GithubIconOption; -import flixel.text.FlxText; using StringTools; diff --git a/source/funkin/menus/credits/CreditsMain.hx b/source/funkin/menus/credits/CreditsMain.hx index 56507274..7a6e8d9c 100644 --- a/source/funkin/menus/credits/CreditsMain.hx +++ b/source/funkin/menus/credits/CreditsMain.hx @@ -1,8 +1,8 @@ package funkin.menus.credits; import funkin.options.OptionsScreen; -import funkin.options.type.*; import funkin.options.TreeMenu; +import funkin.options.type.*; import haxe.xml.Access; class CreditsMain extends TreeMenu { diff --git a/source/funkin/menus/ui/Alphabet.hx b/source/funkin/menus/ui/Alphabet.hx index d4c3db47..a1859d0f 100644 --- a/source/funkin/menus/ui/Alphabet.hx +++ b/source/funkin/menus/ui/Alphabet.hx @@ -1,12 +1,12 @@ package funkin.menus.ui; -import openfl.utils.AssetLibrary; -import haxe.xml.Access; -import funkin.backend.assets.LimeLibrarySymbol; -import funkin.backend.assets.IModsAssetLibrary; import flixel.group.FlxSpriteGroup; -import flixel.util.FlxTimer; import flixel.util.FlxColor; +import flixel.util.FlxTimer; +import funkin.backend.assets.IModsAssetLibrary; +import funkin.backend.assets.LimeLibrarySymbol; +import haxe.xml.Access; +import openfl.utils.AssetLibrary; using StringTools; diff --git a/source/funkin/options/Options.hx b/source/funkin/options/Options.hx index a9bf72ac..972ff69c 100644 --- a/source/funkin/options/Options.hx +++ b/source/funkin/options/Options.hx @@ -1,8 +1,8 @@ package funkin.options; -import openfl.Lib; -import flixel.util.FlxSave; import flixel.input.keyboard.FlxKey; +import flixel.util.FlxSave; +import openfl.Lib; @:build(funkin.backend.system.macros.OptionsMacro.build()) @:build(funkin.backend.system.macros.FunkinSaveMacro.build("__save", "__flush", "__load")) diff --git a/source/funkin/options/OptionsMenu.hx b/source/funkin/options/OptionsMenu.hx index f9232e13..dff76067 100644 --- a/source/funkin/options/OptionsMenu.hx +++ b/source/funkin/options/OptionsMenu.hx @@ -1,11 +1,11 @@ package funkin.options; import funkin.backend.system.framerate.Framerate; +import funkin.options.TreeMenu; +import funkin.options.categories.*; +import funkin.options.type.*; import funkin.options.type.Checkbox; import haxe.xml.Access; -import funkin.options.type.*; -import funkin.options.categories.*; -import funkin.options.TreeMenu; class OptionsMenu extends TreeMenu { public static var mainOptions:Array = [ diff --git a/source/funkin/options/PlayerSettings.hx b/source/funkin/options/PlayerSettings.hx index 5c6dc9b5..bbb0d6e1 100644 --- a/source/funkin/options/PlayerSettings.hx +++ b/source/funkin/options/PlayerSettings.hx @@ -1,10 +1,10 @@ package funkin.options; -import funkin.backend.system.Controls; import flixel.util.FlxSignal; +import funkin.backend.system.Controls; -// import ui.DeviceManager; // import props.Player; +// import ui.DeviceManager; class PlayerSettings { static public var numPlayers(default, null) = 0; diff --git a/source/funkin/options/TreeMenu.hx b/source/funkin/options/TreeMenu.hx index ac027134..6fb4a8a5 100644 --- a/source/funkin/options/TreeMenu.hx +++ b/source/funkin/options/TreeMenu.hx @@ -1,11 +1,11 @@ package funkin.options; -import funkin.editors.ui.UIState; import flixel.FlxState; -import funkin.backend.FunkinText; import flixel.tweens.FlxTween; -import funkin.menus.MainMenuState; import flixel.util.typeLimit.OneOfTwo; +import funkin.backend.FunkinText; +import funkin.editors.ui.UIState; +import funkin.menus.MainMenuState; import funkin.options.type.OptionType; class TreeMenu extends UIState { diff --git a/source/funkin/options/type/GithubIconOption.hx b/source/funkin/options/type/GithubIconOption.hx index 5c780165..d5553486 100644 --- a/source/funkin/options/type/GithubIconOption.hx +++ b/source/funkin/options/type/GithubIconOption.hx @@ -1,10 +1,10 @@ package funkin.options.type; -import openfl.display.BitmapData; import flixel.graphics.FlxGraphic; +import flixel.util.FlxColor; import funkin.backend.shaders.CustomShader; import funkin.backend.system.github.GitHub; -import flixel.util.FlxColor; +import openfl.display.BitmapData; class GithubIconOption extends TextOption { diff --git a/source/funkin/options/type/OptionType.hx b/source/funkin/options/type/OptionType.hx index c7de837d..26699723 100644 --- a/source/funkin/options/type/OptionType.hx +++ b/source/funkin/options/type/OptionType.hx @@ -1,7 +1,7 @@ package funkin.options.type; -import funkin.backend.system.Controls; import flixel.group.FlxSpriteGroup; +import funkin.backend.system.Controls; class OptionType extends FlxSpriteGroup { public var controls(get, null):Controls; diff --git a/source/funkin/savedata/FunkinSave.hx b/source/funkin/savedata/FunkinSave.hx index f0e4163e..20337df6 100644 --- a/source/funkin/savedata/FunkinSave.hx +++ b/source/funkin/savedata/FunkinSave.hx @@ -1,8 +1,8 @@ package funkin.savedata; +import flixel.util.FlxSave; import lime.app.Application; import openfl.Lib; -import flixel.util.FlxSave; /** * Class used for saves WITHOUT going through the struggle of type checks From 75e35b30e195b785b172ce2b247c19227c49e063 Mon Sep 17 00:00:00 2001 From: NeeEoo Date: Thu, 11 Apr 2024 14:27:37 +0200 Subject: [PATCH 3/3] Forgot to organize these --- .../backend/assets/IModsAssetLibrary.hx | 19 ----------------- source/funkin/backend/assets/ModsFolder.hx | 16 ++++---------- .../backend/assets/ModsFolderLibrary.hx | 7 +++---- .../backend/assets/MultiFramesCollection.hx | 2 +- source/funkin/backend/assets/Paths.hx | 18 ++++++++-------- .../backend/assets/ScriptedAssetLibrary.hx | 7 +++---- .../funkin/backend/assets/ZipFolderLibrary.hx | 21 ++++++++----------- .../backend/scripting/events/CamMoveEvent.hx | 2 +- .../scripting/events/CountdownEvent.hx | 2 +- .../backend/scripting/events/NoteHitEvent.hx | 2 +- .../backend/scripting/events/NoteMissEvent.hx | 2 +- .../dialogue/DialogueBoxPlayBubbleEvent.hx | 2 +- .../dialogue/DialogueBoxSetTextEvent.hx | 2 +- 13 files changed, 35 insertions(+), 67 deletions(-) diff --git a/source/funkin/backend/assets/IModsAssetLibrary.hx b/source/funkin/backend/assets/IModsAssetLibrary.hx index a080189b..809a2143 100644 --- a/source/funkin/backend/assets/IModsAssetLibrary.hx +++ b/source/funkin/backend/assets/IModsAssetLibrary.hx @@ -1,24 +1,5 @@ package funkin.backend.assets; -import lime.utils.Log; -import lime.utils.AssetLibrary; -import lime.utils.AssetManifest; - -import haxe.io.Path; -import lime.app.Event; -import lime.app.Future; -import lime.app.Promise; -import lime.media.AudioBuffer; -import lime.graphics.Image; -import lime.text.Font; -import lime.utils.AssetType; -import lime.utils.Bytes; - -#if MOD_SUPPORT -import sys.FileStat; -import sys.FileSystem; -#end - using StringTools; interface IModsAssetLibrary { diff --git a/source/funkin/backend/assets/ModsFolder.hx b/source/funkin/backend/assets/ModsFolder.hx index cd1704ed..9f761b85 100644 --- a/source/funkin/backend/assets/ModsFolder.hx +++ b/source/funkin/backend/assets/ModsFolder.hx @@ -1,25 +1,17 @@ package funkin.backend.assets; +import flixel.util.FlxSignal.FlxTypedSignal; import funkin.backend.system.MainState; -import funkin.menus.TitleState; -import funkin.backend.system.Main; -import openfl.utils.AssetCache; -import flixel.util.FlxSignal.FlxTypedSignal; -import openfl.utils.AssetManifest; -import openfl.utils.AssetLibrary; -import flixel.graphics.FlxGraphic; -import flixel.util.FlxSignal.FlxTypedSignal; - +import haxe.io.Path; import lime.text.Font; import openfl.text.Font as OpenFLFont; +import openfl.utils.AssetLibrary; +import openfl.utils.AssetManifest; #if MOD_SUPPORT import sys.FileSystem; #end -import flixel.FlxState; -import haxe.io.Path; - using StringTools; class ModsFolder { diff --git a/source/funkin/backend/assets/ModsFolderLibrary.hx b/source/funkin/backend/assets/ModsFolderLibrary.hx index ed608bda..23fa0d43 100644 --- a/source/funkin/backend/assets/ModsFolderLibrary.hx +++ b/source/funkin/backend/assets/ModsFolderLibrary.hx @@ -1,11 +1,10 @@ package funkin.backend.assets; +import lime.graphics.Image; +import lime.media.AudioBuffer; +import lime.text.Font; import lime.utils.AssetLibrary; import lime.utils.Assets as LimeAssets; - -import lime.media.AudioBuffer; -import lime.graphics.Image; -import lime.text.Font; import lime.utils.Bytes; #if MOD_SUPPORT diff --git a/source/funkin/backend/assets/MultiFramesCollection.hx b/source/funkin/backend/assets/MultiFramesCollection.hx index a3d9c733..2a03c64c 100644 --- a/source/funkin/backend/assets/MultiFramesCollection.hx +++ b/source/funkin/backend/assets/MultiFramesCollection.hx @@ -1,10 +1,10 @@ package funkin.backend.assets; -import flixel.graphics.frames.FlxFramesCollection; import flixel.FlxG; import flixel.graphics.FlxGraphic; import flixel.graphics.frames.FlxFrame.FlxFrameAngle; import flixel.graphics.frames.FlxFrame.FlxFrameType; +import flixel.graphics.frames.FlxFramesCollection; import flixel.math.FlxMath; import flixel.math.FlxPoint; import flixel.math.FlxRect; diff --git a/source/funkin/backend/assets/Paths.hx b/source/funkin/backend/assets/Paths.hx index d8c6ba39..aac40ad5 100644 --- a/source/funkin/backend/assets/Paths.hx +++ b/source/funkin/backend/assets/Paths.hx @@ -1,17 +1,17 @@ package funkin.backend.assets; -import lime.utils.AssetLibrary; -import flixel.graphics.frames.FlxFramesCollection; -import haxe.io.Path; -import funkin.backend.assets.LimeLibrarySymbol; +import flixel.graphics.FlxGraphic; import flixel.graphics.frames.FlxAtlasFrames; -import openfl.utils.AssetType; -import openfl.utils.Assets as OpenFlAssets; +import flixel.graphics.frames.FlxAtlasFrames; +import flixel.graphics.frames.FlxFramesCollection; +import flixel.system.FlxAssets.FlxGraphicAsset; +import funkin.backend.assets.LimeLibrarySymbol; import funkin.backend.assets.ModsFolder; import funkin.backend.scripting.Script; -import flixel.graphics.frames.FlxAtlasFrames; -import flixel.system.FlxAssets.FlxGraphicAsset; -import flixel.graphics.FlxGraphic; +import haxe.io.Path; +import lime.utils.AssetLibrary; +import openfl.utils.AssetType; +import openfl.utils.Assets as OpenFlAssets; using StringTools; diff --git a/source/funkin/backend/assets/ScriptedAssetLibrary.hx b/source/funkin/backend/assets/ScriptedAssetLibrary.hx index 0fd8d380..e0fd2e33 100644 --- a/source/funkin/backend/assets/ScriptedAssetLibrary.hx +++ b/source/funkin/backend/assets/ScriptedAssetLibrary.hx @@ -1,12 +1,11 @@ package funkin.backend.assets; import funkin.backend.scripting.Script; +import lime.graphics.Image; +import lime.media.AudioBuffer; +import lime.text.Font; import lime.utils.AssetLibrary; import lime.utils.Assets as LimeAssets; - -import lime.media.AudioBuffer; -import lime.graphics.Image; -import lime.text.Font; import lime.utils.Bytes; #if MOD_SUPPORT diff --git a/source/funkin/backend/assets/ZipFolderLibrary.hx b/source/funkin/backend/assets/ZipFolderLibrary.hx index 21e425d8..736cb3ea 100644 --- a/source/funkin/backend/assets/ZipFolderLibrary.hx +++ b/source/funkin/backend/assets/ZipFolderLibrary.hx @@ -1,29 +1,26 @@ package funkin.backend.assets; -import lime.utils.Log; -import lime.utils.AssetLibrary; -import lime.utils.AssetManifest; - +#if MOD_SUPPORT +import funkin.backend.utils.SysZip.SysZipEntry; +import funkin.backend.utils.SysZip; import haxe.io.Path; +import haxe.zip.Reader; import lime.app.Event; import lime.app.Future; import lime.app.Promise; -import lime.media.AudioBuffer; import lime.graphics.Image; +import lime.media.AudioBuffer; import lime.text.Font; +import lime.utils.AssetLibrary; +import lime.utils.AssetManifest; import lime.utils.AssetType; -import lime.utils.Bytes; import lime.utils.Assets as LimeAssets; +import lime.utils.Bytes; +import lime.utils.Log; import openfl.text.Font as OpenFLFont; - - -#if MOD_SUPPORT import sys.FileStat; import sys.FileSystem; import sys.io.File; -import haxe.zip.Reader; -import funkin.backend.utils.SysZip; -import funkin.backend.utils.SysZip.SysZipEntry; class ZipFolderLibrary extends AssetLibrary implements IModsAssetLibrary { public var zipPath:String; diff --git a/source/funkin/backend/scripting/events/CamMoveEvent.hx b/source/funkin/backend/scripting/events/CamMoveEvent.hx index 970c00a7..3dcbda78 100644 --- a/source/funkin/backend/scripting/events/CamMoveEvent.hx +++ b/source/funkin/backend/scripting/events/CamMoveEvent.hx @@ -1,7 +1,7 @@ package funkin.backend.scripting.events; -import funkin.game.StrumLine; import flixel.math.FlxPoint; +import funkin.game.StrumLine; final class CamMoveEvent extends CancellableEvent { /** diff --git a/source/funkin/backend/scripting/events/CountdownEvent.hx b/source/funkin/backend/scripting/events/CountdownEvent.hx index 36a01b87..7c6b4308 100644 --- a/source/funkin/backend/scripting/events/CountdownEvent.hx +++ b/source/funkin/backend/scripting/events/CountdownEvent.hx @@ -1,7 +1,7 @@ package funkin.backend.scripting.events; -import flixel.tweens.FlxTween; import flixel.sound.FlxSound; +import flixel.tweens.FlxTween; final class CountdownEvent extends CancellableEvent { /** diff --git a/source/funkin/backend/scripting/events/NoteHitEvent.hx b/source/funkin/backend/scripting/events/NoteHitEvent.hx index e3c8bbc0..d5f64dc3 100644 --- a/source/funkin/backend/scripting/events/NoteHitEvent.hx +++ b/source/funkin/backend/scripting/events/NoteHitEvent.hx @@ -1,7 +1,7 @@ package funkin.backend.scripting.events; -import funkin.game.Note; import funkin.game.Character; +import funkin.game.Note; final class NoteHitEvent extends CancellableEvent { @:dox(hide) public var animCancelled:Bool = false; diff --git a/source/funkin/backend/scripting/events/NoteMissEvent.hx b/source/funkin/backend/scripting/events/NoteMissEvent.hx index 1b7d0901..e9475bb0 100644 --- a/source/funkin/backend/scripting/events/NoteMissEvent.hx +++ b/source/funkin/backend/scripting/events/NoteMissEvent.hx @@ -1,7 +1,7 @@ package funkin.backend.scripting.events; -import funkin.game.Note; import funkin.game.Character; +import funkin.game.Note; final class NoteMissEvent extends CancellableEvent { @:dox(hide) public var animCancelled:Bool = false; diff --git a/source/funkin/backend/scripting/events/dialogue/DialogueBoxPlayBubbleEvent.hx b/source/funkin/backend/scripting/events/dialogue/DialogueBoxPlayBubbleEvent.hx index 66363a4d..0f7a4e95 100644 --- a/source/funkin/backend/scripting/events/dialogue/DialogueBoxPlayBubbleEvent.hx +++ b/source/funkin/backend/scripting/events/dialogue/DialogueBoxPlayBubbleEvent.hx @@ -1,7 +1,7 @@ package funkin.backend.scripting.events.dialogue; -import funkin.backend.utils.XMLUtil.TextFormat; import flixel.sound.FlxSound; +import funkin.backend.utils.XMLUtil.TextFormat; final class DialogueBoxPlayBubbleEvent extends CancellableEvent { diff --git a/source/funkin/backend/scripting/events/dialogue/DialogueBoxSetTextEvent.hx b/source/funkin/backend/scripting/events/dialogue/DialogueBoxSetTextEvent.hx index 91c3d113..59fe5158 100644 --- a/source/funkin/backend/scripting/events/dialogue/DialogueBoxSetTextEvent.hx +++ b/source/funkin/backend/scripting/events/dialogue/DialogueBoxSetTextEvent.hx @@ -1,7 +1,7 @@ package funkin.backend.scripting.events.dialogue; -import funkin.backend.utils.XMLUtil.TextFormat; import flixel.sound.FlxSound; +import funkin.backend.utils.XMLUtil.TextFormat; final class DialogueBoxSetTextEvent extends CancellableEvent {