Skip to content

Commit

Permalink
Merge branch 'dev' into typed_tilemap
Browse files Browse the repository at this point in the history
  • Loading branch information
Geokureli committed Jun 16, 2023
2 parents 94a7762 + 65db2e2 commit ae6e254
Show file tree
Hide file tree
Showing 103 changed files with 863 additions and 425 deletions.
12 changes: 12 additions & 0 deletions .github/CONTRIBUTING_TR.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
HaxeFlixel'e katkıda bulunduğunuz için teşekkürler!
## Hata bildirme

Hata bildirdiğiniz zaman, size sunulan [sorun şablonu](https://github.com/HaxeFlixel/flixel/blob/dev/.github/ISSUE_TEMPLATE.md) nu basit bir biçimde doldurun.

## Kod katkısı yapma

Kod katkıları için, aşağıdaki bağlantıları inceleyin:

- [Geliştirme Flixel'i indir](http://haxeflixel.com/documentation/install-development-flixel/)
- [Kod Katkısında Bulunma](http://haxeflixel.com/documentation/code-contributions)
- [Kod Stili](http://haxeflixel.com/documentation/code-style)
36 changes: 36 additions & 0 deletions .github/README_TR.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[![](https://raw.github.com/HaxeFlixel/haxeflixel.com/master/src/files/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)

[![CI](https://img.shields.io/github/actions/workflow/status/HaxeFlixel/flixel/main.yml?branch=dev&logo=github)](https://github.com/HaxeFlixel/flixel/actions?query=workflow%3ACI)
[![Discord](https://img.shields.io/discord/162395145352904705.svg?logo=discord)](https://discordapp.com/invite/rqEBAgF)
[![Haxelib Sürümü](https://badgen.net/haxelib/v/flixel)](https://lib.haxe.org/p/flixel)
[![Haxelib Indirmeleri](https://badgen.net/haxelib/d/flixel?color=blue)](https://lib.haxe.org/p/flixel)
[![Haxelib Lisansı](https://badgen.net/haxelib/license/flixel)](LICENSE.md)
[![Patreon](https://img.shields.io/badge/donate-patreon-blue.svg)](https://www.patreon.com/haxeflixel)

[![](../images/showcase.png)](https://haxeflixel.com/showcase)

## Bağlantılar

Burada HaxeFlixel ile başlayabilmeniz için bazı önemli bağlantılar var:

- [Başlarken](https://haxeflixel.com/documentation/getting-started/)
- [Dökümantasyon](https://haxeflixel.com/documentation)
- [API](https://api.haxeflixel.com/)
- [Topluluk](https://haxeflixel.com/documentation/community/)

Eğer kod katkısında bulunmak veya hata bildirmek istiyorsanız, lütfen [CONTRIBUTING.md](https://github.com/HaxeFlixel/flixel/blob/dev/.github/CONTRIBUTING_TR.md)'mizi inceleyin.

## Platformlar

[Haxe](https://haxe.org/) ve [OpenFL](http://www.openfl.org/) üzerinde yapılması sayesinde, HaxeFlixel _doğal olarak_ aşağıdaki platformları destekler:

![](../images/platforms.png)

## Hakkında

HaxeFlixel, [Adam “Atomic” Saltsman](http://www.adamatomic.com/) tarafından yapılan [Flixel'in ActionScript3 versiyonu](https://github.com/AdamAtomic/flixel) ndan köklerini almaktadır. 2011'de [Alexander Hohlov](https://github.com/beeblerox) tarafından AS3 kod tabanının ve Richard Davey'in [Flixel Güç Araçları](http://www.photonstorm.com/flixel-power-tools) nın Haxe portu olarak başladı.


HaxeFlixel'in bugünkü sürümü, [çekirdek ekibin](https://github.com/orgs/HaxeFlixel/people) ve [100'ün üzerinde katkıda bulunanları](https://github.com/HaxeFlixel/flixel/graphs/contributors) sayesinde bugünkü halini aldı. Yalnızca çekirdek motorunda değil birçok önemli gelişme ve yeni özellik görmenin yanı sıra, daha zengin bir ekosistem de ek kütüphanelerle ve [80'den fazla demo projesiyle](https://github.com/HaxeFlixel/flixel-demos) öğrenmeye olanak sağlamaktadır.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"tests"
],
"[haxe]": {
"editor.formatOnSave": true
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "modifications"
},
"haxe.configurations": [
{
Expand Down
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
5.4.0 (TBD)
------------------------------
#### New features:
- **README.md**: Add Turkish translations
- `AssetPaths`: Add `allFiles` field, and an arg in `FlxAssets.buildFileReferences` to change the identifier ([#2807](https://github.com/HaxeFlixel/flixel/pull/2807))
- Debug tools: Add ways to remove custom debug tools ([#2792](https://github.com/HaxeFlixel/flixel/pull/2792))
- `FlxG.console`: Add `removeByAlias`, `removeEnum`, `removeClass`, `removeObject` and `removeFunction`
- `FlxG.game.debugger.interaction`: Add `removeTool`
- `FlxText`: Add `fieldHeight` field ([#2789](https://github.com/HaxeFlixel/flixel/pull/2789))
- `FlxG`: Add compiler flag `FLX_NO_SAVE` to remove `FlxG.save` (also counter-flag `FLX_SAVE`) ([#2840](https://github.com/HaxeFlixel/flixel/pull/2840))
- `FlxCamera`: Add `pixelPerfectShake` field, for pixel-perfect camera shaking ([#2841](https://github.com/HaxeFlixel/flixel/pull/2841))

#### Changes and improvements:
- `FlxEase`: Simplify `bounceIn` and `bounceInOut` ([#2788](https://github.com/HaxeFlixel/flixel/pull/2788))
- Fix typos in various docs ([#2793](https://github.com/HaxeFlixel/flixel/pull/2793))([#2799](https://github.com/HaxeFlixel/flixel/pull/2799))
- `FlxBaseTilemap`: Log errors rather than throw exceptions in `setTileProperties` with invalid args ([#2815](https://github.com/HaxeFlixel/flixel/pull/2815))
- Add hxformat.json to published Flixel release ([#2818](https://github.com/HaxeFlixel/flixel/pull/2818))
- `FlxSprite`: Add erroneously unused `camera` arg when calling `pixelsOverlapPoint` ([#2824](https://github.com/HaxeFlixel/flixel/pull/2824))
- Changed references to the `flash` package to their `openfl` equivalent, whenever possible ([#2832](https://github.com/HaxeFlixel/flixel/pull/2832))

#### Bugfixes:
- `FlxAnimation`: Fix issue where `finishCallback` wasn't being fired on reversed animations ([#2811](https://github.com/HaxeFlixel/flixel/pull/2811))


5.3.1 (May 7, 2023)
------------------------------
#### Changes and improvements:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![](https://raw.github.com/HaxeFlixel/haxeflixel.com/master/src/files/images/flixel-logos/HaxeFlixel.png)](http://haxeflixel.com/)

[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)
[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](https://github.com/HaxeFlixel/flixel/blob/dev/.github/README_TR.md)

[![CI](https://img.shields.io/github/actions/workflow/status/HaxeFlixel/flixel/main.yml?branch=dev&logo=github)](https://github.com/HaxeFlixel/flixel/actions?query=workflow%3ACI)
[![Discord](https://img.shields.io/discord/162395145352904705.svg?logo=discord)](https://discordapp.com/invite/rqEBAgF)
Expand Down
36 changes: 26 additions & 10 deletions flixel/FlxCamera.hx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package flixel;

import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.DisplayObject;
import flash.display.Graphics;
import flash.display.Sprite;
import flash.geom.ColorTransform;
import flash.geom.Point;
import flash.geom.Rectangle;
import openfl.display.Bitmap;
import openfl.display.BitmapData;
import openfl.display.DisplayObject;
import openfl.display.Graphics;
import openfl.display.Sprite;
import openfl.geom.ColorTransform;
import openfl.geom.Point;
import openfl.geom.Rectangle;
import flixel.graphics.FlxGraphic;
import flixel.graphics.frames.FlxFrame;
import flixel.graphics.tile.FlxDrawBaseItem;
Expand Down Expand Up @@ -221,6 +221,12 @@ 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
*/
public var pixelPerfectShake:Null<Bool> = null;

/**
* How wide the camera display is, in game pixels.
Expand Down Expand Up @@ -1315,13 +1321,23 @@ class FlxCamera extends FlxBasic
}
else
{
final pixelPerfect = pixelPerfectShake == null ? pixelPerfectRender : pixelPerfectShake;
if (_fxShakeAxes.x)
{
flashSprite.x += FlxG.random.float(-_fxShakeIntensity * width, _fxShakeIntensity * width) * zoom * FlxG.scaleMode.scale.x;
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)
{
flashSprite.y += FlxG.random.float(-_fxShakeIntensity * height, _fxShakeIntensity * height) * zoom * FlxG.scaleMode.scale.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
16 changes: 11 additions & 5 deletions flixel/FlxG.hx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package flixel;

import flash.Lib;
import flash.display.DisplayObject;
import flash.display.Stage;
import flash.display.StageDisplayState;
import flash.net.URLRequest;
import openfl.Lib;
import openfl.display.DisplayObject;
import openfl.display.Stage;
import openfl.display.StageDisplayState;
import openfl.net.URLRequest;
import flixel.effects.postprocess.PostProcess;
import flixel.math.FlxMath;
import flixel.math.FlxRandom;
Expand Down Expand Up @@ -190,11 +190,13 @@ class FlxG
*/
public static var worldBounds(default, null):FlxRect = FlxRect.get();

#if FLX_SAVE
/**
* A `FlxSave` used internally by flixel to save sound preferences and
* the history of the console window, but no reason you can't use it for your own stuff too!
*/
public static var save(default, null):FlxSave = new FlxSave();
#end

/**
* A `FlxRandom` object which can be used to generate random numbers.
Expand Down Expand Up @@ -618,7 +620,9 @@ class FlxG
accelerometer = new FlxAccelerometer();
#end

#if FLX_SAVE
initSave();
#end

plugins = new PluginFrontEnd();
vcr = new VCRFrontEnd();
Expand Down Expand Up @@ -672,6 +676,7 @@ class FlxG
FlxObject.defaultPixelPerfectPosition = renderBlit;
}

#if FLX_SAVE
static function initSave()
{
// Don't init if the FlxG.save.bind was manually called before the FlxGame was created
Expand All @@ -685,6 +690,7 @@ class FlxG
if (save.isEmpty())
save.mergeDataFrom("flixel", null, false, false);
}
#end

/**
* Called whenever the game is reset, doesn't have to do quite as much work as the basic initialization stuff.
Expand Down
12 changes: 6 additions & 6 deletions flixel/FlxGame.hx
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
package flixel;

import flash.Lib;
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.Event;
import openfl.Lib;
import openfl.display.Sprite;
import openfl.display.StageAlign;
import openfl.display.StageScaleMode;
import openfl.events.Event;
import flixel.graphics.tile.FlxDrawBaseItem;
import flixel.system.FlxSplash;
import flixel.util.FlxArrayUtil;
import openfl.Assets;
import openfl.filters.BitmapFilter;
#if desktop
import flash.events.FocusEvent;
import openfl.events.FocusEvent;
#end
#if FLX_POST_PROCESS
import flixel.effects.postprocess.PostProcess;
Expand Down
2 changes: 1 addition & 1 deletion flixel/FlxObject.hx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package flixel;

import flash.display.Graphics;
import openfl.display.Graphics;
import flixel.group.FlxGroup.FlxTypedGroup;
import flixel.math.FlxPoint;
import flixel.math.FlxRect;
Expand Down
24 changes: 12 additions & 12 deletions flixel/FlxSprite.hx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package flixel;

import flash.display.BitmapData;
import flash.display.BlendMode;
import flash.geom.ColorTransform;
import flash.geom.Point;
import flash.geom.Rectangle;
import openfl.display.BitmapData;
import openfl.display.BlendMode;
import openfl.geom.ColorTransform;
import openfl.geom.Point;
import openfl.geom.Rectangle;
import flixel.FlxBasic.IFlxBasic;
import flixel.animation.FlxAnimationController;
import flixel.graphics.FlxGraphic;
Expand Down Expand Up @@ -36,7 +36,7 @@ using flixel.util.FlxColorTransformUtil;
* - [Handbook - FlxSprite](https://haxeflixel.com/documentation/flxsprite/)
*
* ## Collision and Motion
* Flixel handles many aspects of collision nad physics motions for you. This is all defined in the
* Flixel handles many aspects of collision and physics motions for you. This is all defined in the
* base class: [FlxObject](https://api.haxeflixel.com/flixel/FlxObject.html), check there for things
* like: `x`, `y`, `width`, `height`, `velocity`, `acceleration`, `maxVelocity`, `drag`, `angle`,
* and `angularVelocity`. All of these affect the movement and orientation of the sprite as well
Expand Down Expand Up @@ -1008,17 +1008,17 @@ class FlxSprite extends FlxObject
* current displayed pixels. This check is ALWAYS made in screen space, and
* factors in `scale`, `angle`, `offset`, `origin`, and `scrollFactor`.
*
* @param worldPoint point in world space you want to check.
* @param mask Used in the pixel hit test to determine what counts as solid.
* @param camera The desired "screen" coordinate space. If `null`, `FlxG.camera` is used.
* @param worldPoint point in world space you want to check.
* @param alphaTolerance Used to determine what counts as solid.
* @param camera The desired "screen" coordinate space. If `null`, `FlxG.camera` is used.
* @return Whether or not the point overlaps this object.
*/
public function pixelsOverlapPoint(worldPoint:FlxPoint, mask:Int = 0xFF, ?camera:FlxCamera):Bool
public function pixelsOverlapPoint(worldPoint:FlxPoint, alphaTolerance = 0xFF, ?camera:FlxCamera):Bool
{
var pixelColor = getPixelAt(worldPoint);
final pixelColor = getPixelAt(worldPoint, camera);

if (pixelColor != null)
return pixelColor.alpha * alpha >= mask;
return pixelColor.alpha * alpha >= alphaTolerance;

// point is outside of the graphic
return false;
Expand Down
2 changes: 2 additions & 0 deletions flixel/FlxState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ import flixel.util.FlxSignal.FlxTypedSignal;
* It is for all intents and purpose a fancy `FlxGroup`. And really, it's not even that fancy.
*/
@:keepSub // workaround for HaxeFoundation/haxe#3749
#if FLX_NO_UNIT_TEST
@:autoBuild(flixel.system.macros.FlxMacroUtil.deprecateOverride("switchTo", "switchTo is deprecated, use startOutro"))
#end
// show deprecation warning when `switchTo` is overriden in dereived classes
class FlxState extends FlxGroup
{
Expand Down
2 changes: 1 addition & 1 deletion flixel/animation/FlxAnimation.hx
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ class FlxAnimation extends FlxBaseAnimation

if (tempFrame >= 0)
{
if (!looped && frame > maxFrameIndex)
if (!looped && tempFrame > maxFrameIndex)
{
finished = true;
curFrame = reversed ? 0 : maxFrameIndex;
Expand Down
2 changes: 1 addition & 1 deletion flixel/effects/particles/FlxEmitter.hx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package flixel.effects.particles;

import flash.display.BlendMode;
import openfl.display.BlendMode;
import flixel.FlxG;
import flixel.FlxObject;
import flixel.FlxSprite;
Expand Down
2 changes: 1 addition & 1 deletion flixel/effects/postprocess/PostProcess.hx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package flixel.effects.postprocess;

import flash.geom.Rectangle;
import openfl.geom.Rectangle;
#if FLX_POST_PROCESS
import flixel.FlxG;
import openfl.Assets;
Expand Down
2 changes: 1 addition & 1 deletion flixel/graphics/FlxGraphic.hx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package flixel.graphics;

import flash.display.BitmapData;
import openfl.display.BitmapData;
import flixel.FlxG;
import flixel.graphics.frames.FlxAtlasFrames;
import flixel.graphics.frames.FlxFrame;
Expand Down
4 changes: 2 additions & 2 deletions flixel/graphics/atlas/FlxAtlas.hx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package flixel.graphics.atlas;

import flash.display.BitmapData;
import flash.geom.Point;
import openfl.display.BitmapData;
import openfl.geom.Point;
import flixel.FlxG;
import flixel.graphics.FlxGraphic;
import flixel.graphics.frames.FlxAtlasFrames;
Expand Down
2 changes: 1 addition & 1 deletion flixel/graphics/frames/FlxAtlasFrames.hx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package flixel.graphics.frames;

import flash.geom.Rectangle;
import openfl.geom.Rectangle;
import flixel.graphics.FlxGraphic;
import flixel.graphics.frames.FlxAtlasFrames;
import flixel.graphics.frames.FlxFrame;
Expand Down
6 changes: 3 additions & 3 deletions flixel/graphics/frames/FlxBitmapFont.hx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package flixel.graphics.frames;

import flash.display.BitmapData;
import flash.geom.Point;
import flash.geom.Rectangle;
import openfl.display.BitmapData;
import openfl.geom.Point;
import openfl.geom.Rectangle;
import flixel.FlxG;
import flixel.graphics.FlxGraphic;
import flixel.graphics.frames.FlxFrame.FlxFrameAngle;
Expand Down
6 changes: 3 additions & 3 deletions flixel/graphics/frames/FlxFilterFrames.hx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package flixel.graphics.frames;

import flash.display.BitmapData;
import flash.geom.Point;
import flash.geom.Rectangle;
import openfl.display.BitmapData;
import openfl.geom.Point;
import openfl.geom.Rectangle;
import flixel.FlxSprite;
import flixel.graphics.FlxGraphic;
import flixel.graphics.frames.FlxFramesCollection.FlxFrameCollectionType;
Expand Down
6 changes: 3 additions & 3 deletions flixel/graphics/frames/FlxFrame.hx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package flixel.graphics.frames;

import flash.display.BitmapData;
import flash.geom.Point;
import flash.geom.Rectangle;
import openfl.display.BitmapData;
import openfl.geom.Point;
import openfl.geom.Rectangle;
import flixel.graphics.FlxGraphic;
import flixel.math.FlxMatrix;
import flixel.math.FlxPoint;
Expand Down
Loading

0 comments on commit ae6e254

Please sign in to comment.