Skip to content

Commit 493fe25

Browse files
authored
Flixel 6 compatibility (#331)
* remove warnings (for flixel 6) * fix demos for flixel 6
1 parent 275d4f6 commit 493fe25

85 files changed

Lines changed: 343 additions & 1202 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.vscode/settings.json

Lines changed: 89 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,94 @@
11
{
22
"search.exclude": {
3-
"**/export/**/*.hx": true
3+
"**/export/**": true
44
},
55
"[haxe]": {
6-
"editor.formatOnSave": true
7-
}
6+
"editor.formatOnSave": true,
7+
"editor.formatOnSaveMode": "modifications"
8+
},
9+
"lime.projectFile": "Tutorials/TurnBasedRPG/Project.xml",
10+
"haxecheckstyle.sourceFolders": [
11+
"Arcade/Breakout/source",
12+
"Arcade/Flappybalt/source",
13+
"Arcade/Flixius/source",
14+
"Arcade/FlxInvaders/source",
15+
"Arcade/FlxLightPuzzle/source",
16+
"Arcade/FlxPongApi/source",
17+
"Arcade/FlxSnake/source",
18+
"Arcade/FlxTeroids/source",
19+
"Arcade/MinimalistTD/source",
20+
"Editors/FlxPexParser/source",
21+
"Editors/FlxSpine/source",
22+
"Editors/TexturePackerAtlas/source",
23+
"Effects/BlendModes/source",
24+
"Effects/BlendModesShaders/source",
25+
"Effects/DynamicShadows/source",
26+
"Effects/Filters/source",
27+
"Effects/FloodFill/source",
28+
"Effects/FlxBloom/source",
29+
"Effects/FlxBlur/source",
30+
"Effects/FlxClothSprite/source",
31+
"Effects/FlxEffectSprite/source",
32+
"Effects/FlxFloodFill/source",
33+
"Effects/FlxSimplex/source",
34+
"Effects/FlxSkewedSprite/source",
35+
"Effects/FlxSpriteFilters/source",
36+
"Effects/FlxTrailArea/source",
37+
"Effects/FlxTween/source",
38+
"Effects/MosaicEffect/source",
39+
"Effects/Parallax/source",
40+
"Effects/PostProcess/source",
41+
"Effects/Transitions/source",
42+
"Features/CollisionAndGrouping/source",
43+
"Features/Colors/source",
44+
"Features/FlxCamera/source",
45+
"Features/FlxFSM/source",
46+
"Features/FlxNape/source",
47+
"Features/FlxTerrain/source",
48+
"Features/FlxTilemap/source",
49+
"Features/FlxPieDial/source",
50+
"Features/FlxScene/source",
51+
"Features/FlxShape/source",
52+
"Features/FlxSound/source",
53+
"Features/HeatmapPathfinding/source",
54+
"Features/Particles/source",
55+
"Features/Pathfinding/source",
56+
"Features/Replay/source",
57+
"Features/ScaleModes/source",
58+
"Features/SetTileProperties/source",
59+
"Features/SplitScreen/source",
60+
"Features/SubState/source",
61+
"Features/Tilemap/source",
62+
"Graphics/FlxAsepriteUtils/source",
63+
"Input/FlxAccelerometer/source",
64+
"Input/FlxAction/source",
65+
"Input/FlxMouseEvent/source",
66+
"Input/GamepadTest/source",
67+
"Input/GridMovement/source",
68+
"Input/Multitouch/source",
69+
"Other/BSPMapGen/source",
70+
"Other/Calculator/source",
71+
"Other/FlxAsyncLoop/source",
72+
"Other/FlxAtlas/source",
73+
"Other/FrameCollections/source",
74+
"Other/FlxBunnyMark/source",
75+
"Other/FlxRandom/source",
76+
"Other/NeonVector/source",
77+
"Other/PixelPerfectCollision/source",
78+
"Platformers/EZPlatformer/source",
79+
"Platformers/FlipRotationAnimationTiles/source",
80+
"Platformers/FlxCaveGenerator/source",
81+
"Platformers/FlxTilemapExt/source",
82+
"Platformers/Mode/source",
83+
"Platformers/ProjectJumper/source",
84+
"Platformers/Revenge/source",
85+
"Tutorials/TurnBasedRPG/source",
86+
"UserInterface/Cursor/source",
87+
"UserInterface/FileBrowser/source",
88+
"UserInterface/FlxBitmapText/source",
89+
"UserInterface/FlxTextFormat/source",
90+
"UserInterface/FlxTypeText/source",
91+
"UserInterface/RPGInterface/source",
92+
"UserInterface/Tooltips/source"
93+
]
894
}

Arcade/Breakout/source/PlayState.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ class PlayState extends FlxState
115115
{
116116
if (swipe.distance > 100)
117117
{
118-
if ((swipe.angle < 10 && swipe.angle > -10) || (swipe.angle > 170 || swipe.angle < -170))
118+
if ((swipe.degrees < 10 && swipe.degrees > -10) || (swipe.degrees > 170 || swipe.degrees < -170))
119119
{
120120
FlxG.resetState();
121121
}

Arcade/FlxLightPuzzle/source/Color.hx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ package;
55
* Abstract Int so that colors can be easily combined using the | (or) operator.
66
* @author MSGHero
77
*/
8-
@:enum
9-
abstract Color(Int) from Int to Int
8+
enum abstract Color(Int) from Int to Int
109
{
1110
var MIRROR = 0x01 << 0;
1211
var RED = 0x01 << 1;

Arcade/FlxPongApi/source/MenuState.hx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,13 +335,13 @@ class MenuState extends FlxState
335335
function colorCallback(Name:String):Void
336336
{
337337
Reg.genColors();
338-
FlxG.switchState(new MenuState());
338+
FlxG.switchState(MenuState.new);
339339
}
340340
#end
341341

342342
function playCallback(Name:String):Void
343343
{
344-
FlxG.switchState(new PlayState());
344+
FlxG.switchState(PlayState.new);
345345
}
346346

347347
function hfCallback(Name:String):Void

Arcade/FlxPongApi/source/PlayState.hx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class PlayState extends FlxState
9393
}
9494
if (FlxG.keys.justPressed.ESCAPE)
9595
{
96-
FlxG.switchState(new MenuState());
96+
FlxG.switchState(MenuState.new);
9797
}
9898
#end
9999

@@ -150,6 +150,6 @@ class PlayState extends FlxState
150150

151151
function endGame(f:FlxTimer):Void
152152
{
153-
FlxG.switchState(new MenuState());
153+
FlxG.switchState(MenuState.new);
154154
}
155155
}

Arcade/FlxTeroids/source/MenuState.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class MenuState extends FlxState
2323
{
2424
if (FlxG.keys.justReleased.SPACE)
2525
{
26-
FlxG.switchState(new PlayState());
26+
FlxG.switchState(PlayState.new);
2727
}
2828
}
2929
}

Arcade/FlxTeroids/source/PlayState.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class PlayState extends FlxState
8888
// Escape to the menu
8989
if (FlxG.keys.pressed.ESCAPE)
9090
{
91-
FlxG.switchState(new MenuState());
91+
FlxG.switchState(MenuState.new);
9292
}
9393

9494
super.update(elapsed);

Arcade/MinimalistTD/source/MenuState.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class MenuState extends FlxState
6565
*/
6666
function startGame():Void
6767
{
68-
FlxG.switchState(new PlayState());
68+
FlxG.switchState(PlayState.new);
6969
}
7070

7171
override public function update(elapsed:Float):Void

Arcade/MinimalistTD/source/PlayState.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ class PlayState extends FlxState
306306
if (FlxG.keys.justReleased.ESCAPE)
307307
{
308308
FlxG.sound.destroy(true);
309-
FlxG.switchState(new MenuState());
309+
FlxG.switchState(MenuState.new);
310310
}
311311
if (FlxG.keys.justReleased.N)
312312
{

Effects/BlendModeShaders/source/Main.hx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package;
22

33
import flixel.FlxGame;
4-
import openfl.Lib;
54
import openfl.display.Sprite;
65

76
class Main extends Sprite

0 commit comments

Comments
 (0)