Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backmerge flixel 6 official #4

Merged
merged 113 commits into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
7cf3ab5
prevent deprecation warnings
Geokureli Jun 12, 2024
b0b6576
Add trackingInfo to FlxGraphic for debugging (#3183)
Geokureli Jun 12, 2024
f515d2b
ignore alpha when point-selecting sprites (#3184)
Geokureli Jun 12, 2024
7d38b4a
Implement FlxFlicker.pause() and FlxFlicker.resume() (#3179)
EliteMasterEric Jun 13, 2024
af5e15d
Don't attempt to retrieve frameCollections on a destroyed graphic. (#…
EliteMasterEric Jun 13, 2024
0671ad9
add since
Geokureli Jun 14, 2024
c9438e1
Update Changelog
Geokureli Jun 14, 2024
86d0610
Merge branch 'dev' of https://github.com/HaxeFlixel/flixel into dev
Geokureli Jun 14, 2024
9c5dc07
Merge branch 'dev' into release6
Geokureli Jun 14, 2024
c4d168e
style
Geokureli Jun 14, 2024
56aa451
More new features and overloads to tilemaps (#3189)
Geokureli Jun 15, 2024
112f19a
Merge branch 'dev' into release6
Geokureli Jun 15, 2024
4c580e1
Fix rect.intersections, add rect.clipTo (#3190)
Geokureli Jun 17, 2024
55c8c82
test new setup-flixel (#3188)
Geokureli Jun 19, 2024
61aac1f
ignore border outline when computing field size (#3193)
Geokureli Jun 23, 2024
df5e0c2
Fix crashes from negative tiles (#3194)
Geokureli Jun 26, 2024
5ee9735
Fix `null` text alignment returning as CENTER on HashLink (#3196)
Starmapo Jul 1, 2024
c839af2
fix ci i HL (ignore failing, for now) (#3208)
Geokureli Jul 8, 2024
ad012fa
Pointer (#3210)
Geokureli Jul 10, 2024
37cbe80
Pointer (#3211)
Geokureli Jul 10, 2024
84a7ca5
Add version title underlines to the changelog (#3214)
riconuts Jul 12, 2024
424ad98
Make FlxAnimationController.callback an FlxTypedSignal (#3205)
richTrash21 Jul 12, 2024
34f0d5e
Add blend mode support for FlxStrip (fix blend mode in drawTriangles …
davidetan Jul 12, 2024
c762d99
Add onLoop to FlxAnimationController (#3216)
richTrash21 Jul 13, 2024
8b8d40c
missing doc (#3218)
richTrash21 Jul 14, 2024
ac488bf
Fix FlxCamera.fill() blending (#3217)
richTrash21 Jul 15, 2024
8406274
Update FlxSprite.hx (#3221)
Vortex2Oblivion Jul 21, 2024
01ce3a1
Merge branch 'dev' into release6
Geokureli Jul 30, 2024
64967e3
Little changes to `FlxDebugger` code completion. (#3222)
DetectiveBaldi Aug 6, 2024
94dbde5
Improved FlxInputText (#3219)
Starmapo Aug 6, 2024
a6478fd
Fix logo image link (#3230)
ACrazyTown Aug 13, 2024
a52272d
fix crash in getWorldPos (#3231)
Geokureli Aug 13, 2024
9954eb5
fix console completion selection on HTML5 (#3225)
ninjamuffin99 Aug 14, 2024
efc0b00
Fix flxstrip color-not reset causing not rendering for batches sharin…
davidetan Aug 14, 2024
7acac91
update flxbutton label position on status change (#3232)
Itz-Miles Aug 15, 2024
a5479aa
fix `FlxButtonEvent` documentation typo (#3237)
Itz-Miles Aug 18, 2024
3f0ddae
FlxTextBorderStyle: Add SHADOW_CUSTOM, always draw full outline (#3236)
Geokureli Aug 20, 2024
089ff95
add callback(data) to logstyle, replace callbackFunction() (#3239)
Geokureli Aug 21, 2024
0573fe3
Prevent crash in FlxInputText when switching states (#3243)
DigiEggz Aug 21, 2024
fc01c6e
Update Changelog
Geokureli Aug 21, 2024
f692c60
Merge branch 'dev' of https://github.com/HaxeFlixel/flixel into dev
Geokureli Aug 21, 2024
96ced8c
Merge branch 'dev' into release6
Geokureli Aug 21, 2024
51ecb44
Fix mouse wheel scrolling not working (#3244)
Starmapo Aug 24, 2024
a1dfd99
Remove Matrix Math from default shader (#3227)
NeeEoo Aug 26, 2024
4409577
Add support for custom border sizes to `FlxBar` (#3234)
DetectiveBaldi Aug 26, 2024
599f38e
Merge remote-tracking branch 'upstream/dev' into dev-6.0.0-latest
ninjamuffin99 Aug 27, 2024
32d4c35
fix for html5 arrow keys not working on the console (#3247)
ninjamuffin99 Sep 3, 2024
f2b090d
logarithmic volume control for SoundTray
ninjamuffin99 Sep 9, 2024
6bc06aa
1 line patch? (#3254)
DetectiveBaldi Sep 19, 2024
4b05488
Fixed a small issue with android config on lime 8.2.0. (#3253)
MAJigsaw77 Sep 19, 2024
a7b8d9c
Resize the debug watch window whenever something gets added / removed…
ninjamuffin99 Sep 24, 2024
096a7df
oxipng all assets (#3257)
Vortex2Oblivion Sep 26, 2024
eb84248
Fix FlxTextInput field border not being clipped correctly (#3259)
Starmapo Sep 27, 2024
38d5323
Attach `DEACTIVATE`/`ACTIVATE` events to `stage.nativeWindow`. (#3260)
MAJigsaw77 Oct 1, 2024
b635875
Replace comments mentioning Std.is with Std.isOfType (#3263)
Vortex2Oblivion Oct 6, 2024
ddb6a5f
fixing spelling mistake (#3264)
Temmiekat Oct 13, 2024
f5087ea
Use System.totalMemoryNumber in debugger (#3266)
ACrazyTown Oct 17, 2024
ffa691c
Implement error handling for save data unserialization.
EliteMasterEric Oct 18, 2024
9ffbb1e
Merge remote-tracking branch 'upstream/dev' into dev-6.0.0-latest
ninjamuffin99 Oct 26, 2024
65bd4b8
FlxGamepadInputID: Add ACCEPT/CANCEL buttons (#3276)
Geokureli Oct 30, 2024
60b8e2d
Various FlxAction changes (#3277)
Geokureli Nov 1, 2024
049e9ed
FlxGamepadManager: Add FlxG.gamepads.acceptMode (#3280)
Geokureli Nov 1, 2024
b39f68d
Stricter checks for FlxG.bitmap.maxTextureSize (#3279)
ACrazyTown Nov 4, 2024
fa637c1
add coverage 3 (#3282)
Geokureli Nov 8, 2024
4e4fbc2
checkstyle fixes (#3281)
Geokureli Nov 9, 2024
e2c7773
FlxG.assets: A way to overwrite and customize the way HaxeFlixel fetc…
Geokureli Nov 12, 2024
ed53000
Fix some documentation in AssetFrontEnd (#3283)
ACrazyTown Nov 13, 2024
e0e481c
fix: 0 volume properly is muted with log volume
ninjamuffin99 Nov 19, 2024
9bea600
add lime and openfl to haxelib.json dependencies (#3289)
ninjamuffin99 Nov 24, 2024
7219276
Add "insert" function to the CameraFrontEnd like in FlxGroups (#3290)
T5mpler Nov 24, 2024
df19e4b
FlxSave: Allow custom handling of parsing errors (#3286)
Geokureli Nov 25, 2024
2cca263
Update Changelog
Geokureli Nov 25, 2024
4602462
Merge branch 'dev' into release6
Geokureli Nov 25, 2024
fb408f1
Check if maxTextureSize >0 rather than !=-1 (#3295)
ACrazyTown Nov 28, 2024
bf753a1
fix custom asset path, add _abs (#3296)
Geokureli Nov 29, 2024
f9b7aed
Stop dispatching onFocus when debugger is not visible (#3271)
ACrazyTown Dec 1, 2024
c0cccb4
add #3271
Geokureli Dec 1, 2024
fedc206
remove events to avoid crashes (#3299)
DetectiveBaldi Dec 2, 2024
b14d1e5
oops (#3300)
ACrazyTown Dec 2, 2024
e9e90df
FlxDirectoinFlags: add up, down, left and right fields (#3303)
Geokureli Dec 3, 2024
b247edb
fix list (#3306)
Geokureli Dec 7, 2024
2f1e446
replace callback with onLog (#3307)
Geokureli Dec 9, 2024
073fa1a
Merge branch 'dev' into release6
Geokureli Dec 10, 2024
3465534
fix deprecation typo
Geokureli Dec 10, 2024
9294856
add getSoundAddExt (#3311)
Geokureli Dec 11, 2024
cc81257
use haxe 4.3.6
Geokureli Dec 11, 2024
0fad3b0
Removed @param descriptions for non existent Arguments L115 (a little…
LeonGamerPS1 Dec 11, 2024
e4a994d
Automatically append file extension to sound asset ids (#3314)
Geokureli Dec 12, 2024
2927ead
update changelog
Geokureli Dec 12, 2024
34343d1
add date
Geokureli Dec 12, 2024
5c816d3
add release notes
Geokureli Dec 12, 2024
58b4381
Update outdated documentation for BitmapFrontEnd. (#3313)
glintfishGH Dec 12, 2024
3560c23
Fix outdated references to FLX_SOUND_ADD_EXT (#3318)
ACrazyTown Dec 20, 2024
ab51c0c
Fix typo in FlxAtlasFrames.hx (#3323)
Ria424 Dec 26, 2024
593f04f
Fix camera.color (#3321)
Geokureli Dec 26, 2024
0283d8e
Revert "Fix camera.color (#3321)" (#3324)
Geokureli Dec 26, 2024
21cb868
fix camera.color (#3326)
Geokureli Dec 30, 2024
662dc33
Merge branch 'dev' into release6
Geokureli Jan 14, 2025
580d200
update haxelib after merge
Geokureli Jan 14, 2025
1272a65
Update AssetFrontEnd.hx (#3337)
CrusherNotDrip Jan 19, 2025
b5a40eb
Merge branch 'dev' into release6
Geokureli Jan 23, 2025
71c1d3e
Log pos (#3338)
Geokureli Jan 25, 2025
b386d54
update Changelog
Geokureli Jan 29, 2025
39e1fcf
Add analog directional input to FlxVirtualPad (#3340)
Geokureli Jan 29, 2025
27a756b
Remove unused legacy code & defines (#3059)
Starmapo Jan 30, 2025
2f5d24a
FlxSave: Replace `FlxSaveStatus.ERROR` with SAVE_ERROR (#3294)
Geokureli Jan 30, 2025
076f9cd
remove implicit int casts to/from directions (#3308)
Geokureli Jan 30, 2025
6a601a3
update changelog
Geokureli Jan 30, 2025
5176066
finalize(?) changelog
Geokureli Jan 30, 2025
531a432
enable glsl3 (when openfl does) (#3347)
Geokureli Jan 30, 2025
7ea26f0
Merge remote-tracking branch 'funkin/dev-6.0.0' into fnf-6
Geokureli Jan 30, 2025
21caee3
Merge remote-tracking branch 'funkin/dev-6.0.0-latest' into fnf-6
Geokureli Jan 30, 2025
fffb1a7
Query max texture size only once.
EliteMasterEric Feb 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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