diff --git a/source/Main.hx b/source/Main.hx index 6efcae3..a065da2 100644 --- a/source/Main.hx +++ b/source/Main.hx @@ -1,7 +1,5 @@ package; - -import webm.WebmPlayer; import openfl.display.BlendMode; import openfl.text.TextFormat; import openfl.display.Application; @@ -77,10 +75,12 @@ class Main extends Sprite gameHeight = Math.ceil(stageHeight / zoom); } + #if cpp initialState = Caching; - game = new FlxGame(gameWidth, gameHeight, initialState, zoom, framerate, framerate, skipSplash, startFullscreen); - + #else + game = new FlxGame(gameWidth, gameHeight, initialState, zoom, framerate, framerate, skipSplash, startFullscreen); + #end addChild(game); #if !mobile diff --git a/source/PlayState.hx b/source/PlayState.hx index f21c8a3..7e62b7a 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -6,7 +6,9 @@ import openfl.ui.Keyboard; import openfl.events.KeyboardEvent; import Replay.Ana; import Replay.Analysis; +#if cpp import webm.WebmPlayer; +#end import flixel.input.keyboard.FlxKey; import haxe.Exception; import openfl.geom.Matrix; @@ -3352,6 +3354,7 @@ class PlayState extends MusicBeatState public function backgroundVideo(source:String) // for background videos { + #if cpp useVideo = true; FlxG.stage.window.onFocusOut.add(focusOut); @@ -3402,6 +3405,7 @@ class PlayState extends MusicBeatState webmHandler.pause(); else webmHandler.resume(); + #end } function noteMiss(direction:Int = 1, daNote:Note):Void diff --git a/source/TitleState.hx b/source/TitleState.hx index afd7329..abcc2d7 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -1,6 +1,8 @@ package; +#if sys import smTools.SMFile; +#end import flixel.FlxG; import flixel.FlxSprite; import flixel.FlxState; diff --git a/source/smTools/SMFile.hx b/source/smTools/SMFile.hx index 9b6ffda..f4cde5b 100644 --- a/source/smTools/SMFile.hx +++ b/source/smTools/SMFile.hx @@ -1,3 +1,4 @@ +#if sys package smTools; import sys.io.File; @@ -56,4 +57,5 @@ class SMFile } trace(measures.length + " Measures"); } -} \ No newline at end of file +} +#end \ No newline at end of file diff --git a/source/smTools/SMHeader.hx b/source/smTools/SMHeader.hx index 9e4a381..cfe7770 100644 --- a/source/smTools/SMHeader.hx +++ b/source/smTools/SMHeader.hx @@ -1,3 +1,4 @@ +#if sys package smTools; class SMHeader @@ -34,4 +35,5 @@ class SMHeader Reflect.setProperty(this,propName,value); } } -} \ No newline at end of file +} +#end \ No newline at end of file diff --git a/source/smTools/SMMeasure.hx b/source/smTools/SMMeasure.hx index 1dc4fc4..bd21dd9 100644 --- a/source/smTools/SMMeasure.hx +++ b/source/smTools/SMMeasure.hx @@ -1,3 +1,4 @@ +#if sys package smTools; class SMMeasure @@ -11,4 +12,5 @@ class SMMeasure _measure = measureData; notes = []; } -} \ No newline at end of file +} +#end \ No newline at end of file diff --git a/source/smTools/SMNote.hx b/source/smTools/SMNote.hx index f5dd95a..6f2a5bd 100644 --- a/source/smTools/SMNote.hx +++ b/source/smTools/SMNote.hx @@ -1,3 +1,4 @@ +#if sys package smTools; class SMNote @@ -5,4 +6,5 @@ class SMNote public var time:Float; public var data:Int; public var length:Float; -} \ No newline at end of file +} +#end \ No newline at end of file