From 8e3b9e2830a31e61ea27dd0f32a414b78021eb77 Mon Sep 17 00:00:00 2001 From: shmyga Date: Wed, 25 Mar 2020 16:24:53 +0300 Subject: [PATCH] [server] add module --- gulpfile.js | 23 ++++++-- package.json | 2 +- src/{ => app}/haxe/ru/m/AbstractEnumTools.hx | 0 src/{ => app}/haxe/ru/m/Device.hx | 0 .../haxe/ru/m/ModernFileReference.hx | 0 src/{ => app}/haxe/ru/m/data/DataStorage.hx | 0 src/{ => app}/haxe/ru/m/data/IDataSource.hx | 0 src/{ => app}/haxe/ru/m/draw/DrawPath.hx | 0 src/{ => app}/haxe/ru/m/event/GestureEvent.hx | 0 .../haxe/ru/m/event/GestureManager.hx | 0 .../haxe/ru/m/event/ZoomGestureEvent.hx | 0 src/{ => app}/haxe/ru/m/pixabay/PixabayApi.hx | 0 src/{ => app}/haxe/ru/m/puzzlez/FileUtil.hx | 0 src/{ => app}/haxe/ru/m/puzzlez/ImageUtil.hx | 0 src/{ => app}/haxe/ru/m/puzzlez/PuzzlezApp.hx | 0 .../haxe/ru/m/puzzlez/PuzzlezTheme.hx | 0 .../haxe/ru/m/puzzlez/render/Background.hx | 0 .../haxe/ru/m/puzzlez/render/CompleteView.hx | 0 .../haxe/ru/m/puzzlez/render/IRender.hx | 0 .../ru/m/puzzlez/render/ImagePartBuilder.hx | 0 .../haxe/ru/m/puzzlez/render/PartView.hx | 0 .../haxe/ru/m/puzzlez/render/ProgressView.hx | 0 .../haxe/ru/m/puzzlez/render/Render.hx | 0 .../haxe/ru/m/puzzlez/render/RenderManager.hx | 0 .../haxe/ru/m/puzzlez/render/RenderUtil.hx | 0 .../m/puzzlez/render/part/BasePartBuilder.hx | 0 .../puzzlez/render/part/ClassicPartBuilder.hx | 0 .../ru/m/puzzlez/render/part/IPartBuilder.hx | 0 .../haxe/ru/m/puzzlez/render/part/PartMask.hx | 0 .../puzzlez/render/part/SquarePartBuilder.hx | 0 .../haxe/ru/m/puzzlez/source/AssetSource.hx | 0 .../haxe/ru/m/puzzlez/source/FileSource.hx | 0 .../haxe/ru/m/puzzlez/source/IImageSource.hx | 0 .../haxe/ru/m/puzzlez/source/PixabaySource.hx | 0 .../haxe/ru/m/puzzlez/storage/CacheStorage.hx | 0 .../haxe/ru/m/puzzlez/storage/FileStorage.hx | 0 .../haxe/ru/m/puzzlez/storage/GameStorage.hx | 0 .../haxe/ru/m/puzzlez/storage/ImageStorage.hx | 0 .../ru/m/puzzlez/storage/SettingsStorage.hx | 0 .../haxe/ru/m/puzzlez/view/GameFrame.hx | 0 .../haxe/ru/m/puzzlez/view/GameFrame.yaml | 0 .../haxe/ru/m/puzzlez/view/ImageListFrame.hx | 0 .../ru/m/puzzlez/view/ImageListFrame.yaml | 0 .../haxe/ru/m/puzzlez/view/LoadingWrapper.hx | 0 .../haxe/ru/m/puzzlez/view/PresetFrame.hx | 0 .../haxe/ru/m/puzzlez/view/PresetFrame.yaml | 0 .../haxe/ru/m/puzzlez/view/PuzzlezAppView.hx | 0 .../ru/m/puzzlez/view/PuzzlezAppView.yaml | 0 .../haxe/ru/m/puzzlez/view/StartFrame.hx | 0 .../haxe/ru/m/puzzlez/view/StartFrame.yaml | 0 .../ru/m/puzzlez/view/common/ImageDataList.hx | 0 .../m/puzzlez/view/common/ImageDataList.yaml | 0 .../ru/m/puzzlez/view/common/PaginatorView.hx | 0 .../ru/m/puzzlez/view/common/PresetView.hx | 0 .../m/puzzlez/view/common/PuzzleImageView.hx | 0 .../puzzlez/view/common/PuzzleImageView.yaml | 0 .../m/puzzlez/view/popup/BackgroundPopup.hx | 0 .../m/puzzlez/view/popup/BackgroundPopup.yaml | 0 .../ru/m/puzzlez/view/popup/PreviewPopup.hx | 0 .../ru/m/puzzlez/view/popup/PreviewPopup.yaml | 0 src/{ => app}/haxe/ru/m/skin/ButtonSVGSkin.hx | 0 src/{ => app}/haxe/ru/m/update/Updater.hx | 0 src/{ => app}/haxe/ru/m/update/Version.hx | 0 src/{ => app}/resources/fonts/GamePlayed.eot | Bin src/{ => app}/resources/fonts/GamePlayed.svg | Bin src/{ => app}/resources/fonts/GamePlayed.ttf | Bin src/{ => app}/resources/fonts/GamePlayed.woff | Bin src/{ => app}/resources/icon.png | Bin .../icon/arrow-alt-circle-left-solid.svg | 0 .../icon/arrow-alt-circle-right-solid.svg | 0 src/{ => app}/resources/icon/bars-solid.svg | 0 src/{ => app}/resources/icon/cog-solid.svg | 0 .../resources/icon/compress-solid.svg | 0 src/{ => app}/resources/icon/expand-solid.svg | 0 .../resources/icon/image-polaroid.svg | 0 src/{ => app}/resources/icon/image-solid.svg | 0 .../resources/icon/lock-alt-solid.svg | 0 .../resources/icon/times-circle-solid.svg | 0 .../resources/icon/window-close-solid.svg | 0 .../resources/icon/window-restore-solid.svg | 0 src/{ => app}/resources/image/raccoon.jpg | Bin .../texture/45-degree-fabric-light.png | Bin .../resources/texture/beige-paper.png | Bin .../resources/texture/brick-wall.png | Bin .../resources/texture/pool-table.png | Bin .../haxe/ru/m/puzzlez/core/BoundType.hx | 0 .../haxe/ru/m/puzzlez/core/Game.hx | 0 .../haxe/ru/m/puzzlez/core/GameEvent.hx | 0 .../haxe/ru/m/puzzlez/core/GamePreset.hx | 0 .../haxe/ru/m/puzzlez/core/GameState.hx | 0 .../haxe/ru/m/puzzlez/core/GameUtil.hx | 0 .../haxe/ru/m/puzzlez/core/Grid.hx | 0 .../haxe/ru/m/puzzlez/core/IGame.hx | 0 src/{ => common}/haxe/ru/m/puzzlez/core/Id.hx | 0 .../haxe/ru/m/puzzlez/core/ImageListSource.hx | 0 .../haxe/ru/m/puzzlez/core/Part.hx | 0 .../haxe/ru/m/puzzlez/core/PartLocation.hx | 0 .../haxe/ru/m/puzzlez/core/Side.hx | 0 src/server/haxe/ru/m/puzzlez/PuzzlezServer.hx | 49 ++++++++++++++++++ 99 files changed, 70 insertions(+), 4 deletions(-) rename src/{ => app}/haxe/ru/m/AbstractEnumTools.hx (100%) rename src/{ => app}/haxe/ru/m/Device.hx (100%) rename src/{ => app}/haxe/ru/m/ModernFileReference.hx (100%) rename src/{ => app}/haxe/ru/m/data/DataStorage.hx (100%) rename src/{ => app}/haxe/ru/m/data/IDataSource.hx (100%) rename src/{ => app}/haxe/ru/m/draw/DrawPath.hx (100%) rename src/{ => app}/haxe/ru/m/event/GestureEvent.hx (100%) rename src/{ => app}/haxe/ru/m/event/GestureManager.hx (100%) rename src/{ => app}/haxe/ru/m/event/ZoomGestureEvent.hx (100%) rename src/{ => app}/haxe/ru/m/pixabay/PixabayApi.hx (100%) rename src/{ => app}/haxe/ru/m/puzzlez/FileUtil.hx (100%) rename src/{ => app}/haxe/ru/m/puzzlez/ImageUtil.hx (100%) rename src/{ => app}/haxe/ru/m/puzzlez/PuzzlezApp.hx (100%) rename src/{ => app}/haxe/ru/m/puzzlez/PuzzlezTheme.hx (100%) rename src/{ => app}/haxe/ru/m/puzzlez/render/Background.hx (100%) rename src/{ => app}/haxe/ru/m/puzzlez/render/CompleteView.hx (100%) rename src/{ => app}/haxe/ru/m/puzzlez/render/IRender.hx (100%) rename src/{ => app}/haxe/ru/m/puzzlez/render/ImagePartBuilder.hx (100%) rename src/{ => app}/haxe/ru/m/puzzlez/render/PartView.hx (100%) rename src/{ => app}/haxe/ru/m/puzzlez/render/ProgressView.hx (100%) rename src/{ => app}/haxe/ru/m/puzzlez/render/Render.hx (100%) rename src/{ => app}/haxe/ru/m/puzzlez/render/RenderManager.hx (100%) rename src/{ => app}/haxe/ru/m/puzzlez/render/RenderUtil.hx (100%) rename src/{ => app}/haxe/ru/m/puzzlez/render/part/BasePartBuilder.hx (100%) rename src/{ => app}/haxe/ru/m/puzzlez/render/part/ClassicPartBuilder.hx (100%) rename src/{ => app}/haxe/ru/m/puzzlez/render/part/IPartBuilder.hx (100%) rename src/{ => app}/haxe/ru/m/puzzlez/render/part/PartMask.hx (100%) rename src/{ => app}/haxe/ru/m/puzzlez/render/part/SquarePartBuilder.hx (100%) rename src/{ => app}/haxe/ru/m/puzzlez/source/AssetSource.hx (100%) rename src/{ => app}/haxe/ru/m/puzzlez/source/FileSource.hx (100%) rename src/{ => app}/haxe/ru/m/puzzlez/source/IImageSource.hx (100%) rename src/{ => app}/haxe/ru/m/puzzlez/source/PixabaySource.hx (100%) rename src/{ => app}/haxe/ru/m/puzzlez/storage/CacheStorage.hx (100%) rename src/{ => app}/haxe/ru/m/puzzlez/storage/FileStorage.hx (100%) rename src/{ => app}/haxe/ru/m/puzzlez/storage/GameStorage.hx (100%) rename src/{ => app}/haxe/ru/m/puzzlez/storage/ImageStorage.hx (100%) rename src/{ => app}/haxe/ru/m/puzzlez/storage/SettingsStorage.hx (100%) rename src/{ => app}/haxe/ru/m/puzzlez/view/GameFrame.hx (100%) rename src/{ => app}/haxe/ru/m/puzzlez/view/GameFrame.yaml (100%) rename src/{ => app}/haxe/ru/m/puzzlez/view/ImageListFrame.hx (100%) rename src/{ => app}/haxe/ru/m/puzzlez/view/ImageListFrame.yaml (100%) rename src/{ => app}/haxe/ru/m/puzzlez/view/LoadingWrapper.hx (100%) rename src/{ => app}/haxe/ru/m/puzzlez/view/PresetFrame.hx (100%) rename src/{ => app}/haxe/ru/m/puzzlez/view/PresetFrame.yaml (100%) rename src/{ => app}/haxe/ru/m/puzzlez/view/PuzzlezAppView.hx (100%) rename src/{ => app}/haxe/ru/m/puzzlez/view/PuzzlezAppView.yaml (100%) rename src/{ => app}/haxe/ru/m/puzzlez/view/StartFrame.hx (100%) rename src/{ => app}/haxe/ru/m/puzzlez/view/StartFrame.yaml (100%) rename src/{ => app}/haxe/ru/m/puzzlez/view/common/ImageDataList.hx (100%) rename src/{ => app}/haxe/ru/m/puzzlez/view/common/ImageDataList.yaml (100%) rename src/{ => app}/haxe/ru/m/puzzlez/view/common/PaginatorView.hx (100%) rename src/{ => app}/haxe/ru/m/puzzlez/view/common/PresetView.hx (100%) rename src/{ => app}/haxe/ru/m/puzzlez/view/common/PuzzleImageView.hx (100%) rename src/{ => app}/haxe/ru/m/puzzlez/view/common/PuzzleImageView.yaml (100%) rename src/{ => app}/haxe/ru/m/puzzlez/view/popup/BackgroundPopup.hx (100%) rename src/{ => app}/haxe/ru/m/puzzlez/view/popup/BackgroundPopup.yaml (100%) rename src/{ => app}/haxe/ru/m/puzzlez/view/popup/PreviewPopup.hx (100%) rename src/{ => app}/haxe/ru/m/puzzlez/view/popup/PreviewPopup.yaml (100%) rename src/{ => app}/haxe/ru/m/skin/ButtonSVGSkin.hx (100%) rename src/{ => app}/haxe/ru/m/update/Updater.hx (100%) rename src/{ => app}/haxe/ru/m/update/Version.hx (100%) rename src/{ => app}/resources/fonts/GamePlayed.eot (100%) rename src/{ => app}/resources/fonts/GamePlayed.svg (100%) rename src/{ => app}/resources/fonts/GamePlayed.ttf (100%) rename src/{ => app}/resources/fonts/GamePlayed.woff (100%) rename src/{ => app}/resources/icon.png (100%) rename src/{ => app}/resources/icon/arrow-alt-circle-left-solid.svg (100%) rename src/{ => app}/resources/icon/arrow-alt-circle-right-solid.svg (100%) rename src/{ => app}/resources/icon/bars-solid.svg (100%) rename src/{ => app}/resources/icon/cog-solid.svg (100%) rename src/{ => app}/resources/icon/compress-solid.svg (100%) rename src/{ => app}/resources/icon/expand-solid.svg (100%) rename src/{ => app}/resources/icon/image-polaroid.svg (100%) rename src/{ => app}/resources/icon/image-solid.svg (100%) rename src/{ => app}/resources/icon/lock-alt-solid.svg (100%) rename src/{ => app}/resources/icon/times-circle-solid.svg (100%) rename src/{ => app}/resources/icon/window-close-solid.svg (100%) rename src/{ => app}/resources/icon/window-restore-solid.svg (100%) rename src/{ => app}/resources/image/raccoon.jpg (100%) rename src/{ => app}/resources/texture/45-degree-fabric-light.png (100%) rename src/{ => app}/resources/texture/beige-paper.png (100%) rename src/{ => app}/resources/texture/brick-wall.png (100%) rename src/{ => app}/resources/texture/pool-table.png (100%) rename src/{ => common}/haxe/ru/m/puzzlez/core/BoundType.hx (100%) rename src/{ => common}/haxe/ru/m/puzzlez/core/Game.hx (100%) rename src/{ => common}/haxe/ru/m/puzzlez/core/GameEvent.hx (100%) rename src/{ => common}/haxe/ru/m/puzzlez/core/GamePreset.hx (100%) rename src/{ => common}/haxe/ru/m/puzzlez/core/GameState.hx (100%) rename src/{ => common}/haxe/ru/m/puzzlez/core/GameUtil.hx (100%) rename src/{ => common}/haxe/ru/m/puzzlez/core/Grid.hx (100%) rename src/{ => common}/haxe/ru/m/puzzlez/core/IGame.hx (100%) rename src/{ => common}/haxe/ru/m/puzzlez/core/Id.hx (100%) rename src/{ => common}/haxe/ru/m/puzzlez/core/ImageListSource.hx (100%) rename src/{ => common}/haxe/ru/m/puzzlez/core/Part.hx (100%) rename src/{ => common}/haxe/ru/m/puzzlez/core/PartLocation.hx (100%) rename src/{ => common}/haxe/ru/m/puzzlez/core/Side.hx (100%) create mode 100644 src/server/haxe/ru/m/puzzlez/PuzzlezServer.hx diff --git a/gulpfile.js b/gulpfile.js index 9be7f23..d40f156 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -27,7 +27,7 @@ const config = new Project.Config({ meta: { title: 'Puzzle\'z', filename: 'puzzlez', - icon: 'src/resources/icon.png', + icon: 'src/app/resources/icon.png', pack: 'ru.m.puzzlez', author: 'shmyga ', company: 'MegaLoMania', @@ -52,14 +52,15 @@ const app = new Project( config.branch({ name: 'app', sources: [ - 'src/haxe', + 'src/common/haxe', + 'src/app/haxe', ], android: [{ path: 'dependencies/android', extensions: ['ru.m.android.FileUtil'], }], assets: [ - 'src/resources', + 'src/app/resources', ], main: 'ru.m.puzzlez.PuzzlezApp', meta: { @@ -69,6 +70,22 @@ const app = new Project( }), ).bind(module, gulp); +const server = new Project( + Project.BuildSystem.HAXE, + [ + Project.Platform.NEKO, + Project.Platform.CPP, + ], + config.branch({ + name: 'server', + sources: [ + 'src/common/haxe', + 'src/server/haxe', + ], + main: 'ru.m.puzzlez.PuzzlezServer', + }) +).bind(module, gulp); + module.exports.publish = publish(packageInfo.name, packageInfo.version, Config.PublishDir, Config.PublishUrl); const defaultSeries = [ diff --git a/package.json b/package.json index 42d98c6..3725b88 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "gulp-add": "0.0.2", "gulp-clean": "^0.4.0", "gulp-cli": "^2.2.0", - "gulp-haxetool": "0.1.6", + "gulp-haxetool": "0.1.7", "yargs": "^13.2.4" }, "haxeDependencies": { diff --git a/src/haxe/ru/m/AbstractEnumTools.hx b/src/app/haxe/ru/m/AbstractEnumTools.hx similarity index 100% rename from src/haxe/ru/m/AbstractEnumTools.hx rename to src/app/haxe/ru/m/AbstractEnumTools.hx diff --git a/src/haxe/ru/m/Device.hx b/src/app/haxe/ru/m/Device.hx similarity index 100% rename from src/haxe/ru/m/Device.hx rename to src/app/haxe/ru/m/Device.hx diff --git a/src/haxe/ru/m/ModernFileReference.hx b/src/app/haxe/ru/m/ModernFileReference.hx similarity index 100% rename from src/haxe/ru/m/ModernFileReference.hx rename to src/app/haxe/ru/m/ModernFileReference.hx diff --git a/src/haxe/ru/m/data/DataStorage.hx b/src/app/haxe/ru/m/data/DataStorage.hx similarity index 100% rename from src/haxe/ru/m/data/DataStorage.hx rename to src/app/haxe/ru/m/data/DataStorage.hx diff --git a/src/haxe/ru/m/data/IDataSource.hx b/src/app/haxe/ru/m/data/IDataSource.hx similarity index 100% rename from src/haxe/ru/m/data/IDataSource.hx rename to src/app/haxe/ru/m/data/IDataSource.hx diff --git a/src/haxe/ru/m/draw/DrawPath.hx b/src/app/haxe/ru/m/draw/DrawPath.hx similarity index 100% rename from src/haxe/ru/m/draw/DrawPath.hx rename to src/app/haxe/ru/m/draw/DrawPath.hx diff --git a/src/haxe/ru/m/event/GestureEvent.hx b/src/app/haxe/ru/m/event/GestureEvent.hx similarity index 100% rename from src/haxe/ru/m/event/GestureEvent.hx rename to src/app/haxe/ru/m/event/GestureEvent.hx diff --git a/src/haxe/ru/m/event/GestureManager.hx b/src/app/haxe/ru/m/event/GestureManager.hx similarity index 100% rename from src/haxe/ru/m/event/GestureManager.hx rename to src/app/haxe/ru/m/event/GestureManager.hx diff --git a/src/haxe/ru/m/event/ZoomGestureEvent.hx b/src/app/haxe/ru/m/event/ZoomGestureEvent.hx similarity index 100% rename from src/haxe/ru/m/event/ZoomGestureEvent.hx rename to src/app/haxe/ru/m/event/ZoomGestureEvent.hx diff --git a/src/haxe/ru/m/pixabay/PixabayApi.hx b/src/app/haxe/ru/m/pixabay/PixabayApi.hx similarity index 100% rename from src/haxe/ru/m/pixabay/PixabayApi.hx rename to src/app/haxe/ru/m/pixabay/PixabayApi.hx diff --git a/src/haxe/ru/m/puzzlez/FileUtil.hx b/src/app/haxe/ru/m/puzzlez/FileUtil.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/FileUtil.hx rename to src/app/haxe/ru/m/puzzlez/FileUtil.hx diff --git a/src/haxe/ru/m/puzzlez/ImageUtil.hx b/src/app/haxe/ru/m/puzzlez/ImageUtil.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/ImageUtil.hx rename to src/app/haxe/ru/m/puzzlez/ImageUtil.hx diff --git a/src/haxe/ru/m/puzzlez/PuzzlezApp.hx b/src/app/haxe/ru/m/puzzlez/PuzzlezApp.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/PuzzlezApp.hx rename to src/app/haxe/ru/m/puzzlez/PuzzlezApp.hx diff --git a/src/haxe/ru/m/puzzlez/PuzzlezTheme.hx b/src/app/haxe/ru/m/puzzlez/PuzzlezTheme.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/PuzzlezTheme.hx rename to src/app/haxe/ru/m/puzzlez/PuzzlezTheme.hx diff --git a/src/haxe/ru/m/puzzlez/render/Background.hx b/src/app/haxe/ru/m/puzzlez/render/Background.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/render/Background.hx rename to src/app/haxe/ru/m/puzzlez/render/Background.hx diff --git a/src/haxe/ru/m/puzzlez/render/CompleteView.hx b/src/app/haxe/ru/m/puzzlez/render/CompleteView.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/render/CompleteView.hx rename to src/app/haxe/ru/m/puzzlez/render/CompleteView.hx diff --git a/src/haxe/ru/m/puzzlez/render/IRender.hx b/src/app/haxe/ru/m/puzzlez/render/IRender.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/render/IRender.hx rename to src/app/haxe/ru/m/puzzlez/render/IRender.hx diff --git a/src/haxe/ru/m/puzzlez/render/ImagePartBuilder.hx b/src/app/haxe/ru/m/puzzlez/render/ImagePartBuilder.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/render/ImagePartBuilder.hx rename to src/app/haxe/ru/m/puzzlez/render/ImagePartBuilder.hx diff --git a/src/haxe/ru/m/puzzlez/render/PartView.hx b/src/app/haxe/ru/m/puzzlez/render/PartView.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/render/PartView.hx rename to src/app/haxe/ru/m/puzzlez/render/PartView.hx diff --git a/src/haxe/ru/m/puzzlez/render/ProgressView.hx b/src/app/haxe/ru/m/puzzlez/render/ProgressView.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/render/ProgressView.hx rename to src/app/haxe/ru/m/puzzlez/render/ProgressView.hx diff --git a/src/haxe/ru/m/puzzlez/render/Render.hx b/src/app/haxe/ru/m/puzzlez/render/Render.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/render/Render.hx rename to src/app/haxe/ru/m/puzzlez/render/Render.hx diff --git a/src/haxe/ru/m/puzzlez/render/RenderManager.hx b/src/app/haxe/ru/m/puzzlez/render/RenderManager.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/render/RenderManager.hx rename to src/app/haxe/ru/m/puzzlez/render/RenderManager.hx diff --git a/src/haxe/ru/m/puzzlez/render/RenderUtil.hx b/src/app/haxe/ru/m/puzzlez/render/RenderUtil.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/render/RenderUtil.hx rename to src/app/haxe/ru/m/puzzlez/render/RenderUtil.hx diff --git a/src/haxe/ru/m/puzzlez/render/part/BasePartBuilder.hx b/src/app/haxe/ru/m/puzzlez/render/part/BasePartBuilder.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/render/part/BasePartBuilder.hx rename to src/app/haxe/ru/m/puzzlez/render/part/BasePartBuilder.hx diff --git a/src/haxe/ru/m/puzzlez/render/part/ClassicPartBuilder.hx b/src/app/haxe/ru/m/puzzlez/render/part/ClassicPartBuilder.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/render/part/ClassicPartBuilder.hx rename to src/app/haxe/ru/m/puzzlez/render/part/ClassicPartBuilder.hx diff --git a/src/haxe/ru/m/puzzlez/render/part/IPartBuilder.hx b/src/app/haxe/ru/m/puzzlez/render/part/IPartBuilder.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/render/part/IPartBuilder.hx rename to src/app/haxe/ru/m/puzzlez/render/part/IPartBuilder.hx diff --git a/src/haxe/ru/m/puzzlez/render/part/PartMask.hx b/src/app/haxe/ru/m/puzzlez/render/part/PartMask.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/render/part/PartMask.hx rename to src/app/haxe/ru/m/puzzlez/render/part/PartMask.hx diff --git a/src/haxe/ru/m/puzzlez/render/part/SquarePartBuilder.hx b/src/app/haxe/ru/m/puzzlez/render/part/SquarePartBuilder.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/render/part/SquarePartBuilder.hx rename to src/app/haxe/ru/m/puzzlez/render/part/SquarePartBuilder.hx diff --git a/src/haxe/ru/m/puzzlez/source/AssetSource.hx b/src/app/haxe/ru/m/puzzlez/source/AssetSource.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/source/AssetSource.hx rename to src/app/haxe/ru/m/puzzlez/source/AssetSource.hx diff --git a/src/haxe/ru/m/puzzlez/source/FileSource.hx b/src/app/haxe/ru/m/puzzlez/source/FileSource.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/source/FileSource.hx rename to src/app/haxe/ru/m/puzzlez/source/FileSource.hx diff --git a/src/haxe/ru/m/puzzlez/source/IImageSource.hx b/src/app/haxe/ru/m/puzzlez/source/IImageSource.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/source/IImageSource.hx rename to src/app/haxe/ru/m/puzzlez/source/IImageSource.hx diff --git a/src/haxe/ru/m/puzzlez/source/PixabaySource.hx b/src/app/haxe/ru/m/puzzlez/source/PixabaySource.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/source/PixabaySource.hx rename to src/app/haxe/ru/m/puzzlez/source/PixabaySource.hx diff --git a/src/haxe/ru/m/puzzlez/storage/CacheStorage.hx b/src/app/haxe/ru/m/puzzlez/storage/CacheStorage.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/storage/CacheStorage.hx rename to src/app/haxe/ru/m/puzzlez/storage/CacheStorage.hx diff --git a/src/haxe/ru/m/puzzlez/storage/FileStorage.hx b/src/app/haxe/ru/m/puzzlez/storage/FileStorage.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/storage/FileStorage.hx rename to src/app/haxe/ru/m/puzzlez/storage/FileStorage.hx diff --git a/src/haxe/ru/m/puzzlez/storage/GameStorage.hx b/src/app/haxe/ru/m/puzzlez/storage/GameStorage.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/storage/GameStorage.hx rename to src/app/haxe/ru/m/puzzlez/storage/GameStorage.hx diff --git a/src/haxe/ru/m/puzzlez/storage/ImageStorage.hx b/src/app/haxe/ru/m/puzzlez/storage/ImageStorage.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/storage/ImageStorage.hx rename to src/app/haxe/ru/m/puzzlez/storage/ImageStorage.hx diff --git a/src/haxe/ru/m/puzzlez/storage/SettingsStorage.hx b/src/app/haxe/ru/m/puzzlez/storage/SettingsStorage.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/storage/SettingsStorage.hx rename to src/app/haxe/ru/m/puzzlez/storage/SettingsStorage.hx diff --git a/src/haxe/ru/m/puzzlez/view/GameFrame.hx b/src/app/haxe/ru/m/puzzlez/view/GameFrame.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/view/GameFrame.hx rename to src/app/haxe/ru/m/puzzlez/view/GameFrame.hx diff --git a/src/haxe/ru/m/puzzlez/view/GameFrame.yaml b/src/app/haxe/ru/m/puzzlez/view/GameFrame.yaml similarity index 100% rename from src/haxe/ru/m/puzzlez/view/GameFrame.yaml rename to src/app/haxe/ru/m/puzzlez/view/GameFrame.yaml diff --git a/src/haxe/ru/m/puzzlez/view/ImageListFrame.hx b/src/app/haxe/ru/m/puzzlez/view/ImageListFrame.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/view/ImageListFrame.hx rename to src/app/haxe/ru/m/puzzlez/view/ImageListFrame.hx diff --git a/src/haxe/ru/m/puzzlez/view/ImageListFrame.yaml b/src/app/haxe/ru/m/puzzlez/view/ImageListFrame.yaml similarity index 100% rename from src/haxe/ru/m/puzzlez/view/ImageListFrame.yaml rename to src/app/haxe/ru/m/puzzlez/view/ImageListFrame.yaml diff --git a/src/haxe/ru/m/puzzlez/view/LoadingWrapper.hx b/src/app/haxe/ru/m/puzzlez/view/LoadingWrapper.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/view/LoadingWrapper.hx rename to src/app/haxe/ru/m/puzzlez/view/LoadingWrapper.hx diff --git a/src/haxe/ru/m/puzzlez/view/PresetFrame.hx b/src/app/haxe/ru/m/puzzlez/view/PresetFrame.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/view/PresetFrame.hx rename to src/app/haxe/ru/m/puzzlez/view/PresetFrame.hx diff --git a/src/haxe/ru/m/puzzlez/view/PresetFrame.yaml b/src/app/haxe/ru/m/puzzlez/view/PresetFrame.yaml similarity index 100% rename from src/haxe/ru/m/puzzlez/view/PresetFrame.yaml rename to src/app/haxe/ru/m/puzzlez/view/PresetFrame.yaml diff --git a/src/haxe/ru/m/puzzlez/view/PuzzlezAppView.hx b/src/app/haxe/ru/m/puzzlez/view/PuzzlezAppView.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/view/PuzzlezAppView.hx rename to src/app/haxe/ru/m/puzzlez/view/PuzzlezAppView.hx diff --git a/src/haxe/ru/m/puzzlez/view/PuzzlezAppView.yaml b/src/app/haxe/ru/m/puzzlez/view/PuzzlezAppView.yaml similarity index 100% rename from src/haxe/ru/m/puzzlez/view/PuzzlezAppView.yaml rename to src/app/haxe/ru/m/puzzlez/view/PuzzlezAppView.yaml diff --git a/src/haxe/ru/m/puzzlez/view/StartFrame.hx b/src/app/haxe/ru/m/puzzlez/view/StartFrame.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/view/StartFrame.hx rename to src/app/haxe/ru/m/puzzlez/view/StartFrame.hx diff --git a/src/haxe/ru/m/puzzlez/view/StartFrame.yaml b/src/app/haxe/ru/m/puzzlez/view/StartFrame.yaml similarity index 100% rename from src/haxe/ru/m/puzzlez/view/StartFrame.yaml rename to src/app/haxe/ru/m/puzzlez/view/StartFrame.yaml diff --git a/src/haxe/ru/m/puzzlez/view/common/ImageDataList.hx b/src/app/haxe/ru/m/puzzlez/view/common/ImageDataList.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/view/common/ImageDataList.hx rename to src/app/haxe/ru/m/puzzlez/view/common/ImageDataList.hx diff --git a/src/haxe/ru/m/puzzlez/view/common/ImageDataList.yaml b/src/app/haxe/ru/m/puzzlez/view/common/ImageDataList.yaml similarity index 100% rename from src/haxe/ru/m/puzzlez/view/common/ImageDataList.yaml rename to src/app/haxe/ru/m/puzzlez/view/common/ImageDataList.yaml diff --git a/src/haxe/ru/m/puzzlez/view/common/PaginatorView.hx b/src/app/haxe/ru/m/puzzlez/view/common/PaginatorView.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/view/common/PaginatorView.hx rename to src/app/haxe/ru/m/puzzlez/view/common/PaginatorView.hx diff --git a/src/haxe/ru/m/puzzlez/view/common/PresetView.hx b/src/app/haxe/ru/m/puzzlez/view/common/PresetView.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/view/common/PresetView.hx rename to src/app/haxe/ru/m/puzzlez/view/common/PresetView.hx diff --git a/src/haxe/ru/m/puzzlez/view/common/PuzzleImageView.hx b/src/app/haxe/ru/m/puzzlez/view/common/PuzzleImageView.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/view/common/PuzzleImageView.hx rename to src/app/haxe/ru/m/puzzlez/view/common/PuzzleImageView.hx diff --git a/src/haxe/ru/m/puzzlez/view/common/PuzzleImageView.yaml b/src/app/haxe/ru/m/puzzlez/view/common/PuzzleImageView.yaml similarity index 100% rename from src/haxe/ru/m/puzzlez/view/common/PuzzleImageView.yaml rename to src/app/haxe/ru/m/puzzlez/view/common/PuzzleImageView.yaml diff --git a/src/haxe/ru/m/puzzlez/view/popup/BackgroundPopup.hx b/src/app/haxe/ru/m/puzzlez/view/popup/BackgroundPopup.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/view/popup/BackgroundPopup.hx rename to src/app/haxe/ru/m/puzzlez/view/popup/BackgroundPopup.hx diff --git a/src/haxe/ru/m/puzzlez/view/popup/BackgroundPopup.yaml b/src/app/haxe/ru/m/puzzlez/view/popup/BackgroundPopup.yaml similarity index 100% rename from src/haxe/ru/m/puzzlez/view/popup/BackgroundPopup.yaml rename to src/app/haxe/ru/m/puzzlez/view/popup/BackgroundPopup.yaml diff --git a/src/haxe/ru/m/puzzlez/view/popup/PreviewPopup.hx b/src/app/haxe/ru/m/puzzlez/view/popup/PreviewPopup.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/view/popup/PreviewPopup.hx rename to src/app/haxe/ru/m/puzzlez/view/popup/PreviewPopup.hx diff --git a/src/haxe/ru/m/puzzlez/view/popup/PreviewPopup.yaml b/src/app/haxe/ru/m/puzzlez/view/popup/PreviewPopup.yaml similarity index 100% rename from src/haxe/ru/m/puzzlez/view/popup/PreviewPopup.yaml rename to src/app/haxe/ru/m/puzzlez/view/popup/PreviewPopup.yaml diff --git a/src/haxe/ru/m/skin/ButtonSVGSkin.hx b/src/app/haxe/ru/m/skin/ButtonSVGSkin.hx similarity index 100% rename from src/haxe/ru/m/skin/ButtonSVGSkin.hx rename to src/app/haxe/ru/m/skin/ButtonSVGSkin.hx diff --git a/src/haxe/ru/m/update/Updater.hx b/src/app/haxe/ru/m/update/Updater.hx similarity index 100% rename from src/haxe/ru/m/update/Updater.hx rename to src/app/haxe/ru/m/update/Updater.hx diff --git a/src/haxe/ru/m/update/Version.hx b/src/app/haxe/ru/m/update/Version.hx similarity index 100% rename from src/haxe/ru/m/update/Version.hx rename to src/app/haxe/ru/m/update/Version.hx diff --git a/src/resources/fonts/GamePlayed.eot b/src/app/resources/fonts/GamePlayed.eot similarity index 100% rename from src/resources/fonts/GamePlayed.eot rename to src/app/resources/fonts/GamePlayed.eot diff --git a/src/resources/fonts/GamePlayed.svg b/src/app/resources/fonts/GamePlayed.svg similarity index 100% rename from src/resources/fonts/GamePlayed.svg rename to src/app/resources/fonts/GamePlayed.svg diff --git a/src/resources/fonts/GamePlayed.ttf b/src/app/resources/fonts/GamePlayed.ttf similarity index 100% rename from src/resources/fonts/GamePlayed.ttf rename to src/app/resources/fonts/GamePlayed.ttf diff --git a/src/resources/fonts/GamePlayed.woff b/src/app/resources/fonts/GamePlayed.woff similarity index 100% rename from src/resources/fonts/GamePlayed.woff rename to src/app/resources/fonts/GamePlayed.woff diff --git a/src/resources/icon.png b/src/app/resources/icon.png similarity index 100% rename from src/resources/icon.png rename to src/app/resources/icon.png diff --git a/src/resources/icon/arrow-alt-circle-left-solid.svg b/src/app/resources/icon/arrow-alt-circle-left-solid.svg similarity index 100% rename from src/resources/icon/arrow-alt-circle-left-solid.svg rename to src/app/resources/icon/arrow-alt-circle-left-solid.svg diff --git a/src/resources/icon/arrow-alt-circle-right-solid.svg b/src/app/resources/icon/arrow-alt-circle-right-solid.svg similarity index 100% rename from src/resources/icon/arrow-alt-circle-right-solid.svg rename to src/app/resources/icon/arrow-alt-circle-right-solid.svg diff --git a/src/resources/icon/bars-solid.svg b/src/app/resources/icon/bars-solid.svg similarity index 100% rename from src/resources/icon/bars-solid.svg rename to src/app/resources/icon/bars-solid.svg diff --git a/src/resources/icon/cog-solid.svg b/src/app/resources/icon/cog-solid.svg similarity index 100% rename from src/resources/icon/cog-solid.svg rename to src/app/resources/icon/cog-solid.svg diff --git a/src/resources/icon/compress-solid.svg b/src/app/resources/icon/compress-solid.svg similarity index 100% rename from src/resources/icon/compress-solid.svg rename to src/app/resources/icon/compress-solid.svg diff --git a/src/resources/icon/expand-solid.svg b/src/app/resources/icon/expand-solid.svg similarity index 100% rename from src/resources/icon/expand-solid.svg rename to src/app/resources/icon/expand-solid.svg diff --git a/src/resources/icon/image-polaroid.svg b/src/app/resources/icon/image-polaroid.svg similarity index 100% rename from src/resources/icon/image-polaroid.svg rename to src/app/resources/icon/image-polaroid.svg diff --git a/src/resources/icon/image-solid.svg b/src/app/resources/icon/image-solid.svg similarity index 100% rename from src/resources/icon/image-solid.svg rename to src/app/resources/icon/image-solid.svg diff --git a/src/resources/icon/lock-alt-solid.svg b/src/app/resources/icon/lock-alt-solid.svg similarity index 100% rename from src/resources/icon/lock-alt-solid.svg rename to src/app/resources/icon/lock-alt-solid.svg diff --git a/src/resources/icon/times-circle-solid.svg b/src/app/resources/icon/times-circle-solid.svg similarity index 100% rename from src/resources/icon/times-circle-solid.svg rename to src/app/resources/icon/times-circle-solid.svg diff --git a/src/resources/icon/window-close-solid.svg b/src/app/resources/icon/window-close-solid.svg similarity index 100% rename from src/resources/icon/window-close-solid.svg rename to src/app/resources/icon/window-close-solid.svg diff --git a/src/resources/icon/window-restore-solid.svg b/src/app/resources/icon/window-restore-solid.svg similarity index 100% rename from src/resources/icon/window-restore-solid.svg rename to src/app/resources/icon/window-restore-solid.svg diff --git a/src/resources/image/raccoon.jpg b/src/app/resources/image/raccoon.jpg similarity index 100% rename from src/resources/image/raccoon.jpg rename to src/app/resources/image/raccoon.jpg diff --git a/src/resources/texture/45-degree-fabric-light.png b/src/app/resources/texture/45-degree-fabric-light.png similarity index 100% rename from src/resources/texture/45-degree-fabric-light.png rename to src/app/resources/texture/45-degree-fabric-light.png diff --git a/src/resources/texture/beige-paper.png b/src/app/resources/texture/beige-paper.png similarity index 100% rename from src/resources/texture/beige-paper.png rename to src/app/resources/texture/beige-paper.png diff --git a/src/resources/texture/brick-wall.png b/src/app/resources/texture/brick-wall.png similarity index 100% rename from src/resources/texture/brick-wall.png rename to src/app/resources/texture/brick-wall.png diff --git a/src/resources/texture/pool-table.png b/src/app/resources/texture/pool-table.png similarity index 100% rename from src/resources/texture/pool-table.png rename to src/app/resources/texture/pool-table.png diff --git a/src/haxe/ru/m/puzzlez/core/BoundType.hx b/src/common/haxe/ru/m/puzzlez/core/BoundType.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/core/BoundType.hx rename to src/common/haxe/ru/m/puzzlez/core/BoundType.hx diff --git a/src/haxe/ru/m/puzzlez/core/Game.hx b/src/common/haxe/ru/m/puzzlez/core/Game.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/core/Game.hx rename to src/common/haxe/ru/m/puzzlez/core/Game.hx diff --git a/src/haxe/ru/m/puzzlez/core/GameEvent.hx b/src/common/haxe/ru/m/puzzlez/core/GameEvent.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/core/GameEvent.hx rename to src/common/haxe/ru/m/puzzlez/core/GameEvent.hx diff --git a/src/haxe/ru/m/puzzlez/core/GamePreset.hx b/src/common/haxe/ru/m/puzzlez/core/GamePreset.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/core/GamePreset.hx rename to src/common/haxe/ru/m/puzzlez/core/GamePreset.hx diff --git a/src/haxe/ru/m/puzzlez/core/GameState.hx b/src/common/haxe/ru/m/puzzlez/core/GameState.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/core/GameState.hx rename to src/common/haxe/ru/m/puzzlez/core/GameState.hx diff --git a/src/haxe/ru/m/puzzlez/core/GameUtil.hx b/src/common/haxe/ru/m/puzzlez/core/GameUtil.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/core/GameUtil.hx rename to src/common/haxe/ru/m/puzzlez/core/GameUtil.hx diff --git a/src/haxe/ru/m/puzzlez/core/Grid.hx b/src/common/haxe/ru/m/puzzlez/core/Grid.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/core/Grid.hx rename to src/common/haxe/ru/m/puzzlez/core/Grid.hx diff --git a/src/haxe/ru/m/puzzlez/core/IGame.hx b/src/common/haxe/ru/m/puzzlez/core/IGame.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/core/IGame.hx rename to src/common/haxe/ru/m/puzzlez/core/IGame.hx diff --git a/src/haxe/ru/m/puzzlez/core/Id.hx b/src/common/haxe/ru/m/puzzlez/core/Id.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/core/Id.hx rename to src/common/haxe/ru/m/puzzlez/core/Id.hx diff --git a/src/haxe/ru/m/puzzlez/core/ImageListSource.hx b/src/common/haxe/ru/m/puzzlez/core/ImageListSource.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/core/ImageListSource.hx rename to src/common/haxe/ru/m/puzzlez/core/ImageListSource.hx diff --git a/src/haxe/ru/m/puzzlez/core/Part.hx b/src/common/haxe/ru/m/puzzlez/core/Part.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/core/Part.hx rename to src/common/haxe/ru/m/puzzlez/core/Part.hx diff --git a/src/haxe/ru/m/puzzlez/core/PartLocation.hx b/src/common/haxe/ru/m/puzzlez/core/PartLocation.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/core/PartLocation.hx rename to src/common/haxe/ru/m/puzzlez/core/PartLocation.hx diff --git a/src/haxe/ru/m/puzzlez/core/Side.hx b/src/common/haxe/ru/m/puzzlez/core/Side.hx similarity index 100% rename from src/haxe/ru/m/puzzlez/core/Side.hx rename to src/common/haxe/ru/m/puzzlez/core/Side.hx diff --git a/src/server/haxe/ru/m/puzzlez/PuzzlezServer.hx b/src/server/haxe/ru/m/puzzlez/PuzzlezServer.hx new file mode 100644 index 0000000..6809fec --- /dev/null +++ b/src/server/haxe/ru/m/puzzlez/PuzzlezServer.hx @@ -0,0 +1,49 @@ +package ru.m.puzzlez; + +import hw.log.TraceLogger; +import cpp.net.ThreadServer; +import sys.net.Socket; +import haxe.io.Bytes; + +typedef Session = Dynamic; +typedef Message = Bytes; +typedef ClientMessage = { + var msg:M; + var bytes:Int; +} + +class PuzzlezServer extends ThreadServer { + + private static inline var TAG = 'Server'; + + override public function clientConnected(socket:Socket):Session { + var session = null; // new Session(socket); + L.d(TAG, 'Client connected'); + return session; + } + + override public function clientDisconnected(session:Session) { + L.d(TAG, 'Client disconnected'); + //session.disconnect(); + } + + override public function readClientMessage(session:Session, buf:Bytes, pos:Int, len:Int): ClientMessage { + //L.d(TAG, 'Client message: ${buf}'); + return {msg: buf.sub(pos, len), bytes: len}; + } + + override public function clientMessage(session:Session, message:Message) { + //session.pushData(bytes); + } + + public static function main():Void { + L.push(new TraceLogger()); + L.d(TAG, 'Running'); + L.i(TAG, 'Build: ${CompilationOption.get("build")}'); + var host:String = Sys.args().length > 0 ? Sys.args()[0] : "0.0.0.0"; + var port:Int = Sys.args().length > 1 ? Std.parseInt(Sys.args()[1]) : 5000; + var wserver = new PuzzlezServer(); + L.i(TAG, 'Start on ${host}:${port}'); + wserver.run(host, port); + } +}