diff --git a/.axproj b/.axproj new file mode 100644 index 0000000..d79dd1f --- /dev/null +++ b/.axproj @@ -0,0 +1,4 @@ +engine_version=2.8.1 +project_type=cpp +package_name=dev.axmol.demo + diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..fd035f5 --- /dev/null +++ b/.clang-format @@ -0,0 +1,70 @@ +# This file is copy from https://github.com/google/angle with some modifications +# Defines the axmol style for automatic reformatting. +# https://code.google.com/p/angleproject/wiki/CodingStandard +# See Clang docs: http://clang.llvm.org/docs/ClangFormatStyleOptions.html +BasedOnStyle: Chromium + +# Allow double brackets such as std::vector>. +Standard: Cpp11 + +# Indent 4 spaces at a time. +IndentWidth: 4 + +# Keep lines under 120 columns long. +ColumnLimit: 120 + +SortIncludes: false + +# Always break before braces +BreakBeforeBraces: Custom +BraceWrapping: + AfterCaseLabel: true + AfterClass: true + AfterControlStatement: true + AfterEnum: true + AfterFunction: true + AfterNamespace: true + AfterStruct: true + AfterUnion: true + BeforeCatch: true + BeforeElse: true + IndentBraces: false + SplitEmptyFunction: false + SplitEmptyRecord: false + SplitEmptyNamespace: false + + # Keeps extern "C" blocks unindented. + AfterExternBlock: false + BeforeLambdaBody: false + +# Lambda body indentation +LambdaBodyIndentation: OuterScope + +# Indent case labels. +IndentCaseLabels: false + +# Left-align pointers and references +PointerAlignment: Left + +# ANGLE likes to align things as much as possible. +AlignOperands: true +AlignConsecutiveAssignments: true + +# Use 0 space negative offset for access modifiers +AccessModifierOffset: -4 + +# TODO(jmadill): Decide if we want this on. Doesn't have an "all or none" mode. +AllowShortCaseLabelsOnASingleLine: false + +# Useful for spacing out functions in classes +KeepEmptyLinesAtTheStartOfBlocks: true + +# Indent nested PP directives. +IndentPPDirectives: AfterHash + +# Include blocks style +IncludeBlocks: Preserve +UseTab: Never +BreakConstructorInitializers: BeforeComma + +AlignConsecutiveMacros: AcrossEmptyLines diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..96b6d58 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,42 @@ +root = true + +[*] +end_of_line = lf +charset = utf-8-bom +insert_final_newline = true +indent_style = space +indent_size = 4 +trim_trailing_whitespace = true + +[*.py] +indent_style = space +indent_size = 4 + +[{*[Mm]akefile*,*.mak,*.mk,depend}] +indent_style = tab + +[*.{bat, cmd, cmd.*}] +end_of_line = crlf +indent_style = space +indent_size = 4 + +[*.yml] +indent_style = space +indent_size = 2 + +[*.md] +indent_size = 4 +trim_trailing_whitespace = false + +[*.gemspec] +indent_size = 2 + +[*.rb] +indent_size = 2 + +[*.bat] +end_of_line = crlf + +[{*.cmake, *CMakeLists.txt}] +indent_size = 2 +indent_style = space diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9cc0d8c --- /dev/null +++ b/.gitattributes @@ -0,0 +1,55 @@ +## Unity ## + +*.cs diff=csharp text +*.cginc text +*.shader text + +*.mat merge=unityyamlmerge eol=lf +*.anim merge=unityyamlmerge eol=lf +*.unity merge=unityyamlmerge eol=lf +*.prefab merge=unityyamlmerge eol=lf +*.physicsMaterial2D merge=unityyamlmerge eol=lf +*.physicMaterial merge=unityyamlmerge eol=lf +*.asset merge=unityyamlmerge eol=lf +*.meta merge=unityyamlmerge eol=lf +*.controller merge=unityyamlmerge eol=lf + + +## git-lfs ## + +#Image +*.jpg filter=lfs diff=lfs merge=lfs -text +*.jpeg filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.gif filter=lfs diff=lfs merge=lfs -text +*.psd filter=lfs diff=lfs merge=lfs -text +*.ai filter=lfs diff=lfs merge=lfs -text + +#Audio +*.mp3 filter=lfs diff=lfs merge=lfs -text +*.wav filter=lfs diff=lfs merge=lfs -text +*.ogg filter=lfs diff=lfs merge=lfs -text + +#Video +*.mp4 filter=lfs diff=lfs merge=lfs -text +*.mov filter=lfs diff=lfs merge=lfs -text + +#3D Object +*.FBX filter=lfs diff=lfs merge=lfs -text +*.fbx filter=lfs diff=lfs merge=lfs -text +*.blend filter=lfs diff=lfs merge=lfs -text +*.obj filter=lfs diff=lfs merge=lfs -text + +#ETC +*.a filter=lfs diff=lfs merge=lfs -text +*.exr filter=lfs diff=lfs merge=lfs -text +*.tga filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.dll filter=lfs diff=lfs merge=lfs -text +*.unitypackage filter=lfs diff=lfs merge=lfs -text +*.aif filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.rns filter=lfs diff=lfs merge=lfs -text +*.reason filter=lfs diff=lfs merge=lfs -text +*.lxo filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bbd2645 --- /dev/null +++ b/.gitignore @@ -0,0 +1,234 @@ +# Ignore thumbnails created by windows +Thumbs.db + +buildsrc/ + +# Ignore files build by Visual Studio +*.exe +*.pdb +*.aps +*.vcproj.*.user +*.vcxproj.user +*.csproj.user +*.vspscc +*_i.c +*.i +*.icf +*_p.c +*.ncb +*.suo +*.tlb +*.tlh +*.bak +*.cache +*.ilk +*.log +[Bb]in +[Dd]ebug/ +[Dd]ebug.win32/ +*.sbr +*.sdf +obj/ +[Rr]elease/ +[Rr]elease.win32/ +_ReSharper*/ +[Tt]est[Rr]esult* +ipch/ +*.opensdf +*.opendb +SubmissionInfo +Generated Files +AppPackages +BundleArtifacts +.vs/ +*.VC.db + +# Ignore files build by ndk and eclipse +/libs/ +bin/ +obj/ +gen/ +assets/ +local.properties + +/core/axmolver.h +/core/renderer/RenderConsts.h + +# Ignore python compiled files +*.pyc + +# Ignore files build by xcode +*.mode*v* +*.pbxuser +*.xcbkptlist +*.xcworkspacedata +*.xcuserstate +*.xccheckout +xcschememanagement.plist +IDEWorkspaceChecks.plist +.DS_Store +._.* +xcuserdata/ +DerivedData/ + +# Ignore files built by AppCode +.idea/ + +# Ignore files built by bada +.Simulator-Debug/ +.Target-Debug/ +.Target-Release/ + +# Ignore files built by blackberry +Simulator/ +Device-Debug/ +Device-Release/ + +# Ignore vim swaps +*.swp +*.swo + +# Ignore files created by create_project.py +projects/ + +# Ignore config files in javascript bindings generator +tools/tojs/user.cfg +# ... userconf.ini generated if running from tools/tojs +tools/tojs/userconf.ini +tools/tolua/userconf.ini +# ... userconf.ini generated if running from tools/jenkins_scripts/mac/android/ +tools/jenkins_scripts/mac/android/userconf.ini + +# CTags +tags + +CMakeSettings.json + +# ignore files, created with make-all-linux-project script +/lib +/build/linux-build + +# ignore all build +/build +/build_* + +# ignore ninja build dir +/out +/out* + +# ignore jniLibs android +/**/jniLibs/*/*.so + +# Cmake files +CMakeCache.txt +CMakeFiles +Makefile +cmake_install.cmake +CMakeLists.txt.user + +# Ignore files generated by console +build/build/ +extensions/scripting/lua-bindings/proj.ios_mac/build/ +tests/*/runtime/ +tests/*/publish/ +tests/*/project/proj.android-studio/app/build.xml +tests/*/project/proj.android-studio/app/proguard-project.txt +tests/*/proj.android-studio/app/build.xml +tests/*/proj.android-studio/app/proguard-project.txt + +# Android +project.properties +*.iml + +# Ignore template runtime +/templates/lua-template-runtime/runtime + +/v*-deps-*.zip +/v*-lua-runtime-*.zip +/v*-console-*.zip +/tools/fbx-conv/ +/templates/lua-template-default/src/core/ +/tests/lua-tests/src/core/ +/tests/js-tests/res/ +/tools/framework-compile/bin/proj_modifier/plutil-win32/ +!/tools/framework-compile/bin/ + +# generated by framework-compile +/templates/*-template-binary/ +/prebuilt/ +/*/prebuilt-mk/Android.mk +/*/*/prebuilt-mk/Android.mk +/*/*/*/prebuilt-mk/Android.mk +/*/*/*/*/prebuilt-mk/Android.mk +*.xcscmblueprint +tests/cpp-empty-test/proj.tizen/res/ +tests/cpp-tests/proj.tizen/res/ +tests/lua-empty-test/project/proj.tizen/res/ +tests/lua-tests/project/proj.tizen/res/ + +/extensions/Live2D/Core/ + +# Ignore x-studio folder +.xs +extensions/x-studio.cmake + +# Ignore vscode folder +.vscode/ + +# Ignore the CMake build folder, such as ios-build/linux-build +*-build/ +# Ignore the CLion build folder, such as cmake-build-debug +cmake-build-*/ +.vs +cmake_build* +metal-support*.zip +**/.project + +**/.classpath +**/org.eclipse.buildship.core.prefs + +desktop.ini +# tmp folder for temp usage +tmp/ +temp/ + +# external libs zip +*.zip +**/simulator/ + +# New .cxx temp folder +**/.cxx + +**/SharedLoader.java + +# ignore downloaded tools +tools/external + +# ignore lua-tests res folder which is copy from cpp-tests +tests/lua-tests/res/ + +extensions/libeditor +extensions/libccs30 +extensions/libccs21 +extensions/libccs20 +extensions/libccs19 +extensions/fonteng + +tools/bindings-generator/clang/prebuilt/* + +templates/lua-template-default/Content/src/axmol +tests/lua-tests/Content/src/axmol +tests/lua-tests/Content/res +tests/cpp-tests/Content +tests/fairygui-tests/Content +tests/live2d-tests/Content +tests/unit-tests/Content +tests/*-tests/build +tests/*-tests/build_* +*.patch + +/cache +/_cache + +.gitee +release_note_draft.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..0e480ea --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,89 @@ +# /**************************************************************************** +# Copyright (c) 2013-2014 cocos2d-x.org +# Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md). +# +# https://axmol.dev/ +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +# ****************************************************************************/ + +cmake_minimum_required(VERSION 3.22...4.1) + +set(APP_NAME Pinball) + +project(${APP_NAME}) + +if(XCODE) + set(CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY TRUE) +endif() + +set(_is_axmol_embed FALSE) +set(_AX_USE_PREBUILT FALSE) + +set(CMAKE_MODULE_PATH + ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules +) + +# NOTE: The order of the cmake module "include(AXGame...)" statements matters +include(AXGameEngineOptions) +include(AXGameEngineSetup) + +# The common cross-platforms source files and header files +file(GLOB_RECURSE GAME_HEADER + Source/*.h Source/*.hpp +) + +file(GLOB_RECURSE GAME_SOURCE + Source/*.cpp Source/*.c +) + +set(GAME_INC_DIRS + "${CMAKE_CURRENT_SOURCE_DIR}/Source" +) + +set(content_folder + "${CMAKE_CURRENT_SOURCE_DIR}/Content" +) + +if(APPLE) + ax_mark_multi_resources(common_content_files RES_TO "Resources" FOLDERS ${content_folder}) +elseif(WINDOWS) + ax_mark_multi_resources(common_content_files RES_TO "Content" FOLDERS ${content_folder}) +endif() + +include(AXGameSourceSetup) + +# mark app complie info and libs info +set(APP_SOURCES + ${GAME_HEADER} + ${GAME_SOURCE} +) + +include(AXGameTargetSetup) + +# mark app resources, resource will be copy auto after mark +ax_setup_app_config(${APP_NAME}) + +# Add any libraries you need to link to the project after this point + +# Default Platform-specific setup +include(AXGamePlatformSetup) + +# Make sure the AXGameFinalSetup is included at the end of this file +include(AXGameFinalSetup) diff --git a/Content/CloseNormal.png b/Content/CloseNormal.png new file mode 100644 index 0000000..a2b2006 --- /dev/null +++ b/Content/CloseNormal.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e1f04822684455b8420fd39357e9c78eed50534520b61776b0056eac660b79ad +size 3596 diff --git a/Content/CloseSelected.png b/Content/CloseSelected.png new file mode 100644 index 0000000..14eaa29 --- /dev/null +++ b/Content/CloseSelected.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d5745b57a3d032380087e7d81f8bf9ba6110020d1865a325cc7c810865a76b71 +size 2810 diff --git a/Content/HelloWorld.png b/Content/HelloWorld.png new file mode 100644 index 0000000..d8366e7 --- /dev/null +++ b/Content/HelloWorld.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:576e537cf0ef80de4fe9d21e8df3ad18ae1272e2bc6e98310a0801fc46e19023 +size 11426 diff --git a/Content/fonts/Marker Felt.ttf b/Content/fonts/Marker Felt.ttf new file mode 100644 index 0000000..c15aa1b --- /dev/null +++ b/Content/fonts/Marker Felt.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6650cfc547dd93a75376a2eac62cd67ca63f3e0835aa7a9a500574da2d4a0a0d +size 25776 diff --git a/Content/fonts/arial.ttf b/Content/fonts/arial.ttf new file mode 100644 index 0000000..6f89680 --- /dev/null +++ b/Content/fonts/arial.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ca8c3f3b7608a6e8712b027ccbf584818f78e750da1240fcb5d8fa89a0b92747 +size 778552 diff --git a/Content/res/.gitkeep b/Content/res/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Source/AppDelegate.cpp b/Source/AppDelegate.cpp new file mode 100644 index 0000000..0e1bfac --- /dev/null +++ b/Source/AppDelegate.cpp @@ -0,0 +1,109 @@ +/**************************************************************************** + Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md). + + https://axmol.dev/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#include "AppDelegate.h" +#include "MainScene.h" + +#define USE_AUDIO_ENGINE 1 + +#if USE_AUDIO_ENGINE +# include "audio/AudioEngine.h" +#endif + +using namespace ax; + +static ax::Size designResolutionSize = ax::Size(1280, 720); + +AppDelegate::AppDelegate() {} + +AppDelegate::~AppDelegate() {} + +// if you want a different context, modify the value of gfxContextAttrs +// it will affect all platforms +void AppDelegate::initGfxContextAttrs() +{ + // set graphics context attributes: red,green,blue,alpha,depth,stencil,multisamplesCount + GfxContextAttrs gfxContextAttrs = {8, 8, 8, 8, 24, 8, 0}; + // since axmol-2.2 vsync was enabled in engine by default + // gfxContextAttrs.vsync = false; + + RenderView::setGfxContextAttrs(gfxContextAttrs); +} + +bool AppDelegate::applicationDidFinishLaunching() +{ + // initialize director + auto director = Director::getInstance(); + auto renderView = director->getRenderView(); + if (!renderView) + { +#if (AX_TARGET_PLATFORM == AX_PLATFORM_WIN32) || (AX_TARGET_PLATFORM == AX_PLATFORM_MAC) || \ + (AX_TARGET_PLATFORM == AX_PLATFORM_LINUX) + renderView = RenderViewImpl::createWithRect( + "Pinball", ax::Rect(0, 0, designResolutionSize.width, designResolutionSize.height)); +#else + renderView = RenderViewImpl::create("Pinball"); +#endif + director->setRenderView(renderView); + } + + // turn on display FPS + director->setStatsDisplay(true); + + // set FPS. the default value is 1.0/60 if you don't call this + director->setAnimationInterval(1.0f / 60); + + // Set the design resolution + renderView->setDesignResolutionSize(designResolutionSize.width, designResolutionSize.height, + ResolutionPolicy::SHOW_ALL); + + // create a scene. it's an autorelease object + auto scene = utils::createInstance(); + + // run + director->runWithScene(scene); + + return true; +} + +// This function will be called when the app is inactive. Note, when receiving a phone call it is invoked. +void AppDelegate::applicationDidEnterBackground() +{ + Director::getInstance()->stopAnimation(); + +#if USE_AUDIO_ENGINE + AudioEngine::pauseAll(); +#endif +} + +// this function will be called when the app is active again +void AppDelegate::applicationWillEnterForeground() +{ + Director::getInstance()->startAnimation(); + +#if USE_AUDIO_ENGINE + AudioEngine::resumeAll(); +#endif +} diff --git a/Source/AppDelegate.h b/Source/AppDelegate.h new file mode 100644 index 0000000..48e9703 --- /dev/null +++ b/Source/AppDelegate.h @@ -0,0 +1,60 @@ +/**************************************************************************** + Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md). + + https://axmol.dev/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#pragma once + +#include "axmol.h" + +/** +@brief The axmol Application. + +Private inheritance here hides part of interface from Director. +*/ +class AppDelegate : private ax::Application +{ +public: + AppDelegate(); + ~AppDelegate() override; + + void initGfxContextAttrs() override; + + /** + @brief Implement Director and Scene init code here. + @return true Initialize success, app continue. + @return false Initialize failed, app terminate. + */ + bool applicationDidFinishLaunching() override; + + /** + @brief Called when the application moves to the background + */ + void applicationDidEnterBackground() override; + + /** + @brief Called when the application reenters the foreground + */ + void applicationWillEnterForeground() override; +}; + diff --git a/Source/MainScene.cpp b/Source/MainScene.cpp new file mode 100644 index 0000000..a247b0e --- /dev/null +++ b/Source/MainScene.cpp @@ -0,0 +1,297 @@ +/**************************************************************************** + Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md). + + https://axmol.dev/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#include "MainScene.h" + +using namespace ax; + +static int s_sceneID = 1000; + +// Print useful error message instead of segfaulting when files are not there. +static void problemLoading(const char* filename) +{ + printf("Error while loading: %s\n", filename); + printf( + "Depending on how you compiled you might have to add 'Content/' in front of filenames in " + "MainScene.cpp\n"); +} + +// on "init" you need to initialize your instance +bool MainScene::init() +{ + ////////////////////////////// + // 1. super init first + if (!Scene::init()) + { + return false; + } + + auto visibleSize = _director->getVisibleSize(); + auto origin = _director->getVisibleOrigin(); + auto safeArea = _director->getSafeAreaRect(); + auto safeOrigin = safeArea.origin; + + ///////////////////////////// + // 2. add a menu item with "X" image, which is clicked to quit the program + // you may modify it. + + // add a "close" icon to exit the progress. it's an autorelease object + auto closeItem = MenuItemImage::create("CloseNormal.png", "CloseSelected.png", + AX_CALLBACK_1(MainScene::menuCloseCallback, this)); + + if (closeItem == nullptr || closeItem->getContentSize().width <= 0 || closeItem->getContentSize().height <= 0) + { + problemLoading("'CloseNormal.png' and 'CloseSelected.png'"); + } + else + { + float x = safeOrigin.x + safeArea.size.width - closeItem->getContentSize().width / 2; + float y = safeOrigin.y + closeItem->getContentSize().height / 2; + closeItem->setPosition(Vec2(x, y)); + } + + // create menu, it's an autorelease object + auto menu = Menu::create(closeItem, NULL); + menu->setPosition(Vec2::ZERO); + this->addChild(menu, 1); + + ///////////////////////////// + // 3. add your codes below... + + // Some templates (uncomment what you need) + _touchListener = EventListenerTouchAllAtOnce::create(); + _touchListener->onTouchesBegan = AX_CALLBACK_2(MainScene::onTouchesBegan, this); + _touchListener->onTouchesMoved = AX_CALLBACK_2(MainScene::onTouchesMoved, this); + _touchListener->onTouchesEnded = AX_CALLBACK_2(MainScene::onTouchesEnded, this); + _eventDispatcher->addEventListenerWithSceneGraphPriority(_touchListener, this); + + //_mouseListener = EventListenerMouse::create(); + //_mouseListener->onMouseMove = AX_CALLBACK_1(MainScene::onMouseMove, this); + //_mouseListener->onMouseUp = AX_CALLBACK_1(MainScene::onMouseUp, this); + //_mouseListener->onMouseDown = AX_CALLBACK_1(MainScene::onMouseDown, this); + //_mouseListener->onMouseScroll = AX_CALLBACK_1(MainScene::onMouseScroll, this); + //_eventDispatcher->addEventListenerWithSceneGraphPriority(_mouseListener, this); + + _keyboardListener = EventListenerKeyboard::create(); + _keyboardListener->onKeyPressed = AX_CALLBACK_2(MainScene::onKeyPressed, this); + _keyboardListener->onKeyReleased = AX_CALLBACK_2(MainScene::onKeyReleased, this); + _eventDispatcher->addEventListenerWithFixedPriority(_keyboardListener, 11); + + // add a label shows "Hello World" + // create and initialize a label + + auto label = Label::createWithTTF("Hello World", "fonts/Marker Felt.ttf", 24); + if (label == nullptr) + { + problemLoading("'fonts/Marker Felt.ttf'"); + } + else + { + // position the label on the center of the screen + label->setPosition( + Vec2(origin.x + visibleSize.width / 2, origin.y + visibleSize.height - label->getContentSize().height)); + + // add the label as a child to this layer + this->addChild(label, 1); + } + // add "HelloWorld" splash screen" + auto sprite = Sprite::create("HelloWorld.png"sv); + if (sprite == nullptr) + { + problemLoading("'HelloWorld.png'"); + } + else + { + // position the sprite on the center of the screen + sprite->setPosition(Vec2(visibleSize.width / 2 + origin.x, visibleSize.height / 2 + origin.y)); + + // add the sprite as a child to this layer + this->addChild(sprite, 0); + auto drawNode = DrawNode::create(); + drawNode->setPosition(Vec2(0, 0)); + addChild(drawNode); + + drawNode->drawRect(safeArea.origin + Vec2(1, 1), safeArea.origin + safeArea.size, Color4F::BLUE); + } + + // scheduleUpdate() is required to ensure update(float) is called on every loop + scheduleUpdate(); + + return true; +} + +void MainScene::onTouchesBegan(const std::vector& touches, ax::Event* event) +{ + for (auto&& t : touches) + { + // AXLOGD("onTouchesBegan detected, X:{} Y:{}", t->getLocation().x, t->getLocation().y); + } +} + +void MainScene::onTouchesMoved(const std::vector& touches, ax::Event* event) +{ + for (auto&& t : touches) + { + // AXLOGD("onTouchesMoved detected, X:{} Y:{}", t->getLocation().x, t->getLocation().y); + } +} + +void MainScene::onTouchesEnded(const std::vector& touches, ax::Event* event) +{ + for (auto&& t : touches) + { + // AXLOGD("onTouchesEnded detected, X:{} Y:{}", t->getLocation().x, t->getLocation().y); + } +} + +bool MainScene::onMouseDown(Event* event) +{ + EventMouse* e = static_cast(event); + // AXLOGD("onMouseDown detected, Key: %d", static_cast(e->getMouseButton())); + return true; +} + +bool MainScene::onMouseUp(Event* event) +{ + EventMouse* e = static_cast(event); + AXLOGD("onMouseUp detected, Key: %d", static_cast(e->getMouseButton())); + return true; +} + +bool MainScene::onMouseMove(Event* event) +{ + EventMouse* e = static_cast(event); + // AXLOGD("onMouseMove detected, X:{} Y:{}", e->getCursorX(), e->getCursorY()); + return true; +} + +bool MainScene::onMouseScroll(Event* event) +{ + EventMouse* e = static_cast(event); + // AXLOGD("onMouseScroll detected, X:{} Y:{}", e->getScrollX(), e->getScrollY()); + return true; +} + +void MainScene::onKeyPressed(EventKeyboard::KeyCode code, Event* event) +{ + AXLOGD("Scene: #{} onKeyPressed, keycode: {}", _sceneID, static_cast(code)); +} + +void MainScene::onKeyReleased(EventKeyboard::KeyCode code, Event* event) +{ + AXLOGD("onKeyReleased, keycode: %d", static_cast(code)); +} + +void MainScene::update(float delta) +{ + switch (_gameState) + { + case GameState::init: + { + _gameState = GameState::update; + break; + } + + case GameState::update: + { + ///////////////////////////// + // Add your codes below...like.... + // + // UpdateJoyStick(); + // UpdatePlayer(); + // UpdatePhysics(); + // ... + break; + } + + case GameState::pause: + { + ///////////////////////////// + // Add your codes below...like.... + // + // anyPauseStuff() + + break; + } + + case GameState::menu1: + { ///////////////////////////// + // Add your codes below...like.... + // + // UpdateMenu1(); + break; + } + + case GameState::menu2: + { ///////////////////////////// + // Add your codes below...like.... + // + // UpdateMenu2(); + break; + } + + case GameState::end: + { ///////////////////////////// + // Add your codes below...like.... + // + // CleanUpMyCrap(); + menuCloseCallback(this); + break; + } + + } // switch +} + +void MainScene::menuCloseCallback(ax::Object* sender) +{ + // Close the axmol game scene and quit the application + _director->end(); + + /*To navigate back to native iOS screen(if present) without quitting the application ,do not use + * _director->end() as given above,instead trigger a custom event created in RootViewController.mm + * as below*/ + + // EventCustom customEndEvent("game_scene_close_event"); + //_eventDispatcher->dispatchEvent(&customEndEvent); +} + +MainScene::MainScene() +{ + _sceneID = ++s_sceneID; + AXLOGD("Scene: ctor: #{}", _sceneID); +} + +MainScene::~MainScene() +{ + AXLOGD("~Scene: dtor: #{}", _sceneID); + + if (_touchListener) + _eventDispatcher->removeEventListener(_touchListener); + if (_keyboardListener) + _eventDispatcher->removeEventListener(_keyboardListener); + if (_mouseListener) + _eventDispatcher->removeEventListener(_mouseListener); + _sceneID = -1; +} diff --git a/Source/MainScene.h b/Source/MainScene.h new file mode 100644 index 0000000..c4c30f9 --- /dev/null +++ b/Source/MainScene.h @@ -0,0 +1,74 @@ +/**************************************************************************** + Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md). + + https://axmol.dev/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#pragma once + +#include "axmol.h" + +class MainScene : public ax::Scene +{ + enum class GameState + { + init = 0, + update, + pause, + end, + menu1, + menu2, + }; + +public: + bool init() override; + void update(float delta) override; + + // touch + void onTouchesBegan(const std::vector& touches, ax::Event* event); + void onTouchesMoved(const std::vector& touches, ax::Event* event); + void onTouchesEnded(const std::vector& touches, ax::Event* event); + + // mouse + bool onMouseDown(ax::Event* event); + bool onMouseUp(ax::Event* event); + bool onMouseMove(ax::Event* event); + bool onMouseScroll(ax::Event* event); + + // Keyboard + void onKeyPressed(ax::EventKeyboard::KeyCode code, ax::Event* event); + void onKeyReleased(ax::EventKeyboard::KeyCode code, ax::Event* event); + + // a selector callback + void menuCloseCallback(ax::Object* sender); + + MainScene(); + ~MainScene() override; + +private: + GameState _gameState = GameState::init; + ax::EventListenerTouchAllAtOnce* _touchListener = nullptr; + ax::EventListenerKeyboard* _keyboardListener = nullptr; + ax::EventListenerMouse* _mouseListener = nullptr; + int _sceneID = 0; +}; + diff --git a/build.bat b/build.bat new file mode 100644 index 0000000..91f341a --- /dev/null +++ b/build.bat @@ -0,0 +1,2 @@ +@echo off +axmol build -p win32 diff --git a/cmake/modules/AXGameEngineOptions.cmake b/cmake/modules/AXGameEngineOptions.cmake new file mode 100644 index 0000000..72f2d55 --- /dev/null +++ b/cmake/modules/AXGameEngineOptions.cmake @@ -0,0 +1,47 @@ +# NOTE: Changing the value of AX_EXT_HINT after cmake build files have been created +# will not update all other options that are using AX_EXT_HINT. You must delete the +# {build_dir}/CMakeCache.txt file and then re-run the `axmol build ...` command in +# order for the new setting to take effect. Alternatively, you can also delete the +# entire build folder and then re-run the `axmol build` command. +# set(AX_EXT_HINT ON CACHE BOOL "The default extensions hint" FORCE) + +# The following are by default set the same as the AX_EXT_HINT flag above - default: ON +# Uncomment the lines below to set them individually +# set(AX_ENABLE_EXT_LUA OFF CACHE BOOL "Build lua libraries" FORCE) +# set(AX_ENABLE_EXT_GUI OFF CACHE BOOL "Build extension GUI" FORCE) +# set(AX_ENABLE_EXT_ASSETMANAGER OFF CACHE BOOL "Build extension asset-manager" FORCE) +# set(AX_ENABLE_EXT_SPINE OFF CACHE BOOL "Build extension spine" FORCE) +# set(AX_ENABLE_EXT_DRAGONBONES OFF CACHE BOOL "Build extension DragonBones" FORCE) +# set(AX_ENABLE_EXT_COCOSTUDIO OFF CACHE BOOL "Build extension cocostudio" FORCE) +# set(AX_ENABLE_EXT_FAIRYGUI OFF CACHE BOOL "Build extension FairyGUI" FORCE) +# set(AX_ENABLE_EXT_IMGUI OFF CACHE BOOL "Build extension ImGui" FORCE) +# set(AX_ENABLE_EXT_JSONDEFAULT OFF CACHE BOOL "Build extension JSONDefault" FORCE) + +# 3D Support - - default: ON +# set(AX_ENABLE_3D ON CACHE BOOL "Build 3D support" FORCE) +# These depend on AX_EXT_HINT & AX_ENABLE_3D +# set(AX_ENABLE_EXT_PARTICLE3D ON CACHE BOOL "Build extension Particle3D" FORCE) +# set(AX_ENABLE_3D_PHYSICS ON CACHE BOOL "Build Physics3D support" FORCE) +# set(AX_ENABLE_NAVMESH ON CACHE BOOL "Build NavMesh support" FORCE) + +# Physics Support - - default: ON +# set(AX_ENABLE_PHYSICS ON CACHE BOOL "Build Physics support" FORCE) +# These depend on AX_EXT_HINT & AX_ENABLE_PHYSICS +# set(AX_ENABLE_EXT_PHYSICS_NODE ON CACHE BOOL "Build extension physics-nodes" FORCE) + +# These depend on AX_EXT_HINT & AX_ENABLE_EXT_IMGUI - default: ON +# set(AX_ENABLE_EXT_INSPECTOR ON CACHE BOOL "Enable extension Inspector" FORCE) +# set(AX_ENABLE_EXT_SDFGEN ON CACHE BOOL "Build extension SDFGen" FORCE) + +# The follow options are set individually - default: OFF +# set(AX_ENABLE_EXT_LIVE2D OFF CACHE BOOL "Build extension Live2D" FORCE) +# set(AX_ENABLE_EXT_EFFEKSEER OFF CACHE BOOL "Build extension Effekseer" FORCE) + +# Code modules that can be disabled - default: ON +# set(AX_ENABLE_AUDIO ON CACHE BOOL "Build audio support" FORCE) +# set(AX_ENABLE_WEBSOCKET ON CACHE BOOL "Build Websocket client based on yasio" FORCE) +# set(AX_ENABLE_HTTP ON CACHE BOOL "Build HTTP client based on yasio" FORCE) +# set(AX_ENABLE_OPUS ON CACHE BOOL "Build with opus support" FORCE) + +# WEBVIEW2 - default: ON for WIN32 and WINRT +# set(AX_ENABLE_MSEDGE_WEBVIEW2 ON CACHE BOOL "Disable msedge webview2") diff --git a/cmake/modules/AXGameEngineSetup.cmake b/cmake/modules/AXGameEngineSetup.cmake new file mode 100644 index 0000000..92656c0 --- /dev/null +++ b/cmake/modules/AXGameEngineSetup.cmake @@ -0,0 +1,30 @@ +if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/axmol") + set(_AX_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/axmol") + set(_is_axmol_embed TRUE) + message(STATUS "Building isolated project: ${APP_NAME}") +else() + set(_AX_ROOT "$ENV{AX_ROOT}") + + if(NOT(_AX_ROOT STREQUAL "")) + file(TO_CMAKE_PATH ${_AX_ROOT} _AX_ROOT) + message(STATUS "Using system env var _AX_ROOT=${_AX_ROOT}") + else() + message(FATAL_ERROR "Please run setup.ps1 add system env var 'AX_ROOT' to specific the engine root") + endif() +endif() + +list(APPEND CMAKE_MODULE_PATH + ${_AX_ROOT}/cmake/Modules/ +) + +include(AXBuildSet) + +if(NOT _is_axmol_embed) + if((WIN32 OR LINUX) AND DEFINED AX_PREBUILT_DIR AND IS_DIRECTORY ${_AX_ROOT}/${AX_PREBUILT_DIR}) + set(_AX_USE_PREBUILT TRUE) + endif() +endif() + +if(NOT _AX_USE_PREBUILT) + add_subdirectory(${_AX_ROOT}/core ${ENGINE_BINARY_PATH}/axmol/core) +endif() diff --git a/cmake/modules/AXGameFinalSetup.cmake b/cmake/modules/AXGameFinalSetup.cmake new file mode 100644 index 0000000..06b5e3c --- /dev/null +++ b/cmake/modules/AXGameFinalSetup.cmake @@ -0,0 +1,25 @@ +if((NOT APPLE) AND(NOT WINRT)) + ax_get_resource_path(APP_RES_DIR ${APP_NAME}) + ax_sync_target_res(${APP_NAME} LINK_TO ${APP_RES_DIR} FOLDERS ${content_folder} SYM_LINK 1) + + if((WINDOWS AND(NOT(CMAKE_GENERATOR MATCHES "Ninja")))) + set_property(TARGET ${APP_NAME} PROPERTY VS_DEBUGGER_WORKING_DIRECTORY "${content_folder}") + + if(NOT DEFINED BUILD_ENGINE_DONE) + set_property(DIRECTORY PROPERTY VS_STARTUP_PROJECT ${APP_NAME}) + endif() + endif() +elseif(WINRT) + if(NOT DEFINED BUILD_ENGINE_DONE) + set_property(DIRECTORY PROPERTY VS_STARTUP_PROJECT ${APP_NAME}) + endif() +endif() + +if(_AX_USE_PREBUILT) # support windows and linux + use_ax_compile_define(${APP_NAME}) + + include(AXLinkHelpers) + ax_link_cxx_prebuilt(${APP_NAME} ${_AX_ROOT} ${AX_PREBUILT_DIR}) +endif() + +ax_setup_app_props(${APP_NAME}) diff --git a/cmake/modules/AXGamePlatformSetup.cmake b/cmake/modules/AXGamePlatformSetup.cmake new file mode 100644 index 0000000..52e0979 --- /dev/null +++ b/cmake/modules/AXGamePlatformSetup.cmake @@ -0,0 +1,29 @@ +if(APPLE) + set_target_properties(${APP_NAME} PROPERTIES RESOURCE "${APP_UI_RES}") + set_xcode_property(${APP_NAME} INSTALL_PATH "\$(LOCAL_APPS_DIR)") + set_xcode_property(${APP_NAME} PRODUCT_BUNDLE_IDENTIFIER "dev.axmol.demo") + + if(MACOSX) + set_target_properties(${APP_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/proj.ios_mac/mac/Info.plist") + elseif(TVOS) + set_target_properties(${APP_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/proj.ios_mac/ios/targets/tvos/Info.plist") + set_xcode_property(${APP_NAME} ASSETCATALOG_COMPILER_APPICON_NAME "Brand Assets") + elseif(IOS) + set_target_properties(${APP_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/proj.ios_mac/ios/targets/ios/Info.plist") + set_xcode_property(${APP_NAME} ASSETCATALOG_COMPILER_APPICON_NAME "AppIcon") + set_xcode_property(${APP_NAME} TARGETED_DEVICE_FAMILY "1,2") + endif() + +# For code-signing, set the DEVELOPMENT_TEAM: +# set_xcode_property(${APP_NAME} DEVELOPMENT_TEAM "GRLXXXX2K9") +elseif(WINDOWS) + # config quick starter batch script run.bat for windows + if(WIN32) + file(RELATIVE_PATH CMAKE_BUILD_RELATIVE_DIR "${CMAKE_CURRENT_SOURCE_DIR}" "${PROJECT_BINARY_DIR}") + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/run.bat.in" "${CMAKE_CURRENT_SOURCE_DIR}/run.bat" @ONLY) + endif() + + if(NOT _AX_USE_PREBUILT) + ax_sync_target_dlls(${APP_NAME}) + endif() +endif() diff --git a/cmake/modules/AXGameSourceSetup.cmake b/cmake/modules/AXGameSourceSetup.cmake new file mode 100644 index 0000000..77700df --- /dev/null +++ b/cmake/modules/AXGameSourceSetup.cmake @@ -0,0 +1,71 @@ +if(ANDROID) + # the APP_NAME should match on AndroidManifest.xml + list(APPEND GAME_SOURCE + proj.android/app/jni/main.cpp + ) +elseif(LINUX) + list(APPEND GAME_SOURCE + proj.linux/main.cpp + ) + list(APPEND GAME_SOURCE ${common_content_files}) +elseif(WASM) + list(APPEND GAME_SOURCE + proj.wasm/main.cpp + ) + list(APPEND GAME_SOURCE ${common_content_files}) +elseif(WINDOWS) + if(NOT WINRT) + list(APPEND GAME_HEADER + proj.win32/main.h + proj.win32/resource.h + ) + list(APPEND GAME_SOURCE + proj.win32/main.cpp + proj.win32/game.rc + ) + else() + ax_setup_winrt_sources() + endif() + + list(APPEND GAME_SOURCE ${common_content_files}) +elseif(APPLE) + if(IOS) + list(APPEND GAME_HEADER + proj.ios_mac/ios/AppController.h + proj.ios_mac/ios/RootViewController.h + ) + + if(TVOS) + set(APP_UI_RES + proj.ios_mac/ios/targets/tvos/LaunchScreenBackground.png + proj.ios_mac/ios/targets/tvos/LaunchScreen.storyboard + proj.ios_mac/ios/targets/tvos/Images.xcassets + ) + else() + set(APP_UI_RES + proj.ios_mac/ios/targets/ios/LaunchScreenBackground.png + proj.ios_mac/ios/targets/ios/LaunchScreen.storyboard + proj.ios_mac/ios/targets/ios/Images.xcassets + ) + endif() + + list(APPEND GAME_SOURCE + proj.ios_mac/ios/main.m + proj.ios_mac/ios/AppController.mm + proj.ios_mac/ios/RootViewController.mm + proj.ios_mac/ios/Prefix.pch + ${APP_UI_RES} + ) + elseif(MACOSX) + set(APP_UI_RES + proj.ios_mac/mac/Icon.icns + ) + list(APPEND GAME_SOURCE + proj.ios_mac/mac/main.cpp + proj.ios_mac/mac/Prefix.pch + ${APP_UI_RES} + ) + endif() + + list(APPEND GAME_SOURCE ${common_content_files}) +endif() diff --git a/cmake/modules/AXGameTargetSetup.cmake b/cmake/modules/AXGameTargetSetup.cmake new file mode 100644 index 0000000..6964af8 --- /dev/null +++ b/cmake/modules/AXGameTargetSetup.cmake @@ -0,0 +1,23 @@ +if(NOT ANDROID) + add_executable(${APP_NAME} ${APP_SOURCES}) +else() + add_library(${APP_NAME} SHARED ${APP_SOURCES}) + + # whole archive for jni when not building engine as shared libs, otherwise libaxmol.so is archived with it. + if(NOT BUILD_SHARED_LIBS) + target_link_libraries(${APP_NAME} -Wl,--whole-archive cpp_android_spec -Wl,--no-whole-archive) + endif() + + config_android_shared_libs("dev.axmol.lib" "${CMAKE_CURRENT_SOURCE_DIR}/proj.android/app/src") +endif() + +if(NOT _AX_USE_PREBUILT) + target_link_libraries(${APP_NAME} ${_AX_CORE_LIB}) +endif() + +# The optional thirdparties(not dependent by engine) +if(AX_WITH_YAML_CPP) + list(APPEND GAME_INC_DIRS "${_AX_ROOT}/3rdparty/yaml-cpp/include") +endif() + +target_include_directories(${APP_NAME} PRIVATE ${GAME_INC_DIRS}) diff --git a/proj.android/.gitignore b/proj.android/.gitignore new file mode 100644 index 0000000..233199a --- /dev/null +++ b/proj.android/.gitignore @@ -0,0 +1,8 @@ +.gradle +/local.properties +/.idea/workspace.xml +/.idea/libraries +.DS_Store +/build +/captures +/.externalNativeBuild diff --git a/proj.android/app/.gitignore b/proj.android/app/.gitignore new file mode 100644 index 0000000..0886f94 --- /dev/null +++ b/proj.android/app/.gitignore @@ -0,0 +1,2 @@ +/build +/.externalNativeBuild diff --git a/proj.android/app/AndroidManifest.xml b/proj.android/app/AndroidManifest.xml new file mode 100644 index 0000000..c00c2e4 --- /dev/null +++ b/proj.android/app/AndroidManifest.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/proj.android/app/build.gradle b/proj.android/app/build.gradle new file mode 100644 index 0000000..ca7c2b3 --- /dev/null +++ b/proj.android/app/build.gradle @@ -0,0 +1,132 @@ +apply plugin: 'com.android.application' +apply from: project(':libaxmol').projectDir.toString() + "/../dsl/axmol.gradle" + +// Resolve build profiles +def buildProfiles = AxmolUtils.resolveBuildProfiles(project) + +android { + def packageName = buildProfiles['packageName'] + def cmakeVer = buildProfiles['cmakeVer'] + def cmakeOptions = Eval.me(buildProfiles['cmakeOptions']) + def minSdk = buildProfiles['minSdk'] + def targetSdk = buildProfiles['targetSdk'] + + // Apply build profiles + namespace = packageName + compileSdk = targetSdk.toInteger() + ndkVersion = buildProfiles['ndkVer'] + if(buildProfiles.containsKey('ndkPath')) { + ndkPath = buildProfiles['ndkPath'] + } + + defaultConfig { + applicationId packageName + minSdkVersion minSdk + targetSdkVersion targetSdk + versionCode 1 + versionName "1.0" + + externalNativeBuild { + cmake { + arguments = [] + arguments.addAll(cmakeOptions) + cppFlags "-frtti -fexceptions -fsigned-char" + } + } + + ndk { + // noinspection ChromeOsAbiSupport + abiFilters = __1K_ARCHS.split(':').collect{it as String} + } + } + + sourceSets.main { + java.srcDir "src" + res.srcDir "res" + manifest.srcFile "AndroidManifest.xml" + assets.srcDir "build/assets" + } + + externalNativeBuild { + cmake { + version = cmakeVer + path "../../CMakeLists.txt" + } + } + + signingConfigs { + release { + if (project.hasProperty("KEY_STORE_FILE")) { + storeFile file(KEY_STORE_FILE) + storePassword KEY_STORE_PASSWORD + keyAlias KEY_ALIAS + keyPassword KEY_PASSWORD + } + } + } + + buildTypes { + release { + debuggable false + jniDebuggable false + minifyEnabled true + shrinkResources = true + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + proguardFile file(project(':libaxmol').projectDir.toString() + '/proguard-rules.pro') + if (project.hasProperty("KEY_STORE_FILE")) { + signingConfig signingConfigs.release + } + } + + debug { + debuggable true + jniDebuggable true + } + } + + aaptOptions { + noCompress 'mp3','ogg','wav','mp4','ttf','ttc','otf' + } + + buildFeatures { + aidl = true + } +} + +android.applicationVariants.configureEach { variant -> + def variantName = variant.name.capitalize() + tasks.register("copy${variantName}ContentToAssets") { + doFirst { + delete "${projectDir}/build/assets" + } + doLast { + copy { + from "${projectDir}/../../Content" + into "${projectDir}/build/assets" + exclude "**/*.gz" + } + copy { + from "${projectDir}/build/runtime/axslc" + into "${projectDir}/build/assets/axslc" + } + } + } +} + +dependencies { + implementation fileTree(dir: 'libs', include: ['*.jar']) + implementation project(':libaxmol') +} + +project.afterEvaluate { + android.applicationVariants.configureEach { variant -> + def variantName = variant.name.capitalize() + def externalNativeBuild = tasks.named("externalNativeBuild${variantName}") + if (externalNativeBuild) { + def copyContentToAssets = tasks.named("copy${variantName}ContentToAssets") + copyContentToAssets + copyContentToAssets.get().dependsOn externalNativeBuild + tasks.named("compile${variantName}JavaWithJavac").get().dependsOn copyContentToAssets + } + } +} diff --git a/proj.android/app/jni/main.cpp b/proj.android/app/jni/main.cpp new file mode 100644 index 0000000..2a289d9 --- /dev/null +++ b/proj.android/app/jni/main.cpp @@ -0,0 +1,45 @@ +/**************************************************************************** + Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md). + + https://axmol.dev/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#include + +#include +#include + +#include "AppDelegate.h" + +#define LOG_TAG "main" +#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__) + +namespace +{ +std::unique_ptr appDelegate; +} + +void axmol_android_app_init(JNIEnv* env) +{ + LOGD("axmol_android_app_init"); + appDelegate.reset(new AppDelegate()); +} diff --git a/proj.android/app/proguard-rules.pro b/proj.android/app/proguard-rules.pro new file mode 100644 index 0000000..bf051ad --- /dev/null +++ b/proj.android/app/proguard-rules.pro @@ -0,0 +1,25 @@ +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in ${ANDROID_SDK_ROOT}/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the proguardFiles +# directive in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Proguard Android Webivew for release. uncomment if you are using a webview in axmol +#-keep public class android.net.http.SslError +#-keep public class android.webkit.WebViewClient + +#-dontwarn android.webkit.WebView +#-dontwarn android.net.http.SslError +#-dontwarn android.webkit.WebViewClient \ No newline at end of file diff --git a/proj.android/app/res/mipmap-hdpi/ic_launcher.png b/proj.android/app/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..0792086 --- /dev/null +++ b/proj.android/app/res/mipmap-hdpi/ic_launcher.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fc1c5a34d3c1e452d5f95b1c3c2af7829b65bc770dfd21b5998aca670887b42c +size 5735 diff --git a/proj.android/app/res/mipmap-mdpi/ic_launcher.png b/proj.android/app/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..af31063 --- /dev/null +++ b/proj.android/app/res/mipmap-mdpi/ic_launcher.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:39ead4ab27c836ceffbc7b635fbb3287235284897d852a50614b474b93edc27c +size 3288 diff --git a/proj.android/app/res/mipmap-xhdpi/ic_launcher.png b/proj.android/app/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..2f92b3c --- /dev/null +++ b/proj.android/app/res/mipmap-xhdpi/ic_launcher.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ad3698bbc1dbecee4afd443d58dd3f4918d91fd27d3074277a2e48bf79ff8302 +size 7929 diff --git a/proj.android/app/res/mipmap-xxhdpi/ic_launcher.png b/proj.android/app/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..1f9e30a --- /dev/null +++ b/proj.android/app/res/mipmap-xxhdpi/ic_launcher.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a8c2e1e472376b2589bd57d9e3a87fb90cdfc620b1149c83bf19a7cb1eef125a +size 12876 diff --git a/proj.android/app/res/values/strings.xml b/proj.android/app/res/values/strings.xml new file mode 100644 index 0000000..7d65948 --- /dev/null +++ b/proj.android/app/res/values/strings.xml @@ -0,0 +1,3 @@ + + Pinball + diff --git a/proj.android/app/src/dev/axmol/app/AppActivity.java b/proj.android/app/src/dev/axmol/app/AppActivity.java new file mode 100644 index 0000000..9d91664 --- /dev/null +++ b/proj.android/app/src/dev/axmol/app/AppActivity.java @@ -0,0 +1,64 @@ +/**************************************************************************** +Copyright (c) 2015-2016 Chukong Technologies Inc. +Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. +Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md). + +https://axmol.dev/ + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +****************************************************************************/ +package dev.axmol.app; + +import android.os.Bundle; +import dev.axmol.lib.AxmolActivity; +import dev.axmol.lib.SharedLoader; +import android.os.Build; +import android.view.WindowManager; +import android.view.WindowManager.LayoutParams; + +public class AppActivity extends AxmolActivity { + static { + // DNT remove, some android simulator require explicit load shared libraries, otherwise will crash + SharedLoader.load(); + } + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.setEnableVirtualButton(false); + super.onCreate(savedInstanceState); + // Workaround in https://stackoverflow.com/questions/16283079/re-launch-of-activity-on-home-button-but-only-the-first-time/16447508 + if (!isTaskRoot()) { + // Android launched another instance of the root activity into an existing task + // so just quietly finish and go away, dropping the user back into the activity + // at the top of the stack (ie: the last state of this task) + // Don't need to finish it again since it's finished in super.onCreate . + return; + } + // Make sure we're running on Pie or higher to change cutout mode + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { + // Enable rendering into the cutout area + WindowManager.LayoutParams lp = getWindow().getAttributes(); + lp.layoutInDisplayCutoutMode = WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES; + getWindow().setAttributes(lp); + } + // DO OTHER INITIALIZATION BELOW + + } + +} diff --git a/proj.android/build.gradle b/proj.android/build.gradle new file mode 100644 index 0000000..2947340 --- /dev/null +++ b/proj.android/build.gradle @@ -0,0 +1,26 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +buildscript { + repositories { + google() + mavenCentral() + } + + dependencies { + classpath 'com.android.tools.build:gradle:8.11.1' + + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +tasks.register('clean', Delete) { + delete rootProject.layout.buildDirectory +} diff --git a/proj.android/gradle.properties b/proj.android/gradle.properties new file mode 100644 index 0000000..7e72096 --- /dev/null +++ b/proj.android/gradle.properties @@ -0,0 +1,34 @@ +# Project-wide Gradle settings. + +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. + +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html + +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +org.gradle.jvmargs=-Xmx2048M -Dkotlin.daemon.jvm.options\="-Xmx2048M" -XX\:+HeapDumpOnOutOfMemoryError -Dfile.encoding\=UTF-8 + +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true + +# List of CPU architecture to build that application with +# Available architectures (armeabi-v7a | arm64-v8a | x86 | x86_64) +# To build for multiple architecture, use the `:` between them +# Example - __1K_ARCHS=armeabi-v7a:arm64-v8a:x86:x86_64 +__1K_ARCHS=arm64-v8a + +# uncomment it and fill in sign information for generate signed apk +#KEY_STORE_FILE=file path of keystore +#KEY_STORE_PASSWORD=password of keystore +#KEY_ALIAS=alias of key +#KEY_PASSWORD=password of key + +android.injected.testOnly=false +android.useAndroidX=true +android.native.buildOutput=verbose + diff --git a/proj.android/gradle/wrapper/gradle-wrapper.jar b/proj.android/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..8bdaf60 Binary files /dev/null and b/proj.android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/proj.android/gradle/wrapper/gradle-wrapper.properties b/proj.android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..e24b157 --- /dev/null +++ b/proj.android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Fri Aug 8 15:49:42 UTC+08 2025 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists \ No newline at end of file diff --git a/proj.android/gradlew b/proj.android/gradlew new file mode 100644 index 0000000..0972d35 --- /dev/null +++ b/proj.android/gradlew @@ -0,0 +1,251 @@ +#!/bin/sh + +# +# Copyright © 2015 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH="\\\"\\\"" + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/proj.android/gradlew.bat b/proj.android/gradlew.bat new file mode 100644 index 0000000..8de1053 --- /dev/null +++ b/proj.android/gradlew.bat @@ -0,0 +1,94 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS=-Dfile.encoding=UTF-8 "-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH= + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/proj.android/settings.gradle b/proj.android/settings.gradle new file mode 100644 index 0000000..ea712da --- /dev/null +++ b/proj.android/settings.gradle @@ -0,0 +1,14 @@ +import java.nio.file.Paths + +def folder = new File("${settingsDir}/../axmol") +if (folder.exists()) { + System.setProperty("AX_ROOT", folder.path) +} else { + System.setProperty("AX_ROOT", "${System.env.AX_ROOT}") +} + +include ':libaxmol' +project(':libaxmol').projectDir = new File(Paths.get("${System.properties.AX_ROOT}/core/platform/android/libaxmol").toUri()) +include ':Pinball' +project(':Pinball').projectDir = new File(settingsDir, 'app') +rootProject.name = "Pinball" diff --git a/proj.ios_mac/ios/AppController.h b/proj.ios_mac/ios/AppController.h new file mode 100644 index 0000000..f257358 --- /dev/null +++ b/proj.ios_mac/ios/AppController.h @@ -0,0 +1,38 @@ +/**************************************************************************** + Copyright (c) 2010-2013 cocos2d-x.org + Copyright (c) 2013-2016 Chukong Technologies Inc. + Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md). + + https://axmol.dev/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ +#pragma once + +#import + +@class RootViewController; + +@interface AppController : NSObject { +} + +@property(nonatomic, readonly) RootViewController* viewController; + +@end diff --git a/proj.ios_mac/ios/AppController.mm b/proj.ios_mac/ios/AppController.mm new file mode 100644 index 0000000..c38fa83 --- /dev/null +++ b/proj.ios_mac/ios/AppController.mm @@ -0,0 +1,136 @@ +/**************************************************************************** + Copyright (c) 2010-2013 cocos2d-x.org + Copyright (c) 2013-2016 Chukong Technologies Inc. + Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md). + + https://axmol.dev/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#import "AppController.h" +#import "axmol.h" +#import "AppDelegate.h" +#import "RootViewController.h" + +@implementation AppController + +#pragma mark - +#pragma mark Application lifecycle + +// axmol application instance +static AppDelegate s_sharedApplication; + +- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions +{ + + ax::Application* app = ax::Application::getInstance(); + + // Initialize the RenderView attributes + app->initGfxContextAttrs(); + + // Override point for customization after application launch. + + auto renderView = ax::RenderViewImpl::createWithFullScreen("axmol2"); + _viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil]; + + // uncumment if you want disable multiple touches + // renderView->setMultipleTouchEnabled(false); + + renderView->showWindow(_viewController); + + // IMPORTANT: Setting the RenderView should be done after creating the RootViewController + ax::Director::getInstance()->setRenderView(renderView); + + // run the axmol game scene + app->run(); + + return YES; +} + +- (void)applicationWillResignActive:(UIApplication*)application +{ + /* + Sent when the application is about to move from active to inactive state. This can occur for certain types of + temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and + it begins the transition to the background state. Use this method to pause ongoing tasks, disable timers, and + throttle down OpenGL ES frame rates. Games should use this method to pause the game. + */ + // We don't need to call this method any more. It will interrupt user defined game pause&resume logic + /* ax::Director::getInstance()->pause(); */ +} + +- (void)applicationDidBecomeActive:(UIApplication*)application +{ + /* + Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was + previously in the background, optionally refresh the user interface. + */ + // We don't need to call this method any more. It will interrupt user defined game pause&resume logic + /* ax::Director::getInstance()->resume(); */ +} + +- (void)applicationDidEnterBackground:(UIApplication*)application +{ + /* + Use this method to release shared resources, save user data, invalidate timers, and store enough application state + information to restore your application to its current state in case it is terminated later. If your application + supports background execution, called instead of applicationWillTerminate: when the user quits. + */ + ax::Application::getInstance()->applicationDidEnterBackground(); +} + +- (void)applicationWillEnterForeground:(UIApplication*)application +{ + /* + Called as part of transition from the background to the inactive state: here you can undo many of the changes made + on entering the background. + */ + ax::Application::getInstance()->applicationWillEnterForeground(); +} + +- (void)applicationWillTerminate:(UIApplication*)application +{ + /* + Called when the application is about to terminate. + See also applicationDidEnterBackground:. + */ +} + +#pragma mark - +#pragma mark Memory management + +- (void)applicationDidReceiveMemoryWarning:(UIApplication*)application +{ + /* + Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) + later. + */ +} + +#if !__has_feature(objc_arc) +- (void)dealloc +{ + [_viewController release]; + [super dealloc]; +} +#endif + +@end diff --git a/proj.ios_mac/ios/Prefix.pch b/proj.ios_mac/ios/Prefix.pch new file mode 100644 index 0000000..e2bcb4f --- /dev/null +++ b/proj.ios_mac/ios/Prefix.pch @@ -0,0 +1,12 @@ +// +// Prefix header for all source files of the 'iphone' target in the 'iphone' project +// + +#ifdef __OBJC__ + #import + #import +#endif + +#ifdef __cplusplus + #include "axmol.h" +#endif diff --git a/proj.ios_mac/ios/RootViewController.h b/proj.ios_mac/ios/RootViewController.h new file mode 100644 index 0000000..6053ee6 --- /dev/null +++ b/proj.ios_mac/ios/RootViewController.h @@ -0,0 +1,35 @@ +/**************************************************************************** + Copyright (c) 2013 cocos2d-x.org + Copyright (c) 2013-2016 Chukong Technologies Inc. + Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md). + + https://axmol.dev/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ +#pragma once + +#import + +@interface RootViewController : UIViewController { +} +- (BOOL)prefersStatusBarHidden; + +@end diff --git a/proj.ios_mac/ios/RootViewController.mm b/proj.ios_mac/ios/RootViewController.mm new file mode 100644 index 0000000..b8417db --- /dev/null +++ b/proj.ios_mac/ios/RootViewController.mm @@ -0,0 +1,117 @@ +/**************************************************************************** + Copyright (c) 2013 cocos2d-x.org + Copyright (c) 2013-2016 Chukong Technologies Inc. + Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md). + + https://axmol.dev/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#import "RootViewController.h" +#import "axmol.h" +#import "platform/ios/EARenderView-ios.h" + +@implementation RootViewController + +/* + // The designated initializer. Override if you create the controller programmatically and want to perform +customization that is not appropriate for viewDidLoad. +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { + if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) { + // Custom initialization + } + return self; +} +*/ + +// Implement loadView to create a view hierarchy programmatically, without using a nib. +// - (void)loadView +// { +// } + +// Implement viewDidLoad to do additional setup after loading the view, typically from a nib. +- (void)viewDidLoad +{ + [super viewDidLoad]; +} + +- (void)viewWillAppear:(BOOL)animated +{ + [super viewWillAppear:animated]; +} + +- (void)viewDidDisappear:(BOOL)animated +{ + [super viewDidDisappear:animated]; +} + +// For ios6, use supportedInterfaceOrientations & shouldAutorotate instead +#ifdef __IPHONE_6_0 +- (NSUInteger)supportedInterfaceOrientations +{ + return UIInterfaceOrientationMaskAllButUpsideDown; +} +#endif + +- (BOOL)shouldAutorotate +{ + return YES; +} + +- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation +{ + [super didRotateFromInterfaceOrientation:fromInterfaceOrientation]; + + auto renderView = ax::Director::getInstance()->getRenderView(); + + if (renderView) + { + EARenderView* eaView = (__bridge EARenderView*)renderView->getEARenderView(); + + if (eaView) + { + CGSize s = CGSizeMake([eaView getWidth], [eaView getHeight]); + ax::Application::getInstance()->applicationScreenSizeChanged((int)s.width, (int)s.height); + } + } +} + +// fix not hide status on ios7 +- (BOOL)prefersStatusBarHidden +{ + return YES; +} + +// Controls the application's preferred home indicator auto-hiding when this view controller is shown. +- (BOOL)prefersHomeIndicatorAutoHidden +{ + return YES; +} + +- (void)didReceiveMemoryWarning +{ + // Releases the view if it doesn't have a superview. + [super didReceiveMemoryWarning]; + + // Release any cached data, images, etc that aren't in use. +} + +@end diff --git a/proj.ios_mac/ios/exportoptions.plist b/proj.ios_mac/ios/exportoptions.plist new file mode 100644 index 0000000..b87b8a9 --- /dev/null +++ b/proj.ios_mac/ios/exportoptions.plist @@ -0,0 +1,15 @@ + + + + + compileBitcode + + method + development + provisioningProfiles + + Bundle Identifier + Provision Profile Name + + + diff --git a/proj.ios_mac/ios/main.m b/proj.ios_mac/ios/main.m new file mode 100644 index 0000000..6217853 --- /dev/null +++ b/proj.ios_mac/ios/main.m @@ -0,0 +1,7 @@ +#import + +int main(int argc, char *argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, @"AppController"); + } +} diff --git a/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Contents.json b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..8e4b175 --- /dev/null +++ b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,158 @@ +{ + "images" : [ + { + "filename" : "Icon-20@2x.png", + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" + }, + { + "filename" : "Icon-20@3x.png", + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" + }, + { + "filename" : "Icon-29.png", + "idiom" : "iphone", + "scale" : "1x", + "size" : "29x29" + }, + { + "filename" : "Icon-29@2x.png", + "idiom" : "iphone", + "scale" : "2x", + "size" : "29x29" + }, + { + "filename" : "Icon-29@3x.png", + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" + }, + { + "filename" : "Icon-40@2x.png", + "idiom" : "iphone", + "scale" : "2x", + "size" : "40x40" + }, + { + "filename" : "Icon-40@3x.png", + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" + }, + { + "filename" : "Icon-57.png", + "idiom" : "iphone", + "scale" : "1x", + "size" : "57x57" + }, + { + "filename" : "Icon-57@2x.png", + "idiom" : "iphone", + "scale" : "2x", + "size" : "57x57" + }, + { + "filename" : "Icon-60@2x.png", + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "filename" : "Icon-60@3x.png", + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "filename" : "Icon-20.png", + "idiom" : "ipad", + "scale" : "1x", + "size" : "20x20" + }, + { + "filename" : "Icon-20@2x.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "20x20" + }, + { + "filename" : "Icon-29.png", + "idiom" : "ipad", + "scale" : "1x", + "size" : "29x29" + }, + { + "filename" : "Icon-29@2x.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "29x29" + }, + { + "filename" : "Icon-40.png", + "idiom" : "ipad", + "scale" : "1x", + "size" : "40x40" + }, + { + "filename" : "Icon-40@2x.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "40x40" + }, + { + "filename" : "Icon-50.png", + "idiom" : "ipad", + "scale" : "1x", + "size" : "50x50" + }, + { + "filename" : "Icon-50@2x.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "50x50" + }, + { + "filename" : "Icon-72.png", + "idiom" : "ipad", + "scale" : "1x", + "size" : "72x72" + }, + { + "filename" : "Icon-72@2x.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "72x72" + }, + { + "filename" : "Icon-76.png", + "idiom" : "ipad", + "scale" : "1x", + "size" : "76x76" + }, + { + "filename" : "Icon-76@2x.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "76x76" + }, + { + "filename" : "Icon-83.5@2x.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "83.5x83.5" + }, + { + "filename" : "Icon-1024.png", + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-1024.png b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-1024.png new file mode 100644 index 0000000..6461668 --- /dev/null +++ b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-1024.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:754ae1f5602cccba6a8233ab0431d5367af1d4b7952efb8fe36e5c792efb3fbc +size 246096 diff --git a/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20.png b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20.png new file mode 100644 index 0000000..44d5717 --- /dev/null +++ b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:12e2a43ae1082f453edf8c89d9f5b955623c372d2f11bdd212203b2cedfc9717 +size 866 diff --git a/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20@2x.png b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20@2x.png new file mode 100644 index 0000000..6e202fa --- /dev/null +++ b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20@2x.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cc17184708593e71f31193481bd0a9ed3cd749a022def52a21f1843d292d1a50 +size 2110 diff --git a/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png new file mode 100644 index 0000000..a2e6146 --- /dev/null +++ b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-20@3x.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:73f8c2ae9fb5d4b901cc9703e0aa53e630641ef87f927fa7e29eae5f317baedf +size 3487 diff --git a/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-29.png b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-29.png new file mode 100644 index 0000000..c0ceeec --- /dev/null +++ b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-29.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c72bc81e391513041704ab1c94d88150604de7efa1f14073d164b8b65d61855f +size 1437 diff --git a/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png new file mode 100644 index 0000000..ddd351c --- /dev/null +++ b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-29@2x.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9953eb94e4a0c94093228dc6c3ee5b13c10ac1caaa2c76daa4b3e339bbf4e18c +size 3361 diff --git a/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png new file mode 100644 index 0000000..8a0e2a5 --- /dev/null +++ b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-29@3x.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b0ef47293047ba46f17895616fbc88d7b7afbf53e44862b37dac47eb60d2b6e9 +size 5726 diff --git a/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-40.png b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-40.png new file mode 100644 index 0000000..d36aec1 --- /dev/null +++ b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-40.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4632e897595da1e6255b2284c276aba06a236158200998b257e9ffb4e9d78471 +size 2110 diff --git a/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png new file mode 100644 index 0000000..e63760e --- /dev/null +++ b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-40@2x.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2b03d08dc7fa58de18e1bdf97261b452cf866851e920a0468539abc594b60d4e +size 5061 diff --git a/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png new file mode 100644 index 0000000..c700943 --- /dev/null +++ b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-40@3x.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d5e5ba93e44d1bbe24e47c2a3bbf315ff49846a32a6792afadaac54b42116f0e +size 8484 diff --git a/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-50.png b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-50.png new file mode 100644 index 0000000..b77f4b8 --- /dev/null +++ b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-50.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ccfa30bf3462a981fe17048f95b0e51d1dd9b927fb94cdc6e98e9b0ab09bca01 +size 2801 diff --git a/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-50@2x.png b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-50@2x.png new file mode 100644 index 0000000..c1d1e29 --- /dev/null +++ b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-50@2x.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cfc4442d933bad29c502a827cec54dd38e1e30f0fedfe296c631fac7c6d7e202 +size 6721 diff --git a/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-57.png b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-57.png new file mode 100644 index 0000000..ee97ba4 --- /dev/null +++ b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-57.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e880103f0676f0c83f5c017497423bb71cdb57bc097ecec098eef5115636e0e7 +size 3338 diff --git a/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-57@2x.png b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-57@2x.png new file mode 100644 index 0000000..342f5fe --- /dev/null +++ b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-57@2x.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:351eae21d7f3f24bcf353aa104523eea8ec447f3caf2cc3f6c2ae37c29ec29b8 +size 8049 diff --git a/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png new file mode 100644 index 0000000..90f0f55 --- /dev/null +++ b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-60@2x.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5952ad772b34daf2c980dd75ce697f4ea918fe7f4f4d374d4ae727f3760eacfd +size 8484 diff --git a/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png new file mode 100644 index 0000000..65dce12 --- /dev/null +++ b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-60@3x.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:56388e5805bd7e61caa66e05108f4b83e1b9022364f86dd5aad675e7503ef53a +size 14319 diff --git a/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-72.png b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-72.png new file mode 100644 index 0000000..b70f1eb --- /dev/null +++ b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-72.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2a453d8276da9b3ade381e5a36a385220dfe8d4c547468d95ae16b2c34c8501e +size 4466 diff --git a/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png new file mode 100644 index 0000000..1a15561 --- /dev/null +++ b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-72@2x.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2d8dbfa81bcd8a740ae62247523ec2f93e9e886e86ab0de1e685276407f43b79 +size 10737 diff --git a/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-76.png b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-76.png new file mode 100644 index 0000000..02b563e --- /dev/null +++ b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-76.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:50bc42dcf90e9eb243c14ac02529d93a979d80b46e003afd4ca8454d01bb6986 +size 4760 diff --git a/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png new file mode 100644 index 0000000..ec983c9 --- /dev/null +++ b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-76@2x.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:82ebb098c8e201e0c21a83f345c1d6ddf8adc11f13ad9fa8f4431c8efed401f0 +size 11421 diff --git a/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png new file mode 100644 index 0000000..f93b900 --- /dev/null +++ b/proj.ios_mac/ios/targets/ios/Images.xcassets/AppIcon.appiconset/Icon-83.5@2x.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e04cf52280b455c9cc0c89b2a4a2b57168d814eb05980a752299e881d31f8ed0 +size 12905 diff --git a/proj.ios_mac/ios/targets/ios/Images.xcassets/Contents.json b/proj.ios_mac/ios/targets/ios/Images.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/proj.ios_mac/ios/targets/ios/Images.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/proj.ios_mac/ios/targets/ios/Info.plist b/proj.ios_mac/ios/targets/ios/Info.plist new file mode 100644 index 0000000..540421e --- /dev/null +++ b/proj.ios_mac/ios/targets/ios/Info.plist @@ -0,0 +1,54 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleDisplayName + ${PROJECT_NAME} + CFBundleExecutable + ${MACOSX_BUNDLE_EXECUTABLE_NAME} + CFBundleIconFile + Icon-57.png + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PROJECT_NAME} + CFBundleShortVersionString + 1.0 + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UIAppFonts + + UILaunchStoryboardName + LaunchScreen + UIPrerenderedIcon + + UIStatusBarHidden + + UISupportedInterfaceOrientations + + UIInterfaceOrientationLandscapeRight + UIInterfaceOrientationLandscapeLeft + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationLandscapeRight + UIInterfaceOrientationLandscapeLeft + + ITSAppUsesNonExemptEncryption + + UIRequiresFullScreen + + NSHumanReadableCopyright + Copyright © 2023. All rights reserved. + + diff --git a/proj.ios_mac/ios/targets/ios/LaunchScreen.storyboard b/proj.ios_mac/ios/targets/ios/LaunchScreen.storyboard new file mode 100644 index 0000000..ba8383a --- /dev/null +++ b/proj.ios_mac/ios/targets/ios/LaunchScreen.storyboard @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/proj.ios_mac/ios/targets/ios/LaunchScreenBackground.png b/proj.ios_mac/ios/targets/ios/LaunchScreenBackground.png new file mode 100644 index 0000000..f63d1c2 --- /dev/null +++ b/proj.ios_mac/ios/targets/ios/LaunchScreenBackground.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1590cfdf8ea496657f6a4d646bd2d53aac052394f5c4764fa3db9efc80f35e6f +size 58215 diff --git a/proj.ios_mac/ios/targets/ios/LaunchScreenBackgroundPortrait.png b/proj.ios_mac/ios/targets/ios/LaunchScreenBackgroundPortrait.png new file mode 100644 index 0000000..f8b7aa9 --- /dev/null +++ b/proj.ios_mac/ios/targets/ios/LaunchScreenBackgroundPortrait.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3c17f1480c23b34b7af05e6d45d2baad369057971afbcdf66ddae8c11a5c5968 +size 119745 diff --git a/proj.ios_mac/ios/targets/tvos/Images.xcassets/AccentColor.colorset/Contents.json b/proj.ios_mac/ios/targets/tvos/Images.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..0407a30 --- /dev/null +++ b/proj.ios_mac/ios/targets/tvos/Images.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,20 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "display-p3", + "components" : { + "alpha" : "1.000", + "blue" : "0.447", + "green" : "0.282", + "red" : "0.129" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..008b25d --- /dev/null +++ b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,11 @@ +{ + "images" : [ + { + "idiom" : "tv", + "size" : "1280x768", + "filename" : "icon-0.png" + } + ], + "author" : "Store Assets Generator", + "version" : "0.4.0" +} \ No newline at end of file diff --git a/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/icon-0.png b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/icon-0.png new file mode 100644 index 0000000..fb89bfe --- /dev/null +++ b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Content.imageset/icon-0.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8456283db451797e017254a9744783e0d71b2948e7932500e46fb593edc29f7d +size 124059 diff --git a/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json new file mode 100644 index 0000000..f652e9b --- /dev/null +++ b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Back.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "Store Assets Generator", + "version" : "0.4.0" + } +} \ No newline at end of file diff --git a/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Contents.json b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Contents.json new file mode 100644 index 0000000..5d09d3b --- /dev/null +++ b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Contents.json @@ -0,0 +1,17 @@ +{ + "info" : { + "author" : "Store Assets Generator", + "version" : "0.4.0" + }, + "layers" : [ + { + "filename" : "Front.imagestacklayer" + }, + { + "filename" : "Middle.imagestacklayer" + }, + { + "filename" : "Back.imagestacklayer" + } + ] +} \ No newline at end of file diff --git a/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..008b25d --- /dev/null +++ b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,11 @@ +{ + "images" : [ + { + "idiom" : "tv", + "size" : "1280x768", + "filename" : "icon-0.png" + } + ], + "author" : "Store Assets Generator", + "version" : "0.4.0" +} \ No newline at end of file diff --git a/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/icon-0.png b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/icon-0.png new file mode 100644 index 0000000..54cd2d3 --- /dev/null +++ b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Content.imageset/icon-0.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e17db870c87c8e57875b3e44fcea2ceeaf1af41ae39aa5383f468d91ded19c5a +size 116019 diff --git a/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json new file mode 100644 index 0000000..929319b --- /dev/null +++ b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Front.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : "0.4.0", + "author" : "Store Assets Generator" + } +} \ No newline at end of file diff --git a/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..008b25d --- /dev/null +++ b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,11 @@ +{ + "images" : [ + { + "idiom" : "tv", + "size" : "1280x768", + "filename" : "icon-0.png" + } + ], + "author" : "Store Assets Generator", + "version" : "0.4.0" +} \ No newline at end of file diff --git a/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/icon-0.png b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/icon-0.png new file mode 100644 index 0000000..9f0c5f7 --- /dev/null +++ b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Content.imageset/icon-0.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a9c9434cb79a7515f870eadcbeb03041d0f48279310a7fa368da1b4aea66d00a +size 131058 diff --git a/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json new file mode 100644 index 0000000..f652e9b --- /dev/null +++ b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon - App Store.imagestack/Middle.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "Store Assets Generator", + "version" : "0.4.0" + } +} \ No newline at end of file diff --git a/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..1e90ad9 --- /dev/null +++ b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,18 @@ +{ + "images" : [ + { + "size" : "400x240", + "idiom" : "tv", + "filename" : "icon-400.png", + "scale" : "1x" + }, + { + "size" : "400x240", + "idiom" : "tv", + "filename" : "icon-800.png", + "scale" : "2x" + } + ], + "author" : "Store Assets Generator", + "version" : "0.4.0" +} \ No newline at end of file diff --git a/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/icon-400.png b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/icon-400.png new file mode 100644 index 0000000..b2212f8 --- /dev/null +++ b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/icon-400.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:71f55478bedf500f0dc857d277cfe763ab6bec82427e04ff1461b1662d8360ee +size 16058 diff --git a/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/icon-800.png b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/icon-800.png new file mode 100644 index 0000000..e8c05cb --- /dev/null +++ b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Content.imageset/icon-800.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b4e3554d9c1dd87cae31ece219094bf7263265c39ba4e465677853c6e6db5490 +size 50399 diff --git a/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json new file mode 100644 index 0000000..929319b --- /dev/null +++ b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Back.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : "0.4.0", + "author" : "Store Assets Generator" + } +} \ No newline at end of file diff --git a/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Contents.json b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Contents.json new file mode 100644 index 0000000..dda6d33 --- /dev/null +++ b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Contents.json @@ -0,0 +1,17 @@ +{ + "info" : { + "version" : "0.4.0", + "author" : "Store Assets Generator" + }, + "layers" : [ + { + "filename" : "Front.imagestacklayer" + }, + { + "filename" : "Middle.imagestacklayer" + }, + { + "filename" : "Back.imagestacklayer" + } + ] +} \ No newline at end of file diff --git a/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..1e90ad9 --- /dev/null +++ b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,18 @@ +{ + "images" : [ + { + "size" : "400x240", + "idiom" : "tv", + "filename" : "icon-400.png", + "scale" : "1x" + }, + { + "size" : "400x240", + "idiom" : "tv", + "filename" : "icon-800.png", + "scale" : "2x" + } + ], + "author" : "Store Assets Generator", + "version" : "0.4.0" +} \ No newline at end of file diff --git a/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/icon-400.png b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/icon-400.png new file mode 100644 index 0000000..e2376d8 --- /dev/null +++ b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/icon-400.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a30764ae43e2dab13caf99ae30f8640023e22eda11ab64cc6677a30bec81c2bc +size 26661 diff --git a/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/icon-800.png b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/icon-800.png new file mode 100644 index 0000000..0bb3d6f --- /dev/null +++ b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Content.imageset/icon-800.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4d7ffacf9ce130abf67991e84d3c4fd1ff098430e0c081c1474f62ea5d53e4fa +size 55490 diff --git a/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json new file mode 100644 index 0000000..929319b --- /dev/null +++ b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Front.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : "0.4.0", + "author" : "Store Assets Generator" + } +} \ No newline at end of file diff --git a/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json new file mode 100644 index 0000000..1e90ad9 --- /dev/null +++ b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json @@ -0,0 +1,18 @@ +{ + "images" : [ + { + "size" : "400x240", + "idiom" : "tv", + "filename" : "icon-400.png", + "scale" : "1x" + }, + { + "size" : "400x240", + "idiom" : "tv", + "filename" : "icon-800.png", + "scale" : "2x" + } + ], + "author" : "Store Assets Generator", + "version" : "0.4.0" +} \ No newline at end of file diff --git a/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/icon-400.png b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/icon-400.png new file mode 100644 index 0000000..70e93f7 --- /dev/null +++ b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/icon-400.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8dd21ccb317a7156a7b745d04be635971be4fd7b4995cdf66cca0caf303f3e06 +size 25845 diff --git a/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/icon-800.png b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/icon-800.png new file mode 100644 index 0000000..f17602b --- /dev/null +++ b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Content.imageset/icon-800.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d6a53742977758f383c39772d5df0a8d856c52862a5a75b6912046a1af3ebcf5 +size 50035 diff --git a/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json new file mode 100644 index 0000000..929319b --- /dev/null +++ b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/App Icon.imagestack/Middle.imagestacklayer/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : "0.4.0", + "author" : "Store Assets Generator" + } +} \ No newline at end of file diff --git a/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Contents.json b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Contents.json new file mode 100644 index 0000000..93db393 --- /dev/null +++ b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Contents.json @@ -0,0 +1,32 @@ +{ + "info" : { + "author" : "Store Assets Generator", + "version" : "0.4.0" + }, + "assets" : [ + { + "filename" : "App Icon - App Store.imagestack", + "role" : "primary-app-icon", + "idiom" : "tv", + "size" : "1280x768" + }, + { + "idiom" : "tv", + "filename" : "App Icon.imagestack", + "size" : "400x240", + "role" : "primary-app-icon" + }, + { + "size" : "2320x720", + "filename" : "Top Shelf Image Wide.imageset", + "idiom" : "tv", + "role" : "top-shelf-image-wide" + }, + { + "role" : "top-shelf-image", + "size" : "1920x720", + "filename" : "Top Shelf Image.imageset", + "idiom" : "tv" + } + ] +} \ No newline at end of file diff --git a/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/Contents.json b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/Contents.json new file mode 100644 index 0000000..707d2e0 --- /dev/null +++ b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/Contents.json @@ -0,0 +1,18 @@ +{ + "images" : [ + { + "size" : "2320x720", + "idiom" : "tv", + "filename" : "icon-2320.png", + "scale" : "1x" + }, + { + "size" : "2320x720", + "idiom" : "tv", + "filename" : "icon-4640.png", + "scale" : "2x" + } + ], + "author" : "Store Assets Generator", + "version" : "0.4.0" +} \ No newline at end of file diff --git a/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/icon-2320.png b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/icon-2320.png new file mode 100644 index 0000000..2055693 --- /dev/null +++ b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/icon-2320.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e4e63b641b474a957d7723a33ad4c98a49d207319ceb12d82e710dc9c7351f0d +size 117838 diff --git a/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/icon-4640.png b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/icon-4640.png new file mode 100644 index 0000000..ecf99cb --- /dev/null +++ b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image Wide.imageset/icon-4640.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b14f5233af818a89ba6a44038fe677f0695220ef429f6aa3dc9d70e1da74477a +size 310143 diff --git a/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/Contents.json b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/Contents.json new file mode 100644 index 0000000..0d9a5d2 --- /dev/null +++ b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/Contents.json @@ -0,0 +1,18 @@ +{ + "images" : [ + { + "size" : "1920x720", + "idiom" : "tv", + "filename" : "icon-1920.png", + "scale" : "1x" + }, + { + "size" : "1920x720", + "idiom" : "tv", + "filename" : "icon-3840.png", + "scale" : "2x" + } + ], + "author" : "Store Assets Generator", + "version" : "0.4.0" +} \ No newline at end of file diff --git a/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/icon-1920.png b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/icon-1920.png new file mode 100644 index 0000000..f93c468 --- /dev/null +++ b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/icon-1920.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d9de92fc8654a60da5eae05c70069a34c5730b71e982e81e31a837352767264 +size 112472 diff --git a/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/icon-3840.png b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/icon-3840.png new file mode 100644 index 0000000..f7b6f93 --- /dev/null +++ b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Brand Assets.brandassets/Top Shelf Image.imageset/icon-3840.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eadb44d9a6eeef5ec8c280e1cc4979424f89464978d74632c9fab869d7b13d5a +size 332834 diff --git a/proj.ios_mac/ios/targets/tvos/Images.xcassets/Contents.json b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/proj.ios_mac/ios/targets/tvos/Images.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/proj.ios_mac/ios/targets/tvos/Info.plist b/proj.ios_mac/ios/targets/tvos/Info.plist new file mode 100644 index 0000000..2db4d69 --- /dev/null +++ b/proj.ios_mac/ios/targets/tvos/Info.plist @@ -0,0 +1,43 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleDisplayName + ${PROJECT_NAME} + CFBundleExecutable + ${MACOSX_BUNDLE_EXECUTABLE_NAME} + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PROJECT_NAME} + CFBundleShortVersionString + 1.0 + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1 + UIAppFonts + + UILaunchStoryboardName + LaunchScreen + UIPrerenderedIcon + + UIStatusBarHidden + + UISupportedInterfaceOrientations + + UIInterfaceOrientationLandscapeRight + UIInterfaceOrientationLandscapeLeft + + ITSAppUsesNonExemptEncryption + + NSHumanReadableCopyright + Copyright © 2023. All rights reserved. + + diff --git a/proj.ios_mac/ios/targets/tvos/LaunchScreen.storyboard b/proj.ios_mac/ios/targets/tvos/LaunchScreen.storyboard new file mode 100644 index 0000000..1b38fee --- /dev/null +++ b/proj.ios_mac/ios/targets/tvos/LaunchScreen.storyboard @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/proj.ios_mac/ios/targets/tvos/LaunchScreenBackground.png b/proj.ios_mac/ios/targets/tvos/LaunchScreenBackground.png new file mode 100644 index 0000000..f63d1c2 --- /dev/null +++ b/proj.ios_mac/ios/targets/tvos/LaunchScreenBackground.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1590cfdf8ea496657f6a4d646bd2d53aac052394f5c4764fa3db9efc80f35e6f +size 58215 diff --git a/proj.ios_mac/mac/Icon.icns b/proj.ios_mac/mac/Icon.icns new file mode 100644 index 0000000..8f6f945 Binary files /dev/null and b/proj.ios_mac/mac/Icon.icns differ diff --git a/proj.ios_mac/mac/Info.plist b/proj.ios_mac/mac/Info.plist new file mode 100644 index 0000000..59f0b3b --- /dev/null +++ b/proj.ios_mac/mac/Info.plist @@ -0,0 +1,36 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${MACOSX_BUNDLE_EXECUTABLE_NAME} + CFBundleIconFile + Icon + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PROJECT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSApplicationCategoryType + public.app-category.games + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSHumanReadableCopyright + Copyright © 2023. All rights reserved. + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/proj.ios_mac/mac/Prefix.pch b/proj.ios_mac/mac/Prefix.pch new file mode 100644 index 0000000..b11b00b --- /dev/null +++ b/proj.ios_mac/mac/Prefix.pch @@ -0,0 +1,11 @@ +// +// Prefix header for all source files of the 'Paralaxer' target in the 'Paralaxer' project +// + +#ifdef __OBJC__ + #import +#endif + +#ifdef __cplusplus + #include "axmol.h" +#endif diff --git a/proj.ios_mac/mac/main.cpp b/proj.ios_mac/mac/main.cpp new file mode 100644 index 0000000..6060c9e --- /dev/null +++ b/proj.ios_mac/mac/main.cpp @@ -0,0 +1,48 @@ +/**************************************************************************** + Copyright (c) 2010 cocos2d-x.org + Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md). + + https://axmol.dev/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#include "AppDelegate.h" +#include "axmol.h" + +using namespace ax; + +int axmol_main() +{ + // create the application instance + AppDelegate app; + return Application::getInstance()->run(); +} + +int main(int argc, char* argv[]) +{ + auto result = axmol_main(); + +#if AX_OBJECT_LEAK_DETECTION + Object::printLeaks(); +#endif + + return result; +} diff --git a/proj.linux/main.cpp b/proj.linux/main.cpp new file mode 100644 index 0000000..fee53bf --- /dev/null +++ b/proj.linux/main.cpp @@ -0,0 +1,51 @@ +/**************************************************************************** + Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md). + + https://axmol.dev/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#include "AppDelegate.h" + +#include +#include +#include +#include + +using namespace ax; + +int axmol_main() +{ + // create the application instance + AppDelegate app; + return Application::getInstance()->run(); +} + +int main(int argc, char** argv) +{ + auto result = axmol_main(); + +#if AX_OBJECT_LEAK_DETECTION + Object::printLeaks(); +#endif + + return result; +} diff --git a/proj.wasm/main.cpp b/proj.wasm/main.cpp new file mode 100644 index 0000000..0024f86 --- /dev/null +++ b/proj.wasm/main.cpp @@ -0,0 +1,55 @@ +/**************************************************************************** + Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md). + + https://axmol.dev/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#include "AppDelegate.h" +#include "axmol.h" + +#include +#include +#include +#include + +using namespace ax; + +namespace +{ +std::unique_ptr appDelegate; +} + +void axmol_wasm_app_exit() +{ + appDelegate = nullptr; + +#if AX_OBJECT_LEAK_DETECTION + Object::printLeaks(); +#endif +} + +int main(int argc, char** argv) +{ + // create the application instance + appDelegate.reset(new AppDelegate()); + return Application::getInstance()->run(); +} diff --git a/proj.win32/game.rc b/proj.win32/game.rc new file mode 100644 index 0000000..1e0a2a0 --- /dev/null +++ b/proj.win32/game.rc @@ -0,0 +1,86 @@ +// Microsoft Visual C++ generated resource script. +// +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#define APSTUDIO_HIDDEN_SYMBOLS +#include "windows.h" +#undef APSTUDIO_HIDDEN_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (U.S.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US +#pragma code_page(1252) +#endif //_WIN32 + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +#endif // APSTUDIO_INVOKED + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +GLFW_ICON ICON "res\\game.ico" + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 1,0,0,1 + PRODUCTVERSION 1,0,0,1 + FILEFLAGSMASK 0x3fL +#ifdef _DEBUG + FILEFLAGS 0x1L +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904B0" + BEGIN + VALUE "CompanyName", "\0" + VALUE "FileDescription", "game Module\0" + VALUE "FileVersion", "1, 0, 0, 1\0" + VALUE "InternalName", "game\0" + VALUE "LegalCopyright", "Copyright \0" + VALUE "OriginalFilename", "game.exe\0" + VALUE "ProductName", "game Module\0" + VALUE "ProductVersion", "1, 0, 0, 1\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0409, 0x04B0 + END +END + +///////////////////////////////////////////////////////////////////////////// +#endif // !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) diff --git a/proj.win32/main.cpp b/proj.win32/main.cpp new file mode 100644 index 0000000..95a3ffa --- /dev/null +++ b/proj.win32/main.cpp @@ -0,0 +1,70 @@ +/**************************************************************************** + Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md). + + https://axmol.dev/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#include "main.h" +#include "AppDelegate.h" +#include "platform/Application.h" + +// Uncomment to enable win32 console +#define USE_WIN32_CONSOLE + +using namespace ax; + +int axmol_main() { + // create the application instance + AppDelegate app; + int ret = Application::getInstance()->run(); + return ret; +} + +#if !defined(_CONSOLE) +int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) +{ + UNREFERENCED_PARAMETER(hPrevInstance); + UNREFERENCED_PARAMETER(lpCmdLine); + +#ifdef USE_WIN32_CONSOLE +# include "platform/win32/EmbedConsole.h" +#endif + + auto result = axmol_main(); + +#if AX_OBJECT_LEAK_DETECTION + Object::printLeaks(); +#endif + + return result; +} +#else +int main(int, char**) { + auto result = axmol_main(); + +#if AX_OBJECT_LEAK_DETECTION + Object::printLeaks(); +#endif + + return result; +} +#endif diff --git a/proj.win32/main.h b/proj.win32/main.h new file mode 100644 index 0000000..4af11ab --- /dev/null +++ b/proj.win32/main.h @@ -0,0 +1,36 @@ +/**************************************************************************** + Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md). + + https://axmol.dev/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#pragma once + +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers + +// Windows Header Files: +#include +#include + +// C RunTime Header Files +#include "platform/StdC.h" + diff --git a/proj.win32/res/game.ico b/proj.win32/res/game.ico new file mode 100644 index 0000000..c5493a8 Binary files /dev/null and b/proj.win32/res/game.ico differ diff --git a/proj.win32/resource.h b/proj.win32/resource.h new file mode 100644 index 0000000..56e925d --- /dev/null +++ b/proj.win32/resource.h @@ -0,0 +1,46 @@ +/**************************************************************************** + Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + + https://axmol.dev/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#pragma once + +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by game.RC +// + +#define IDS_PROJNAME 100 +#define IDR_TESTJS 100 + +#define ID_FILE_NEW_WINDOW 32771 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +# ifndef APSTUDIO_READONLY_SYMBOLS +# define _APS_NEXT_RESOURCE_VALUE 201 +# define _APS_NEXT_CONTROL_VALUE 1000 +# define _APS_NEXT_SYMED_VALUE 101 +# define _APS_NEXT_COMMAND_VALUE 32775 +# endif +#endif diff --git a/proj.winrt/App.cpp b/proj.winrt/App.cpp new file mode 100644 index 0000000..01ed756 --- /dev/null +++ b/proj.winrt/App.cpp @@ -0,0 +1,153 @@ +/**************************************************************************** + Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md). + + https://axmol.dev/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#include "App.h" + +#include "OpenGLESPage.h" + +using namespace winrt; +using namespace Windows::ApplicationModel; +using namespace Windows::ApplicationModel::Activation; +using namespace Windows::Foundation; +using namespace Windows::Foundation::Collections; +using namespace Windows::UI::Xaml::Media::Animation; +using namespace Windows::UI::Xaml; +using namespace Windows::UI::Xaml::Controls; +using namespace Windows::UI::Xaml::Controls::Primitives; +using namespace Windows::UI::Xaml::Data; +using namespace Windows::UI::Xaml::Input; +using namespace Windows::UI::Xaml::Interop; +using namespace Windows::UI::Xaml::Media; +using namespace Windows::UI::Xaml::Navigation; +using namespace AxmolAppWinRT; +using namespace AxmolAppWinRT::implementation; + +/// +/// Creates the singleton application object. This is the first line of authored code +/// executed, and as such is the logical equivalent of main() or WinMain(). +/// +App::App() +{ + Suspending({ this, &App::OnSuspending }); + Resuming({this, &App::OnResuming}); + + // Resuming({ this, &AppOnResuming }); + +#if defined _DEBUG && !defined DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION + UnhandledException([this](IInspectable const&, UnhandledExceptionEventArgs const& e) + { + if (IsDebuggerPresent()) + { + auto errorMessage = e.Message(); + __debugbreak(); + } + }); +#endif +} + +/// +/// Invoked when the application is launched normally by the end user. Other entry points +/// will be used such as when the application is launched to open a specific file. +/// +/// Details about the launch request and process. +void App::OnLaunched(LaunchActivatedEventArgs const& e) +{ + Frame rootFrame{ nullptr }; + auto content = Window::Current().Content(); + if (content) + { + rootFrame = content.try_as(); + } + + // Do not repeat app initialization when the Window already has content, + // just ensure that the window is active + if (rootFrame == nullptr) + { + // Create a Frame to act as the navigation context and associate it with + // a SuspensionManager key + rootFrame = Frame(); + + rootFrame.NavigationFailed({ this, &App::OnNavigationFailed }); + + if (e.PreviousExecutionState() == ApplicationExecutionState::Terminated) + { + // Restore the saved session state only when appropriate, scheduling the + // final launch steps after the restore is complete + } + } + + if (e.PrelaunchActivated() == false) + { + if (rootFrame.Content() == nullptr) + { + // When the navigation stack isn't restored navigate to the first page, + // configuring the new page by passing required information as a navigation + // parameter + rootFrame.Content(winrt::make(&mOpenGLES)); + //rootFrame.Navigate(xaml_typename(), box_value(e.Arguments())); + mPage = rootFrame.Content(); + } + // Place the frame in the current Window + Window::Current().Content(rootFrame); + // Ensure the current window is active + Window::Current().Activate(); + } +} + +/// +/// Invoked when application execution is being suspended. Application state is saved +/// without knowing whether the application will be terminated or resumed with the contents +/// of memory still intact. +/// +/// The source of the suspend request. +/// Details about the suspend request. +void App::OnSuspending([[maybe_unused]] IInspectable const& sender, [[maybe_unused]] SuspendingEventArgs const& e) +{ + // Save application state and stop any background activity +} + +/// +/// Invoked when application execution is being resumed. +/// +/// The source of the resume request. +/// Details about the resume request. +void App::OnResuming(IInspectable const& sender, IInspectable const& args) +{ + (void)sender; // Unused parameter + (void)args; // Unused parameter + + if (mPage) + mPage.as()->SetVisibility(true); +} + +/// +/// Invoked when Navigation to a certain page fails +/// +/// The Frame which failed navigation +/// Details about the navigation failure +void App::OnNavigationFailed(IInspectable const&, NavigationFailedEventArgs const& e) +{ + //throw hresult_error(E_FAIL, hstring(L"Failed to load Page ") + e.SourcePageType().Name); +} diff --git a/proj.winrt/App.h b/proj.winrt/App.h new file mode 100644 index 0000000..cdc1fba --- /dev/null +++ b/proj.winrt/App.h @@ -0,0 +1,47 @@ +/**************************************************************************** + Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. + Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md). + + https://axmol.dev/ + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + ****************************************************************************/ + +#pragma once + +#include "pch.h" + +#include "App.xaml.g.h" +#include "OpenGLES.h" + +using namespace winrt; + +namespace winrt::AxmolAppWinRT::implementation +{ + struct App : AppT + { + App(); + void OnLaunched(Windows::ApplicationModel::Activation::LaunchActivatedEventArgs const&); + void OnSuspending(IInspectable const&, Windows::ApplicationModel::SuspendingEventArgs const&); + void OnResuming(IInspectable const&, IInspectable const&); + void OnNavigationFailed(IInspectable const&, Windows::UI::Xaml::Navigation::NavigationFailedEventArgs const&); + Windows::Foundation::IInspectable mPage; + OpenGLES mOpenGLES; + }; +} diff --git a/proj.winrt/App.idl b/proj.winrt/App.idl new file mode 100644 index 0000000..94961d9 --- /dev/null +++ b/proj.winrt/App.idl @@ -0,0 +1,3 @@ +namespace AxmolAppWinRT +{ +} diff --git a/proj.winrt/App.xaml b/proj.winrt/App.xaml new file mode 100644 index 0000000..60ec482 --- /dev/null +++ b/proj.winrt/App.xaml @@ -0,0 +1,12 @@ + + + + + Pinball + + + diff --git a/proj.winrt/Content/LockScreenLogo.scale-200.png b/proj.winrt/Content/LockScreenLogo.scale-200.png new file mode 100644 index 0000000..8cf1cc0 --- /dev/null +++ b/proj.winrt/Content/LockScreenLogo.scale-200.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a41a053b3fc3b0c109720ccd437a19725ae9163ea75990222a12b596b9c7ca76 +size 1430 diff --git a/proj.winrt/Content/SplashScreen.scale-200.png b/proj.winrt/Content/SplashScreen.scale-200.png new file mode 100644 index 0000000..1ade290 --- /dev/null +++ b/proj.winrt/Content/SplashScreen.scale-200.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a3382b0b1b834e95b888f06d483dc2d78fa1b3855e0683d5cfbd5167be9731a6 +size 7700 diff --git a/proj.winrt/Content/Square150x150Logo.scale-200.png b/proj.winrt/Content/Square150x150Logo.scale-200.png new file mode 100644 index 0000000..f269619 --- /dev/null +++ b/proj.winrt/Content/Square150x150Logo.scale-200.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7f3cb5738e8f05544445f79996a313f8b47dee22dbc9c7be859d2707710f0c73 +size 2937 diff --git a/proj.winrt/Content/Square44x44Logo.scale-200.png b/proj.winrt/Content/Square44x44Logo.scale-200.png new file mode 100644 index 0000000..818d96d --- /dev/null +++ b/proj.winrt/Content/Square44x44Logo.scale-200.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:594492a25070951d7462c091d9f899a66f55ba992bb9b05d98d50f67cdfb2abe +size 1647 diff --git a/proj.winrt/Content/Square44x44Logo.targetsize-24_altform-unplated.png b/proj.winrt/Content/Square44x44Logo.targetsize-24_altform-unplated.png new file mode 100644 index 0000000..8c01028 --- /dev/null +++ b/proj.winrt/Content/Square44x44Logo.targetsize-24_altform-unplated.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:48cf9c22156a0b3d77982641f972785e7861a7257f7bcf155be7d5a12e1aa3d8 +size 1255 diff --git a/proj.winrt/Content/StoreLogo.png b/proj.winrt/Content/StoreLogo.png new file mode 100644 index 0000000..679f7d7 --- /dev/null +++ b/proj.winrt/Content/StoreLogo.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ae95e99a96251abaf8de15c9cdaddb8cefb1b8b320b10a4f1f4e1dc3c25c1b1a +size 1451 diff --git a/proj.winrt/Content/Wide310x150Logo.scale-200.png b/proj.winrt/Content/Wide310x150Logo.scale-200.png new file mode 100644 index 0000000..7578982 --- /dev/null +++ b/proj.winrt/Content/Wide310x150Logo.scale-200.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b5b7754832c08e58faacfe64ea4b9f8b59b52a658e4eea4aab3790cfb89faa03 +size 3204 diff --git a/proj.winrt/Package.appxmanifest b/proj.winrt/Package.appxmanifest new file mode 100644 index 0000000..7e47243 --- /dev/null +++ b/proj.winrt/Package.appxmanifest @@ -0,0 +1,43 @@ + + + + + + Pinball + Microsoft Open Technologies, Inc. + Content\StoreLogo.png + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/proj.winrt/pch.cpp b/proj.winrt/pch.cpp new file mode 100644 index 0000000..bcb5590 --- /dev/null +++ b/proj.winrt/pch.cpp @@ -0,0 +1 @@ +#include "pch.h" diff --git a/proj.winrt/pch.h b/proj.winrt/pch.h new file mode 100644 index 0000000..b559e36 --- /dev/null +++ b/proj.winrt/pch.h @@ -0,0 +1,15 @@ +#pragma once +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include diff --git a/run.bat.in b/run.bat.in new file mode 100644 index 0000000..7a5b99e --- /dev/null +++ b/run.bat.in @@ -0,0 +1,25 @@ +@echo off +rem !!!Don't move this file +rem usage: run.bat +rem BUILD_CFG could be Debug,Release,MinSizeRel,RelWithDebInfo + +set myDir=%~dp0 +set cacheFile=%myDir%run.bat.txt + +echo Entering run.bat directory: %myDir% + +cd /d %myDir% + +set APP_NAME=@APP_NAME@ +set BUILD_DIR=@CMAKE_BUILD_RELATIVE_DIR@ +set BUILD_CFG=%1 + +rem Determine which build config to run +if not defined BUILD_CFG if exist %cacheFile% set /p BUILD_CFG=< %cacheFile% +if not defined BUILD_CFG set /p BUILD_CFG=Please input Build config(Debug,Release,MinSizeRel,RelWithDebInfo): +if not defined BUILD_CFG set BUILD_CFG=Debug + +rem Save run config to run.bat.txt +echo %BUILD_CFG%>%cacheFile% + +start /D %myDir%Content %BUILD_DIR%/bin/%APP_NAME%/%BUILD_CFG%/%APP_NAME%.exe