Skip to content

Commit

Permalink
Merge pull request #4 from Geokureli/fnf-6
Browse files Browse the repository at this point in the history
backmerge flixel 6 official
  • Loading branch information
ninjamuffin99 authored Feb 18, 2025
2 parents 0acbd85 + fffb1a7 commit 95aec0c
Show file tree
Hide file tree
Showing 167 changed files with 8,302 additions and 2,975 deletions.
2 changes: 1 addition & 1 deletion .github/README_TR.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/HaxeFlixel.png)](http://haxeflixel.com/)
[![](https://raw.githubusercontent.com/HaxeFlixel/haxeflixel.com/master/content/_static/images/flixel-logos/HaxeFlixel.png)](http://haxeflixel.com/)

[flixel](https://github.com/HaxeFlixel/flixel) | [eklentiler](https://github.com/HaxeFlixel/flixel-addons) | [ui](https://github.com/HaxeFlixel/flixel-ui) | [demolar](https://github.com/HaxeFlixel/flixel-demos) | [araçlar](https://github.com/HaxeFlixel/flixel-tools) | [şablonlar](https://github.com/HaxeFlixel/flixel-templates) | [dökümanlar](https://github.com/HaxeFlixel/flixel-docs) | [haxeflixel.com](https://github.com/HaxeFlixel/haxeflixel.com) | [english](https://github.com/HaxeFlixel/flixel/blob/dev/README.md)

Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
build:
strategy:
matrix:
haxe-version: ["4.2.5", "4.3.4"]
haxe-version: ["4.2.5", "4.3.6"]
target: [html5, hl, neko, flash, cpp]
fail-fast: false
runs-on: ubuntu-latest
Expand All @@ -31,10 +31,9 @@ jobs:
haxelib install haxelib 4.0.3
haxelib dev flixel .
- uses: HaxeFlixel/setup-flixel@v1
- uses: HaxeFlixel/setup-flixel@master
with:
haxe-version: current
flixel-versions: dev
test-location: local
target: ${{matrix.target}}
run-tests: true
run-tests: true
262 changes: 161 additions & 101 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ Thanks to being built on top of [Haxe](https://haxe.org/) and [OpenFL](http://ww

HaxeFlixel has its roots in the original [ActionScript 3 version of Flixel](https://github.com/AdamAtomic/flixel), created by [Adam “Atomic” Saltsman](http://www.adamatomic.com/). It was started by [Alexander Hohlov](https://github.com/beeblerox) in 2011, initially as a straightforward Haxe port of the AS3 codebase and Richard Davey's [Flixel Power Tools](http://www.photonstorm.com/flixel-power-tools).

Thanks to the efforts of the [core team](https://github.com/orgs/HaxeFlixel/people) as well as [over 100 contributors](https://github.com/HaxeFlixel/flixel/graphs/contributors), today's version of HaxeFlixel far surpasses the capabilities of the original. Not only has the core engine seen many substantial improvements and new features, there is also a far richer ecosystem with additional libaries and [over 80 demo projects](https://github.com/HaxeFlixel/flixel-demos) to learn from.
Thanks to the efforts of the [core team](https://github.com/orgs/HaxeFlixel/people) as well as [over 100 contributors](https://github.com/HaxeFlixel/flixel/graphs/contributors), today's version of HaxeFlixel far surpasses the capabilities of the original. Not only has the core engine seen many substantial improvements and new features, there is also a far richer ecosystem with additional libraries and [over 80 demo projects](https://github.com/HaxeFlixel/flixel-demos) to learn from.
Binary file modified assets/images/debugger/buttons/arrowLeft.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/debugger/buttons/bitmapLog.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/debugger/buttons/close.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/debugger/buttons/console.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/debugger/buttons/eraser.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/debugger/buttons/interactive.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/debugger/buttons/log.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/debugger/buttons/maximize.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/debugger/buttons/minimize.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/debugger/buttons/mover.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/debugger/buttons/pause.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/debugger/buttons/pointer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/debugger/buttons/stats.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/debugger/buttons/toggleSize.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/debugger/buttons/transform.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/debugger/buttons/watch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/debugger/cursorCross.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/debugger/cursors/transformRotate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/debugger/cursors/transformScaleX.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/debugger/cursors/transformScaleXY.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/debugger/cursors/transformScaleY.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/debugger/flixel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/logo/default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/logo/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/tile/autotiles_full.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/images/ui/button.png
Binary file modified assets/images/ui/virtual-input.png
7 changes: 4 additions & 3 deletions checkstyle.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"FLX_NATIVE_CURSOR",
"FLX_SOUND_TRAY",
"FLX_POINTER_INPUT",
"FLX_POST_PROCESS",
"FLX_RECORD"
],
"defineCombinations": [
Expand All @@ -19,7 +18,8 @@
"exclude": {
"all": [
"TestSuite",
"/export/"
"/export/",
"tests/unit/bin/"
],
"AvoidStarImport": [
"flixel.math.FlxRandomTest"
Expand All @@ -35,7 +35,8 @@
"STATIC",
"MACRO",
"INLINE",
"DYNAMIC"
"DYNAMIC",
"FINAL"
]
}
},
Expand Down
91 changes: 46 additions & 45 deletions flixel/FlxCamera.hx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class FlxCamera extends FlxBasic
/**
* Used behind-the-scenes during the draw phase so that members use the same default
* cameras as their parent.
*
*
* This is the non-deprecated list that the public `defaultCameras` proxies. Allows flixel classes
* to use it without warning.
*/
Expand Down Expand Up @@ -206,7 +206,7 @@ class FlxCamera extends FlxBasic
* WARNING: setting this to `false` on blitting targets is very expensive.
*/
public var pixelPerfectRender:Bool;

/**
* If true, screen shake will be rounded to game pixels. If null, pixelPerfectRender is used.
* @since 5.4.0
Expand Down Expand Up @@ -610,8 +610,6 @@ class FlxCamera extends FlxBasic
if (graphic.isDestroyed)
throw 'Attempted to queue an invalid FlxDrawItem, did you destroy a cached sprite?';

if (graphic.isDestroyed) throw 'Attempted to queue an invalid FlxDrawItem, did you destroy a cached sprite?';

itemToReturn.graphics = graphic;
itemToReturn.antialiasing = smooth;
itemToReturn.colored = colored;
Expand Down Expand Up @@ -650,6 +648,7 @@ class FlxCamera extends FlxBasic
&& _headTriangles.antialiasing == smoothing
&& _headTriangles.colored == isColored
&& _headTriangles.blending == blendInt
&& _headTriangles.blend == blend
#if !flash
&& _headTriangles.hasColorOffsets == hasColorOffsets
&& _headTriangles.shader == shader
Expand Down Expand Up @@ -684,6 +683,7 @@ class FlxCamera extends FlxBasic
itemToReturn.antialiasing = smoothing;
itemToReturn.colored = isColored;
itemToReturn.blending = blendInt;
itemToReturn.blend = blend;
#if !flash
itemToReturn.hasColorOffsets = hasColorOffsets;
itemToReturn.shader = shader;
Expand Down Expand Up @@ -1149,11 +1149,11 @@ class FlxCamera extends FlxBasic
// Make sure we didn't go outside the camera's bounds
bindScrollPos(scroll);
}

/**
* Takes the desired scroll position and restricts it to the camera's min/max scroll properties.
* This modifies the given point.
*
*
* @param scrollPos The scroll position
* @return The same point passed in, moved within the scroll bounds
* @since 5.4.0
Expand Down Expand Up @@ -1182,7 +1182,7 @@ class FlxCamera extends FlxBasic
if (deadzone == null)
{
target.getMidpoint(_point);
_point.addPoint(targetOffset);
_point.add(targetOffset);
_scrollTarget.set(_point.x - width * 0.5, _point.y - height * 0.5);
}
else
Expand Down Expand Up @@ -1210,7 +1210,7 @@ class FlxCamera extends FlxBasic
{
_scrollTarget.y -= viewHeight;
}

// without this we see weird behavior when switching to SCREEN_BY_SCREEN at arbitrary scroll positions
bindScrollPos(_scrollTarget);
}
Expand Down Expand Up @@ -1335,16 +1335,16 @@ class FlxCamera extends FlxBasic
var shakePixels = FlxG.random.float(-1, 1) * _fxShakeIntensity * width;
if (pixelPerfect)
shakePixels = Math.round(shakePixels);

flashSprite.x += shakePixels * zoom * FlxG.scaleMode.scale.x;
}

if (_fxShakeAxes.y)
{
var shakePixels = FlxG.random.float(-1, 1) * _fxShakeIntensity * height;
if (pixelPerfect)
shakePixels = Math.round(shakePixels);

flashSprite.y += shakePixels * zoom * FlxG.scaleMode.scale.y;
}
}
Expand Down Expand Up @@ -1674,8 +1674,9 @@ class FlxCamera extends FlxBasic
if (FxAlpha == 0)
return;

var targetGraphics:Graphics = (graphics == null) ? canvas.graphics : graphics;
final targetGraphics = (graphics == null) ? canvas.graphics : graphics;

targetGraphics.overrideBlendMode(null);
targetGraphics.beginFill(Color, FxAlpha);
// i'm drawing rect with these parameters to avoid light lines at the top and left of the camera,
// which could appear while cameras fading
Expand All @@ -1690,35 +1691,35 @@ class FlxCamera extends FlxBasic
@:allow(flixel.system.frontEnds.CameraFrontEnd)
function drawFX():Void
{
var alphaComponent:Float;

// Draw the "flash" special effect onto the buffer
if (_fxFlashAlpha > 0.0)
{
alphaComponent = _fxFlashColor.alpha;

if (FlxG.renderBlit)
{
fill((Std.int(((alphaComponent <= 0) ? 0xff : alphaComponent) * _fxFlashAlpha) << 24) + (_fxFlashColor & 0x00ffffff));
var color = _fxFlashColor;
color.alphaFloat *= _fxFlashAlpha;
fill(color);
}
else
{
fill((_fxFlashColor & 0x00ffffff), true, ((alphaComponent <= 0) ? 0xff : alphaComponent) * _fxFlashAlpha / 255, canvas.graphics);
final alpha = color.alphaFloat * _fxFlashAlpha;
fill(_fxFlashColor.rgb, true, alpha, canvas.graphics);
}
}

// Draw the "fade" special effect onto the buffer
if (_fxFadeAlpha > 0.0)
{
alphaComponent = _fxFadeColor.alpha;

if (FlxG.renderBlit)
{
fill((Std.int(((alphaComponent <= 0) ? 0xff : alphaComponent) * _fxFadeAlpha) << 24) + (_fxFadeColor & 0x00ffffff));
var color = _fxFadeColor;
color.alphaFloat *= _fxFadeAlpha;
fill(color);
}
else
{
fill((_fxFadeColor & 0x00ffffff), true, ((alphaComponent <= 0) ? 0xff : alphaComponent) * _fxFadeAlpha / 255, canvas.graphics);
final alpha = _fxFadeColor.alphaFloat * _fxFadeAlpha;
fill(_fxFadeColor.rgb, true, alpha, canvas.graphics);
}
}
}
Expand Down Expand Up @@ -1866,7 +1867,7 @@ class FlxCamera extends FlxBasic
updateFlashOffset();
setScale(scaleX, scaleY);
}

/**
* The size and position of this camera's margins, via `viewMarginLeft`, `viewMarginTop`, `viewWidth`
* and `viewHeight`.
Expand All @@ -1876,10 +1877,10 @@ class FlxCamera extends FlxBasic
{
if (rect == null)
rect = FlxRect.get();

return rect.set(viewMarginLeft, viewMarginTop, viewWidth, viewHeight);
}

/**
* Checks whether this camera contains a given point or rectangle, in
* screen coordinates.
Expand All @@ -1892,7 +1893,7 @@ class FlxCamera extends FlxBasic
point.putWeak();
return contained;
}

/**
* Checks whether this camera contains a given rectangle, in screen coordinates.
* @since 4.11.0
Expand Down Expand Up @@ -2039,72 +2040,72 @@ class FlxCamera extends FlxBasic
{
viewMarginY = 0.5 * height * (scaleY - initialZoom) / scaleY;
}

static inline function get_defaultCameras():Array<FlxCamera>
{
return _defaultCameras;
}

static inline function set_defaultCameras(value:Array<FlxCamera>):Array<FlxCamera>
{
return _defaultCameras = value;
}

inline function get_viewMarginLeft():Float
{
return viewMarginX;
}

inline function get_viewMarginTop():Float
{
return viewMarginY;
}

inline function get_viewMarginRight():Float
{
return width - viewMarginX;
}

inline function get_viewMarginBottom():Float
{
return height - viewMarginY;
}

inline function get_viewWidth():Float
{
return width - viewMarginX * 2;
}

inline function get_viewHeight():Float
{
return height - viewMarginY * 2;
}

inline function get_viewX():Float
{
return scroll.x + viewMarginX;
}

inline function get_viewY():Float
{
return scroll.y + viewMarginY;
}

inline function get_viewLeft():Float
{
return viewX;
}

inline function get_viewTop():Float
{
return viewY;
}

inline function get_viewRight():Float
{
return scroll.x + viewMarginRight;
}

inline function get_viewBottom():Float
{
return scroll.y + viewMarginBottom;
Expand All @@ -2117,19 +2118,19 @@ class FlxCamera extends FlxBasic
@:deprecated("don't reference camera.camera")
@:noCompletion
override function get_camera():FlxCamera throw "don't reference camera.camera";

@:deprecated("don't reference camera.camera")
@:noCompletion
override function set_camera(value:FlxCamera):FlxCamera throw "don't reference camera.camera";

@:deprecated("don't reference camera.cameras")
@:noCompletion
override function get_cameras():Array<FlxCamera> throw "don't reference camera.cameras";

@:deprecated("don't reference camera.cameras")
@:noCompletion
override function set_cameras(value:Array<FlxCamera>):Array<FlxCamera> throw "don't reference camera.cameras";

}

enum FlxCameraFollowStyle
Expand Down
Loading

0 comments on commit 95aec0c

Please sign in to comment.