Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/HaxeFlixel/flixel-addons int…
Browse files Browse the repository at this point in the history
…o dev
  • Loading branch information
Geokureli committed Jan 31, 2025
2 parents c2b8e68 + 8595a75 commit f597881
Show file tree
Hide file tree
Showing 21 changed files with 26 additions and 34 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![](https://raw.github.com/HaxeFlixel/haxeflixel.com/master/src/files/images/flixel-logos/flixel-addons.png)
![](https://github.com/HaxeFlixel/haxeflixel.com/blob/dev/content/_static/images/flixel-logos/flixel-addons.png?raw=true)

[flixel](https://github.com/HaxeFlixel/flixel) | [addons](https://github.com/HaxeFlixel/flixel-addons) | [ui](https://github.com/HaxeFlixel/flixel-ui) | [demos](https://github.com/HaxeFlixel/flixel-demos) | [tools](https://github.com/HaxeFlixel/flixel-tools) | [templates](https://github.com/HaxeFlixel/flixel-templates) | [docs](https://github.com/HaxeFlixel/flixel-docs) | [haxeflixel.com](https://github.com/HaxeFlixel/haxeflixel.com) | [türkçe](/README_TR.md)

Expand Down
4 changes: 2 additions & 2 deletions flixel/addons/display/FlxBackdrop.hx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class FlxBackdrop extends FlxSprite
drawToLargestCamera();
}

#if (flixel >= "5.7.0")
#if (flixel >= version("5.7.0"))
final cameras = getCamerasLegacy();
#end
for (camera in cameras)
Expand Down Expand Up @@ -161,7 +161,7 @@ class FlxBackdrop extends FlxSprite
{
var largest:FlxCamera = null;
var largestArea = 0.0;
#if (flixel >= "5.7.0")
#if (flixel >= version("5.7.0"))
final cameras = getCamerasLegacy(); // else use this.cameras
#end
for (camera in cameras)
Expand Down
2 changes: 1 addition & 1 deletion flixel/addons/display/FlxShaderMaskCamera.hx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package flixel.addons.display;

#if (openfl >= "8.0.0")
#if (openfl >= version("8.0.0"))
import flixel.FlxBasic;
import flixel.FlxCamera;
import flixel.FlxG;
Expand Down
2 changes: 1 addition & 1 deletion flixel/addons/editors/ogmo/FlxOgmo3Loader.hx
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ class FlxOgmo3Loader
for (i in 0...tileFlags.length)
{
var flag = tileFlags[i];
#if (flixel < "5.9.0")
#if (flixel <version( "5.9.0"))
var specialTile = new FlxTileSpecial(tilemap.getTileByIndex(i), false, false, 0);
#else
var specialTile = new FlxTileSpecial(tilemap.getTileIndex(i), false, false, 0);
Expand Down
9 changes: 0 additions & 9 deletions flixel/addons/editors/spine/FlxSpine.hx
Original file line number Diff line number Diff line change
Expand Up @@ -270,20 +270,11 @@ class FlxSpine extends FlxSprite
wrapper.y = 0;
wrapper._cameras = _cameras;

#if (flash || openfl >= "4.0.0")
wrapper.vertices.length = verticesLength;
for (i in 0...verticesLength)
{
wrapper.vertices[i] = worldVertices[i];
}
#else
if (worldVertices.length - verticesLength > 0)
{
worldVertices.splice(verticesLength, worldVertices.length - verticesLength);
}

wrapper.vertices = worldVertices;
#end

wrapper.indices = Vector.ofArray(triangles);
wrapper.uvtData = Vector.ofArray(uvtData);
Expand Down
2 changes: 1 addition & 1 deletion flixel/addons/effects/FlxTrail.hx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import flixel.math.FlxPoint;
* Feel free to use this class and adjust it to your needs.
* @author Gama11
*/
class FlxTrail extends #if (flixel < "5.7.0") FlxSpriteGroup #else FlxSpriteContainer #end
class FlxTrail extends #if (flixel < version("5.7.0")) FlxSpriteGroup #else FlxSpriteContainer #end
{
/**
* Stores the FlxSprite the trail is attached to.
Expand Down
2 changes: 1 addition & 1 deletion flixel/addons/effects/chainable/FlxEffectSprite.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package flixel.addons.effects.chainable;

// TODO: remove this check when min flixel version is 5.6.0,
// So that FlxAddonDefines will handle this
#if (flixel < "5.3.0")
#if (flixel < version("5.3.0"))
#error "Flixel-Addons is not compatible with flixel versions older than 5.3.0";
#end

Expand Down
2 changes: 1 addition & 1 deletion flixel/addons/nape/FlxNapeSpace.hx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class FlxNapeSpace extends FlxBasic
*/
public static function init():Void
{
#if (flixel < "5.6.0")
#if (flixel < version("5.6.0"))
FlxG.plugins.add(new FlxNapeSpace());
#else
FlxG.plugins.addPlugin(new FlxNapeSpace());
Expand Down
2 changes: 1 addition & 1 deletion flixel/addons/nape/FlxNapeTilemap.hx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class FlxNapeTilemap extends FlxTilemap
var polygon:Polygon;
for (index in tileIndices)
{
#if (flixel >= "5.9.0")
#if (flixel >= version("5.9.0"))
final points = getAllTilePos(index);
#else
final points = getTileCoords(index, false);
Expand Down
2 changes: 1 addition & 1 deletion flixel/addons/plugin/control/FlxControlHandler.hx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import flixel.FlxSprite;
import flixel.math.FlxMath;
import flixel.math.FlxPoint;
import flixel.math.FlxVelocity;
#if (flixel >= "5.3.0")
#if (flixel >= version("5.3.0"))
import flixel.sound.FlxSound;
#else
import flixel.system.FlxSound;
Expand Down
2 changes: 0 additions & 2 deletions flixel/addons/plugin/screengrab/FlxScreenGrab.hx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@ import flixel.addons.util.PNGEncoder;
import flixel.FlxG;
import flixel.input.keyboard.FlxKey;
#if sys
#if (!lime_legacy || lime < "2.9.0")
import lime.ui.FileDialog;
import lime.ui.FileDialogType;
import openfl.display.PNGEncoderOptions;
#end
#else
import openfl.net.FileReference;
#end
Expand Down
4 changes: 2 additions & 2 deletions flixel/addons/system/macros/FlxAddonDefines.hx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class FlxAddonDefines
* When the minimum version of flixel is changed to 5.6.0 or greater, remove the above
* checks and this comment.
*/
#if (flixel < "5.3.0")
#if (flixel < version("5.3.0"))
FlxDefines.abortVersion("Flixel", "5.3.0 or newer", "flixel", (macro null).pos);
#end
}
Expand All @@ -61,4 +61,4 @@ class FlxAddonDefines
Context.fatalError(message, pos);
}
}
#end
#end
2 changes: 1 addition & 1 deletion flixel/addons/text/FlxTypeText.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package flixel.addons.text;

// TODO: remove this check when min flixel version is 5.6.0,
// So that FlxAddonDefines will handle this
#if (flixel < "5.3.0")
#if (flixel < version("5.3.0"))
#error "Flixel-Addons is not compatible with flixel versions older than 5.3.0";
#end

Expand Down
4 changes: 2 additions & 2 deletions flixel/addons/tile/FlxTilemapExt.hx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class FlxTilemapExt extends FlxTilemap
}

// Copy tile images into the tile buffer
#if (flixel < "5.2.0")
#if (flixel < version("5.2.0"))
_point.x = (camera.scroll.x * scrollFactor.x) - x - offset.x + camera.viewOffsetX; // modified from getScreenPosition()
_point.y = (camera.scroll.y * scrollFactor.y) - y - offset.y + camera.viewOffsetY;
#else
Expand Down Expand Up @@ -322,7 +322,7 @@ class FlxTilemapExt extends FlxTilemap
}
}

#if (flixel < "5.9.0")
#if (flixel < version("5.9.0"))
/**
* THIS IS A COPY FROM FlxTilemap BUT IT SOLVES SLOPE COLLISION TOO
* Checks if the Object overlaps any tiles with any collision flags set,
Expand Down
2 changes: 1 addition & 1 deletion flixel/addons/transition/FlxTransitionableState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package flixel.addons.transition;

// TODO: remove this check when min flixel version is 5.6.0,
// So that FlxAddonDefines will handle this
#if (flixel < "5.3.0")
#if (flixel < version("5.3.0"))
#error "Flixel-Addons is not compatible with flixel versions older than 5.3.0";
#end

Expand Down
2 changes: 1 addition & 1 deletion flixel/addons/transition/TransitionEffect.hx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import flixel.util.FlxTimer;
* @author larsiusprime
*/
@:allow(flixel.addons.transition.Transition)
class TransitionEffect extends #if (flixel < "5.7.0") FlxSpriteGroup #else FlxSpriteContainer #end
class TransitionEffect extends #if (flixel < version("5.7.0")) FlxSpriteGroup #else FlxSpriteContainer #end
{
public var finishCallback:Void->Void;
public var finished(default, null):Bool = false;
Expand Down
2 changes: 1 addition & 1 deletion flixel/addons/ui/FlxButtonPlus.hx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import flixel.math.FlxMath;
* @link http://www.photonstorm.com
* @author Richard Davey / Photon Storm
*/
class FlxButtonPlus extends #if (flixel < "5.7.0") FlxSpriteGroup #else FlxSpriteContainer #end
class FlxButtonPlus extends #if (flixel < version("5.7.0")) FlxSpriteGroup #else FlxSpriteContainer #end
{
public static inline var NORMAL:Int = 0;
public static inline var HIGHLIGHT:Int = 1;
Expand Down
2 changes: 1 addition & 1 deletion flixel/addons/ui/FlxClickArea.hx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class FlxClickArea extends FlxObject
if (continueUpdate)
{
var offAll:Bool = true;
#if (flixel >= "5.7.0")
#if (flixel >= version("5.7.0"))
final cameras = getCameras(); // else use this.cameras
#end
for (camera in cameras)
Expand Down
2 changes: 1 addition & 1 deletion flixel/addons/ui/FlxSlider.hx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import flixel.util.FlxSpriteUtil;
* A slider GUI element for float and integer manipulation.
* @author Gama11
*/
class FlxSlider extends #if (flixel < "5.7.0") FlxSpriteGroup #else FlxSpriteContainer #end
class FlxSlider extends #if (flixel < version("5.7.0")) FlxSpriteGroup #else FlxSpriteContainer #end
{
/**
* The horizontal line in the background.
Expand Down
4 changes: 2 additions & 2 deletions flixel/addons/weapon/FlxWeapon.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package flixel.addons.weapon;

// TODO: remove this check when min flixel version is 5.6.0,
// So that FlxAddonDefines will handle this
#if (flixel < "5.3.0")
#if (flixel < version("5.3.0"))
#error "Flixel-Addons is not compatible with flixel versions older than 5.3.0";
#end

Expand Down Expand Up @@ -439,7 +439,7 @@ class FlxTypedWeapon<TBullet:FlxBullet>

if ((object is FlxTilemap))
{
#if (flixel < "5.9.0")
#if (flixel < version("5.9.0"))
return cast(object, FlxTilemap).overlapsWithCallback(bullet);
#else
return cast(object, FlxTilemap).objectOverlapsTiles(bullet);
Expand Down
5 changes: 4 additions & 1 deletion haxelib.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@
"description": "flixel-addons is a set of useful, additional classes for HaxeFlixel.",
"version": "3.3.0",
"releasenote": "Compatibility with flixel 5.9.0",
"contributors": ["haxeflixel", "Gama11", "GeoKureli"]
"contributors": ["haxeflixel", "Gama11", "GeoKureli"],
"dependencies": {
"flixel": ""
}
}

0 comments on commit f597881

Please sign in to comment.