Skip to content

Commit a181899

Browse files
Changes 399
1 parent 4706723 commit a181899

10 files changed

Lines changed: 178 additions & 91 deletions

File tree

‎project.xml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@
113113
<haxeflag name="--macro" value="allowPackage('flash')"/>
114114
<haxeflag name="--macro" value="include('my.pack')"/>
115115

116-
<haxeflag name="--macro" value="addMetadata('@:build(macros.FlxMacro.buildZindex())', 'flixel.FlxBasic')" />
116+
<haxeflag name="--macro" value="addMetadata('@:build(macros.FlxMacro.buildZindex())', 'flixel.FlxBasic')"/>
117+
<haxeflag name="--macro" value="macros.FlxMacro.initMacros()"/>
117118

118119
<!-- hxVLC Defines-->
119120
<haxedef name="HXC_LIBVLC_LOGGING" if="VIDEOS_ALLOWED debug"/>

‎source/_external/memory/Memory.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,6 @@ size_t getCurrentRSS( ) {
7070

7171
#else
7272
/* AIX, BSD, Solaris, and Unknown OS ------------------------ */
73-
return (size_t)0L; /* Unsupported. */
73+
return (size_t)0L; * Unsupported. */
7474
#endif
7575
}

‎source/backend/SongJson.hx‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ import haxe.ds.Vector;
44

55
// Original code is haxe.format.JsonParser.hx
66
/**
7-
An implementation of JSON parser in Haxe but optimized.
8-
**/
7+
* An implementation of JSON parser in Haxe but optimized.
8+
*/
99
class SongJson {
1010
/**
11-
Parses given JSON-encoded `str` and returns the resulting object.
11+
* Parses given JSON-encoded `str` and returns the resulting object.
1212
13-
JSON objects are parsed into anonymous structures and JSON arrays
14-
are parsed into `Array<Dynamic>`.
13+
* JSON objects are parsed into anonymous structures and JSON arrays
14+
* are parsed into `Array<Dynamic>`.
1515
16-
If given `str` is not valid JSON, an exception will be thrown.
16+
* If given `str` is not valid JSON, an exception will be thrown.
1717
18-
If `str` is null, the result is unspecified.
19-
**/
18+
* If `str` is null, the result is unspecified.
19+
*/
2020
public static inline function parse(str:String):Dynamic {
2121
return new SongJson(str).doParse();
2222
}

‎source/cpp/vm/tracy/TracyProfiler.hx‎

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -20,68 +20,68 @@ enum abstract PlotFormatType(UInt8) from UInt8 to UInt8 {
2020
@:include('hx/TelemetryTracy.h')
2121
extern class Native_TracyProfiler {
2222
/**
23-
Mark a frame. Call this at the end of each frame loop.
24-
**/
23+
* Mark a frame. Call this at the end of each frame loop.
24+
*/
2525
@:native('::__hxcpp_tracy_framemark')
2626
public static function frameMark():Void;
2727

2828
/**
29-
Mark a named frame. Allows creating multiple frame sets for different timing categories.
30-
Each unique name creates a separate frame set in the Tracy timeline.
31-
**/
29+
* Mark a named frame. Allows creating multiple frame sets for different timing categories.
30+
* Each unique name creates a separate frame set in the Tracy timeline.
31+
*/
3232
@:native('::__hxcpp_tracy_framemark_named')
3333
public static function frameMarkNamed(_name:String):Void;
3434

3535
/**
36-
Mark the start of a discontinuous frame. Use for periodic work with gaps.
37-
Must be paired with frameMarkEnd() using the same name.
38-
**/
36+
* Mark the start of a discontinuous frame. Use for periodic work with gaps.
37+
* Must be paired with frameMarkEnd() using the same name.
38+
*/
3939
@:native('::__hxcpp_tracy_framemark_start')
4040
public static function frameMarkStart(_name:String):Void;
4141

4242
/**
43-
Mark the end of a discontinuous frame. Use for periodic work with gaps.
44-
Must be paired with frameMarkStart() using the same name.
45-
**/
43+
* Mark the end of a discontinuous frame. Use for periodic work with gaps.
44+
* Must be paired with frameMarkStart() using the same name.
45+
*/
4646
@:native('::__hxcpp_tracy_framemark_end')
4747
public static function frameMarkEnd(_name:String):Void;
4848

4949
/**
50-
Print a message into Tracy's log.
51-
**/
50+
* Print a message into Tracy's log.
51+
*/
5252
@:native('::__hxcpp_tracy_message')
5353
public static function message(_msg:String, ?_color:Int = 0x000000):Void;
5454

5555
/**
56-
Tracy can collect additional information about the profiled application,
57-
which will be available in the trace description.
58-
This can include data such as the source repository revision,
59-
the application’s environment (dev/prod), etc.
60-
**/
56+
* Tracy can collect additional information about the profiled application,
57+
* which will be available in the trace description.
58+
* This can include data such as the source repository revision,
59+
* the application’s environment (dev/prod), etc.
60+
*/
6161
@:native('::__hxcpp_tracy_message_app_info')
6262
public static function messageAppInfo(_info:String):Void;
6363

6464
/**
65-
Plot a named value to tracy. This will generate a graph in the profiler for you.
66-
**/
65+
* Plot a named value to tracy. This will generate a graph in the profiler for you.
66+
*/
6767
@:native('::__hxcpp_tracy_plot')
6868
public static function plot(_name:String, _val:cpp.Float32):Void;
6969

7070
/**
71-
Configure how values are plotted and displayed.
72-
**/
71+
* Configure how values are plotted and displayed.
72+
*/
7373
@:native('::__hxcpp_tracy_plot_config')
7474
public static function plotConfig(_name:String, _format:PlotFormatType, ?_step:Bool = false, ?_fill:Bool = false, ?_color:Int = 0x000000):Void;
7575

7676
/**
77-
Set a name for the current thread this function is called in. Supply an optional groupHint so threads become grouped in Tracy's UI.
78-
**/
77+
* Set a name for the current thread this function is called in. Supply an optional groupHint so threads become grouped in Tracy's UI.
78+
*/
7979
@:native('::__hxcpp_tracy_set_thread_name_and_group')
8080
public static function setThreadName(_name:String, ?_groupHint:Int = 1):Void;
8181

8282
/**
83-
Create a custom named scoped zone in your code.
84-
**/
83+
* Create a custom named scoped zone in your code.
84+
*/
8585
@:native('HXCPP_TRACY_ZONE')
8686
public static function zoneScoped(_name:String):Void;
8787
}
@@ -132,4 +132,4 @@ class Cppia_TracyProfiler {
132132
typedef TracyProfiler = Cppia_TracyProfiler;
133133
#else
134134
typedef TracyProfiler = Native_TracyProfiler;
135-
#end
135+
#end

‎source/haxe/format/JsonParser.hx‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,24 @@
2323
package haxe.format;
2424

2525
/**
26-
An implementation of JSON parser in Haxe.
26+
* An implementation of JSON parser in Haxe.
2727
28-
This class is used by `haxe.Json` when native JSON implementation
29-
is not available.
28+
* This class is used by `haxe.Json` when native JSON implementation
29+
* is not available.
3030
31-
@see https://haxe.org/manual/std-Json-parsing.html
32-
**/
31+
* @see https://haxe.org/manual/std-Json-parsing.html
32+
*/
3333
class JsonParser {
3434
/**
35-
Parses given JSON-encoded `str` and returns the resulting object.
35+
* Parses given JSON-encoded `str` and returns the resulting object.
3636
37-
JSON objects are parsed into anonymous structures and JSON arrays
38-
are parsed into `Array<Dynamic>`.
37+
* JSON objects are parsed into anonymous structures and JSON arrays
38+
* are parsed into `Array<Dynamic>`.
3939
40-
If given `str` is not valid JSON, an exception will be thrown.
40+
* If given `str` is not valid JSON, an exception will be thrown.
4141
42-
If `str` is null, the result is unspecified.
43-
**/
42+
* If `str` is null, the result is unspecified.
43+
*/
4444
public static inline function parse(str:String):Dynamic {
4545
return new JsonParser(str).doParse();
4646
}

‎source/macros/FlxMacro.hx‎

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

3-
#if (!display && macro)
3+
#if macro
44
import haxe.macro.Expr;
55
import haxe.macro.Context;
66

@@ -38,5 +38,9 @@ class FlxMacro {
3838

3939
return fields;
4040
}
41+
42+
public static function initMacros():Void {
43+
if (Context.defined("hscript_imporved") && !Context.defined("hscript")) haxe.macro.Compiler.define("hscript");
44+
}
4145
}
4246
#end

‎source/objects/Popup.hx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ enum PopupType {
88
}
99

1010
class Popup extends FlxSprite {
11-
public var baseAcc:FlxPoint = FlxPoint.get();
12-
public var baseVel:FlxPoint = FlxPoint.get();
11+
public static var baseAcc:FlxPoint = FlxPoint.get();
12+
public static var baseVel:FlxPoint = FlxPoint.get();
13+
public static var noVelocity:Bool = false;
1314

1415
public var type:PopupType = NONE;
1516
public var popUpTime:Float = 0;
16-
public static var noVelocity:Bool = false;
1717

1818
final placement:Float = FlxG.width * .35;
1919

0 commit comments

Comments
 (0)