From fd74689d2c6625c421b3c817077952263fd284f2 Mon Sep 17 00:00:00 2001 From: Nat Quayle Nelson Date: Wed, 5 Jul 2023 07:15:36 -0600 Subject: [PATCH] simplewindow test project --- simplewindow-test/.gitignore | 1 + simplewindow-test/.haxerc | 4 + simplewindow-test/.vscode/extensions.json | 6 ++ simplewindow-test/.vscode/launch.json | 21 +++++ simplewindow-test/.vscode/settings.json | 13 +++ simplewindow-test/.vscode/tasks.json | 13 +++ simplewindow-test/Project.xml | 88 +++++++++++++++++++ .../assets/data/data-goes-here.txt | 0 .../assets/images/images-go-here.txt | 0 .../assets/music/music-goes-here.txt | 0 .../assets/sounds/sounds-go-here.txt | 0 .../haxe_libraries/flixel-addons.hxml | 3 + .../haxe_libraries/flixel-ui.hxml | 3 + simplewindow-test/haxe_libraries/flixel.hxml | 4 + .../haxe_libraries/haxe-strings.hxml | 5 ++ simplewindow-test/haxe_libraries/hscript.hxml | 5 ++ .../haxe_libraries/kiss-flixel.hxml | 10 +++ .../haxe_libraries/kiss-tools.hxml | 4 + simplewindow-test/haxe_libraries/kiss.hxml | 12 +++ simplewindow-test/haxe_libraries/lime.hxml | 6 ++ simplewindow-test/haxe_libraries/openfl.hxml | 5 ++ .../haxe_libraries/tink_core.hxml | 3 + .../haxe_libraries/tink_json.hxml | 4 + .../haxe_libraries/tink_macro.hxml | 4 + .../haxe_libraries/tink_priority.hxml | 3 + .../haxe_libraries/tink_syntaxhub.hxml | 6 ++ .../haxe_libraries/tink_typecrawler.hxml | 4 + simplewindow-test/haxe_libraries/uuid.hxml | 3 + simplewindow-test/hxformat.json | 15 ++++ simplewindow-test/source/AssetPaths.hx | 4 + simplewindow-test/source/Main.hx | 13 +++ simplewindow-test/source/PlayState.kiss | 23 +++++ test.sh | 3 + 33 files changed, 288 insertions(+) create mode 100644 simplewindow-test/.gitignore create mode 100644 simplewindow-test/.haxerc create mode 100644 simplewindow-test/.vscode/extensions.json create mode 100644 simplewindow-test/.vscode/launch.json create mode 100644 simplewindow-test/.vscode/settings.json create mode 100644 simplewindow-test/.vscode/tasks.json create mode 100644 simplewindow-test/Project.xml create mode 100644 simplewindow-test/assets/data/data-goes-here.txt create mode 100644 simplewindow-test/assets/images/images-go-here.txt create mode 100644 simplewindow-test/assets/music/music-goes-here.txt create mode 100644 simplewindow-test/assets/sounds/sounds-go-here.txt create mode 100644 simplewindow-test/haxe_libraries/flixel-addons.hxml create mode 100644 simplewindow-test/haxe_libraries/flixel-ui.hxml create mode 100644 simplewindow-test/haxe_libraries/flixel.hxml create mode 100644 simplewindow-test/haxe_libraries/haxe-strings.hxml create mode 100644 simplewindow-test/haxe_libraries/hscript.hxml create mode 100644 simplewindow-test/haxe_libraries/kiss-flixel.hxml create mode 100644 simplewindow-test/haxe_libraries/kiss-tools.hxml create mode 100644 simplewindow-test/haxe_libraries/kiss.hxml create mode 100644 simplewindow-test/haxe_libraries/lime.hxml create mode 100644 simplewindow-test/haxe_libraries/openfl.hxml create mode 100644 simplewindow-test/haxe_libraries/tink_core.hxml create mode 100644 simplewindow-test/haxe_libraries/tink_json.hxml create mode 100644 simplewindow-test/haxe_libraries/tink_macro.hxml create mode 100644 simplewindow-test/haxe_libraries/tink_priority.hxml create mode 100644 simplewindow-test/haxe_libraries/tink_syntaxhub.hxml create mode 100644 simplewindow-test/haxe_libraries/tink_typecrawler.hxml create mode 100644 simplewindow-test/haxe_libraries/uuid.hxml create mode 100644 simplewindow-test/hxformat.json create mode 100644 simplewindow-test/source/AssetPaths.hx create mode 100644 simplewindow-test/source/Main.hx create mode 100644 simplewindow-test/source/PlayState.kiss create mode 100755 test.sh diff --git a/simplewindow-test/.gitignore b/simplewindow-test/.gitignore new file mode 100644 index 0000000..1fe2d30 --- /dev/null +++ b/simplewindow-test/.gitignore @@ -0,0 +1 @@ +export/ \ No newline at end of file diff --git a/simplewindow-test/.haxerc b/simplewindow-test/.haxerc new file mode 100644 index 0000000..dc3cec2 --- /dev/null +++ b/simplewindow-test/.haxerc @@ -0,0 +1,4 @@ +{ + "version": "4.3.1", + "resolveLibs": "scoped" +} \ No newline at end of file diff --git a/simplewindow-test/.vscode/extensions.json b/simplewindow-test/.vscode/extensions.json new file mode 100644 index 0000000..89e20ed --- /dev/null +++ b/simplewindow-test/.vscode/extensions.json @@ -0,0 +1,6 @@ +{ + "recommendations": [ + "openfl.lime-vscode-extension", + "redhat.vscode-xml" + ] +} diff --git a/simplewindow-test/.vscode/launch.json b/simplewindow-test/.vscode/launch.json new file mode 100644 index 0000000..5e9a7a1 --- /dev/null +++ b/simplewindow-test/.vscode/launch.json @@ -0,0 +1,21 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Build + Debug", + "type": "lime", + "request": "launch" + }, + { + "name": "Debug", + "type": "lime", + "request": "launch", + "preLaunchTask": null + }, + { + "name": "Macro", + "type": "haxe-eval", + "request": "launch" + } + ] +} diff --git a/simplewindow-test/.vscode/settings.json b/simplewindow-test/.vscode/settings.json new file mode 100644 index 0000000..4c1a0e9 --- /dev/null +++ b/simplewindow-test/.vscode/settings.json @@ -0,0 +1,13 @@ +{ + "search.exclude": { + "export/**/*.hx": true + }, + "[haxe]": { + "editor.formatOnSave": true, + "editor.formatOnPaste": true, + "editor.codeActionsOnSave": { + "source.sortImports": true + } + }, + "haxe.enableExtendedIndentation": true +} \ No newline at end of file diff --git a/simplewindow-test/.vscode/tasks.json b/simplewindow-test/.vscode/tasks.json new file mode 100644 index 0000000..16a7764 --- /dev/null +++ b/simplewindow-test/.vscode/tasks.json @@ -0,0 +1,13 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "type": "lime", + "command": "test", + "group": { + "kind": "build", + "isDefault": true + } + } + ] +} diff --git a/simplewindow-test/Project.xml b/simplewindow-test/Project.xml new file mode 100644 index 0000000..33ada53 --- /dev/null +++ b/simplewindow-test/Project.xml @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/simplewindow-test/assets/data/data-goes-here.txt b/simplewindow-test/assets/data/data-goes-here.txt new file mode 100644 index 0000000..e69de29 diff --git a/simplewindow-test/assets/images/images-go-here.txt b/simplewindow-test/assets/images/images-go-here.txt new file mode 100644 index 0000000..e69de29 diff --git a/simplewindow-test/assets/music/music-goes-here.txt b/simplewindow-test/assets/music/music-goes-here.txt new file mode 100644 index 0000000..e69de29 diff --git a/simplewindow-test/assets/sounds/sounds-go-here.txt b/simplewindow-test/assets/sounds/sounds-go-here.txt new file mode 100644 index 0000000..e69de29 diff --git a/simplewindow-test/haxe_libraries/flixel-addons.hxml b/simplewindow-test/haxe_libraries/flixel-addons.hxml new file mode 100644 index 0000000..065c4c3 --- /dev/null +++ b/simplewindow-test/haxe_libraries/flixel-addons.hxml @@ -0,0 +1,3 @@ +# @install: lix --silent download "haxelib:/flixel-addons#3.1.0" into flixel-addons/3.1.0/haxelib +-cp ${HAXE_LIBCACHE}/flixel-addons/3.1.0/haxelib/ +-D flixel-addons=3.1.0 \ No newline at end of file diff --git a/simplewindow-test/haxe_libraries/flixel-ui.hxml b/simplewindow-test/haxe_libraries/flixel-ui.hxml new file mode 100644 index 0000000..9dafa52 --- /dev/null +++ b/simplewindow-test/haxe_libraries/flixel-ui.hxml @@ -0,0 +1,3 @@ +# @install: lix --silent download "haxelib:/flixel-ui#2.5.0" into flixel-ui/2.5.0/haxelib +-cp ${HAXE_LIBCACHE}/flixel-ui/2.5.0/haxelib/ +-D flixel-ui=2.5.0 \ No newline at end of file diff --git a/simplewindow-test/haxe_libraries/flixel.hxml b/simplewindow-test/haxe_libraries/flixel.hxml new file mode 100644 index 0000000..331fb0e --- /dev/null +++ b/simplewindow-test/haxe_libraries/flixel.hxml @@ -0,0 +1,4 @@ +# @install: lix --silent download "haxelib:/flixel#5.3.0" into flixel/5.3.0/haxelib +# @run: haxelib run-dir flixel "${HAXE_LIBCACHE}/flixel/5.3.0/haxelib" +-cp ${HAXE_LIBCACHE}/flixel/5.3.0/haxelib/ +-D flixel=5.3.0 \ No newline at end of file diff --git a/simplewindow-test/haxe_libraries/haxe-strings.hxml b/simplewindow-test/haxe_libraries/haxe-strings.hxml new file mode 100644 index 0000000..59cd626 --- /dev/null +++ b/simplewindow-test/haxe_libraries/haxe-strings.hxml @@ -0,0 +1,5 @@ +# @install: lix --silent download "haxelib:/haxe-strings#7.0.3" into haxe-strings/7.0.3/haxelib +-cp ${HAXE_LIBCACHE}/haxe-strings/7.0.3/haxelib/src/ +-D haxe-strings=7.0.3 +--macro hx.strings.internal.Macros.addDefines() +--macro hx.strings.internal.Macros.configureNullSafety() diff --git a/simplewindow-test/haxe_libraries/hscript.hxml b/simplewindow-test/haxe_libraries/hscript.hxml new file mode 100644 index 0000000..106e1f8 --- /dev/null +++ b/simplewindow-test/haxe_libraries/hscript.hxml @@ -0,0 +1,5 @@ +# @install: lix --silent download "haxelib:/hscript#2.5.0" into hscript/2.5.0/haxelib +# @run: haxelib run-dir hscript "${HAXE_LIBCACHE}/hscript/2.5.0/haxelib" +-cp ${HAXE_LIBCACHE}/hscript/2.5.0/haxelib/ +-D hscript=2.5.0 +--macro keep('IntIterator') \ No newline at end of file diff --git a/simplewindow-test/haxe_libraries/kiss-flixel.hxml b/simplewindow-test/haxe_libraries/kiss-flixel.hxml new file mode 100644 index 0000000..4e6881d --- /dev/null +++ b/simplewindow-test/haxe_libraries/kiss-flixel.hxml @@ -0,0 +1,10 @@ +-lib kiss +-lib kiss-tools +-lib flixel +-lib flixel-addons +-lib flixel-ui +-lib lime +-lib openfl +-cp ${SCOPE_DIR}/..//src/ +-D kiss-flixel=0.0.0 +--macro Sys.println("haxe_libraries/kiss-flixel.hxml:9: [Warning] Using dev version of library kiss-flixel") \ No newline at end of file diff --git a/simplewindow-test/haxe_libraries/kiss-tools.hxml b/simplewindow-test/haxe_libraries/kiss-tools.hxml new file mode 100644 index 0000000..b5922d6 --- /dev/null +++ b/simplewindow-test/haxe_libraries/kiss-tools.hxml @@ -0,0 +1,4 @@ +# @install: lix --silent download "gh://github.com/kiss-lang/kiss-tools#a01cc6b76a2dfd7dcb72ee201fec1064ee050795" into kiss-tools/0.0.0/github/a01cc6b76a2dfd7dcb72ee201fec1064ee050795 +-lib kiss +-cp ${HAXE_LIBCACHE}/kiss-tools/0.0.0/github/a01cc6b76a2dfd7dcb72ee201fec1064ee050795/src/ +-D kiss-tools=0.0.0 \ No newline at end of file diff --git a/simplewindow-test/haxe_libraries/kiss.hxml b/simplewindow-test/haxe_libraries/kiss.hxml new file mode 100644 index 0000000..dcd328c --- /dev/null +++ b/simplewindow-test/haxe_libraries/kiss.hxml @@ -0,0 +1,12 @@ +# @install: lix --silent download "gh://github.com/kiss-lang/kiss#9e916a482393c4aa45dfce0e63b4c53403d66238" into kiss/0.0.1/github/9e916a482393c4aa45dfce0e63b4c53403d66238 +# @run: haxelib run-dir kiss "${HAXE_LIBCACHE}/kiss/0.0.1/github/9e916a482393c4aa45dfce0e63b4c53403d66238" +-lib haxe-strings +-lib hscript +-lib tink_json +-lib tink_macro +-lib tink_syntaxhub +-lib uuid +-cp ${HAXE_LIBCACHE}/kiss/0.0.1/github/9e916a482393c4aa45dfce0e63b4c53403d66238/src +-D kiss=0.0.1 +-w -WUnusedPattern +--macro kiss.KissFrontend.use() \ No newline at end of file diff --git a/simplewindow-test/haxe_libraries/lime.hxml b/simplewindow-test/haxe_libraries/lime.hxml new file mode 100644 index 0000000..8789e43 --- /dev/null +++ b/simplewindow-test/haxe_libraries/lime.hxml @@ -0,0 +1,6 @@ +# @install: lix --silent download "haxelib:/lime#8.0.1" into lime/8.0.1/haxelib +# @run: haxelib run-dir lime "${HAXE_LIBCACHE}/lime/8.0.1/haxelib" +-cp ${HAXE_LIBCACHE}/lime/8.0.1/haxelib/src +-D lime=8.0.1 +--macro lime._internal.macros.DefineMacro.run() +-lib ndll:${HAXE_LIBCACHE}/lime/8.0.1/haxelib/ndll/ \ No newline at end of file diff --git a/simplewindow-test/haxe_libraries/openfl.hxml b/simplewindow-test/haxe_libraries/openfl.hxml new file mode 100644 index 0000000..7676fb1 --- /dev/null +++ b/simplewindow-test/haxe_libraries/openfl.hxml @@ -0,0 +1,5 @@ +# @install: lix --silent download "haxelib:/openfl#9.2.1" into openfl/9.2.1/haxelib +# @run: haxelib run-dir openfl "${HAXE_LIBCACHE}/openfl/9.2.1/haxelib" +-cp ${HAXE_LIBCACHE}/openfl/9.2.1/haxelib/src +-D openfl=9.2.1 +--macro openfl.utils._internal.ExtraParamsMacro.include() \ No newline at end of file diff --git a/simplewindow-test/haxe_libraries/tink_core.hxml b/simplewindow-test/haxe_libraries/tink_core.hxml new file mode 100644 index 0000000..37a0d96 --- /dev/null +++ b/simplewindow-test/haxe_libraries/tink_core.hxml @@ -0,0 +1,3 @@ +# @install: lix --silent download "haxelib:/tink_core#2.1.0" into tink_core/2.1.0/haxelib +-cp ${HAXE_LIBCACHE}/tink_core/2.1.0/haxelib/src +-D tink_core=2.1.0 \ No newline at end of file diff --git a/simplewindow-test/haxe_libraries/tink_json.hxml b/simplewindow-test/haxe_libraries/tink_json.hxml new file mode 100644 index 0000000..b167de7 --- /dev/null +++ b/simplewindow-test/haxe_libraries/tink_json.hxml @@ -0,0 +1,4 @@ +# @install: lix --silent download "haxelib:/tink_json#0.11.0" into tink_json/0.11.0/haxelib +-lib tink_typecrawler +-cp ${HAXE_LIBCACHE}/tink_json/0.11.0/haxelib/src +-D tink_json=0.11.0 \ No newline at end of file diff --git a/simplewindow-test/haxe_libraries/tink_macro.hxml b/simplewindow-test/haxe_libraries/tink_macro.hxml new file mode 100644 index 0000000..a9e19b1 --- /dev/null +++ b/simplewindow-test/haxe_libraries/tink_macro.hxml @@ -0,0 +1,4 @@ +# @install: lix --silent download "haxelib:/tink_macro#1.0.1" into tink_macro/1.0.1/haxelib +-lib tink_core +-cp ${HAXE_LIBCACHE}/tink_macro/1.0.1/haxelib/src +-D tink_macro=1.0.1 \ No newline at end of file diff --git a/simplewindow-test/haxe_libraries/tink_priority.hxml b/simplewindow-test/haxe_libraries/tink_priority.hxml new file mode 100644 index 0000000..98cfa80 --- /dev/null +++ b/simplewindow-test/haxe_libraries/tink_priority.hxml @@ -0,0 +1,3 @@ +-D tink_priority=0.1.3 +# @install: lix --silent download "gh://github.com/haxetink/tink_priority#ea736d31dc788aae703a2aa415c25d5b80d0e7d1" into tink_priority/0.1.3/github/ea736d31dc788aae703a2aa415c25d5b80d0e7d1 +-cp ${HAXE_LIBCACHE}/tink_priority/0.1.3/github/ea736d31dc788aae703a2aa415c25d5b80d0e7d1/src diff --git a/simplewindow-test/haxe_libraries/tink_syntaxhub.hxml b/simplewindow-test/haxe_libraries/tink_syntaxhub.hxml new file mode 100644 index 0000000..e3c7d2b --- /dev/null +++ b/simplewindow-test/haxe_libraries/tink_syntaxhub.hxml @@ -0,0 +1,6 @@ +# @install: lix --silent download "gh://github.com/haxetink/tink_syntaxhub#b6ea4966bbdee4d176ac8dd5d2d8ae3b362b2f86" into tink_syntaxhub/0.6.0/github/b6ea4966bbdee4d176ac8dd5d2d8ae3b362b2f86 +-lib tink_macro +-lib tink_priority +-cp ${HAXE_LIBCACHE}/tink_syntaxhub/0.6.0/github/b6ea4966bbdee4d176ac8dd5d2d8ae3b362b2f86/src +-D tink_syntaxhub=0.6.0 +--macro tink.SyntaxHub.use() \ No newline at end of file diff --git a/simplewindow-test/haxe_libraries/tink_typecrawler.hxml b/simplewindow-test/haxe_libraries/tink_typecrawler.hxml new file mode 100644 index 0000000..373aee9 --- /dev/null +++ b/simplewindow-test/haxe_libraries/tink_typecrawler.hxml @@ -0,0 +1,4 @@ +# @install: lix --silent download "haxelib:/tink_typecrawler#0.7.0" into tink_typecrawler/0.7.0/haxelib +-lib tink_macro +-cp ${HAXE_LIBCACHE}/tink_typecrawler/0.7.0/haxelib/src +-D tink_typecrawler=0.7.0 \ No newline at end of file diff --git a/simplewindow-test/haxe_libraries/uuid.hxml b/simplewindow-test/haxe_libraries/uuid.hxml new file mode 100644 index 0000000..ff1269b --- /dev/null +++ b/simplewindow-test/haxe_libraries/uuid.hxml @@ -0,0 +1,3 @@ +# @install: lix --silent download "haxelib:/uuid#2.4.1" into uuid/2.4.1/haxelib +-cp ${HAXE_LIBCACHE}/uuid/2.4.1/haxelib/src +-D uuid=2.4.1 \ No newline at end of file diff --git a/simplewindow-test/hxformat.json b/simplewindow-test/hxformat.json new file mode 100644 index 0000000..66cb386 --- /dev/null +++ b/simplewindow-test/hxformat.json @@ -0,0 +1,15 @@ +{ + "lineEnds": { + "leftCurly": "both", + "rightCurly": "both", + "objectLiteralCurly": { + "leftCurly": "after" + } + }, + "sameLine": { + "ifElse": "next", + "doWhile": "next", + "tryBody": "next", + "tryCatch": "next" + } +} diff --git a/simplewindow-test/source/AssetPaths.hx b/simplewindow-test/source/AssetPaths.hx new file mode 100644 index 0000000..db7ef44 --- /dev/null +++ b/simplewindow-test/source/AssetPaths.hx @@ -0,0 +1,4 @@ +package; + +@:build(flixel.system.FlxAssets.buildFileReferences("assets", true)) +class AssetPaths {} diff --git a/simplewindow-test/source/Main.hx b/simplewindow-test/source/Main.hx new file mode 100644 index 0000000..efa0e2d --- /dev/null +++ b/simplewindow-test/source/Main.hx @@ -0,0 +1,13 @@ +package; + +import flixel.FlxGame; +import openfl.display.Sprite; + +class Main extends Sprite +{ + public function new() + { + super(); + addChild(new FlxGame(0, 0, PlayState)); + } +} diff --git a/simplewindow-test/source/PlayState.kiss b/simplewindow-test/source/PlayState.kiss new file mode 100644 index 0000000..ce06a6b --- /dev/null +++ b/simplewindow-test/source/PlayState.kiss @@ -0,0 +1,23 @@ +(import flixel.FlxState) +(import kiss_flixel.SimpleWindow) +(extends FlxState) + +(method &override :Void create [] + (super.create) + (showMenu) + ) + +(method showMenu [] + (SimpleWindow.promptForChoice "Testing SimpleWindow" ["Vertical" "Menu" "Quit"] + ->:Void choice + (case choice + ("Vertical" + null) + ("Menu" + null) + ("Quit" + (Sys.exit 0)) + (never otherwise)))) + +(method &override :Void update [:Float elapsed] + (super.update elapsed)) \ No newline at end of file diff --git a/test.sh b/test.sh new file mode 100755 index 0000000..fdd38dd --- /dev/null +++ b/test.sh @@ -0,0 +1,3 @@ +#! /bin/bash + +(cd simplewindow-test && lix dev kiss-flixel ../ && lix run lime test cpp -debug) \ No newline at end of file