diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
deleted file mode 100644
index 134c351..0000000
--- a/.github/workflows/main.yml
+++ /dev/null
@@ -1,96 +0,0 @@
-name: CI
-
-on:
- pull_request:
- branches:
- - main
-
-env:
- GODOT_VERSION_4: 4.4
- GODOT_VERSION_3: 3.x
- PYTHONIOENCODING: utf8
-
-jobs:
- godot:
- name: ${{ matrix.name }}
- runs-on: ${{ matrix.os }}
- strategy:
- fail-fast: false
- matrix:
- include:
- - name: Godot 4.x ð Windows (x86_64, MSVC)
- os: windows-latest
- platform: windows
-
- - name: Godot 4.x ð macOS (universal)
- os: macos-latest
- platform: macos
-
- defaults:
- run:
- shell: zsh {0}
-
- steps:
- - uses: actions/checkout@v4
- with:
- submodules: 'recursive'
- - name: clone Godot repository
- uses: GuillaumeFalourd/clone-github-repo-action@v2.3
- with:
- depth: 1
- branch: ${{ env.GODOT_VERSION_4 }}
- owner: 'godotengine'
- repository: 'godot'
-
- - name: setup for godot
- uses: ./.github/actions/setup-godot
- with:
- platform: ${{ matrix.platform }}
-
- - name: build godot
- if: matrix.platform == 'macos'
- run: |
- ./scripts/build.sh arch=universal compiledb=no strip=yes
- - name: build godot
- if: matrix.platform == 'windows'
- shell: pwsh
- run: |
- .\scripts\build.ps1 compiledb=no strip=yes
-
- godot_v3:
- name: ${{ matrix.name }}
- runs-on: ${{ matrix.os }}
- strategy:
- fail-fast: false
- matrix:
- include:
- - name: Godot 3.x ð Windows (x86_64, MSVC)
- os: windows-latest
- platform: windows
-
- - name: Godot 3.x ð macOS (universal)
- os: macos-latest
- platform: macos
-
- steps:
- - uses: actions/checkout@v4
- with:
- submodules: 'recursive'
- - name: clone Godot repository
- uses: GuillaumeFalourd/clone-github-repo-action@v2.3
- with:
- depth: 1
- branch: ${{ env.GODOT_VERSION_3 }}
- owner: 'godotengine'
- repository: 'godot'
- - name: setup for godot
- uses: ./.github/actions/setup-scons
- - name: build godot
- if: matrix.platform == 'macos'
- run: |
- ./scripts/build-v3.sh arch=universal compiledb=no strip=yes
- - name: build godot
- if: matrix.platform == 'windows'
- shell: pwsh
- run: |
- .\scripts\build-v3.ps1 compiledb=no strip=yes
diff --git a/.gitmodules b/.gitmodules
index 9e0e81a..ad44894 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +1,6 @@
-[submodule "gd_spritestudio/SpriteStudio6-SDK"]
- path = gd_spritestudio/SpriteStudio6-SDK
- url = https://github.com/SpriteStudio/SpriteStudio6-SDK.git
+[submodule "gd_spritestudio/SpriteStudio7-SDK"]
+ path = gd_spritestudio/SpriteStudio7-SDK
+ url = git@github.com:SpriteStudio/SpriteStudio7-SDK.git
+[submodule "gd_spritestudio/flatbuffers"]
+ path = gd_spritestudio/flatbuffers
+ url = git@github.com:SpriteStudio/SpriteStudio7-SDK.git
diff --git a/BUILD.md b/BUILD.md
deleted file mode 100644
index 26610df..0000000
--- a/BUILD.md
+++ /dev/null
@@ -1,322 +0,0 @@
-# ãœãŒã¹ååŸ
-
-æ¬ãªããžããªãã¯ããŒã³ããŠã `SSPlayerForGodot` ãã£ã¬ã¯ããªå
ã«å
¥ã£ãŠãã ããã
-
-```bash
-git clone --recursive https://github.com/SpriteStudio/SSPlayerForGodot.git
-cd SSPlayerForGodot
-```
-
-SSPlayerForGodot ãã£ã¬ã¯ããªãã以äžã®ã³ãã³ããå®è¡ãã Godot ãååŸããŸãã
-
-```bash
-git clone https://github.com/godotengine/godot.git
-```
-
-gdextension ããã«ãããå Žå㯠godot-cpp ãååŸããŸãã
-
-```bash
-git clone https://github.com/godotengine/godot-cpp.git
-```
-
-# ãã©ã³ãéžæ
-## Godot
-SSPlayerForGodot ãã£ã¬ã¯ããªã® `godot` ãã£ã¬ã¯ããªå
ã§ãã«ããã Godot Engine ã®ãã©ã³ããéžæããŠãã ããã
-
-### 4
-
-```bash
-pushd godot
-git checkout 4.4
-popd
-```
-
-### 3.x
-
-```bash
-pushd godot
-git checkout 3.x
-popd
-```
-
-## GDExtension
-gdextension ããã«ãããå Žå㯠`godot-cpp` ãã£ã¬ã¯ããªã§å¯Ÿç
§ãã Godot Engine ããŒãžã§ã³ãšåããã©ã³ãåãéžæããŠãã ããã
-
-
-```bash
-pushd godot-cpp
-git checkout 4.4
-popd
-```
-
-# ãã«ãç°å¢ã®ã»ããã¢ãã
-
-以éã§ãã«ãç°å¢ã®æ§ç¯æé ã«ã€ããŠèª¬æããŠãããŸãã
-
-## Windows
-
-[Godotå
¬åŒã®ã³ã³ãã€ã«æé ](https://docs.godotengine.org/en/stable/contributing/development/compiling/compiling_for_windows.html)
-
-å¿
èŠãªããŒã«
-* ãã«ãããŒã« (ãããããéžæ)
- * VisualStudio 2019(æšå¥š) or 2022
- * MSYS2 + MinGW + gcc + make
-* Python 3.6 以é
-* scons 3.0 以é
-
-VisualStudio 2019 ã§ã®ãã«ãã»ãããã°ã確èªããŠããŸãã
-
-scons ã¯äžèšã§ã€ã³ã¹ããŒã«ã§ããŸãã(äžèšãªã³ã¯ã«ãèšèŒãã)
-
-```bat
-python -m pip install scons
-```
-
-## macOS
-
-[Godotå
¬åŒã®ã³ã³ãã€ã«æé ](https://docs.godotengine.org/ja/4.x/contributing/development/compiling/compiling_for_macos.html)
-
-å¿
èŠãªããŒã«
-* Xcode
-* Python 3.6 以é
-* scons 3.0 以é
-* Vulkan SDK for MoltenVK (4 察å¿çš)
-* emscripten (optional)
-* Android SDK / Android NDK (optional)
-
-Xcode 以å€ã¯ [Homebrew](https://brew.sh/) ã§ã€ã³ã¹ããŒã«ãã§ããŸãã
-
-```sh
-brew install python3 scons
-```
-
-```sh
-brew install molten-vk
-```
-
-ãã¹ãã¢ãŒããã¯ãã£ãšã¯ç°ãªãã¢ãŒããã¯ãã£ã® Godot Engine ããã«ãããå Žåã Universal Binary å¯Ÿå¿ Godot Engine ããã«ãããå Žå㯠`molten-vk` ã®ä»£ããã« Universal Binary 察å¿ããŠãã [Vulkan SDK for MoltenVK](https://vulkan.lunarg.com/sdk/home) ãã€ã³ã¹ããŒã«ããŠãã ããã
-
-(Optional) target ã Web ã®ãã«ããããé㯠emscripten ãã€ã³ã¹ããŒã«ããŠãã ããã
-
-```sh
-brew install emscripten
-```
-
-(Optional) target ã Android ã®ãã«ããããé㯠Android NDK ãã€ã³ã¹ããŒã«ããŠãã ããã
-
-
-## Linux
-T.B.D
-
-# ãã«ã
-## Windows
-### 4
-
-[build.ps1](./scripts/build.ps1) ã§ãã«ãå¯èœã§ãã
-
-
-ææç©ã¯ `godot\bin` ã«æ ŒçŽãããŸãã
-
-**PowerShell**
-
-```powershell
-$env:PYTHONUTF8=1
-.\scripts\build.ps1
-```
-
-**Cmd**
-
-```cmd
-set PYTHONUTF8=1
-PowerShell.exe -ExecutionPolicy Bypass -File .\scripts\build.ps1
-```
-
-### 3.x
-
-[build-v3.ps1](./scripts/build-v3.ps1) ã§ãã«ãå¯èœã§ãã
-ææç©ã¯ `godot\bin` ã«æ ŒçŽãããŸãã
-
-**PowerShell**
-
-```powershell
-$env:PYTHONUTF8=1
-.\scripts\build-v3.ps1
-```
-
-**Cmd**
-
-```cmd
-set PYTHONUTF8=1
-PowerShell.exe -ExecutionPolicy Bypass -File .\scripts\build-v3.ps1
-```
-
-## macOS ãã«ã
-
-### 4
-
-[build.sh](./scripts/build.sh) ã§ãã«ãå¯èœã§ãã
-ææç©ã¯ `godot/bin` ã«æ ŒçŽãããŸãã
-
-```sh
-./scripts/build.sh
-```
-
-åŒæ°ãæå®ããªãå Žåã¯ãã¹ããã·ã³ã®ã¢ãŒããã¯ãã£ãšåãã¢ãŒããã¯ãã£åãã«ãã«ãããŸãã
-ã¢ãŒããã¯ãã£ãæç€ºçã«æå®ããå Žå㯠`arch=` ã«åŒæ°ã远å ããŠãã ããã
-
-**Universal Binary (supports both arm64 and x86_64)**
-
-```sh
-./scripts/build.sh arch=universal
-```
-
-**arm64 (Apple Silicon)**
-
-```sh
-./scripts/build.sh arch=arm64
-```
-
-**x86_64 (Intel)**
-
-```sh
-./scripts/build.sh arch=x86_64
-```
-
-`godot/Godot.app` ãéããŠèµ·åã確èªããŸãã
-
-### 3.x
-
-[build-v3.sh](./scripts/build-v3.sh) ã§ãã«ãå¯èœã§ãã
-ææç©ã¯ `godot/bin` ã«æ ŒçŽãããŸãã
-
-```sh
-./scripts/build-v3.sh
-```
-
-åŒæ°ãæå®ããªãå Žåã¯ãã¹ããã·ã³ã®ã¢ãŒããã¯ãã£ãšåãã¢ãŒããã¯ãã£åãã«ãã«ãããŸãã
-ã¢ãŒããã¯ãã£ãæç€ºçã«æå®ããå Žå㯠`arch=` ã«åŒæ°ã远å ããŠãã ããã
-
-**Universal Binary (supports both arm64 and x86_64)**
-
-```sh
-./scripts/build-v3.sh arch=universal
-```
-
-**arm64 (Apple Silicon)**
-
-```sh
-./scripts/build-v3.sh arch=arm64
-```
-
-**x86_64 (Intel)**
-
-```sh
-./scripts/build-v3.sh arch=x86_64
-```
-
-`godot/Godot.app` ãéããŠèµ·åã確èªããŸãã
-
-
-# GDExtension
-## Windows
-[build-extension.ps1](./scripts/build-extension.ps1) ã§ãã«ãå¯èœã§ãã
-ææç©ã¯ `bin` ãã£ã¬ã¯ããªã«æ ŒçŽãããŸãã
-
-
-**PowerShell**
-
-```powershell
-$env:PYTHONUTF8=1
-.\scripts\build-extension.ps1
-```
-
-**Cmd**
-
-```cmd
-set PYTHONUTF8=1
-PowerShell.exe -ExecutionPolicy Bypass -File .\scripts\build-extension.ps1
-```
-
-## macOS, linux, iOS, Android, Web ãã«ã
-
-macOS ã Linux ã§å®è¡ããŠãã ããã
-
-[build-extension.sh](./scripts/build-extension.sh) ã§ãã«ãå¯èœã§ãã
-ææç©ã¯ `bin` ãã£ã¬ã¯ããªã«æ ŒçŽãããŸãã
-
-```sh
-./scripts/build-extension.sh
-```
-
-
-# ãªãªãŒã¹ãã«ã
-## 4
-
-åãã©ãããã©ãŒã ã® godot ã® `editor`, `template_debug`, `template_release` ããŸãšããŠãã«ãã¹ã¯ãªããã¯äžèšã®éãã§ãã
-
-windows
-```
-.\scripts\release-windows.ps1
-```
-
-macOS
-```sh
-./scripts/release-macos.sh
-```
-
-Linux
-```sh
-./scripts/release-linux.sh
-```
-
-iOS
-```sh
-./scripts/release-ios.sh
-```
-
-Android
-```sh
-./scripts/release-android.sh
-```
-
-Web
-```sh
-./scripts/release-web.sh
-```
-
-## GDExtension
-åãã©ãããã©ãŒã ã® gdextension ã® `editor`, `template_debug`, `template_release` ããŸãšããŠãã«ãã¹ã¯ãªããã¯äžèšã®éãã§ãã
-
-windows
-```
-.\scripts\release-gdextension-windows.ps1
-```
-
-macOS
-```sh
-./scripts/release-gdextension-macos.sh
-```
-
-Linux
-```sh
-./scripts/release-gdextension-linux.sh
-```
-
-iOS
-```sh
-./scripts/release-gdextension-ios.sh
-```
-
-Android
-```sh
-./scripts/release-gdextension-android.sh
-```
-
-Web
-```sh
-./scripts/release-gdextension-web.sh
-```
-
-## 3.x
-
-...
\ No newline at end of file
diff --git a/README.md b/README.md
index a7ebb27..dbbea75 100644
--- a/README.md
+++ b/README.md
@@ -1,83 +1,65 @@
# SpriteStudioPlayer for Godot
-# ã¯ããã«
+**The branch is in experimental and unstable phase.**
-æ¬ãã©ã°ã€ã³ã¯ [OPTPiX SpriteStudio](https://www.webtech.co.jp/spritestudio/index.html) ã§äœæããã¢ãã¡ãŒã·ã§ã³ã [Godot Engine](https://godotengine.org/) äžã§åçããããã®ãã©ã°ã€ã³ã§ãã
+**No guarantee, No support and can't reply any requests and any bug reports regarding the branch.**
-å®è¡æããã©ãŒãã³ã¹ãåªå
ãããã C++ ã¢ãžã¥ãŒã«ã®åœ¢æ
ã«ãªã£ãŠããŸãã
-SpriteStudioPlayer for Godot ãå©çšããå ŽåãSpriteStudioPlayer ã®[ã«ã¹ã¿ã ã¢ãžã¥ãŒã«](https://docs.godotengine.org/en/stable/contributing/development/core_and_modules/custom_modules_in_cpp.html) ãçµã¿èŸŒãã Godot Engine ã® Editor ãæå
ã§ãã«ããããã SpriteStudioPlayer ã® [GDExtension](https://docs.godotengine.org/en/stable/tutorials/scripting/gdextension/what_is_gdextension.html) ããããžã§ã¯ããžå
¥ããå¿
èŠããããŸãã
+# For Player Develoeprs
-## 察å¿ãã [OPTPiX SpriteStudio](https://www.webtech.co.jp/spritestudio/index.html) ã®ããŒãžã§ã³
+## prepare development environment of Godot
+Reference the official documents
-Ver.6 ãš Ver.7 ã«å¯Ÿå¿ããŠããŸãã
-ãã ããVer.7.1 ã§è¿œå ãããæ°æ©èœ(ããã¹ãããµãŠã³ãç)ã«ã¯æªå¯Ÿå¿ã§ãã
+- windows
+ - https://docs.godotengine.org/en/stable/engine_details/development/compiling/compiling_for_windows.html
+- macOS
+ - https://docs.godotengine.org/en/stable/engine_details/development/compiling/compiling_for_macos.html
-## 察å¿ãã [Godot Engine](https://github.com/godotengine/godot) ã®ããŒãžã§ã³
+## clone repositories
-- [4.4 ãã©ã³ã](https://github.com/godotengine/godot/tree/4.4)ã§ Windows / macOS ã§ãã«ããããã³å®è¡ã確èªããŠããŸãã
-- [3.x ãã©ã³ã](https://github.com/godotengine/godot/tree/3.x)ã§ Windows / macOS ã§ãã«ããããã³å®è¡ã確èªããŠããŸãã
+```bash
+git clone --recursive git@github.com:SpriteStudio/SSPlayerForGodot.git
-# ãã«ã
+cd SSPlayerForGodot
+git clone https://github.com/godotengine/godot.git -b 4.5
+git clone https://github.com/godotengine/godot-cpp.git -b 4.5
+```
-[BUILD.md](BUILD.md) ãåç
§ããŠãã ããã
+## get libssruntime binaries
+T.B.D
-# äœ¿ãæ¹
+## build custom godot or gdextension
+### gdextension
-[USAGE.md](USAGE.md) ãåç
§ããŠãã ããã
+```bash
+./scripts/build-extension.sh
+```
+or
+```pwsh
+.\scripts\build-extension.ps1
+```
-# ãµã³ãã«
+### custom godot
-[examples ãã©ã«ã](./examples/)ã«ãµã³ãã«ãããžã§ã¯ãããããŸãã
+```bash
+./scripts/build.sh
+```
+or
+```pwsh
+.\scripts\build.ps1
+```
-**ãµã³ãã«ãããžã§ã¯ã㯠3.x åãã«äœã£ãŠããããã4.4 ã§å©çšããé㯠"Convert Full Project" ãå®è¡ããŠããå©çšããŠãã ããã**
+# For SDK Developers
+## prepare development environment of SpriteStudio7-SDK
+Reference [For Develoeprs of SpriteStudio7-SDK](https://github.com/SpriteStudio/SpriteStudio7-SDK?tab=readme-ov-file#for-sdk-developers) and prepare development environment of SpriteStudio7-SDK.
-## [feature_test](./examples/feature_test)
-åºæ¬æ©èœã®ãã¹ããããžã§ã¯ãã§ãã
-以äžã®ã·ãŒã³ããããŸãã
+## build and deploy libssruntime
+Build ssruntime binary for your platform and archtecture and deploy the binary to [the runtime directory](./gd_spritestudio/runtime)
-- [v6_feature.tscn](./examples/feature_test/v6_feature.tscn)
- - SpriteStudio v6.0~v7.0 ãŸã§ã®åæ©èœã®åçç¶æ
ã確èªã§ããŸãã
- - 確èªãããæ©èœããŒãã®å¯èŠæ§ãæå¹ã«ããŠãã ããã
- - SignalãUserData ã¯ããããã·ã°ãã«ããŠãŒã¶ãŒããŒã¿ã®ããŒã«å°éããã¿ã€ãã³ã°ã§Godotã®ã·ã°ãã«ãçºè¡ããããã«ãªã£ãŠããŸãã
- - ã·ãŒã³ãå®è¡ãããšã³ã³ãœãŒã«ã«åä¿¡ãããã©ã¡ãŒã¿ãåºåãããŸãã
- - ssdata ãµããã©ã«ãã«ã€ã³ããŒãå
ã®ãããžã§ã¯ããã¡ã€ã«(v6_all.sspj)ããããŸãã
-- [sspj_load.tscn](./examples/feature_test/sspj_load.tscn)
- - GDã¹ã¯ãªããããSSãããžã§ã¯ããããŒããã¢ãã¡ãŒã·ã§ã³ãæå®ããŠåçãããµã³ãã«ã§ãã
- - ã¢ãã¡ãŒã·ã§ã³çµäºæã«å¥ã®SSãããžã§ã¯ãã«èªã¿æ¿ããããã«ãªã£ãŠããŸãã
-- [texture_change.tscn](./examples/feature_test/texture_change.tscn)
- - åçäžã«ã»ã«ããããªãœãŒã¹ã®ãã¯ã¹ãã£ã倿Žãããµã³ãã«ã§ãã
- - ã€ã³ã¹ãã¯ã¿ã«ãã Change ã®ãã§ãã¯ãOn/Offãããšåãæ¿ãããŸãã
-
-## [mesh_bone](./examples/mesh_bone)
-
-ã¡ãã·ã¥ãããŒã³ããšãã§ã¯ããªã©ãå©çšãããã£ã©ã¯ã¿ãŒã¢ãã¡ã®ãµã³ãã«ã§ãã
-
-## [particle_effect](./examples/particle_effect)
-
-ãšãã§ã¯ãæ©èœãå©çšãããµã³ãã«ã§ãã
-ã·ãŒã³ã«è¡šç€ºãããã¢ãã¡ãŒã·ã§ã³ã¯40çš®é¡ã®ãã¡ã®äžéšã«ãªããŸãã
-ã€ã³ã¹ãã¯ã¿ã® Anime Pack ãããã®ä»ã®ã¢ãã¡ãŒã·ã§ã³ã確èªã§ããŸãã
-
-## [feature_test_gdextension](./examples/feature_test_gdextension)
-
-gdextension ã®åäœç¢ºèªçšãããžã§ã¯ãã§ãã
-
-確èªã§ãããµã³ãã«ã¯ [feature_test](./examples/feature_test) ãšåããã®ã«ãªããŸãã
-
-# ãåãåãã
-
-ã質åããèŠæãäžå
·åã®ãå ±å㯠[Issues](../../issues) ã«æçš¿ããŠãã ããã
-éå
¬éã§ã®ãåãåãããåžæãããå Žåã¯ã[ãã«ãã»ã³ã¿ãŒ](https://www.webtech.co.jp/help/ja/spritestudio7/inquiries/ssplayer_tool/) ãããå¯ããã ããã
-åçŸããŒã¿ãªã©ã®éä»ãå¿
èŠãªå Žåããäžèšãã«ãã»ã³ã¿ãŒçµç±ã§ãã¡ã€ã«ãéä¿¡ããŠãã ããã
-
-=========================================================
-
-æ ªåŒäŒç€ŸïŒ£ïŒ²ïŒ©ã»ããã«ãŠã§ã¢
-âhttps://www.cri-mw.co.jp/
-Copyright © CRI Middleware Co., Ltd.
-
-=========================================================
-
-* SpriteStudio, Web Technologyã¯ãæ ªåŒäŒç€ŸãŠã§ããã¯ãããžã®ç»é²åæšã§ãã
-* ãã®ä»ã®åååã¯å瀟ã®ç»é²åæšãŸãã¯åæšã§ãã
+```bash
+./scripts/build-runtime.sh
+```
+or
+```pwsh
+.\scripts\build-runtime.ps1
+```
diff --git a/SConstruct b/SConstruct
index eb74adb..14c9171 100644
--- a/SConstruct
+++ b/SConstruct
@@ -64,19 +64,39 @@ Run the following command to download godot-cpp:
env = SConscript("godot-cpp/SConstruct", {"env": env, "customs": customs})
+sources = Glob("gd_spritestudio/*.cpp")
+sources.append("gd_spritestudio/flatbuffers/src/idl_parser.cpp")
+sources.append("gd_spritestudio/flatbuffers/src/idl_gen_text.cpp")
+sources.append("gd_spritestudio/flatbuffers/src/reflection.cpp")
+sources.append("gd_spritestudio/flatbuffers/src/util.cpp")
+
env.Append(CPPDEFINES = "SPRITESTUDIO_GODOT_EXTENSION")
-env.Append(CPPDEFINES = "_NOTUSE_STBI")
-env.Append(CPPDEFINES = "_NOTUSE_TEXTURE_FULLPATH")
-env.Append(CPPDEFINES = "_NOTUSE_EXCEPTION")
-env.Append(CPPPATH=["src/"])
env.Append(
CPPPATH=[
- "gd_spritestudio/SpriteStudio6-SDK/Common/Loader",
- "gd_spritestudio/SpriteStudio6-SDK/Common/Animator",
- "gd_spritestudio/SpriteStudio6-SDK/Common/Helper",
+ "gd_spritestudio/flatbuffers/src",
+ "gd_spritestudio/flatbuffers/include",
+ "gd_spritestudio/runtime",
]
)
+extension_path = env.Dir('.').abspath
+if env['platform'] == 'macos':
+ runtime_libpath = os.path.join(extension_path, "gd_spritestudio", "runtime", "libs", env['platform'])
+else:
+ runtime_libpath = os.path.join(extension_path, "gd_spritestudio", "runtime", "libs", env['platform'], env['arch'])
+print(runtime_libpath)
+env.Append(
+ LIBPATH=[
+ runtime_libpath,
+ ])
+
+if env['target'] == 'editor':
+ env.Append(LIBS=["ssconverter"])
+ if env["platform"] == "windows":
+ env.Append(LINKFLAGS=["Userenv.lib", "Bcrypt.lib", "Ntdll.lib", "Ws2_32.lib"])
+env.Append(LIBS=["ssruntime"])
+
+
if env["platform"] == 'macos':
env.Append(LINKFLAGS=["-framework", "CoreFoundation"])
@@ -85,14 +105,6 @@ if env["platform"] == "ios":
env.Append(CCFLAGS=["-miphoneos-version-min=12.0"])
env.Append(LINKFLAGS=["-miphoneos-version-min=12.0"])
-sources = Glob("gd_spritestudio/*.cpp")
-sources.extend(Glob("gd_spritestudio/SpriteStudio6-SDK/Common/Loader/tinyxml2/*.cpp"))
-sources.extend(Glob("gd_spritestudio/SpriteStudio6-SDK/Common/Loader/*.cpp"))
-sources.extend(Glob("gd_spritestudio/SpriteStudio6-SDK/Common/Animator/*.cpp"))
-sources.extend(Glob("gd_spritestudio/SpriteStudio6-SDK/Common/Helper/DebugPrint.cpp"))
-sources.extend(Glob("gd_spritestudio/SpriteStudio6-SDK/Common/Helper/IsshTexture.cpp"))
-sources.extend(Glob("gd_spritestudio/SpriteStudio6-SDK/Common/Helper/stb_image.c"))
-
if env["target"] in ["editor", "template_debug"]:
try:
doc_data = env.GodotCPPDocData("src/gen/doc_data.gen.cpp", source=Glob("doc_classes/*.xml"))
@@ -150,4 +162,4 @@ if env["platform"] == "macos" or env["platform"] == "ios":
if localEnv.get("compiledb", False):
default_args += [compilation_db]
-Default(*default_args)
\ No newline at end of file
+Default(*default_args)
diff --git a/USAGE.md b/USAGE.md
deleted file mode 100644
index b01108e..0000000
--- a/USAGE.md
+++ /dev/null
@@ -1,198 +0,0 @@
-# ãšãã£ã¿ã®éžæ
-äžèšã©ã¡ããã®æ¹æ³ã§å©çšããŠãã ããã
-
-## SpriteStudioPlayer ã®ã«ã¹ã¿ã ã¢ãžã¥ãŒã«ãçµã¿èŸŒãã Godot Engine ãå©çšãã
-[BUILD.md](BUILD.md) ãåç
§ã㊠SpriteStudioPlayer ã®ã«ã¹ã¿ã ã¢ãžã¥ãŒã«ãçµã¿èŸŒãã Godot ããã«ãããŠãã ããã
-
-## SpriteStudioPlayer ã® GDExtension ãã¡ã€ã«ãå©çšãã
-1. æ¬å®¶ãµã€ã(https://godotengine.org/download/) ããã該åœããããŒãžã§ã³ã® Godot ããŠã³ããŒãããŸãã
-2. SpriteStudioPlayer ã® GDExtension ãã¡ã€ã«ãçšæããŸãã
- - [ãªãªãŒã¹](https://github.com/SpriteStudio/SSPlayerForGodot/releases) ã« GDExtension ãã¡ã€ã«ã®ææç©ãçšæããŠããã®ã§ããã¡ããå©çšããŠãã ããã
- - GDExtension ãèªåã§ãã«ãããå Žå㯠[BUILD.md](BUILD.md) ãåç
§ããŠãã ãã
-3. SpriteStudioPlayer ã® GDExtension ãã¡ã€ã«ããããžã§ã¯ããã£ã¬ã¯ããªã® `bin` ãã£ã¬ã¯ããªãžæ ŒçŽããŸãã
-
-
-# SpriteStudioããŒã¿ã®ã€ã³ããŒã
-
-SpriteStudioããŒã¿ã®ã€ã³ããŒãæé ã«ã€ããŠèª¬æããŸãã
-çŸåšã® SpriteStudio for Godot ãã©ã°ã€ã³ã§ã¯ sspj ãã¡ã€ã«ãçŽæ¥æå®ãã圢æ
ã«ãªã£ãŠããŸãã
-ãå©çšã®ãããžã§ã¯ãäžã®ãã©ã«ãã« sspjãssaeãssce ãšç»åãã¡ã€ã«ãªã©ã®äžåŒãé
眮ããŸãã
-
-# SpriteStudioããŒãã®äœæãš sspj ãã¡ã€ã«ã®æå®
-
-1. ãNode ãæ°èŠäœæããããGdNodeSsPlayerããéžæãããäœæããã¿ã³ãæŒããŸãã
-2. ã€ã³ã¹ãã¯ã¿ãŒã®ãRes Playerããããæ°èŠ GdResourceSsPlayerããéžæããŸãã
-3. GdResourceSsPlayer ã®ãRes Projectããããèªã¿èŸŒã¿ããéžæããŸãã
-4. ããã¡ã€ã«ãéãããã€ã¢ãã°ããã*.sspjããã¡ã€ã«ãéžæããŠéããŸãã
-
-# ã¢ãã¡ãŒã·ã§ã³ã®æå®
-
-1. ãAnimation Settingsããå±éãAnime Packãããåçãããã*.ssaeããã¡ã€ã«ãéžæããŸãã
-2. ç¶ããŠãAnimationãããåçãããã¢ãã¡ãŒã·ã§ã³ãéžæããŸãã
-3. Frame ããã©ãã°ããããPlay ãã©ã°ããªã³ã«ããããšã§ãã¬ãã¥ãŒã§ããŸãã
-
-## ã€ã³ã¹ãã¯ã¿ãŒã®åããããã£ã®æå³
-
-
-
-```
-GdNodeSsPlayer - SsPlayer ãæ±ãããŒã
-âââ Res Player - SsPlayer ã䜿çšãããªãœãŒã¹
-â âââ Res Project - sspj ãã¡ã€ã«
-â âââ CellMap Settings - ã»ã«ãããã®èšå®
-â âââ ssce File 01 - ã»ã«ããã
-â âââ ssce File 02 - ã»ã«ããã
-â
-âââ Animation Settings - ã¢ãã¡ãŒã·ã§ã³ã®èšå®
- âââ Anime Pack - ã¢ãã¡ããã¯
- âââ Animation - ã¢ãã¡ãŒã·ã§ã³
- âââ Frame - çŸåšã®ãã¬ãŒã
- âââ Loop - ã«ãŒãåçãã©ã°
- âââ Playing - åçãã©ã°
- âââ Texture Interpolate - ãã¯ã¹ãã£è£éãã©ã°
-```
-
-## ãã¯ã¹ãã£è£éãã©ã°ã«ã€ããŠ
-
-SSPlayer for Godot ã®å®è£
(v1.2.0æç¹)ã§ã¯ãäžåºŠã¢ãã¡ãŒã·ã§ã³ããã¯ã¹ãã£ã«ã¬ã³ããªã³ã°ããåŸãGodot ã®ã¬ã³ãã©ãŒã«ãã£ãŠã¹ã¯ãªãŒã³ãããã¡ã«æç»ãããŸãã
-ãã®ãã¯ã¹ãã£ã«ã¬ã³ããªã³ã°ããéã«ãã€ãªãã¢è£éããããå Žåã¯ãã©ã°ããªã³ã«èšå®ããŸãã
-ãã®ç¶æ
ã§ã¯å転ããŠæãã«ãªã£ãããŒãã®ãšããžã«ã¢ã³ããšã€ãªã¢ã¹ãããããŸããããã®åäœã奜ãŸãããªãå Žåã¯ãªãã«ããŠãã ããã
-ãã®ãã©ã°ããªãã«èšå®ããCanvasItem ã® Texture ã® FilterMode ã Nearest ã«ããŠãããšã¹ã¯ãªãŒã³ãããã¡ã«æç»ããéã«ãè£éããããããã¯ã»ã«ã®ãšããžãæç¢ºã«ãªããŸãã
-äŸãã°ãã¯ã»ã«ã¢ãŒãç³»ã®ã²ãŒã ã§å©çšããå Žåã¯ããã®èšå®ã詊ããŠã¿ãŠäžããã
-
-### ã¬ã³ããªã³ã°ãããã¯ã¹ãã£ã®ãµã€ãº
-ã¬ã³ããªã³ã°ãããã¯ã¹ãã£ã®ãµã€ãºã¯SpriteStudioäžã§ã¢ãã¡ãŒã·ã§ã³ã«èšå®ãããåºæºæ ãã®ãµã€ãºãæ¡çšãããŸãã(v1.2.0æç¹)
-
-# ã¯ã©ã¹
-
-GDScript ããã³ã³ãããŒã«ã§ããã¯ã©ã¹ã®åœ¹å²ãšäž»èŠãªã¡ãœããã«ã€ããŠèª¬æããŸãã
-åã¯ã©ã¹ãæã£ãŠããå
šãŠã®ã¡ãœãããããããã£ãã·ã°ãã«ã«ã€ããŠã¯ Godot ã® Script ç»é¢ã§ç¢ºèªããŠã¿ãŠãã ããã
-
-## ãªãœãŒã¹ç®¡çã¯ã©ã¹
-
-SpriteStudio ã®åçš® .ss** ãã¡ã€ã«ã«çžåœãããªãœãŒã¹ã管çããã¯ã©ã¹ããããŸãã
-
-### [GdResourceSsProject](./gd_spritestudio/gd_resource_ssproject.h) ã¯ã©ã¹
-
-ïŒã€ã® sspj ãã¡ã€ã«ã«çžåœãããªãœãŒã¹ãåãæ±ãã¯ã©ã¹ã§ãã
-sspj ã«ç»é²ããã ssae, ssce, ssee åã
ã®ãªãœãŒã¹ã®ååŸãšèšå®ãè¡ããŸãã
-
-### [GdResourceSsCellMap](./gd_spritestudio/gd_resource_sscellmap.h) ã¯ã©ã¹
-
-ïŒã€ã® ssce ãã¡ã€ã«ã«çžåœãããªãœãŒã¹ãåãæ±ãã¯ã©ã¹ã§ãã
-çŸåšãã¯ã¹ãã£ã®ååŸãšèšå®ãè¡ãã¡ã³ããŒã®ã¿å¯Ÿå¿ããŠããŸãã
-
-### [GdResourceSsAnimePack](./gd_spritestudio/gd_resource_ssanimepack.h) ã¯ã©ã¹
-
-ïŒã€ã® ssae ãã¡ã€ã«ã«çžåœãããªãœãŒã¹ãåãæ±ãã¯ã©ã¹ã§ãã
-å
å
ããŠããã¢ãã¡ãŒã·ã§ã³ã®æ°ããšã¢ãã¡ãŒã·ã§ã³åã®ååŸãè¡ããŸãã
-
-### [GdResourceSsPlayer](./gd_spritestudio/gd_resource_ssplayer.h) ã¯ã©ã¹
-
-çŸåš GdResourceSsProject ãªãœãŒã¹ãèšå®ãååŸããã¢ã¯ã»ãµã®ã¿ã§ãã
-
-## åçã®ããã®ã¯ã©ã¹
-
-GdNodeSsPlayer ã«åè¿°ã®ãªãœãŒã¹ãæå®ããããšã§åçãè¡ããŸãã
-以äžã¯ãã¡ã€ã«ã®èªã¿èŸŒã¿ããåçéå§ãŸã§ã®ã·ã³ãã«ãªãµã³ãã«ã³ãŒãã§ãã
-
-```python
-# GdNodeSsPlayerããŒããæããŸãã
-## Godot 4
-@onread var ssnode = $target
-## Godot 3.x
-# onready var ssnode = $target
-
-func _ready():
- # sspj ãã¡ã€ã«ãèªã¿èŸŒã¿ãŸãã
- ssnode.res_player.res_project = ResourceLoader.load("Sample.sspj")
-
- # ssaeãã¡ã€ã«ãšã¢ãã¡ãŒã·ã§ã³ãæå®ããŸãã
- ssnode.set_anime_pack("Sample.ssae")
- ssnode.set_animation("anime_1")
-
- # ã¢ãã¡ãŒã·ã§ã³çµäºæã³ãŒã«ããã¯ã®èšå®
- ## Godot 4
- ssnode.connect("animation_finished", Callable(self, "_on_animation_finished"))
- ## Godot 3.x
- # ssnode.connect("animation_finished", self, "_on_animation_finished")
-
- # ã«ãŒããæå®ããŠåçãéå§ããŸãã
- ssnode.set_loop(true)
- ssnode.play()
-
-# ã¢ãã¡çµäºæã®ã³ãŒã«ããã¯é¢æ°ã§ã
-func _on_animation_finished(name):
- print("SIGNAL _on_animation_finished from " + name)
-```
-
-ä»ã«ãã«ã¬ã³ããã¬ãŒã ã®æå®ãäžæåæ¢ãéå§ãçµäºãã¬ãŒã ãFPSã®ååŸãªã©äžè¬çãªã¡ãœããããããŸãã
-äžèŠ§ã¯ Godot ã® Script ç»é¢ã§ç¢ºèªããŠã¿ãŠãã ããã
-
-### ã·ã°ãã«
-
-GdNodeSsPlayer ãçºè¡ããã·ã°ãã«ã«ã€ããŠèª¬æããŸãã
-
-### on_animation_changed(name: String)
-
-ã¢ãã¡ãŒã·ã§ã³å€æŽæã«çºè¡ãããŸãã
-nameïŒå€æŽããã¢ãã¡ãŒã·ã§ã³å
-
-### on_animation_finished(name: String)
-
-åçäžã®ã¢ãã¡ãŒã·ã§ã³ãçµäºãã¬ãŒã ã«å°éããæã«çºè¡ãããŸãã
-ã«ãŒãåçãªã³ã§ãæ¯åšçºè¡ãããŸãã
-nameïŒå€æŽããã¢ãã¡ãŒã·ã§ã³å
-
-### on_animepack_changed(name: String)
-
-ã¢ãã¡ããã¯å€æŽæã«çºè¡ãããŸãã
-nameïŒå€æŽããã¢ãã¡ããã¯å
-
-### on_frame_changed(frame: int)
-
-ãã¬ãŒã äœçœ®å€æŽæã«çºè¡ãããŸãã
-frameïŒå€æŽãããã¬ãŒã äœçœ®
-
-### on_signal(command: String, value: Dictionary)
-
-SpriteStudioã®ã·ã°ãã«ã¢ããªãã¥ãŒãã®ããŒãã¬ãŒã å°éæã«çºè¡ãããŸãã
-commandïŒã³ãã³ãå
-valueïŒãã©ã¡ãŒã¿åãšå€ã®ã³ã¬ã¯ã·ã§ã³
-
-### on_user_data(flag: int, intValue: int, rectValue: Rect2, pointValue: Vector2, stringValue: String)
-
-ãŠãŒã¶ãŒããŒã¿ã®ããŒãã¬ãŒã å°éæã«çºè¡ãããŸãã
-
-- flagïŒåŸç¶ã®åŒæ°ãæå¹ãã©ããã®è«çå€
- - 1ïŒæŽæ°ãæå¹
- - 2ïŒç¯å²ãæå¹
- - 4ïŒäœçœ®ãæå¹
- - 8ïŒæååãæå¹
-- intValueïŒæŽæ°
-- rectValueïŒç¯å²
-- pointValueïŒäœçœ®
-- stringValueïŒæåå
-
-# å¶éäºé
-
-## åäœããªããã®
-
-- ãã¹ã¯æ©èœ
-- æç»ã¢ãŒãïŒããã¯ã¹ä»¥å€ãããã¯ã¹çžåœã«ãªããŸãã
-- SpriteStudio Ver.7.1 ã§è¿œå ãããæ°æ©èœ(ããã¹ãã»ãµãŠã³ãã»9ã¹ã©ã€ã¹ã»ã·ã§ã€ã)
-
-## 衚瀺ãç°ãªããã®
-
-- ããŒãã«ã©ãŒ
- - [x] v1.1.1 ã§ä¿®æ£æžïŒããã¯ã¹ã®é ç¹åäœã®æã«Xç¶(äžè§åœ¢ã®èŸºéšå)ã®èŒåºŠãé«ããªã£ãŠããŸãã
- - [x] v1.1 ã§ä¿®æ£æžïŒä¹ç®ã§ãã¯ã¹ãã£ã«ã©ãŒã®å²åããšãã£ã¿ãã倧ãããªããŸãã
-
-## ãã®ä»ã®å¶é
-
-- ã€ã³ã¹ã¿ã³ã¹ã®ç¬ç«åäœãOnã®ããŒãã®åçã«ã€ããŠ
- - ã·ãŒã³äžã§ Frame ããããã£ã 0 以å€ã®ç¶æ
ã§ Play ããããã£ã On ã«ããŠåçéå§ããå Žåãç¬ç«åäœãOnã«èšå®ãããã€ã³ã¹ã¿ã³ã¹ããŒããåçãããå Žåãã€ã³ã¹ã¿ã³ã¹ããŒãã®åçãã¬ãŒã ããããããšããããŸãã
- - ãã®å ŽåãäžæŠ Frame ããããã£ã®å€ã 0 以å€ã«å€æŽåŸã0 ã«æ»ããŠããåçéå§ããããšã§äžèŽãããããŸãã
-- ã·ã§ãŒããŒ
- - SpriteStudioå
¬åŒã®äžéšã®ã¿å¯Ÿå¿ããŠããŸãã
- - ã«ã¹ã¿ã ã·ã§ãŒããŒã¯ç¬èªã«è¿œå ã»å¯Ÿå¿ããå¿
èŠããããŸãã
diff --git a/doc_images/ssnode_inspector.png b/doc_images/ssnode_inspector.png
deleted file mode 100644
index 2cf9f30..0000000
Binary files a/doc_images/ssnode_inspector.png and /dev/null differ
diff --git a/examples/new/.editorconfig b/examples/new/.editorconfig
new file mode 100644
index 0000000..f28239b
--- /dev/null
+++ b/examples/new/.editorconfig
@@ -0,0 +1,4 @@
+root = true
+
+[*]
+charset = utf-8
diff --git a/examples/new/.gitattributes b/examples/new/.gitattributes
new file mode 100644
index 0000000..8ad74f7
--- /dev/null
+++ b/examples/new/.gitattributes
@@ -0,0 +1,2 @@
+# Normalize EOL for all files that Git considers text files.
+* text=auto eol=lf
diff --git a/examples/new/.gitignore b/examples/new/.gitignore
new file mode 100644
index 0000000..0af181c
--- /dev/null
+++ b/examples/new/.gitignore
@@ -0,0 +1,3 @@
+# Godot 4+ specific ignores
+.godot/
+/android/
diff --git a/examples/new/icon.svg b/examples/new/icon.svg
new file mode 100644
index 0000000..c6bbb7d
--- /dev/null
+++ b/examples/new/icon.svg
@@ -0,0 +1 @@
+
diff --git a/examples/new/icon.svg.import b/examples/new/icon.svg.import
new file mode 100644
index 0000000..72612e6
--- /dev/null
+++ b/examples/new/icon.svg.import
@@ -0,0 +1,43 @@
+[remap]
+
+importer="texture"
+type="CompressedTexture2D"
+uid="uid://blqanr2op3koj"
+path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://icon.svg"
+dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"]
+
+[params]
+
+compress/mode=0
+compress/high_quality=false
+compress/lossy_quality=0.7
+compress/uastc_level=0
+compress/rdo_quality_loss=0.0
+compress/hdr_compression=1
+compress/normal_map=0
+compress/channel_pack=0
+mipmaps/generate=false
+mipmaps/limit=-1
+roughness/mode=0
+roughness/src_normal=""
+process/channel_remap/red=0
+process/channel_remap/green=1
+process/channel_remap/blue=2
+process/channel_remap/alpha=3
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/normal_map_invert_y=false
+process/hdr_as_srgb=false
+process/hdr_clamp_exposure=false
+process/size_limit=0
+detect_3d/compress_to=1
+svg/scale=1.0
+editor/scale_with_editor_scale=false
+editor/convert_colors_with_editor_theme=false
diff --git a/examples/new/project.godot b/examples/new/project.godot
new file mode 100644
index 0000000..588e54e
--- /dev/null
+++ b/examples/new/project.godot
@@ -0,0 +1,20 @@
+; Engine configuration file.
+; It's best edited using the editor UI and not directly,
+; since the parameters that go here are not all obvious.
+;
+; Format:
+; [section] ; section goes between []
+; param=value ; assign values to parameters
+
+config_version=5
+
+[application]
+
+config/name="new"
+config/features=PackedStringArray("4.5", "GL Compatibility")
+config/icon="res://icon.svg"
+
+[rendering]
+
+renderer/rendering_method="gl_compatibility"
+renderer/rendering_method.mobile="gl_compatibility"
diff --git a/gd_spritestudio/SCsub b/gd_spritestudio/SCsub
index 5c70f5a..fba830b 100644
--- a/gd_spritestudio/SCsub
+++ b/gd_spritestudio/SCsub
@@ -1,30 +1,43 @@
-#!/usr/bin/env python
+#!/usr/bin/env python
Import("env")
Import("env_modules")
+import os
env_gd_spritestudio = env_modules.Clone()
env_gd_spritestudio.add_source_files(env.modules_sources, "*.cpp")
-env_gd_spritestudio.add_source_files(env.modules_sources, "SpriteStudio6-SDK/Common/Loader/tinyxml2/*.cpp")
-env_gd_spritestudio.add_source_files(env.modules_sources, "SpriteStudio6-SDK/Common/Loader/*.cpp")
-# env_gd_spritestudio.add_source_files(env.modules_sources, "SpriteStudio6-SDK/Common/Helper/*.cpp")
-env_gd_spritestudio.add_source_files(env.modules_sources, "SpriteStudio6-SDK/Common/Animator/*.cpp")
-env_gd_spritestudio.add_source_files(env.modules_sources, "SpriteStudio6-SDK/Common/Helper/DebugPrint.cpp")
-env_gd_spritestudio.add_source_files(env.modules_sources, "SpriteStudio6-SDK/Common/Helper/IsshTexture.cpp")
+env_gd_spritestudio.add_source_files(env.modules_sources, "flatbuffers/src/idl_parser.cpp")
+env_gd_spritestudio.add_source_files(env.modules_sources, "flatbuffers/src/idl_gen_text.cpp")
+env_gd_spritestudio.add_source_files(env.modules_sources, "flatbuffers/src/reflection.cpp")
+env_gd_spritestudio.add_source_files(env.modules_sources, "flatbuffers/src/util.cpp")
-env_gd_spritestudio.Append(CPPDEFINES = '_NOTUSE_STBI')
-env_gd_spritestudio.Append(CPPDEFINES = '_NOTUSE_TEXTURE_FULLPATH')
-env_gd_spritestudio.Append(CPPDEFINES = '_NOTUSE_EXCEPTION')
-
env_gd_spritestudio.Append(
CPPPATH=[
- "SpriteStudio6-SDK/Common/Loader",
- "SpriteStudio6-SDK/Common/Helper",
- "SpriteStudio6-SDK/Common/Animator",
+ "flatbuffers/src",
+ "flatbuffers/include",
+ "runtime",
])
+module_path = env.Dir('.').abspath
+if env['platform'] == 'macos' or env['platform'] == 'windows':
+ runtime_libpath = os.path.join(module_path, "runtime", "libs", env['platform'])
+else:
+ runtime_libpath = os.path.join(module_path, "runtime", "libs", env['platform'], env['arch'])
+
+env.Append(
+ LIBPATH=[
+ runtime_libpath,
+ ])
+
+if env['target'] == 'editor':
+ env.Append(LIBS=["ssconverter"])
+ if env["platform"] == "windows":
+ env.Append(LINKFLAGS=["Userenv.lib", "Bcrypt.lib", "Ntdll.lib", "Ws2_32.lib"])
+env.Append(LIBS=["ssruntime"])
+
+
if not env_gd_spritestudio.msvc:
env_gd_spritestudio.Append(CXXFLAGS=["-Wno-inconsistent-missing-override"])
diff --git a/gd_spritestudio/SpriteStudio6-SDK b/gd_spritestudio/SpriteStudio6-SDK
deleted file mode 160000
index b31ec85..0000000
--- a/gd_spritestudio/SpriteStudio6-SDK
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit b31ec853086976a84e01265244b962cadf4b6fba
diff --git a/gd_spritestudio/SpriteStudio7-SDK b/gd_spritestudio/SpriteStudio7-SDK
new file mode 160000
index 0000000..5f2151f
--- /dev/null
+++ b/gd_spritestudio/SpriteStudio7-SDK
@@ -0,0 +1 @@
+Subproject commit 5f2151fc0a285a99b64391e915b74a7391fbf4ad
diff --git a/gd_spritestudio/addons/ss_importer/plugin.cfg b/gd_spritestudio/addons/ss_importer/plugin.cfg
deleted file mode 100644
index 88e6c8e..0000000
--- a/gd_spritestudio/addons/ss_importer/plugin.cfg
+++ /dev/null
@@ -1,7 +0,0 @@
-[plugin]
-
-name="ss_importer"
-description=""
-author="ss"
-version="1"
-script="ss_importer.gd"
diff --git a/gd_spritestudio/addons/ss_importer/ss_importer.gd b/gd_spritestudio/addons/ss_importer/ss_importer.gd
deleted file mode 100644
index a739ab5..0000000
--- a/gd_spritestudio/addons/ss_importer/ss_importer.gd
+++ /dev/null
@@ -1,27 +0,0 @@
-tool
-extends EditorPlugin
-
-var importer_sspj
-var importer_ssae
-var importer_ssce
-var importer_ssee
-
-func _enter_tree():
- importer_sspj = preload("ss_importer_sspj.gd").new()
- importer_ssae = preload("ss_importer_ssae.gd").new()
- importer_ssce = preload("ss_importer_ssce.gd").new()
- importer_ssee = preload("ss_importer_ssee.gd").new()
- add_import_plugin(importer_sspj)
- add_import_plugin(importer_ssae)
- add_import_plugin(importer_ssce)
- add_import_plugin(importer_ssee)
-
-func _exit_tree():
- remove_import_plugin(importer_sspj)
- remove_import_plugin(importer_ssae)
- remove_import_plugin(importer_ssce)
- remove_import_plugin(importer_ssee)
- importer_sspj = null
- importer_ssae = null
- importer_ssce = null
- importer_ssee = null
diff --git a/gd_spritestudio/addons/ss_importer/ss_importer_ssae.gd b/gd_spritestudio/addons/ss_importer/ss_importer_ssae.gd
deleted file mode 100644
index 7d2e2e5..0000000
--- a/gd_spritestudio/addons/ss_importer/ss_importer_ssae.gd
+++ /dev/null
@@ -1,35 +0,0 @@
-tool
-extends EditorImportPlugin
-
-func get_preset_count():
- return 0
-
-func get_preset_name(preset):
- return ""
-
-func get_import_options(preset):
- return []
-
-func get_option_visibility(option, options):
- return false
-
-func import(source_file, save_path, options, r_platform_variants, r_gen_files):
- var doc = GdResourceSsDocument.new()
- doc.load_from_file(source_file,source_file)
-
- return ResourceSaver.save("%s.%s" % [save_path, get_save_extension()], doc)
-
-func get_importer_name():
- return "ssae_importer"
-
-func get_visible_name():
- return "ssae_importer"
-
-func get_recognized_extensions():
- return ["ssae"]
-
-func get_save_extension():
- return "gdssae"
-
-func get_resource_type():
- return "GdResourceSsAnimePack"
diff --git a/gd_spritestudio/addons/ss_importer/ss_importer_ssce.gd b/gd_spritestudio/addons/ss_importer/ss_importer_ssce.gd
deleted file mode 100644
index 8c3981f..0000000
--- a/gd_spritestudio/addons/ss_importer/ss_importer_ssce.gd
+++ /dev/null
@@ -1,35 +0,0 @@
-tool
-extends EditorImportPlugin
-
-func get_preset_count():
- return 0
-
-func get_preset_name(preset):
- return ""
-
-func get_import_options(preset):
- return []
-
-func get_option_visibility(option, options):
- return false
-
-func import(source_file, save_path, options, r_platform_variants, r_gen_files):
- var doc = GdResourceSsDocument.new()
- doc.load_from_file(source_file,source_file)
-
- return ResourceSaver.save("%s.%s" % [save_path, get_save_extension()], doc)
-
-func get_importer_name():
- return "ssce_importer"
-
-func get_visible_name():
- return "ssce_importer"
-
-func get_recognized_extensions():
- return ["ssce"]
-
-func get_save_extension():
- return "gdssce"
-
-func get_resource_type():
- return "GdResourceSsCellMap"
diff --git a/gd_spritestudio/addons/ss_importer/ss_importer_ssee.gd b/gd_spritestudio/addons/ss_importer/ss_importer_ssee.gd
deleted file mode 100644
index 1b43dc0..0000000
--- a/gd_spritestudio/addons/ss_importer/ss_importer_ssee.gd
+++ /dev/null
@@ -1,35 +0,0 @@
-tool
-extends EditorImportPlugin
-
-func get_preset_count():
- return 0
-
-func get_preset_name(preset):
- return ""
-
-func get_import_options(preset):
- return []
-
-func get_option_visibility(option, options):
- return false
-
-func import(source_file, save_path, options, r_platform_variants, r_gen_files):
- var doc = GdResourceSsDocument.new()
- doc.load_from_file(source_file,source_file)
-
- return ResourceSaver.save("%s.%s" % [save_path, get_save_extension()], doc)
-
-func get_importer_name():
- return "ssee_importer"
-
-func get_visible_name():
- return "ssee_importer"
-
-func get_recognized_extensions():
- return ["ssee"]
-
-func get_save_extension():
- return "gdssee"
-
-func get_resource_type():
- return "GdResourceSsEffect"
diff --git a/gd_spritestudio/addons/ss_importer/ss_importer_sspj.gd b/gd_spritestudio/addons/ss_importer/ss_importer_sspj.gd
deleted file mode 100644
index 37578fd..0000000
--- a/gd_spritestudio/addons/ss_importer/ss_importer_sspj.gd
+++ /dev/null
@@ -1,35 +0,0 @@
-tool
-extends EditorImportPlugin
-
-func get_preset_count():
- return 0
-
-func get_preset_name(preset):
- return ""
-
-func get_import_options(preset):
- return []
-
-func get_option_visibility(option, options):
- return false
-
-func import(source_file, save_path, options, r_platform_variants, r_gen_files):
- var doc = GdResourceSsDocument.new()
- doc.load_from_file(source_file,source_file)
-
- return ResourceSaver.save("%s.%s" % [save_path, get_save_extension()], doc)
-
-func get_importer_name():
- return "sspj_importer"
-
-func get_visible_name():
- return "sspj_importer"
-
-func get_recognized_extensions():
- return ["sspj"]
-
-func get_save_extension():
- return "gdsspj"
-
-func get_resource_type():
- return "GdResourceSsProject"
diff --git a/gd_spritestudio/config.py b/gd_spritestudio/config.py
index e16887f..3475ca9 100644
--- a/gd_spritestudio/config.py
+++ b/gd_spritestudio/config.py
@@ -1,4 +1,4 @@
-# config.py
+# config.py
def can_build(env, platform):
return True
diff --git a/gd_spritestudio/defs.h b/gd_spritestudio/defs.h
new file mode 100644
index 0000000..5c1942b
--- /dev/null
+++ b/gd_spritestudio/defs.h
@@ -0,0 +1,15 @@
+#pragma once
+
+#include
+#include
+#include
+
+#if !defined(GDE_EXPORT)
+#if defined(_WIN32)
+#define GDE_EXPORT __declspec(dllexport)
+#elif defined(__GNUC__)
+#define GDE_EXPORT __attribute__((visibility("default")))
+#else
+#define GDE_EXPORT
+#endif
+#endif // ! GDE_EXPORT
diff --git a/gd_spritestudio/doc/classes/GdNodeSsPlayer.xml b/gd_spritestudio/doc/classes/GdNodeSsPlayer.xml
deleted file mode 100644
index 869f470..0000000
--- a/gd_spritestudio/doc/classes/GdNodeSsPlayer.xml
+++ /dev/null
@@ -1,140 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/gd_spritestudio/doc/classes/GdResourceSsAnimePack.xml b/gd_spritestudio/doc/classes/GdResourceSsAnimePack.xml
deleted file mode 100644
index fe94d97..0000000
--- a/gd_spritestudio/doc/classes/GdResourceSsAnimePack.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/gd_spritestudio/doc/classes/GdResourceSsCellMap.xml b/gd_spritestudio/doc/classes/GdResourceSsCellMap.xml
deleted file mode 100644
index 76370f1..0000000
--- a/gd_spritestudio/doc/classes/GdResourceSsCellMap.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/gd_spritestudio/doc/classes/GdResourceSsDocument.xml b/gd_spritestudio/doc/classes/GdResourceSsDocument.xml
deleted file mode 100644
index c255523..0000000
--- a/gd_spritestudio/doc/classes/GdResourceSsDocument.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/gd_spritestudio/doc/classes/GdResourceSsEffect.xml b/gd_spritestudio/doc/classes/GdResourceSsEffect.xml
deleted file mode 100644
index 0a0fa74..0000000
--- a/gd_spritestudio/doc/classes/GdResourceSsEffect.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/gd_spritestudio/doc/classes/GdResourceSsPlayer.xml b/gd_spritestudio/doc/classes/GdResourceSsPlayer.xml
deleted file mode 100644
index 0227c17..0000000
--- a/gd_spritestudio/doc/classes/GdResourceSsPlayer.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/gd_spritestudio/doc/classes/GdResourceSsProject.xml b/gd_spritestudio/doc/classes/GdResourceSsProject.xml
deleted file mode 100644
index 217414a..0000000
--- a/gd_spritestudio/doc/classes/GdResourceSsProject.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/gd_spritestudio/flatbuffers b/gd_spritestudio/flatbuffers
new file mode 160000
index 0000000..8914d06
--- /dev/null
+++ b/gd_spritestudio/flatbuffers
@@ -0,0 +1 @@
+Subproject commit 8914d06ab7123167424438cf293bb349833bcb7d
diff --git a/gd_spritestudio/gd_clickable_label.cpp b/gd_spritestudio/gd_clickable_label.cpp
new file mode 100644
index 0000000..2507850
--- /dev/null
+++ b/gd_spritestudio/gd_clickable_label.cpp
@@ -0,0 +1,43 @@
+#ifdef TOOLS_ENABLED
+
+#include "gd_clickable_label.h"
+
+#ifdef SPRITESTUDIO_GODOT_EXTENSION
+#include
+#include
+#include
+using namespace godot;
+#else
+#include "servers/display_server.h"
+
+#endif
+
+void GdClickableLabel::_bind_methods() {
+ ADD_SIGNAL(MethodInfo("text_copied"));
+}
+
+GdClickableLabel::GdClickableLabel() {
+ set_mouse_filter(MOUSE_FILTER_STOP);
+
+ set_default_cursor_shape(CURSOR_POINTING_HAND);
+}
+
+#ifdef SPRITESTUDIO_GODOT_EXTENSION
+void GdClickableLabel::_gui_input(const Ref &p_event) {
+#else
+void GdClickableLabel::gui_input(const Ref &p_event) {
+#endif
+ Ref mb = p_event;
+
+#ifdef SPRITESTUDIO_GODOT_EXTENSION
+ if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MOUSE_BUTTON_LEFT) {
+#else
+ if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == MouseButton::LEFT) {
+#endif
+ String text_to_copy = get_text();
+ DisplayServer::get_singleton()->clipboard_set(text_to_copy);
+ emit_signal("text_copied");
+ accept_event();
+ }
+}
+#endif // #ifdef TOOLS_ENABLED
diff --git a/gd_spritestudio/gd_clickable_label.h b/gd_spritestudio/gd_clickable_label.h
new file mode 100644
index 0000000..43e7caa
--- /dev/null
+++ b/gd_spritestudio/gd_clickable_label.h
@@ -0,0 +1,32 @@
+#ifdef TOOLS_ENABLED
+
+#ifndef CLICKABLE_LABEL_H
+#define CLICKABLE_LABEL_H
+
+#ifdef SPRITESTUDIO_GODOT_EXTENSION
+#include
+#include
+using namespace godot;
+#else
+#include "scene/gui/label.h"
+#include "core/input/input_event.h"
+#endif
+
+class GdClickableLabel : public Label {
+ GDCLASS(GdClickableLabel, Label);
+
+protected:
+ static void _bind_methods();
+
+public:
+ GdClickableLabel();
+
+#ifdef SPRITESTUDIO_GODOT_EXTENSION
+ virtual void _gui_input(const Ref &p_event) override;
+#else
+ virtual void gui_input(const Ref &p_event) override;
+#endif
+};
+
+#endif // CLICKABLE_LABEL_HPP
+#endif // #ifdef TOOLS_ENABLED
diff --git a/gd_spritestudio/gd_io.cpp b/gd_spritestudio/gd_io.cpp
deleted file mode 100644
index 0fc40b9..0000000
--- a/gd_spritestudio/gd_io.cpp
+++ /dev/null
@@ -1,295 +0,0 @@
-/*!
-* \file gd_io.cpp
-* \author CRI Middleware Co., Ltd.
-*/
-#include "gd_io.h"
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-#include
-using namespace godot;
-#else
-#ifdef GD_V4
-#include "core/io/file_access.h"
-#endif
-#ifdef GD_V3
-#include "core/os/file_access.h"
-#endif
-#include "core/io/stream_peer.h"
-#endif
-
-GdIO::GdIO()
-{
-}
-
-GdIO::~GdIO()
-{
-}
-
-String GdIO::loadStringFromFile( const String& strPath )
-{
- Error err;
- String str = String( "" );
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
- str = FileAccess::get_file_as_string(strPath);
- if (str.length() == 0) {
- err = ERR_FILE_UNRECOGNIZED;
- ERR_PRINT( String( "loadStringFromFile error: " ) + String::num( err ) );
-
- return str;
- }
-
-#endif
-#ifdef GD_V4
- Ref resFileAccess = FileAccess::open( strPath, FileAccess::READ, &err );
-
- if ( err != OK ) {
- ERR_PRINT( String( "loadStringFromFile error: " ) + String::num( err ) );
-
- if ( resFileAccess.is_valid() ) {
- resFileAccess->close();
- }
-
- return str;
- }
-
- while ( !resFileAccess->eof_reached() ) {
- str += resFileAccess->get_line();
- }
-
- resFileAccess->close();
-#endif
-#ifdef GD_V3
- FileAccess* pFileAccess = FileAccess::open( strPath, FileAccess::READ, &err );
-
- if ( err != OK ) {
- ERR_PRINT( String( "loadStringFromFile error: " ) + String::num( err ) );
-
- if ( pFileAccess ) {
- pFileAccess->close();
- }
-
- return str;
- }
-
- str = pFileAccess->get_as_utf8_string();
-
- pFileAccess->close();
-#endif
-
- return str;
-}
-
-Error GdIO::saveStringToFile( const String& strPath, const String& str )
-{
- Error err;
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
- Ref resFileAccess = FileAccess::open( strPath, FileAccess::WRITE);
- if ( !resFileAccess.is_valid() ) {
- err = ERR_FILE_CANT_OPEN;
- ERR_PRINT( String( "saveStringToFile error: " ) + String::num( err ) );
-
- return err;
- }
-
- resFileAccess->store_string( str );
-
- resFileAccess->close();
-
-#endif
-#ifdef GD_V4
- Ref resFileAccess = FileAccess::open( strPath, FileAccess::WRITE, &err );
-
- if ( err != OK ) {
- ERR_PRINT( String( "saveStringToFile error: " ) + String::num( err ) );
-
- if ( resFileAccess.is_valid() ) {
- resFileAccess->close();
- }
-
- return err;
- }
-
- resFileAccess->store_string( str );
-
- resFileAccess->close();
-#endif
-#ifdef GD_V3
- FileAccess* pFileAccess = FileAccess::open( strPath, FileAccess::WRITE, &err );
-
- if ( err != OK ) {
- ERR_PRINT( String( "saveStringToFile error: " ) + String::num( err ) );
-
- if ( pFileAccess ) {
- pFileAccess->close();
- }
-
- return err;
- }
-
- pFileAccess->store_string( str );
-
- pFileAccess->close();
-#endif
-
- return err;
-}
-
-Variant GdIO::loadVariantFromFile( const String& strPath )
-{
- Error err;
- Variant val = Variant( "" );
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
- Ref resFileAccess = FileAccess::open( strPath, FileAccess::READ);
- if ( !resFileAccess.is_valid() ) {
- err = ERR_FILE_CANT_OPEN;
- ERR_PRINT( String( "loadVariantFromFile error: " ) + String::num( err ) );
- return val;
- }
-
- val = resFileAccess->get_var();
-
- resFileAccess->close();
-#else
-#ifdef GD_V4
- Ref resFileAccess = FileAccess::open( strPath, FileAccess::READ, &err );
-
- if ( err != OK ) {
- ERR_PRINT( String( "loadVariantFromFile error: " ) + String::num( err ) );
-
- if ( resFileAccess.is_valid() ) {
- resFileAccess->close();
- }
-
- return val;
- }
-
- int iSize = resFileAccess->get_length();
- uint8_t* pBuf = memnew_arr( uint8_t, iSize );
-
- resFileAccess->get_buffer( pBuf, iSize );
-
- resFileAccess->close();
-
- StreamPeerBuffer st;
-
- st.put_data( pBuf, iSize );
- st.seek( 0 );
-
- val = st.get_var();
-
- memdelete_arr( pBuf );
-#endif
-#ifdef GD_V3
- FileAccess* pFileAccess = FileAccess::open( strPath, FileAccess::READ, &err );
-
- if ( err != OK ) {
- ERR_PRINT( String( "loadVariantFromFile error: " ) + String::num( err ) );
-
- if ( pFileAccess ) {
- pFileAccess->close();
- }
-
- return val;
- }
-
- int iSize = pFileAccess->get_len();
- uint8_t* pBuf = memnew_arr( uint8_t, iSize );
-
- pFileAccess->get_buffer( pBuf, iSize );
-
- pFileAccess->close();
-
- StreamPeerBuffer st;
-
- st.put_data( pBuf, iSize );
- st.seek( 0 );
-
- val = st.get_var();
-
- memdelete_arr( pBuf );
-#endif
-#endif
-
- return val;
-}
-
-Error GdIO::saveVariantToFile( const String& strPath, const Variant& val )
-{
- Error err;
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
- Ref resFileAccess = FileAccess::open( strPath, FileAccess::WRITE);
- if ( !resFileAccess.is_valid() ) {
- err = ERR_FILE_CANT_OPEN;
- ERR_PRINT( String( "saveVariantToFile error: " ) + String::num( err ) );
-
- return err;
- }
-
- resFileAccess->store_var(val);
-
-#endif
-#ifdef GD_V4
- Ref resFileAccess = FileAccess::open( strPath, FileAccess::WRITE, &err );
-
- if ( err != OK ) {
- ERR_PRINT( String( "saveVariantToFile error: " ) + String::num( err ) );
-
- if ( resFileAccess.is_valid() ) {
- resFileAccess->close();
- }
-
- return err;
- }
-
- StreamPeerBuffer st;
-
- st.put_var( val );
- st.seek( 0 );
-
- int iSize = st.get_size();
- uint8_t* pBuf = memnew_arr( uint8_t, iSize );
-
- st.get_data( pBuf, iSize );
-
- resFileAccess->store_buffer( pBuf, iSize );
-
- resFileAccess->close();
-
- memdelete_arr( pBuf );
-#endif
-#ifdef GD_V3
- FileAccess* pFileAccess = FileAccess::open( strPath, FileAccess::WRITE, &err );
-
- if ( err != OK ) {
- ERR_PRINT( String( "saveVariantToFile error: " ) + String::num( err ) );
-
- if ( pFileAccess ) {
- pFileAccess->close();
- }
-
- return err;
- }
-
- StreamPeerBuffer st;
-
- st.put_var( val );
- st.seek( 0 );
-
- int iSize = st.get_size();
- uint8_t* pBuf = memnew_arr( uint8_t, iSize );
-
- st.get_data( pBuf, iSize );
-
- pFileAccess->store_buffer( pBuf, iSize );
-
- pFileAccess->close();
-
- memdelete_arr( pBuf );
-#endif
-
- return err;
-}
diff --git a/gd_spritestudio/gd_io.h b/gd_spritestudio/gd_io.h
deleted file mode 100644
index a586191..0000000
--- a/gd_spritestudio/gd_io.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*!
-* \file gd_io.h
-* \author CRI Middleware Co., Ltd.
-*/
-#ifndef GD_IO_H
-#define GD_IO_H
-
-#include "gd_macros.h"
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-#include
-#include
-#include
-using namespace godot;
-#else
-#ifdef GD_V4
-#include "core/string/ustring.h"
-#endif
-#ifdef GD_V3
-#include "core/ustring.h"
-#endif
-#endif
-
-class GdIO
-{
-private :
- GdIO();
-
-public :
- virtual ~GdIO();
-
- static String loadStringFromFile( const String& strPath );
- static Error saveStringToFile( const String& strPath, const String& str );
- static Variant loadVariantFromFile( const String& strPath );
- static Error saveVariantToFile( const String& strPath, const Variant& val );
-};
-
-#endif // GD_IO_H
diff --git a/gd_spritestudio/gd_loader_bssanimepack.cpp b/gd_spritestudio/gd_loader_bssanimepack.cpp
deleted file mode 100644
index dda90f0..0000000
--- a/gd_spritestudio/gd_loader_bssanimepack.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-/*!
-* \file gd_loader_bssanimepack.cpp
-* \author CRI Middleware Co., Ltd.
-*/
-#include "gd_loader_bssanimepack.h"
-
-#include "gd_resource_ssanimepack.h"
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-Variant GdLoaderBssAnimePack::_load(const String &p_path, const String &p_original_path, bool use_sub_threads, int32_t cache_mode)
-#else
-#ifdef GD_V4
-Ref GdLoaderBssAnimePack::load( const String& p_path, const String& p_original_path, Error* r_error, bool p_use_sub_threads, float* r_progress, CacheMode p_cache_mode )
-#endif
-#ifdef GD_V3
-RES GdLoaderBssAnimePack::load( const String& p_path, const String& p_original_path, Error* r_error, bool p_no_subresource_cache )
-#endif
-#endif
-{
- Ref res = memnew( GdResourceSsAnimePack );
- Error err = res->loadFromFile( p_path, p_original_path );
-
- if ( err != OK ) {
- ERR_PRINT( String( "load error: " ) + String::num( err ) );
- }
-
-#ifndef SPRITESTUDIO_GODOT_EXTENSION
- if ( r_error ) {
- *r_error = err;
- }
-#endif
-
- return res;
-}
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-PackedStringArray GdLoaderBssAnimePack::_get_recognized_extensions()
-{
- PackedStringArray extensions;
- extensions.push_back("gdssae");
- return extensions;
-}
-#else
-void GdLoaderBssAnimePack::get_recognized_extensions( List* p_extensions ) const
-{
- if ( !p_extensions->find( "gdssae" ) ) {
- p_extensions->push_back( "gdssae" );
- }
-}
-#endif
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-bool GdLoaderBssAnimePack::_handles_type(const StringName &p_type)
-#else
-bool GdLoaderBssAnimePack::handles_type( const String& p_type ) const
-#endif
-{
- return ClassDB::is_parent_class( p_type, "GdResourceSsAnimePack" );
-}
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-String GdLoaderBssAnimePack::_get_resource_type(const String &path)
-#else
-String GdLoaderBssAnimePack::get_resource_type( const String& p_path ) const
-#endif
-{
- return "GdResourceSsAnimePack";
-}
diff --git a/gd_spritestudio/gd_loader_bssanimepack.h b/gd_spritestudio/gd_loader_bssanimepack.h
deleted file mode 100644
index ce1a0ae..0000000
--- a/gd_spritestudio/gd_loader_bssanimepack.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*!
-* \file gd_loader_bssanimepack.h
-* \author CRI Middleware Co., Ltd.
-*/
-#ifndef GD_LOADER_BSSANIMEPACK_H
-#define GD_LOADER_BSSANIMEPACK_H
-
-#include "gd_macros.h"
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-#include
-#include
-#include
-using namespace godot;
-#else
-#include "core/io/resource_loader.h"
-#endif
-
-class GdLoaderBssAnimePack : public ResourceFormatLoader
-{
- GDCLASS( GdLoaderBssAnimePack, ResourceFormatLoader );
-
-public :
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
- static void _bind_methods(){};
-
- PackedStringArray _get_recognized_extensions();
-
- bool _handles_type(const StringName &p_type);
-
- String _get_resource_type(const String &path);
-
- Variant _load(const String &p_path, const String &p_original_path, bool use_sub_threads, int32_t cache_mode);
-#else
-#ifdef GD_V4
- virtual Ref load( const String& p_path, const String& p_original_path = "", Error* r_error = nullptr, bool p_use_sub_threads = false, float* r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE ) override;
-#endif
-#ifdef GD_V3
- virtual RES load( const String& p_path, const String& p_original_path = "", Error* r_error = nullptr, bool p_no_subresource_cache = false ) override;
-#endif
- virtual void get_recognized_extensions( List* p_extensions ) const override;
- virtual bool handles_type( const String& p_type ) const override;
- virtual String get_resource_type( const String& p_path ) const override;
-#endif
-};
-
-#endif // GD_LOADER_BSSANIMEPACK_H
diff --git a/gd_spritestudio/gd_loader_bsscellmap.cpp b/gd_spritestudio/gd_loader_bsscellmap.cpp
deleted file mode 100644
index 7cfdf26..0000000
--- a/gd_spritestudio/gd_loader_bsscellmap.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-/*!
-* \file gd_loader_bsscellmap.cpp
-* \author CRI Middleware Co., Ltd.
-*/
-#include "gd_loader_bsscellmap.h"
-
-#include "gd_resource_sscellmap.h"
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-Variant GdLoaderBssCellMap::_load(const String &p_path, const String &p_original_path, bool use_sub_threads, int32_t cache_mode)
-#else
-#ifdef GD_V4
-Ref GdLoaderBssCellMap::load( const String& p_path, const String& p_original_path, Error* r_error, bool p_use_sub_threads, float* r_progress, CacheMode p_cache_mode )
-#endif
-#ifdef GD_V3
-RES GdLoaderBssCellMap::load( const String& p_path, const String& p_original_path, Error* r_error, bool p_no_subresource_cache )
-#endif
-#endif
-{
- Ref res = memnew( GdResourceSsCellMap );
- Error err = res->loadFromFile( p_path, p_original_path );
-
- if ( err != OK ) {
- ERR_PRINT( String( "load error: " ) + String::num( err ) );
- }
-
-#ifndef SPRITESTUDIO_GODOT_EXTENSION
- if ( r_error ) {
- *r_error = err;
- }
-#endif
-
- return res;
-}
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-PackedStringArray GdLoaderBssCellMap::_get_recognized_extensions()
-{
- PackedStringArray extensions;
- extensions.push_back("gdssce");
- return extensions;
-}
-#else
-void GdLoaderBssCellMap::get_recognized_extensions( List* p_extensions ) const
-{
- if ( !p_extensions->find( "gdssce" ) ) {
- p_extensions->push_back( "gdssce" );
- }
-}
-#endif
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-bool GdLoaderBssCellMap::_handles_type(const StringName &p_type)
-#else
-bool GdLoaderBssCellMap::handles_type( const String& p_type ) const
-#endif
-{
- return ClassDB::is_parent_class( p_type, "GdResourceSsCellMap" );
-}
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-String GdLoaderBssCellMap::_get_resource_type(const String &path)
-#else
-String GdLoaderBssCellMap::get_resource_type( const String& p_path ) const
-#endif
-{
- return "GdResourceSsCellMap";
-}
diff --git a/gd_spritestudio/gd_loader_bsscellmap.h b/gd_spritestudio/gd_loader_bsscellmap.h
deleted file mode 100644
index a255d5c..0000000
--- a/gd_spritestudio/gd_loader_bsscellmap.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*!
-* \file gd_loader_bsscellmap.h
-* \author CRI Middleware Co., Ltd.
-*/
-#ifndef GD_LOADER_BSSCELLMAP_H
-#define GD_LOADER_BSSCELLMAP_H
-
-#include "gd_macros.h"
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-#include
-#include
-#include
-using namespace godot;
-#else
-#include "core/io/resource_loader.h"
-#endif
-
-class GdLoaderBssCellMap : public ResourceFormatLoader
-{
- GDCLASS( GdLoaderBssCellMap, ResourceFormatLoader );
-
-public :
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
- static void _bind_methods(){};
-
- PackedStringArray _get_recognized_extensions();
-
- bool _handles_type(const StringName &p_type);
-
- String _get_resource_type(const String &path);
-
- Variant _load(const String &p_path, const String &p_original_path, bool use_sub_threads, int32_t cache_mode);
-#else
-#ifdef GD_V4
- virtual Ref load( const String& p_path, const String& p_original_path = "", Error* r_error = nullptr, bool p_use_sub_threads = false, float* r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE ) override;
-#endif
-#ifdef GD_V3
- virtual RES load( const String& p_path, const String& p_original_path = "", Error* r_error = nullptr, bool p_no_subresource_cache = false ) override;
-#endif
- virtual void get_recognized_extensions( List* p_extensions ) const override;
- virtual bool handles_type( const String& p_type ) const override;
- virtual String get_resource_type( const String& p_path ) const override;
-#endif
-};
-
-#endif // GD_LOADER_BSSCELLMAP_H
diff --git a/gd_spritestudio/gd_loader_bsseffect.cpp b/gd_spritestudio/gd_loader_bsseffect.cpp
deleted file mode 100644
index 07177ca..0000000
--- a/gd_spritestudio/gd_loader_bsseffect.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-/*!
-* \file gd_loader_bsseffect.cpp
-* \author CRI Middleware Co., Ltd.
-*/
-#include "gd_loader_bsseffect.h"
-
-#include "gd_resource_sseffect.h"
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-Variant GdLoaderBssEffect::_load(const String &p_path, const String &p_original_path, bool use_sub_threads, int32_t cache_mode)
-#else
-#ifdef GD_V4
-Ref GdLoaderBssEffect::load( const String& p_path, const String& p_original_path, Error* r_error, bool p_use_sub_threads, float* r_progress, CacheMode p_cache_mode )
-#endif
-#ifdef GD_V3
-RES GdLoaderBssEffect::load( const String& p_path, const String& p_original_path, Error* r_error, bool p_no_subresource_cache )
-#endif
-#endif
-{
- Ref res = memnew( GdResourceSsEffect );
- Error err = res->loadFromFile( p_path, p_original_path );
-
- if ( err != OK ) {
- ERR_PRINT( String( "load error: " ) + String::num( err ) );
- }
-
-#ifndef SPRITESTUDIO_GODOT_EXTENSION
- if ( r_error ) {
- *r_error = err;
- }
-#endif
-
- return res;
-}
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-PackedStringArray GdLoaderBssEffect::_get_recognized_extensions()
-{
- PackedStringArray extensions;
- extensions.push_back("gdssee");
- return extensions;
-}
-#else
-void GdLoaderBssEffect::get_recognized_extensions( List* p_extensions ) const
-{
- if ( !p_extensions->find( "gdssee" ) ) {
- p_extensions->push_back( "gdssee" );
- }
-}
-#endif
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-bool GdLoaderBssEffect::_handles_type(const StringName &p_type)
-#else
-bool GdLoaderBssEffect::handles_type( const String& p_type ) const
-#endif
-{
- return ClassDB::is_parent_class( p_type, "GdResourceSsEffect" );
-}
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-String GdLoaderBssEffect::_get_resource_type(const String &path)
-#else
-String GdLoaderBssEffect::get_resource_type( const String& p_path ) const
-#endif
-{
- return "GdResourceSsEffect";
-}
diff --git a/gd_spritestudio/gd_loader_bsseffect.h b/gd_spritestudio/gd_loader_bsseffect.h
deleted file mode 100644
index ead81c8..0000000
--- a/gd_spritestudio/gd_loader_bsseffect.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*!
-* \file gd_loader_bsseffect.h
-* \author CRI Middleware Co., Ltd.
-*/
-#ifndef GD_LOADER_BSSEFFECT_H
-#define GD_LOADER_BSSEFFECT_H
-
-#include "gd_macros.h"
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-#include
-#include
-#include
-using namespace godot;
-#else
-#include "core/io/resource_loader.h"
-#endif
-
-class GdLoaderBssEffect : public ResourceFormatLoader
-{
- GDCLASS( GdLoaderBssEffect, ResourceFormatLoader );
-
-public :
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
- static void _bind_methods(){};
-
- PackedStringArray _get_recognized_extensions();
-
- bool _handles_type(const StringName &p_type);
-
- String _get_resource_type(const String &path);
-
- Variant _load(const String &p_path, const String &p_original_path, bool use_sub_threads, int32_t cache_mode);
-#else
-#ifdef GD_V4
- virtual Ref load( const String& p_path, const String& p_original_path = "", Error* r_error = nullptr, bool p_use_sub_threads = false, float* r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE ) override;
-#endif
-#ifdef GD_V3
- virtual RES load( const String& p_path, const String& p_original_path = "", Error* r_error = nullptr, bool p_no_subresource_cache = false ) override;
-#endif
- virtual void get_recognized_extensions( List* p_extensions ) const override;
- virtual bool handles_type( const String& p_type ) const override;
- virtual String get_resource_type( const String& p_path ) const override;
-#endif
-};
-
-#endif // GD_LOADER_BSSEFFECT_H
diff --git a/gd_spritestudio/gd_loader_bssproject.cpp b/gd_spritestudio/gd_loader_bssproject.cpp
deleted file mode 100644
index 0cb2b2b..0000000
--- a/gd_spritestudio/gd_loader_bssproject.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-/*!
-* \file gd_loader_bssproject.cpp
-* \author CRI Middleware Co., Ltd.
-*/
-#include "gd_loader_bssproject.h"
-
-#include "gd_resource_ssproject.h"
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-Variant GdLoaderBssProject::_load(const String &p_path, const String &p_original_path, bool use_sub_threads, int32_t cache_mode)
-#else
-#ifdef GD_V4
-Ref GdLoaderBssProject::load( const String& p_path, const String& p_original_path, Error* r_error, bool p_use_sub_threads, float* r_progress, CacheMode p_cache_mode )
-#endif
-#ifdef GD_V3
-RES GdLoaderBssProject::load( const String& p_path, const String& p_original_path, Error* r_error, bool p_no_subresource_cache )
-#endif
-#endif
-{
- Ref res = memnew( GdResourceSsProject );
- Error err = res->loadFromFile( p_path, p_original_path );
-
- if ( err != OK ) {
- ERR_PRINT( String( "load error: " ) + String::num( err ) );
- }
-
-#ifndef SPRITESTUDIO_GODOT_EXTENSION
- if ( r_error ) {
- *r_error = err;
- }
-#endif
-
- return res;
-}
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-PackedStringArray GdLoaderBssProject::_get_recognized_extensions()
-{
- PackedStringArray extensions;
- extensions.push_back("gdsspj");
- return extensions;
-}
-#else
-void GdLoaderBssProject::get_recognized_extensions( List* p_extensions ) const
-{
- if ( !p_extensions->find( "gdsspj" ) ) {
- p_extensions->push_back( "gdsspj" );
- }
-}
-#endif
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-bool GdLoaderBssProject::_handles_type(const StringName &p_type)
-#else
-bool GdLoaderBssProject::handles_type( const String& p_type ) const
-#endif
-{
- return ClassDB::is_parent_class( p_type, "GdResourceSsProject" );
-}
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-String GdLoaderBssProject::_get_resource_type(const String &path)
-#else
-String GdLoaderBssProject::get_resource_type( const String& p_path ) const
-#endif
-{
- return "GdResourceSsProject";
-}
diff --git a/gd_spritestudio/gd_loader_bssproject.h b/gd_spritestudio/gd_loader_bssproject.h
deleted file mode 100644
index ae9bd2e..0000000
--- a/gd_spritestudio/gd_loader_bssproject.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*!
-* \file gd_loader_bssproject.h
-* \author CRI Middleware Co., Ltd.
-*/
-#ifndef GD_LOADER_BSSPROJECT_H
-#define GD_LOADER_BSSPROJECT_H
-
-#include "gd_macros.h"
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-#include
-#include
-#include
-using namespace godot;
-#else
-#include "core/io/resource_loader.h"
-#endif
-
-class GdLoaderBssProject : public ResourceFormatLoader
-{
- GDCLASS( GdLoaderBssProject, ResourceFormatLoader );
-
-public :
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
- static void _bind_methods(){};
-
- PackedStringArray _get_recognized_extensions();
-
- bool _handles_type(const StringName &p_type);
-
- String _get_resource_type(const String &path);
-
- Variant _load(const String &p_path, const String &p_original_path, bool use_sub_threads, int32_t cache_mode);
-#else
-#ifdef GD_V4
- virtual Ref load( const String& p_path, const String& p_original_path = "", Error* r_error = nullptr, bool p_use_sub_threads = false, float* r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE ) override;
-#endif
-#ifdef GD_V3
- virtual RES load( const String& p_path, const String& p_original_path = "", Error* r_error = nullptr, bool p_no_subresource_cache = false ) override;
-#endif
- virtual void get_recognized_extensions( List* p_extensions ) const override;
- virtual bool handles_type( const String& p_type ) const override;
- virtual String get_resource_type( const String& p_path ) const override;
-#endif
-};
-
-#endif // GD_LOADER_BSSPROJECT_H
diff --git a/gd_spritestudio/gd_loader_ssanimepack.cpp b/gd_spritestudio/gd_loader_ssanimepack.cpp
deleted file mode 100644
index a53b8e4..0000000
--- a/gd_spritestudio/gd_loader_ssanimepack.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-/*!
-* \file gd_loader_ssanimepack.cpp
-* \author CRI Middleware Co., Ltd.
-*/
-#include "gd_loader_ssanimepack.h"
-
-#include "gd_resource_ssanimepack.h"
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-Variant GdLoaderSsAnimePack::_load(const String &p_path, const String &p_original_path, bool p_use_sub_threads, int32_t p_cache_mode)
-#else
-#ifdef GD_V4
-Ref GdLoaderSsAnimePack::load( const String& p_path, const String& p_original_path, Error* r_error, bool p_use_sub_threads, float* r_progress, CacheMode p_cache_mode )
-#endif
-#ifdef GD_V3
-RES GdLoaderSsAnimePack::load( const String& p_path, const String& p_original_path, Error* r_error, bool p_no_subresource_cache )
-#endif
-#endif
-{
- Ref res = memnew( GdResourceSsAnimePack );
- Error err = res->loadFromFile( p_path, p_original_path );
-
- if ( err != OK ) {
- ERR_PRINT( String( "load error: " ) + String::num( err ) );
- }
-
-#ifndef SPRITESTUDIO_GODOT_EXTENSION
- if ( r_error ) {
- *r_error = err;
- }
-#endif
-
- return res;
-}
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-PackedStringArray GdLoaderSsAnimePack::_get_recognized_extensions()
-{
- PackedStringArray extensions;
- extensions.push_back("ssae");
- return extensions;
-}
-#else
-void GdLoaderSsAnimePack::get_recognized_extensions( List* p_extensions ) const
-{
- if ( !p_extensions->find( "ssae" ) ) {
- p_extensions->push_back( "ssae" );
- }
-}
-#endif
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-bool GdLoaderSsAnimePack::_handles_type(const StringName &p_type)
-#else
-bool GdLoaderSsAnimePack::handles_type( const String& p_type ) const
-#endif
-{
- return ClassDB::is_parent_class( p_type, "GdResourceSsAnimePack" );
-}
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-String GdLoaderSsAnimePack::_get_resource_type(const String &p_path)
-#else
-String GdLoaderSsAnimePack::get_resource_type( const String& p_path ) const
-#endif
-{
- return "GdResourceSsAnimePack";
-}
diff --git a/gd_spritestudio/gd_loader_ssanimepack.h b/gd_spritestudio/gd_loader_ssanimepack.h
deleted file mode 100644
index 593204c..0000000
--- a/gd_spritestudio/gd_loader_ssanimepack.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*!
-* \file gd_loader_ssanimepack.h
-* \author CRI Middleware Co., Ltd.
-*/
-#ifndef GD_LOADER_SSANIMEPACK_H
-#define GD_LOADER_SSANIMEPACK_H
-
-#include "gd_macros.h"
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-#include
-#include
-#include
-using namespace godot;
-#else
-#include "core/io/resource_loader.h"
-#endif
-
-class GdLoaderSsAnimePack : public ResourceFormatLoader
-{
- GDCLASS( GdLoaderSsAnimePack, ResourceFormatLoader );
-
-public :
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
- static void _bind_methods(){};
-
- PackedStringArray _get_recognized_extensions();
-
- bool _handles_type(const StringName &p_type);
-
- String _get_resource_type(const String &p_path);
-
- Variant _load(const String &p_path, const String &p_original_path, bool p_use_sub_threads, int32_t p_cache_mode);
-#else
-#ifdef GD_V4
- virtual Ref load( const String& p_path, const String& p_original_path = "", Error* r_error = nullptr, bool p_use_sub_threads = false, float* r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE ) override;
-#endif
-#ifdef GD_V3
- virtual RES load( const String& p_path, const String& p_original_path = "", Error* r_error = nullptr, bool p_no_subresource_cache = false ) override;
-#endif
- virtual void get_recognized_extensions( List* p_extensions ) const override;
- virtual bool handles_type( const String& p_type ) const override;
- virtual String get_resource_type( const String& p_path ) const override;
-#endif
-};
-
-#endif // GD_LOADER_SSANIMEPACK_H
diff --git a/gd_spritestudio/gd_loader_sscellmap.cpp b/gd_spritestudio/gd_loader_sscellmap.cpp
deleted file mode 100644
index 31f1f77..0000000
--- a/gd_spritestudio/gd_loader_sscellmap.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-/*!
-* \file gd_loader_sscellmap.cpp
-* \author CRI Middleware Co., Ltd.
-*/
-#include "gd_loader_sscellmap.h"
-
-#include "gd_resource_sscellmap.h"
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-Variant GdLoaderSsCellMap::_load(const String &p_path, const String &p_original_path, bool p_use_sub_threads, int32_t p_cache_mode)
-#else
-#ifdef GD_V4
-Ref GdLoaderSsCellMap::load( const String& p_path, const String& p_original_path, Error* r_error, bool p_use_sub_threads, float* r_progress, CacheMode p_cache_mode )
-#endif
-#ifdef GD_V3
-RES GdLoaderSsCellMap::load( const String& p_path, const String& p_original_path, Error* r_error, bool p_no_subresource_cache )
-#endif
-#endif
-{
- Ref res = memnew( GdResourceSsCellMap );
- Error err = res->loadFromFile( p_path, p_original_path );
-
- if ( err != OK ) {
- ERR_PRINT( String( "load error: " ) + String::num( err ) );
- }
-
-#ifndef SPRITESTUDIO_GODOT_EXTENSION
- if ( r_error ) {
- *r_error = err;
- }
-#endif
-
- return res;
-}
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-PackedStringArray GdLoaderSsCellMap::_get_recognized_extensions()
-{
- PackedStringArray extensions;
- extensions.push_back("ssce");
- return extensions;
-}
-#else
-void GdLoaderSsCellMap::get_recognized_extensions( List* p_extensions ) const
-{
- if ( !p_extensions->find( "ssce" ) ) {
- p_extensions->push_back( "ssce" );
- }
-}
-#endif
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-bool GdLoaderSsCellMap::_handles_type(const StringName &p_type)
-#else
-bool GdLoaderSsCellMap::handles_type( const String& p_type ) const
-#endif
-{
- return ClassDB::is_parent_class( p_type, "GdResourceSsCellMap" );
-}
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-String GdLoaderSsCellMap::_get_resource_type(const String &p_path)
-#else
-String GdLoaderSsCellMap::get_resource_type( const String& p_path ) const
-#endif
-{
- return "GdResourceSsCellMap";
-}
diff --git a/gd_spritestudio/gd_loader_sscellmap.h b/gd_spritestudio/gd_loader_sscellmap.h
deleted file mode 100644
index f6e324d..0000000
--- a/gd_spritestudio/gd_loader_sscellmap.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*!
-* \file gd_loader_sscellmap.h
-* \author CRI Middleware Co., Ltd.
-*/
-#ifndef GD_LOADER_SSCELLMAP_H
-#define GD_LOADER_SSCELLMAP_H
-
-#include "gd_macros.h"
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-#include
-#include
-#include
-using namespace godot;
-#else
-#include "core/io/resource_loader.h"
-#endif
-
-class GdLoaderSsCellMap : public ResourceFormatLoader
-{
- GDCLASS( GdLoaderSsCellMap, ResourceFormatLoader );
-
-public :
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
- static void _bind_methods(){};
-
- PackedStringArray _get_recognized_extensions();
-
- bool _handles_type(const StringName &p_type);
-
- String _get_resource_type(const String &path);
-
- Variant _load(const String &p_path, const String &p_original_path = "", bool p_use_sub_threads = false, int32_t p_cache_mode = CACHE_MODE_REUSE);
-#else
-#ifdef GD_V4
- virtual Ref load( const String& p_path, const String& p_original_path = "", Error* r_error = nullptr, bool p_use_sub_threads = false, float* r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE ) override;
-#endif
-#ifdef GD_V3
- virtual RES load( const String& p_path, const String& p_original_path = "", Error* r_error = nullptr, bool p_no_subresource_cache = false ) override;
-#endif
- virtual void get_recognized_extensions( List* p_extensions ) const override;
- virtual bool handles_type( const String& p_type ) const override;
- virtual String get_resource_type( const String& p_path ) const override;
-#endif
-};
-
-#endif // GD_LOADER_SSCELLMAP_H
diff --git a/gd_spritestudio/gd_loader_sseffect.cpp b/gd_spritestudio/gd_loader_sseffect.cpp
deleted file mode 100644
index 732df45..0000000
--- a/gd_spritestudio/gd_loader_sseffect.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-/*!
-* \file gd_loader_sseffect.cpp
-* \author CRI Middleware Co., Ltd.
-*/
-#include "gd_loader_sseffect.h"
-
-#include "gd_resource_sseffect.h"
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-Variant GdLoaderSsEffect::_load(const String &p_path, const String &p_original_path, bool p_use_sub_threads, int32_t p_cache_mode)
-#else
-#ifdef GD_V4
-Ref GdLoaderSsEffect::load( const String& p_path, const String& p_original_path, Error* r_error, bool p_use_sub_threads, float* r_progress, CacheMode p_cache_mode )
-#endif
-#ifdef GD_V3
-RES GdLoaderSsEffect::load( const String& p_path, const String& p_original_path, Error* r_error, bool p_no_subresource_cache )
-#endif
-#endif
-{
- Ref res = memnew( GdResourceSsEffect );
- Error err = res->loadFromFile( p_path, p_original_path );
-
- if ( err != OK ) {
- ERR_PRINT( String( "load error: " ) + String::num( err ) );
- }
-
-#ifndef SPRITESTUDIO_GODOT_EXTENSION
- if ( r_error ) {
- *r_error = err;
- }
-#endif
-
- return res;
-}
-
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-PackedStringArray GdLoaderSsEffect::_get_recognized_extensions()
-{
- PackedStringArray extensions;
- extensions.push_back("ssee");
- return extensions;
-}
-#else
-void GdLoaderSsEffect::get_recognized_extensions( List* p_extensions ) const
-{
- if ( !p_extensions->find( "ssee" ) ) {
- p_extensions->push_back( "ssee" );
- }
-}
-#endif
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-bool GdLoaderSsEffect::_handles_type(const StringName &p_type)
-#else
-bool GdLoaderSsEffect::handles_type( const String& p_type ) const
-#endif
-{
- return ClassDB::is_parent_class( p_type, "GdResourceSsEffect" );
-}
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-String GdLoaderSsEffect::_get_resource_type(const String &p_path)
-#else
-String GdLoaderSsEffect::get_resource_type( const String& p_path ) const
-#endif
-{
- return "GdResourceSsEffect";
-}
diff --git a/gd_spritestudio/gd_loader_sseffect.h b/gd_spritestudio/gd_loader_sseffect.h
deleted file mode 100644
index 9587e18..0000000
--- a/gd_spritestudio/gd_loader_sseffect.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*!
-* \file gd_loader_sseffect.h
-* \author CRI Middleware Co., Ltd.
-*/
-#ifndef GD_LOADER_SSEFFECT_H
-#define GD_LOADER_SSEFFECT_H
-
-#include "gd_macros.h"
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-#include
-#include
-#include
-using namespace godot;
-#else
-#include "core/io/resource_loader.h"
-#endif
-
-class GdLoaderSsEffect : public ResourceFormatLoader
-{
- GDCLASS( GdLoaderSsEffect, ResourceFormatLoader );
-
-public :
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
- static void _bind_methods(){};
-
- PackedStringArray _get_recognized_extensions();
-
- bool _handles_type(const StringName &p_type);
-
- String _get_resource_type(const String &path);
-
- Variant _load(const String &p_path, const String &p_original_path, bool use_sub_threads, int32_t cache_mode);
-#else
-#ifdef GD_V4
- virtual Ref load( const String& p_path, const String& p_original_path = "", Error* r_error = nullptr, bool p_use_sub_threads = false, float* r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE ) override;
-#endif
-#ifdef GD_V3
- virtual RES load( const String& p_path, const String& p_original_path = "", Error* r_error = nullptr, bool p_no_subresource_cache = false ) override;
-#endif
- virtual void get_recognized_extensions( List* p_extensions ) const override;
- virtual bool handles_type( const String& p_type ) const override;
- virtual String get_resource_type( const String& p_path ) const override;
-#endif
-};
-
-#endif // GD_LOADER_SSEFFECT_H
diff --git a/gd_spritestudio/gd_loader_ssproject.cpp b/gd_spritestudio/gd_loader_ssproject.cpp
deleted file mode 100644
index 6ea903b..0000000
--- a/gd_spritestudio/gd_loader_ssproject.cpp
+++ /dev/null
@@ -1,68 +0,0 @@
-/*!
-* \file gd_loader_ssproject.cpp
-* \author CRI Middleware Co., Ltd.
-*/
-#include "gd_loader_ssproject.h"
-
-#include "gd_resource_ssproject.h"
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-Variant GdLoaderSsProject::_load(const String &p_path, const String &p_original_path, bool use_sub_threads, int32_t cache_mode)
-#else
-#ifdef GD_V4
-Ref GdLoaderSsProject::load( const String& p_path, const String& p_original_path, Error* r_error, bool p_use_sub_threads, float* r_progress, CacheMode p_cache_mode )
-#endif
-#ifdef GD_V3
-RES GdLoaderSsProject::load( const String& p_path, const String& p_original_path, Error* r_error, bool p_no_subresource_cache )
-#endif
-#endif
-{
- Ref res = memnew( GdResourceSsProject );
- Error err = res->loadFromFile( p_path, p_original_path );
-
- if ( err != OK ) {
- ERR_PRINT( String( "load error: " ) + String::num( err ) );
- }
-
-#ifndef SPRITESTUDIO_GODOT_EXTENSION
- if ( r_error ) {
- *r_error = err;
- }
-#endif
-
- return res;
-}
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-PackedStringArray GdLoaderSsProject::_get_recognized_extensions()
-{
- PackedStringArray extensions;
- extensions.push_back("sspj");
- return extensions;
-}
-#else
-void GdLoaderSsProject::get_recognized_extensions( List* p_extensions ) const
-{
- if ( !p_extensions->find( "sspj" ) ) {
- p_extensions->push_back( "sspj" );
- }
-}
-#endif
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-bool GdLoaderSsProject::_handles_type(const StringName &p_type)
-#else
-bool GdLoaderSsProject::handles_type( const String& p_type ) const
-#endif
-{
- return ClassDB::is_parent_class( p_type, "GdResourceSsProject" );
-}
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-String GdLoaderSsProject::_get_resource_type(const String &path)
-#else
-String GdLoaderSsProject::get_resource_type( const String& p_path ) const
-#endif
-{
- return "GdResourceSsProject";
-}
diff --git a/gd_spritestudio/gd_loader_ssproject.h b/gd_spritestudio/gd_loader_ssproject.h
deleted file mode 100644
index 7d30dba..0000000
--- a/gd_spritestudio/gd_loader_ssproject.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*!
-* \file gd_loader_ssproject.h
-* \author CRI Middleware Co., Ltd.
-*/
-#ifndef GD_LOADER_SSPROJECT_H
-#define GD_LOADER_SSPROJECT_H
-
-#include "gd_macros.h"
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-#include
-#include
-#include
-using namespace godot;
-#else
-#include "core/io/resource_loader.h"
-#endif
-
-class GdLoaderSsProject : public ResourceFormatLoader
-{
- GDCLASS( GdLoaderSsProject, ResourceFormatLoader );
-
-public :
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
- static void _bind_methods(){};
-
- PackedStringArray _get_recognized_extensions();
-
- bool _handles_type(const StringName &p_type);
-
- String _get_resource_type(const String &path);
-
- Variant _load(const String &p_path, const String &p_original_path, bool use_sub_threads, int32_t cache_mode);
-#else
-#ifdef GD_V4
- virtual Ref load( const String& p_path, const String& p_original_path = "", Error* r_error = nullptr, bool p_use_sub_threads = false, float* r_progress = nullptr, CacheMode p_cache_mode = CACHE_MODE_REUSE ) override;
-#endif
-#ifdef GD_V3
- virtual RES load( const String& p_path, const String& p_original_path = "", Error* r_error = nullptr, bool p_no_subresource_cache = false ) override;
-#endif
- virtual void get_recognized_extensions( List* p_extensions ) const override;
- virtual bool handles_type( const String& p_type ) const override;
- virtual String get_resource_type( const String& p_path ) const override;
-#endif
-};
-
-#endif // GD_LOADER_SSPROJECT_H
diff --git a/gd_spritestudio/gd_macros.h b/gd_spritestudio/gd_macros.h
index 91c7c9d..a1c82b2 100644
--- a/gd_spritestudio/gd_macros.h
+++ b/gd_spritestudio/gd_macros.h
@@ -1,4 +1,4 @@
-/*!
+/*!
* \file gd_macros.h
* \author CRI Middleware Co., Ltd.
*/
@@ -13,28 +13,13 @@
#else
#include "core/version.h"
#if VERSION_MAJOR>=4
- #define GD_V4 //!< ããŒãžã§ã³4.xã®godotã䜿çšãããŠããŸãã
+ #define GD_V4
#define EMPTY(x) ((x).is_empty())
#define VARIANT_FLOAT Variant::FLOAT
#define NOTIFY_PROPERTY_LIST_CHANGED() notify_property_list_changed()
- #elif VERSION_MAJOR>=3
- #define GD_V3 //!< ããŒãžã§ã³3.xã®godotã䜿çšãããŠããŸãã
- #define EMPTY(x) ((x).empty())
- #define VARIANT_FLOAT Variant::REAL
- #define NOTIFY_PROPERTY_LIST_CHANGED() property_list_changed_notify()
#else
#error not supported godot version.
#endif
#endif
-
-/*!
-* 次ã®é¢æ°ã¯Object掟çã¯ã©ã¹ã§ãªãŒããŒã©ã€ãã§ããŸãã
-* ãããã®é¢æ°ã¯ä»®æ³ã§ã¯ãããŸãããä»®æ³ã«ããªãã§ãã ããã
-* ãªãŒããŒã©ã€ãã®ãã³ã«åŒã³åºãããåã®é¢æ°ã¯ç¡å¹ã«ãªããŸãã(å€éã¬ãã«åŒåºã)ã
-*/
-#define GdMultilevelCall
-
-#define GdUiText( _a ) _a
-
-#endif // GD_MACROS_H
+#endif // GD_MACROS_H
\ No newline at end of file
diff --git a/gd_spritestudio/gd_node_ssplayer.cpp b/gd_spritestudio/gd_node_ssplayer.cpp
deleted file mode 100644
index 2548170..0000000
--- a/gd_spritestudio/gd_node_ssplayer.cpp
+++ /dev/null
@@ -1,1014 +0,0 @@
-/*!
-* \file gd_node_ssplayer.cpp
-* \author CRI Middleware Co., Ltd.
-*/
-#include "gd_node_ssplayer.h"
-
-#include "SpriteStudio6-SDK/Common/Animator/ssplayer_render.h"
-
-#include "ss_macros.h"
-#include "ss_loader_texture_impl.h"
-#include "ss_texture_impl.h"
-#include "gd_notifier.h"
-
-SsSdkUsing
-
-static SsTextureImpl s_TextureLoader;
-static SSTextureFactory s_TextureFactory( &s_TextureLoader, false );
-
-GdNodeSsPlayer::GdNodeSsPlayer()
-: m_strAnimePackSelected( "" )
-, m_strAnimationSelected( "" )
-, m_iFrame( 0 )
-, m_fDelta( 0.0f )
-, m_iLive( 0 )
-, m_pLive( NULL )
-, m_bLoop( false )
-, m_bPlay( false )
-, m_bPause( false )
-, m_bTextureInterpolate( true )
-{
- GdNotifier::getInstance().addItem( this );
-
- SsLoaderTextureImpl::setCallbacks();
-
- m_Renderer.m_iSetup = 0;
- SsCurrentRenderer::SetCurrentRender( &m_Renderer );
-
- m_bAnimeDecoder = false;
- m_AnimeDecoder.reset( new SsAnimeDecoder() );
-
- m_CellMapList.reset( new SsCellMapList() );
-}
-
-GdNodeSsPlayer::~GdNodeSsPlayer()
-{
- GdNotifier::getInstance().removeItem( this );
-
- m_Renderer.m_iSetup = 0;
- SsCurrentRenderer::SetCurrentRender( &m_Renderer );
-
- // äºéè§£æŸå¯ŸçïŒSsAnimeDecoder åŽã«çãã€ã³ã¿ã®æææš©ãæž¡ããŠããªãå Žåã«éãè§£æŸããã
- if (m_bAnimeDecoder)
- {
- // è§£æŸã®ã¿
- m_CellMapList.release();
- }
- else
- {
- // ããã§åé€
- m_CellMapList.reset();
- }
-
- m_bAnimeDecoder = false;
- m_AnimeDecoder.reset();
- //m_CellMapList.reset();
-
- m_bAnimeDecoder = false;
- //m_AnimeDecoder = 0;
- //m_CellMapList = 0;
-}
-
-void GdNodeSsPlayer::resourcePlayerChanged( const Ref& resPlayer )
-{
- fetchAnimation();
-
- NOTIFY_PROPERTY_LIST_CHANGED();
-}
-
-void GdNodeSsPlayer::resourceProjectChanged( const Ref& resProject )
-{
- fetchAnimation();
-
- NOTIFY_PROPERTY_LIST_CHANGED();
-}
-
-void GdNodeSsPlayer::resourceAnimePackChanged( const Ref& resAnimePack )
-{
- fetchAnimation();
-
- NOTIFY_PROPERTY_LIST_CHANGED();
-}
-
-void GdNodeSsPlayer::resourceCellMapChanged( const Ref& resCellMap )
-{
- fetchAnimation();
-
- NOTIFY_PROPERTY_LIST_CHANGED();
-}
-
-void GdNodeSsPlayer::setPlayerResource( const Ref& resPlayer )
-{
- m_ResPlayer = resPlayer;
-
- m_strAnimationSelected = "";
- fetchAnimation();
-
- NOTIFY_PROPERTY_LIST_CHANGED();
-}
-
-Ref GdNodeSsPlayer::getPlayerResource() const
-{
- return m_ResPlayer;
-}
-
-void GdNodeSsPlayer::setAnimePack( const String& strName )
-{
- m_strAnimePackSelected = strName;
-
- Ref resProject = m_ResPlayer->getProjectResource();
- Ref resAnimePack;
-
- if ( !resProject.is_null() ) {
- resAnimePack = resProject->getAnimePackResource( m_strAnimePackSelected );
- }
-
- m_ResAnimePack = resAnimePack;
-
- if ( m_ResAnimePack.is_null() ) {
- ERR_PRINT( "AnimePack Load Error : " + m_strAnimePackSelected );
- return;
- }
-
- postAnimePackChanged( m_strAnimePackSelected );
-
- m_strAnimationSelected = "";
- fetchAnimation();
-
- NOTIFY_PROPERTY_LIST_CHANGED();
-}
-
-String GdNodeSsPlayer::getAnimePack() const
-{
- return m_strAnimePackSelected;
-}
-
-void GdNodeSsPlayer::setAnimation( const String& strName )
-{
- m_strAnimationSelected = strName;
-
- postAnimationChanged( m_strAnimationSelected );
-
- fetchAnimation();
-
- NOTIFY_PROPERTY_LIST_CHANGED();
-}
-
-String GdNodeSsPlayer::getAnimation() const
-{
- return m_strAnimationSelected;
-}
-
-void GdNodeSsPlayer::setFrame( int iFrame )
-{
- m_iFrame = iFrame;
-
- if ( m_ResAnimePack.is_null() ) {
- return;
- }
-
- auto c = m_strAnimationSelected.utf8();
- SsString strAnimationName = c.ptr() ? SsString( c.ptr() ) : SsString( "" );
- SsAnimePack* pAnimePack = m_ResAnimePack->getAnimePack();
-
- if ( !pAnimePack ) {
- return;
- }
-
- SsAnimation* pAnimation = pAnimePack->findAnimation( strAnimationName );
-
- if ( pAnimation ) {
- int iRange = pAnimation->settings.endFrame - pAnimation->settings.startFrame + 1;
- int iRel = iFrame - pAnimation->settings.startFrame;
-
- while ( iRel < 0 ) {
- iRel += iRange;
- }
- while ( iRel >= iRange ) {
- iRel -= iRange;
- }
-
- iFrame = iRel + pAnimation->settings.startFrame;
- }
-
- if ( m_bAnimeDecoder && m_AnimeDecoder ) {
- m_Renderer.m_iSetup = 0;
- SsCurrentRenderer::SetCurrentRender( &m_Renderer );
-
- m_AnimeDecoder->setPlayFrame( iFrame );
-
- auto mapUserData = m_Renderer.getUserData();
-
- if ( mapUserData.find( iFrame ) != mapUserData.end() ) {
- auto userData = mapUserData[iFrame];
- int iFlag;
- int iIntValue;
- Rect2 rectValue;
- Point2 pointValue;
- String strStringValue;
-
- iFlag = 0;
- if ( userData.useInteger ) iFlag |= 0x01;
- if ( userData.useRect ) iFlag |= 0x02;
- if ( userData.usePoint ) iFlag |= 0x04;
- if ( userData.useString ) iFlag |= 0x08;
-
- iIntValue = userData.integer;
-
- rectValue.position.x = userData.rect.x;
- rectValue.position.y = userData.rect.y;
- rectValue.size.width = userData.rect.w;
- rectValue.size.height = userData.rect.h;
-
- pointValue.x = userData.point.x;
- pointValue.y = userData.point.y;
-
- strStringValue = String::utf8( userData.string.c_str() );
-
- postUserData( iFlag, iIntValue, rectValue, pointValue, strStringValue );
- }
-
- auto mapSignal = m_Renderer.getSignal();
-
- if ( mapSignal.find( iFrame ) != mapSignal.end() ) {
- auto signalAttr = mapSignal[iFrame];
-
- const std::vector& vec = signalAttr.commands;
-
- for ( int j = 0; j < vec.size(); j++ ) {
- const SsSignalCommand& command = vec.at( j );
- String strCommandId = String::utf8( command.commandId.c_str() );
-
- if ( command.active ) {
- Dictionary dic;
-
- for ( int k = 0; k < command.params.size(); k++ ) {
- const SsSignalParam& param = command.params.at( k );
- String strParamId = String::utf8( param.paramId.c_str() );
-
- switch ( static_cast(param.type) ) {
- case SsSignalParamType::index :
- case SsSignalParamType::integer :
- dic[strParamId] = Variant( param.value.i );
- break;
- case SsSignalParamType::floating :
- dic[strParamId] = Variant( param.value.f );
- break;
- }
- }
-
- postSignal( strCommandId, dic );
- }
- }
- }
- }
-
- postFrameChanged( m_iFrame );
-}
-
-int GdNodeSsPlayer::getFrame() const
-{
- return m_iFrame;
-}
-
-int GdNodeSsPlayer::getStartFrame() const
-{
- if ( !m_ResAnimePack.is_null() ) {
- auto c = m_strAnimationSelected.utf8();
- SsString strAnimationName = c.ptr() ? SsString( c.ptr() ) : SsString( "" );
- SsAnimePack* pAnimePack = m_ResAnimePack->getAnimePack();
-
- if ( !pAnimePack ) {
- return 0;
- }
-
- SsAnimation* pAnimation = pAnimePack->findAnimation( strAnimationName );
-
- if ( pAnimation ) {
- return pAnimation->settings.startFrame;
- }
- }
-
- return 0;
-}
-
-int GdNodeSsPlayer::getEndFrame() const
-{
- if ( !m_ResAnimePack.is_null() ) {
- auto c = m_strAnimationSelected.utf8();
- SsString strAnimationName = c.ptr() ? SsString( c.ptr() ) : SsString( "" );
- SsAnimePack* pAnimePack = m_ResAnimePack->getAnimePack();
-
- if ( !pAnimePack ) {
- return 0;
- }
-
- SsAnimation* pAnimation = pAnimePack->findAnimation( strAnimationName );
-
- if ( pAnimation ) {
- return pAnimation->settings.endFrame;
- }
- }
-
- return 0;
-}
-
-int GdNodeSsPlayer::getFps() const
-{
- if ( !m_ResAnimePack.is_null() ) {
- auto c = m_strAnimationSelected.utf8();
- SsString strAnimationName = c.ptr() ? SsString( c.ptr() ) : SsString( "" );
- SsAnimePack* pAnimePack = m_ResAnimePack->getAnimePack();
-
- if ( !pAnimePack ) {
- return 0;
- }
-
- SsAnimation* pAnimation = pAnimePack->findAnimation( strAnimationName );
-
- if ( pAnimation ) {
- return pAnimation->settings.fps;
- }
- }
-
- return 0;
-}
-
-void GdNodeSsPlayer::setTextureInterpolate( bool bSwitch )
-{
- m_bTextureInterpolate = bSwitch;
-}
-
-bool GdNodeSsPlayer::getTextureInterpolate() const
-{
- return m_bTextureInterpolate;
-}
-
-void GdNodeSsPlayer::setLoop( bool bLoop )
-{
- m_bLoop = bLoop;
-}
-
-bool GdNodeSsPlayer::getLoop() const
-{
- return m_bLoop;
-}
-
-void GdNodeSsPlayer::setPlay( bool bPlay )
-{
- m_bPlay = bPlay;
-
- if ( bPlay ) {
- int iFrame = getFrame();
- int iRange = getEndFrame() - getStartFrame() + 1;
-
- if ( false ) {
- if ( iFrame <= getStartFrame() ) {
- while ( iFrame <= getStartFrame() ) {
- iFrame += iRange;
- }
- setFrame( iFrame );
- }
- }else{
- if ( iFrame >= getEndFrame() ) {
- while ( iFrame >= getEndFrame() ) {
- iFrame -= iRange;
- }
- setFrame( iFrame );
- }
- }
-
- pause( false );
- }
-
- if ( m_AnimeDecoder ) {
- std::vector& anim = m_AnimeDecoder->getPartAnime();
-
- if ( m_pLive && anim.size() != m_iLive ) {
- delete[] m_pLive;
- m_pLive = NULL;
- }
- m_iLive = anim.size();
- if ( !m_pLive && m_iLive ) {
- m_pLive = new float[m_iLive];
- }
- if ( m_pLive && m_iLive ) {
- memset( m_pLive, 0, sizeof( float ) * m_iLive );
- }
- }
-}
-
-bool GdNodeSsPlayer::getPlay() const
-{
- return m_bPlay;
-}
-
-void GdNodeSsPlayer::play()
-{
- setFrame( 0 );
- setPlay( true );
-}
-
-void GdNodeSsPlayer::pause( bool b )
-{
- m_bPause = b;
-}
-
-void GdNodeSsPlayer::stop()
-{
- setPlay( false );
- setFrame( 0 );
-}
-
-void GdNodeSsPlayer::_bind_methods()
-{
- ClassDB::bind_method( D_METHOD( "set_player_resource", "res_player" ), &GdNodeSsPlayer::setPlayerResource );
- ClassDB::bind_method( D_METHOD( "get_player_resource" ), &GdNodeSsPlayer::getPlayerResource );
- ClassDB::bind_method( D_METHOD( "set_anime_pack", "name" ), &GdNodeSsPlayer::setAnimePack );
- ClassDB::bind_method( D_METHOD( "get_anime_pack" ), &GdNodeSsPlayer::getAnimePack );
- ClassDB::bind_method( D_METHOD( "set_animation", "name" ), &GdNodeSsPlayer::setAnimation );
- ClassDB::bind_method( D_METHOD( "get_animation" ), &GdNodeSsPlayer::getAnimation );
- ClassDB::bind_method( D_METHOD( "set_frame", "frame" ), &GdNodeSsPlayer::setFrame );
- ClassDB::bind_method( D_METHOD( "get_frame" ), &GdNodeSsPlayer::getFrame );
- ClassDB::bind_method( D_METHOD( "get_start_frame" ), &GdNodeSsPlayer::getStartFrame );
- ClassDB::bind_method( D_METHOD( "get_end_frame" ), &GdNodeSsPlayer::getEndFrame );
- ClassDB::bind_method( D_METHOD( "get_fps" ), &GdNodeSsPlayer::getFps );
- ClassDB::bind_method( D_METHOD( "set_loop", "loop" ), &GdNodeSsPlayer::setLoop );
- ClassDB::bind_method( D_METHOD( "get_loop" ), &GdNodeSsPlayer::getLoop );
- ClassDB::bind_method( D_METHOD( "set_play", "play" ), &GdNodeSsPlayer::setPlay );
- ClassDB::bind_method( D_METHOD( "get_play" ), &GdNodeSsPlayer::getPlay );
- ClassDB::bind_method( D_METHOD( "set_texture_interpolate", "interpolate" ), &GdNodeSsPlayer::setTextureInterpolate );
- ClassDB::bind_method( D_METHOD( "get_texture_interpolate" ), &GdNodeSsPlayer::getTextureInterpolate );
- ClassDB::bind_method( D_METHOD( "play" ), &GdNodeSsPlayer::play );
- ClassDB::bind_method( D_METHOD( "pause", "b" ), &GdNodeSsPlayer::pause );
- ClassDB::bind_method( D_METHOD( "stop" ), &GdNodeSsPlayer::stop );
-
- ADD_SIGNAL( MethodInfo( "anime_pack_changed", PropertyInfo( Variant::STRING, GdUiText( "name" ) ) ) );
- ADD_SIGNAL( MethodInfo( "animation_changed", PropertyInfo( Variant::STRING, GdUiText( "name" ) ) ) );
- ADD_SIGNAL( MethodInfo( "animation_finished", PropertyInfo( Variant::STRING, GdUiText( "name" ) ) ) );
- ADD_SIGNAL( MethodInfo( "frame_changed", PropertyInfo( Variant::INT, GdUiText( "frame" ) ) ) );
-
- ADD_SIGNAL(
- MethodInfo(
- "user_data",
- PropertyInfo(
- Variant::INT,
- GdUiText( "flag" )
- ),
- PropertyInfo(
- Variant::INT,
- GdUiText( "int_value" )
- ),
- PropertyInfo(
- Variant::RECT2,
- GdUiText( "rect_value" )
- ),
- PropertyInfo(
- Variant::VECTOR2,
- GdUiText( "point_value" )
- ),
- PropertyInfo(
- Variant::STRING,
- GdUiText( "string_value" )
- )
- )
- );
- ADD_SIGNAL(
- MethodInfo(
- "signal",
- PropertyInfo(
- Variant::STRING,
- GdUiText( "command" )
- ),
- PropertyInfo(
- Variant::DICTIONARY,
- GdUiText( "value" )
- )
- )
- );
-
- ADD_PROPERTY(
- PropertyInfo(
- Variant::OBJECT,
- GdUiText( "res_player" ),
- PropertyHint::PROPERTY_HINT_RESOURCE_TYPE,
- "GdResourceSsPlayer"
- ),
- "set_player_resource",
- "get_player_resource"
- );
-
- ADD_GROUP( GdUiText( "Animation Settings" ), "" );
-}
-
-bool GdNodeSsPlayer::_set( const StringName& p_name, const Variant& p_property )
-{
- if ( p_name == StringName(GdUiText( "anime_pack" )) ) {
- setAnimePack( p_property );
-
- if ( !m_ResAnimePack.is_null() ) {
- SsAnimePack* pAnimePack = m_ResAnimePack->getAnimePack();
-
- if ( !pAnimePack ) {
- return true;
- }
-
- const std::vector& listAnimation = pAnimePack->animeList;
-
- for ( int i = 0; i < listAnimation.size(); i++ ) {
- SsAnimation* pAnimation = listAnimation[i];
-
- if ( !pAnimation->isSetup ) {
- String strName = String::utf8( pAnimation->name.c_str() );
-
- setAnimation( strName );
- break;
- }
- }
- }
-
- return true;
- }else
- if ( p_name == StringName(GdUiText( "animation" )) ) {
- setAnimation( p_property );
-
- return true;
- }else
- if ( p_name == StringName(GdUiText( "frame" )) ) {
- setFrame( p_property );
-
- return true;
- }else
- if ( p_name == StringName(GdUiText( "loop" )) ) {
- setLoop( p_property );
-
- return true;
- }else
- if ( p_name == StringName(GdUiText( "playing" )) ) {
- setPlay( p_property );
-
- return true;
- }
- if ( p_name == StringName(GdUiText( "texture_interpolate" )) ) {
- setTextureInterpolate( p_property );
-
- return true;
- }
-
- return false;
-}
-
-bool GdNodeSsPlayer::_get( const StringName& p_name, Variant& r_property ) const
-{
- if ( p_name == StringName(GdUiText( "anime_pack" )) ) {
- r_property = getAnimePack();
-
- return true;
- }else
- if ( p_name == StringName(GdUiText( "animation" )) ) {
- r_property = getAnimation();
-
- return true;
- }else
- if ( p_name == StringName(GdUiText( "frame" )) ) {
- r_property = getFrame();
-
- return true;
- }else
- if ( p_name == StringName(GdUiText( "loop" )) ) {
- r_property = getLoop();
-
- return true;
- }else
- if ( p_name == StringName(GdUiText( "playing" )) ) {
- r_property = getPlay();
-
- return true;
- }
- if ( p_name == StringName(GdUiText( "texture_interpolate" )) ) {
- r_property = getTextureInterpolate();
-
- return true;
- }
-
- return false;
-}
-
-void GdNodeSsPlayer::_get_property_list( List* p_list ) const
-{
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
- PackedStringArray vecAnimePackName;
-#else
- Vector vecAnimePackName;
-#endif
-
- vecAnimePackName.insert( 0, GdUiText( "-- Empty --" ) );
-
- if ( !m_ResPlayer.is_null() ) {
- Ref resProject = m_ResPlayer->getProjectResource();
-
- if ( !resProject.is_null() ) {
- auto vec = resProject->getAnimePackNames();
-
- for ( int i = 0; i < vec.size(); i++ ) {
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
- String str = vec[ i ];
-#else
- String str = vec.get( i );
-#endif
-
- vecAnimePackName.push_back( str );
- }
- }
- }
-
- PropertyInfo animePacksPropertyInfo;
-
- animePacksPropertyInfo.name = GdUiText( "anime_pack" );
- animePacksPropertyInfo.type = Variant::STRING;
- animePacksPropertyInfo.usage = PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_STORAGE;
- animePacksPropertyInfo.hint_string = String( "," ).join( vecAnimePackName );
- animePacksPropertyInfo.hint = PROPERTY_HINT_ENUM;
-
- p_list->push_back( animePacksPropertyInfo );
-
- if ( !m_ResAnimePack.is_null() ) {
- PropertyInfo animationsPropertyInfo;
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
- PackedStringArray vecAnimationName = m_ResAnimePack->getAnimationNames();
-#else
- Vector vecAnimationName = m_ResAnimePack->getAnimationNames();
-#endif
-
- animationsPropertyInfo.name = GdUiText( "animation" );
- animationsPropertyInfo.type = Variant::STRING;
- animationsPropertyInfo.usage = PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_STORAGE;
- animationsPropertyInfo.hint_string = String( "," ).join( vecAnimationName );
- animationsPropertyInfo.hint = PROPERTY_HINT_ENUM;
-
- p_list->push_back( animationsPropertyInfo );
-
- auto c = m_strAnimationSelected.utf8();
- SsString strAnimationName = c.ptr() ? SsString( c.ptr() ) : SsString( "" );
- SsAnimePack* pAnimePack = m_ResAnimePack->getAnimePack();
-
- if ( !pAnimePack ) {
- return;
- }
-
- SsAnimation* pAnimation = pAnimePack->findAnimation( strAnimationName );
-
- if ( pAnimation ) {
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
- PackedStringArray vecRange;
-#else
- Vector vecRange;
-#endif
-
- vecRange.push_back( String::num( pAnimation->settings.startFrame ) );
- vecRange.push_back( String::num( pAnimation->settings.endFrame ) );
- vecRange.push_back( String::num( 0.1 ) );
-
- animationsPropertyInfo.name = GdUiText( "frame" );
- animationsPropertyInfo.type = VARIANT_FLOAT;
-
- animationsPropertyInfo.usage = PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_STORAGE;
- animationsPropertyInfo.hint_string = String( "," ).join( vecRange );
- animationsPropertyInfo.hint = PROPERTY_HINT_RANGE;
-
- p_list->push_back( animationsPropertyInfo );
-
- animationsPropertyInfo.name = GdUiText( "loop" );
- animationsPropertyInfo.type = Variant::BOOL;
- animationsPropertyInfo.usage = PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_STORAGE;
- animationsPropertyInfo.hint = PROPERTY_HINT_NONE;
-
- p_list->push_back( animationsPropertyInfo );
-
- animationsPropertyInfo.name = GdUiText( "playing" );
- animationsPropertyInfo.type = Variant::BOOL;
- animationsPropertyInfo.usage = PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_STORAGE;
- animationsPropertyInfo.hint = PROPERTY_HINT_NONE;
-
- p_list->push_back( animationsPropertyInfo );
-
- animationsPropertyInfo.name = GdUiText( "texture_interpolate" );
- animationsPropertyInfo.type = Variant::BOOL;
- animationsPropertyInfo.usage = PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_STORAGE;
- animationsPropertyInfo.hint = PROPERTY_HINT_NONE;
-
- p_list->push_back( animationsPropertyInfo );
- }
- }
-}
-
-void GdNodeSsPlayer::_notification( int p_notification )
-{
- switch ( p_notification ) {
- case NOTIFICATION_READY :
- set_process_internal( true );
-
- break;
- case NOTIFICATION_INTERNAL_PROCESS :
- updateAnimation( get_process_delta_time() );
-
- break;
- case NOTIFICATION_DRAW :
- drawAnimation();
-
- break;
- default :
- break;
- }
-}
-
-void GdNodeSsPlayer::postAnimePackChanged( const String& strName )
-{
- Error err;
-
- err = emit_signal( "anime_pack_changed", Variant( strName ) );
-}
-
-void GdNodeSsPlayer::postAnimationChanged( const String& strName )
-{
- Error err;
-
- err = emit_signal( "animation_changed", Variant( strName ) );
-}
-
-void GdNodeSsPlayer::postAnimationFinished( const String& strName )
-{
- Error err;
-
- err = emit_signal( "animation_finished", Variant( strName ) );
-}
-
-void GdNodeSsPlayer::postFrameChanged( int iFrame )
-{
- Error err;
-
- err = emit_signal( "frame_changed", Variant( iFrame ) );
-}
-
-void GdNodeSsPlayer::postUserData( int iFlag, int iIntValue, const Rect2& rectValue, const Vector2& pointValue, const String& strStringValue )
-{
- Error err;
-
- err = emit_signal( "user_data", Variant( iFlag ), Variant( iIntValue ), Variant( rectValue ), Variant( pointValue ), Variant( strStringValue ) );
-}
-
-void GdNodeSsPlayer::postSignal( const String& strName, const Dictionary& dicParam )
-{
- Error err;
-
- err = emit_signal( "signal", Variant( strName ), Variant( dicParam ) );
-}
-
-void GdNodeSsPlayer::updateAnimation( float delta )
-{
- int iDelta = 0;
-
- if ( getPlay() ) {
- if ( m_bPause ) {
- }else{
- m_fDelta += delta * m_Renderer.getFps();
-
- iDelta = (int)m_fDelta;
-
- if ( iDelta != 0 ) {
- int iFrame = getFrame() + iDelta;
- int iRange = getEndFrame() - getStartFrame() + 1;
-
- m_fDelta -= iDelta;
-
- if ( iFrame < getStartFrame() ) {
- if ( getLoop() ) {
- while ( iFrame < getStartFrame() ) {
- iFrame += iRange;
-
- postAnimationFinished( m_strAnimationSelected );
- }
- }else{
- iFrame = getStartFrame();
-
- postAnimationFinished( m_strAnimationSelected );
-
- pause( true );
- }
- }else
- if ( iFrame > getEndFrame() ) {
- if ( getLoop() ) {
- while ( iFrame > getEndFrame() ) {
- iFrame -= iRange;
-
- postAnimationFinished( m_strAnimationSelected );
- }
- }else{
- iFrame = getEndFrame();
-
- postAnimationFinished( m_strAnimationSelected );
-
- pause( true );
- }
- }
-
- set( "frame", iFrame );
- }
- }
- }
-
- if ( iDelta != 0 ) {
- std::vector& anim = m_AnimeDecoder->getPartAnime();
- std::vector& stat = m_AnimeDecoder->getPartState();
-
- if ( m_pLive && anim.size() != m_iLive ) {
- delete[] m_pLive;
- m_pLive = NULL;
- }
- m_iLive = anim.size();
- if ( !m_pLive && m_iLive ) {
- m_pLive = new float[m_iLive];
- memset( m_pLive, 0, sizeof( float ) * m_iLive );
- }
-
- int i = 0;
-
- for ( auto it = anim.begin(); it != anim.end(); it++ ) {
- SsPart* part = it->first;
- SsPartAnime* anime = it->second;
- SsPartState* state = &stat[i];
-
- i++;
-
- if ( part->type == SsPartType::instance ) {
- SsInstanceAttr& attr = state->instanceValue;
-
- if ( attr.independent ) {
- attr.liveFrame -= iDelta * ( attr.speed - 1 );
- }else{
- if ( m_pLive && i < m_iLive ) {
- attr.liveFrame = m_pLive[i];
- }
- attr.liveFrame += iDelta;
- }
-
- if ( m_pLive && i < m_iLive ) {
- m_pLive[i] = attr.liveFrame;
- }
- }else
- if ( part->type == SsPartType::effect ) {
- SsEffectAttr& attr = state->effectValue;
-
- if ( attr.independent ) {
- float fNext = state->effectTimeTotal + iDelta * state->effectValue.speed;
-
- if ( fNext > state->refEffect->getEffectTimeLength() ) {
- fNext = state->refEffect->getEffectTimeLength();
- fNext -= iDelta * state->effectValue.speed;
- fNext -= 1;
-
- state->effectTimeTotal = fNext;
- }
- }
- }
- }
- }
-
- if ( m_bAnimeDecoder && m_AnimeDecoder ) {
- m_Renderer.m_iSetup = 0;
- SsCurrentRenderer::SetCurrentRender( &m_Renderer );
-
- m_AnimeDecoder->update( iDelta );
- }
-
-#if defined(GD_V4) || defined(SPRITESTUDIO_GODOT_EXTENSION)
- queue_redraw();
-#endif
-#ifdef GD_V3
- update();
-#endif
-}
-
-void GdNodeSsPlayer::drawAnimation()
-{
- if ( m_bAnimeDecoder && m_AnimeDecoder ) {
- m_Renderer.m_iSetup = 0;
- SsCurrentRenderer::SetCurrentRender( &m_Renderer );
-
- m_AnimeDecoder->draw();
-
- m_Renderer.setTextureInterpolate( m_bTextureInterpolate );
- m_Renderer.draw( get_canvas_item() );
- }
-}
-
-void GdNodeSsPlayer::fetchAnimation()
-{
- m_bAnimeDecoder = false;
- if ( !EMPTY(m_strAnimationSelected) ) {
- if ( m_ResPlayer.is_null() ) {
- return;
- }
- if ( m_ResAnimePack.is_null() ) {
- return;
- }
-
- Ref resProject = m_ResPlayer->getProjectResource();
-
- if ( resProject.is_null() ) {
- return;
- }
-
- SsProject* pProject = resProject->getProject();
-
- if ( !pProject ) {
- return;
- }
-
- auto c = m_strAnimationSelected.utf8();
- SsString strAnimationName = c.ptr() ? SsString( c.ptr() ) : SsString( "" );
- SsAnimePack* pAnimePack = m_ResAnimePack->getAnimePack();
-
- if ( !pAnimePack ) {
- return;
- }
-
- SsAnimation* pAnimation = pAnimePack->findAnimation( strAnimationName );
-
- if ( !pAnimation ) {
- return;
- }
-
- if ( !pAnimation ) {
- ERR_PRINT( "Select Anime is Null" );
- }
-
- m_CellMapList->clear();
-
- int idx = 0;
-
- for ( int i = 0; i < pAnimePack->cellmapNames.size(); i++ ) {
- Ref resCellMap = resProject->getCellMapResource( pAnimePack->cellmapNames[i] );
-
- if ( resCellMap.is_null() ) {
- continue;
- }
-
- SsCellMap* pCellMap = resCellMap->getCellMap();
-
- if ( pCellMap ) {
- m_CellMapList->addIndex( pCellMap );
- m_CellMapList->addMap( pCellMap );
-
- ( (SsTextureImpl*)m_CellMapList->getCellMapLink( idx++ )->tex )->setTexture( resCellMap->getTexture() );
- }
- }
- for ( int i = 0; i < pProject->cellmapNames.size(); i++ ) {
- Ref resCellMap = resProject->getCellMapResource( pProject->cellmapNames[i] );
-
- if ( resCellMap.is_null() ) {
- continue;
- }
-
- SsCellMap* pCellMap = resCellMap->getCellMap();
-
- if ( pCellMap ) {
- m_CellMapList->addIndex( pCellMap );
- m_CellMapList->addMap( pCellMap );
-
- ( (SsTextureImpl*)m_CellMapList->getCellMapLink( idx++ )->tex )->setTexture( resCellMap->getTexture() );
- }
- }
-
- if ( m_AnimeDecoder ) {
- m_Renderer.m_iSetup = 0;
- SsCurrentRenderer::SetCurrentRender( &m_Renderer );
-
- if ( pAnimation ) {
- float fW = pAnimation->settings.canvasSize.x;
- float fH = pAnimation->settings.canvasSize.y;
- float fX = ( pAnimation->settings.pivot.x + 0.5f ) * fW;
- float fY = ( pAnimation->settings.pivot.y + 0.5f ) * fH;
- int iFps = pAnimation->settings.fps;
-
- m_Renderer.setCanvasItem( get_canvas_item() );
- m_Renderer.setCanvasSize( fW, fH );
- m_Renderer.setCanvasCenter( fX, fY );
- m_Renderer.setFps( iFps );
-// m_Renderer.setTextureInterpolate( m_bTextureInterpolate ); /* Updated in drawAnimation() */
- }
-
- m_Renderer.createPartSprites( &pAnimePack->Model, pProject );
-
- m_bAnimeDecoder = true;
- m_AnimeDecoder->setAnimation(
- &pAnimePack->Model,
- pAnimation,
- m_CellMapList.get(),
- pProject
- );
-
- setFrame( m_iFrame );
- }
- }
-}
diff --git a/gd_spritestudio/gd_node_ssplayer.h b/gd_spritestudio/gd_node_ssplayer.h
deleted file mode 100644
index bb8f6fe..0000000
--- a/gd_spritestudio/gd_node_ssplayer.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/*!
-* \file gd_node_ssplayer.h
-* \author CRI Middleware Co., Ltd.
-*/
-#ifndef GD_NODE_SSPLAYER_H
-#define GD_NODE_SSPLAYER_H
-
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-#include
-using namespace godot;
-#else
-#include "scene/2d/node_2d.h"
-#endif
-
-
-#include "SpriteStudio6-SDK/Common/Animator/ssplayer_animedecode.h"
-
-#include "gd_macros.h"
-#include "ss_macros.h"
-#include "gd_resource_ssplayer.h"
-#include "gd_resource_ssanimepack.h"
-#include "ss_renderer_impl.h"
-#include "gd_notifier_item.h"
-
-SsSdkUsing
-
-class GdNodeSsPlayer : public Node2D, public GdNotifierItem
-{
- GDCLASS( GdNodeSsPlayer, Node2D )
-
-public :
- GdNodeSsPlayer();
- virtual ~GdNodeSsPlayer();
-
- virtual void resourcePlayerChanged( const Ref& resPlayer ) override;
- virtual void resourceProjectChanged( const Ref& resProject ) override;
- virtual void resourceAnimePackChanged( const Ref& resAnimePack ) override;
- virtual void resourceCellMapChanged( const Ref& resCellMap ) override;
-
- void setPlayerResource( const Ref& resPlayer );
- Ref getPlayerResource() const;
-
- void setAnimePack( const String& strName );
- String getAnimePack() const;
- void setAnimation( const String& strName );
- String getAnimation() const;
- void setFrame( int iFrame );
- int getFrame() const;
-
- int getStartFrame() const;
- int getEndFrame() const;
- int getFps() const;
-
- void setTextureInterpolate( bool bSwitch );
- bool getTextureInterpolate() const;
-
- void setLoop( bool bLoop );
- bool getLoop() const;
- void setPlay( bool bPlay );
- bool getPlay() const;
- void play();
- void pause( bool b );
- void stop();
-
-protected :
- GdMultilevelCall static void _bind_methods();
-
- GdMultilevelCall bool _set( const StringName& p_name, const Variant& p_property );
- GdMultilevelCall bool _get( const StringName& p_name, Variant& r_property ) const;
- GdMultilevelCall void _get_property_list( List* p_list ) const;
- GdMultilevelCall void _notification( int p_notification );
-
-private :
- void postAnimePackChanged( const String& strName );
- void postAnimationChanged( const String& strName );
- void postAnimationFinished( const String& strName );
- void postFrameChanged( int iFrame );
- void postUserData( int iFlag, int iIntValue, const Rect2& rectValue, const Vector2& pointValue, const String& strStringValue );
- void postSignal( const String& strName, const Dictionary& dicParam );
-
- void updateAnimation( float delta );
- void drawAnimation();
-
- void fetchAnimation();
-
- Ref m_ResPlayer;
- Ref m_ResAnimePack;
-
- SsRendererImpl m_Renderer;
-
- bool m_bAnimeDecoder;
- std::unique_ptr m_AnimeDecoder;
- std::unique_ptr m_CellMapList;
-
- String m_strAnimePackSelected;
- String m_strAnimationSelected;
- int m_iFrame;
- float m_fDelta;
- int m_iLive;
- float* m_pLive;
-
- bool m_bLoop;
- bool m_bPlay;
- bool m_bPause;
-
- bool m_bTextureInterpolate;
-};
-
-#endif // GD_NODE_SSPLAYER_H
diff --git a/gd_spritestudio/gd_notifier.cpp b/gd_spritestudio/gd_notifier.cpp
deleted file mode 100644
index 6d42482..0000000
--- a/gd_spritestudio/gd_notifier.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-/*!
-* \file gd_notifier.cpp
-* \author CRI Middleware Co., Ltd.
-*/
-#include "gd_notifier.h"
-
-GdNotifier::GdNotifier()
-{
- m_vecItem.clear();
-}
-
-GdNotifier::~GdNotifier()
-{
- m_vecItem.clear();
-}
-
-GdNotifier& GdNotifier::getInstance()
-{
- static GdNotifier m_Self;
-
- return m_Self;
-}
-
-void GdNotifier::addItem( GdNotifierItem* pItem )
-{
- if ( !pItem ) {
- return;
- }
-
- if ( m_vecItem.find( pItem ) >= 0 ) {
- return;
- }
-
- m_vecItem.push_back( pItem );
-}
-
-void GdNotifier::removeItem( GdNotifierItem* pItem )
-{
- int iIndex = m_vecItem.find( pItem );
-
- if ( iIndex < 0 ) {
- return;
- }
-
-#if defined(GD_V4) || defined(SPRITESTUDIO_GODOT_EXTENSION)
- m_vecItem.remove_at( iIndex );
-#endif
-#ifdef GD_V3
- m_vecItem.remove( iIndex );
-#endif
-}
-
-void GdNotifier::notifyResourcePlayerChanged( const Ref& resPlayer )
-{
- for ( int i = 0; i < m_vecItem.size(); i++ ) {
- auto e = m_vecItem[i];
-
- e->resourcePlayerChanged( resPlayer );
- }
-}
-
-void GdNotifier::notifyResourceProjectChanged( const Ref& resProject )
-{
- for ( int i = 0; i < m_vecItem.size(); i++ ) {
- auto e = m_vecItem[i];
-
- e->resourceProjectChanged( resProject );
- }
-}
-
-void GdNotifier::notifyResourceAnimePackChanged( const Ref& resAnimePack )
-{
- for ( int i = 0; i < m_vecItem.size(); i++ ) {
- auto e = m_vecItem[i];
-
- e->resourceAnimePackChanged( resAnimePack );
- }
-}
-
-void GdNotifier::notifyResourceCellMapChanged( const Ref& resCellMap )
-{
- for ( int i = 0; i < m_vecItem.size(); i++ ) {
- auto e = m_vecItem[i];
-
- e->resourceCellMapChanged( resCellMap );
- }
-}
diff --git a/gd_spritestudio/gd_notifier.h b/gd_spritestudio/gd_notifier.h
deleted file mode 100644
index 8ff8107..0000000
--- a/gd_spritestudio/gd_notifier.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*!
-* \file gd_notifier.h
-* \author CRI Middleware Co., Ltd.
-*/
-#ifndef GD_NOTIFIER_H
-#define GD_NOTIFIER_H
-
-#include "gd_notifier_item.h"
-
-class GdNotifier
-{
-private :
- GdNotifier();
-
-public :
- virtual ~GdNotifier();
-
- static GdNotifier& getInstance();
-
- void addItem( GdNotifierItem* pItem );
- void removeItem( GdNotifierItem* pItem );
-
- void notifyResourcePlayerChanged( const Ref& resPlayer );
- void notifyResourceProjectChanged( const Ref& resProject );
- void notifyResourceAnimePackChanged( const Ref& resAnimePack );
- void notifyResourceCellMapChanged( const Ref& resCellMap );
-
-private :
- Vector m_vecItem;
-};
-
-#endif // GD_NOTIFIER_H
diff --git a/gd_spritestudio/gd_notifier_item.cpp b/gd_spritestudio/gd_notifier_item.cpp
deleted file mode 100644
index 849acd7..0000000
--- a/gd_spritestudio/gd_notifier_item.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-/*!
-* \file gd_notifier_item.cpp
-* \author CRI Middleware Co., Ltd.
-*/
-#include "gd_notifier_item.h"
-
-GdNotifierItem::GdNotifierItem()
-{
-}
-
-GdNotifierItem::~GdNotifierItem()
-{
-}
-
-void GdNotifierItem::resourcePlayerChanged( const Ref& resPlayer )
-{
-}
-
-void GdNotifierItem::resourceProjectChanged( const Ref& resProject )
-{
-}
-
-void GdNotifierItem::resourceAnimePackChanged( const Ref& resAnimePack )
-{
-}
-
-void GdNotifierItem::resourceCellMapChanged( const Ref& resCellMap )
-{
-}
diff --git a/gd_spritestudio/gd_notifier_item.h b/gd_spritestudio/gd_notifier_item.h
deleted file mode 100644
index 325a659..0000000
--- a/gd_spritestudio/gd_notifier_item.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*!
-* \file gd_notifier_item.h
-* \author CRI Middleware Co., Ltd.
-*/
-#ifndef GD_NOTIFIER_ITEM_H
-#define GD_NOTIFIER_ITEM_H
-
-#include "gd_resource_ssplayer.h"
-#include "gd_resource_ssproject.h"
-#include "gd_resource_ssanimepack.h"
-#include "gd_resource_sscellmap.h"
-
-class GdNotifierItem
-{
-public :
- GdNotifierItem();
- virtual ~GdNotifierItem();
-
- virtual void resourcePlayerChanged( const Ref& resPlayer );
- virtual void resourceProjectChanged( const Ref& resProject );
- virtual void resourceAnimePackChanged( const Ref& resAnimePack );
- virtual void resourceCellMapChanged( const Ref& resCellMap );
-};
-
-#endif // GD_NOTIFIER_ITEM_H
diff --git a/gd_spritestudio/gd_packet_ssanimepack.cpp b/gd_spritestudio/gd_packet_ssanimepack.cpp
deleted file mode 100644
index 53487bc..0000000
--- a/gd_spritestudio/gd_packet_ssanimepack.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-/*!
-* \file gd_packet_ssanimepack.cpp
-* \author CRI Middleware Co., Ltd.
-*/
-#include "gd_packet_ssanimepack.h"
-
-#include "ss_io.h"
-
-GdPacketSsAnimePack::GdPacketSsAnimePack()
-{
-}
-
-GdPacketSsAnimePack::~GdPacketSsAnimePack()
-{
-}
-
-bool GdPacketSsAnimePack::write( const String& strRaw )
-{
- auto c = strRaw.utf8();
-
- if ( c.length() > 0 ) {
- libXML::XMLDocument xml;
-
- if ( libXML::XML_SUCCESS == xml.Parse( c.get_data(), c.length() ) ) {
- SsXmlIArchiver ar( xml.GetDocument(), "SpriteStudioAnimePack" );
- SsAnimePack animePack;
-
- animePack.__Serialize( &ar );
-
- SsIO::push( *this, animePack );
- }
- }
-
- return true;
-}
-
-bool GdPacketSsAnimePack::read( SsAnimePack* pAnimePack, const PoolByteArray& bytes )
-{
- if ( !pAnimePack ) {
- return false;
- }
-
- set_data_array( bytes );
-
- SsIO::pull( *this, *pAnimePack );
-
- return true;
-}
-
-PoolByteArray GdPacketSsAnimePack::getBytes() const
-{
- return get_data_array();
-}
diff --git a/gd_spritestudio/gd_packet_ssanimepack.h b/gd_spritestudio/gd_packet_ssanimepack.h
deleted file mode 100644
index 40dee08..0000000
--- a/gd_spritestudio/gd_packet_ssanimepack.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*!
-* \file gd_packet_ssanimepack.h
-* \author CRI Middleware Co., Ltd.
-*/
-#ifndef GD_PACKET_SSANIMEPACK_H
-#define GD_PACKET_SSANIMEPACK_H
-
-#include "gd_macros.h"
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-#include
-#include
-using namespace godot;
-#define PoolByteArray PackedByteArray
-#else
-#ifdef GD_V4
-#include "core/io/stream_peer.h"
-#define PoolByteArray PackedByteArray
-#endif
-#ifdef GD_V3
-#include "core/io/stream_peer.h"
-#endif
-#endif
-
-#include "SpriteStudio6-SDK/Common/Loader/ssloader_ssae.h"
-
-#include "ss_macros.h"
-
-SsSdkUsing
-
-class GdPacketSsAnimePack : public StreamPeerBuffer
-{
-public :
- GdPacketSsAnimePack();
- virtual ~GdPacketSsAnimePack();
-
- bool write( const String& strRaw );
-
- bool read( SsAnimePack* pAnimePack, const PoolByteArray& bytes );
-
- PoolByteArray getBytes() const;
-};
-
-#endif // GD_PACKET_SSANIMEPACK_H
diff --git a/gd_spritestudio/gd_packet_sscellmap.cpp b/gd_spritestudio/gd_packet_sscellmap.cpp
deleted file mode 100644
index 67cc405..0000000
--- a/gd_spritestudio/gd_packet_sscellmap.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-/*!
-* \file gd_packet_sscellmap.cpp
-* \author CRI Middleware Co., Ltd.
-*/
-#include "gd_packet_sscellmap.h"
-
-#include "ss_io.h"
-
-GdPacketSsCellMap::GdPacketSsCellMap()
-{
-}
-
-GdPacketSsCellMap::~GdPacketSsCellMap()
-{
-}
-
-bool GdPacketSsCellMap::write( const String& strRaw )
-{
- auto c = strRaw.utf8();
-
- if ( c.length() > 0 ) {
- libXML::XMLDocument xml;
-
- if ( libXML::XML_SUCCESS == xml.Parse( c.get_data(), c.length() ) ) {
- SsXmlIArchiver ar( xml.GetDocument(), "SpriteStudioCellMap" );
- SsCellMap cellMap;
-
- cellMap.__Serialize( &ar );
-
- SsIO::push( *this, cellMap );
- }
- }
-
- return true;
-}
-
-bool GdPacketSsCellMap::read( SsCellMap* pCellMap, const PoolByteArray& bytes )
-{
- if ( !pCellMap ) {
- return false;
- }
-
- set_data_array( bytes );
-
- SsIO::pull( *this, *pCellMap );
-
- return true;
-}
-
-PoolByteArray GdPacketSsCellMap::getBytes() const
-{
- return get_data_array();
-}
diff --git a/gd_spritestudio/gd_packet_sscellmap.h b/gd_spritestudio/gd_packet_sscellmap.h
deleted file mode 100644
index 5fd9a7c..0000000
--- a/gd_spritestudio/gd_packet_sscellmap.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*!
-* \file gd_packet_sscellmap.h
-* \author CRI Middleware Co., Ltd.
-*/
-#ifndef GD_PACKET_SSCELLMAP_H
-#define GD_PACKET_SSCELLMAP_H
-
-#include "gd_macros.h"
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-#include
-#include
-using namespace godot;
-#define PoolByteArray PackedByteArray
-#else
-#ifdef GD_V4
-#include "core/io/stream_peer.h"
-#define PoolByteArray PackedByteArray
-#endif
-#ifdef GD_V3
-#include "core/io/stream_peer.h"
-#endif
-#endif
-
-#include "SpriteStudio6-SDK/Common/Loader/ssloader_ssce.h"
-
-#include "ss_macros.h"
-
-SsSdkUsing
-
-class GdPacketSsCellMap : public StreamPeerBuffer
-{
-public :
- GdPacketSsCellMap();
- virtual ~GdPacketSsCellMap();
-
- bool write( const String& strRaw );
-
- bool read( SsCellMap* pCellMap, const PoolByteArray& bytes );
-
- PoolByteArray getBytes() const;
-};
-
-#endif // GD_PACKET_SSCELLMAP_H
diff --git a/gd_spritestudio/gd_packet_sseffect.cpp b/gd_spritestudio/gd_packet_sseffect.cpp
deleted file mode 100644
index f24c633..0000000
--- a/gd_spritestudio/gd_packet_sseffect.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-/*!
-* \file gd_packet_sseffect.cpp
-* \author CRI Middleware Co., Ltd.
-*/
-#include "gd_packet_sseffect.h"
-
-#include "ss_io.h"
-
-GdPacketSsEffect::GdPacketSsEffect()
-{
-}
-
-GdPacketSsEffect::~GdPacketSsEffect()
-{
-}
-
-bool GdPacketSsEffect::write( const String& strRaw )
-{
- auto c = strRaw.utf8();
-
- if ( c.length() > 0 ) {
- libXML::XMLDocument xml;
-
- if ( libXML::XML_SUCCESS == xml.Parse( c.get_data(), c.length() ) ) {
- SsXmlIArchiver ar( xml.GetDocument(), "SpriteStudioEffect" );
- SsEffectFile effect;
-
- effect.__Serialize( &ar );
-
- SsIO::push( *this, effect );
- }
- }
-
- return true;
-}
-
-bool GdPacketSsEffect::read( SsEffectFile* pEffect, const PoolByteArray& bytes )
-{
- if ( !pEffect ) {
- return false;
- }
-
- set_data_array( bytes );
-
- SsIO::pull( *this, *pEffect );
-
- return true;
-}
-
-PoolByteArray GdPacketSsEffect::getBytes() const
-{
- return get_data_array();
-}
diff --git a/gd_spritestudio/gd_packet_sseffect.h b/gd_spritestudio/gd_packet_sseffect.h
deleted file mode 100644
index 9b7ae90..0000000
--- a/gd_spritestudio/gd_packet_sseffect.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*!
-* \file gd_packet_sseffect.h
-* \author CRI Middleware Co., Ltd.
-*/
-#ifndef GD_PACKET_SSEFFECT_H
-#define GD_PACKET_SSEFFECT_H
-
-#include "gd_macros.h"
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-#include
-#include
-using namespace godot;
-#define PoolByteArray PackedByteArray
-#else
-#ifdef GD_V4
-#include "core/io/stream_peer.h"
-#define PoolByteArray PackedByteArray
-#endif
-#ifdef GD_V3
-#include "core/io/stream_peer.h"
-#endif
-#endif
-
-#include "SpriteStudio6-SDK/Common/Loader/ssloader_ssee.h"
-
-#include "ss_macros.h"
-
-SsSdkUsing
-
-class GdPacketSsEffect : public StreamPeerBuffer
-{
-public :
- GdPacketSsEffect();
- virtual ~GdPacketSsEffect();
-
- bool write( const String& strRaw );
-
- bool read( SsEffectFile* pEffect, const PoolByteArray& bytes );
-
- PoolByteArray getBytes() const;
-};
-
-#endif // GD_PACKET_SSEFFECT_H
diff --git a/gd_spritestudio/gd_packet_ssproject.cpp b/gd_spritestudio/gd_packet_ssproject.cpp
deleted file mode 100644
index 4fb93fa..0000000
--- a/gd_spritestudio/gd_packet_ssproject.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-/*!
-* \file gd_packet_ssproject.cpp
-* \author CRI Middleware Co., Ltd.
-*/
-#include "gd_packet_ssproject.h"
-
-#include "ss_io.h"
-
-GdPacketSsProject::GdPacketSsProject()
-{
-}
-
-GdPacketSsProject::~GdPacketSsProject()
-{
-}
-
-bool GdPacketSsProject::write( const String& strRaw )
-{
- auto c = strRaw.utf8();
-
- if ( c.length() > 0 ) {
- libXML::XMLDocument xml;
-
- if ( libXML::XML_SUCCESS == xml.Parse( c.get_data(), c.length() ) ) {
- SsXmlIArchiver ar( xml.GetDocument(), "SpriteStudioProject" );
- SsProject project;
-
- project.__Serialize( &ar );
-
- SsIO::push( *this, project );
- }
- }
-
- return true;
-}
-
-bool GdPacketSsProject::read( SsProject* pProject, const PoolByteArray& bytes )
-{
- if ( !pProject ) {
- return false;
- }
-
- set_data_array( bytes );
-
- SsIO::pull( *this, *pProject );
-
- return true;
-}
-
-PoolByteArray GdPacketSsProject::getBytes() const
-{
- return get_data_array();
-}
diff --git a/gd_spritestudio/gd_packet_ssproject.h b/gd_spritestudio/gd_packet_ssproject.h
deleted file mode 100644
index ee4e66e..0000000
--- a/gd_spritestudio/gd_packet_ssproject.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*!
-* \file gd_packet_ssproject.h
-* \author CRI Middleware Co., Ltd.
-*/
-#ifndef GD_PACKET_SSPROJECT_H
-#define GD_PACKET_SSPROJECT_H
-
-#include "gd_macros.h"
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-#include
-#include
-using namespace godot;
-#define PoolByteArray PackedByteArray
-#else
-#ifdef GD_V4
-#include "core/io/stream_peer.h"
-#define PoolByteArray PackedByteArray
-#endif
-#ifdef GD_V3
-#include "core/io/stream_peer.h"
-#endif
-#endif
-
-#include "SpriteStudio6-SDK/Common/Loader/ssloader_sspj.h"
-
-#include "ss_macros.h"
-
-SsSdkUsing
-
-class GdPacketSsProject : public StreamPeerBuffer
-{
-public :
- GdPacketSsProject();
- virtual ~GdPacketSsProject();
-
- bool write( const String& strRaw );
-
- bool read( SsProject* pProject, const PoolByteArray& bytes );
-
- PoolByteArray getBytes() const;
-};
-
-#endif // GD_PACKET_SSPROJECT_H
diff --git a/gd_spritestudio/gd_progress_dialog.cpp b/gd_spritestudio/gd_progress_dialog.cpp
new file mode 100644
index 0000000..aa4188e
--- /dev/null
+++ b/gd_spritestudio/gd_progress_dialog.cpp
@@ -0,0 +1,106 @@
+#ifdef TOOLS_ENABLED
+
+#include "gd_progress_dialog.h"
+
+#ifdef SPRITESTUDIO_GODOT_EXTENSION
+ #include
+ #include
+ #include
+ #include
+
+ using namespace godot;
+#else
+ #include "servers/display_server.h"
+ #include "core/os/time.h"
+ #include "scene/gui/panel.h"
+ #include "servers/rendering_server.h"
+ #include "core/object/message_queue.h"
+#endif
+
+void GdProgressDialog::_bind_methods() {
+ // ClassDB::bind_method(D_METHOD("_on_cancel_pressed"), &GdProgressDialog::_on_cancel_pressed);
+}
+
+GdProgressDialog::GdProgressDialog() {
+ set_wrap_controls(true);
+ set_visible(false);
+ set_transient(true);
+ set_exclusive(true);
+ set_keep_title_visible(true);
+
+#ifndef SPRITESTUDIO_GODOT_EXTENSION
+ set_clamp_to_embedder(true);
+ set_flag(FLAG_MINIMIZE_DISABLED, true);
+ set_flag(FLAG_MAXIMIZE_DISABLED, true);
+#endif
+ set_title("Processing...");
+
+ Panel *background = memnew(Panel);
+ background->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT);
+ add_child(background);
+
+ vbox = memnew(VBoxContainer);
+ background->add_child(vbox);
+ vbox->set_anchors_and_offsets_preset(Control::PRESET_FULL_RECT, Control::PRESET_MODE_KEEP_SIZE, 10);
+ // add_child(vbox);
+
+ status_label = memnew(Label);
+ status_label->set_text("Please wait...");
+ status_label->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
+ vbox->add_child(status_label);
+
+ progress_bar = memnew(ProgressBar);
+ vbox->add_child(progress_bar);
+
+ // cancel_button = memnew(Button);
+ // cancel_button->set_text("Cancel");
+ // vbox->add_child(cancel_button);
+ // cancel_button->connect("pressed", Callable(this, "_on_cancel_pressed"));
+
+ set_size(Size2(300, 130));
+}
+
+
+void GdProgressDialog::show_progress(const String &title, int total_steps) {
+ // canceled = false;
+ // cancel_button->set_disabled(false);
+ set_title(title);
+ progress_bar->set_max(total_steps);
+ progress_bar->set_value(0);
+
+ popup_centered();
+
+ DisplayServer::get_singleton()->process_events(); // 1. å
¥ååŠç
+#ifndef SPRITESTUDIO_GODOT_EXTENSION
+ MessageQueue::get_singleton()->flush(); // 2. ã¬ã€ã¢ãŠãèšç®ã»ã·ã°ãã«åŠçã®å®è¡
+ RenderingServer::get_singleton()->draw(true, 0.0); // 3. æç»
+#endif
+}
+
+void GdProgressDialog::step(const String &message, int step_value) {
+ status_label->set_text(message);
+ progress_bar->set_value(step_value);
+
+ DisplayServer::get_singleton()->process_events();
+#ifndef SPRITESTUDIO_GODOT_EXTENSION
+ MessageQueue::get_singleton()->flush();
+ RenderingServer::get_singleton()->draw(true, 0.0);
+#endif
+}
+
+// void GdProgressDialog::_on_cancel_pressed() {
+// canceled = true;
+// status_label->set_text("Canceling...");
+// cancel_button->set_disabled(true); // äºéæŒã鲿¢
+// }
+
+// bool GdProgressDialog::is_canceled() const {
+// return canceled;
+// }
+
+void GdProgressDialog::finish() {
+ hide();
+ queue_free();
+}
+
+#endif // #ifdef TOOLS_ENABLED
diff --git a/gd_spritestudio/gd_progress_dialog.h b/gd_spritestudio/gd_progress_dialog.h
new file mode 100644
index 0000000..b83bdee
--- /dev/null
+++ b/gd_spritestudio/gd_progress_dialog.h
@@ -0,0 +1,47 @@
+#pragma once
+
+#ifdef TOOLS_ENABLED
+
+#ifdef SPRITESTUDIO_GODOT_EXTENSION
+ #include
+ #include
+ #include
+ #include
+ #include
+
+ using namespace godot;
+#else
+ #include "scene/main/window.h"
+ #include "scene/gui/button.h"
+ #include "scene/gui/box_container.h"
+ #include "scene/gui/label.h"
+ #include "scene/gui/progress_bar.h"
+#endif
+
+
+class GdProgressDialog : public Window {
+ GDCLASS(GdProgressDialog, Window);
+
+private:
+ VBoxContainer *vbox = nullptr;
+ Label *status_label = nullptr;
+ ProgressBar *progress_bar = nullptr;
+
+ // Button *cancel_button = nullptr;
+ // bool canceled = false;
+
+protected:
+ static void _bind_methods();
+
+ // void _on_cancel_pressed();
+
+ public:
+ GdProgressDialog();
+
+ void show_progress(const String &title, int total_steps);
+ void step(const String &message, int step_value);
+ void finish();
+
+ // bool is_canceled() const;
+};
+#endif // #ifdef TOOLS_ENABLED
diff --git a/gd_spritestudio/gd_renderer.cpp b/gd_spritestudio/gd_renderer.cpp
deleted file mode 100644
index 075f219..0000000
--- a/gd_spritestudio/gd_renderer.cpp
+++ /dev/null
@@ -1,147 +0,0 @@
-/*!
-* \file gd_renderer.cpp
-* \author CRI Middleware Co., Ltd.
-*/
-#include "gd_renderer.h"
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-#include
-#define VisualServer RenderingServer
-using namespace godot;
-#else
-#ifdef GD_V4
-#include "servers/rendering_server.h"
-#define VisualServer RenderingServer
-#endif
-#ifdef GD_V3
-#include "servers/visual_server.h"
-#endif
-#endif
-
-static inline void safeFree( RID& rid )
-{
- if ( rid.is_valid() ) {
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
- VisualServer::get_singleton()->free_rid( rid );
-#else
- VisualServer::get_singleton()->free( rid );
-#endif
- rid = RID();
- }
-}
-
-GdRenderer::GdRenderer()
-{
- m_ViewPortId = RID();
- m_TextureId = RID();
- m_CanvasId = RID();
- m_CanvasItemId = RID();
-
- m_Size = Rect2();
-}
-
-GdRenderer::~GdRenderer()
-{
- term();
-}
-
-void GdRenderer::init()
-{
- VisualServer* pVisualServer = VisualServer::get_singleton();
-
- term();
-
- m_ViewPortId = pVisualServer->viewport_create();
- m_CanvasId = pVisualServer->canvas_create();
- m_CanvasItemId = pVisualServer->canvas_item_create();
-
- setSize( 16, 16 );
-
- pVisualServer->canvas_item_set_parent( m_CanvasItemId, m_CanvasId );
-
- pVisualServer->viewport_set_transparent_background( m_ViewPortId, true );
-
- pVisualServer->viewport_attach_canvas( m_ViewPortId, m_CanvasId );
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
- RID viewPortTextureId = pVisualServer->viewport_get_texture( m_ViewPortId );
- Ref viewPortTextureData = pVisualServer->texture_2d_get( viewPortTextureId );
-
- m_TextureId = pVisualServer->texture_2d_create( viewPortTextureData );
-
-// pVisualServer->texture_set_proxy( m_TextureId, viewPortTextureId );
- m_TextureId = viewPortTextureId;
-#else
-#ifdef GD_V4
- RID viewPortTextureId = pVisualServer->viewport_get_texture( m_ViewPortId );
- Ref viewPortTextureData = pVisualServer->texture_2d_get( viewPortTextureId );
-
- m_TextureId = pVisualServer->texture_2d_create( viewPortTextureData );
-
-// pVisualServer->texture_set_proxy( m_TextureId, viewPortTextureId );
- m_TextureId = viewPortTextureId;
-#endif
-#ifdef GD_V3
- RID viewPortTextureId = pVisualServer->viewport_get_texture( m_ViewPortId );
- Ref viewPortTextureData = pVisualServer->texture_get_data( viewPortTextureId );
-
- m_TextureId = pVisualServer->texture_create_from_image( viewPortTextureData );
-
- pVisualServer->texture_set_proxy( m_TextureId, viewPortTextureId );
-#endif
-#endif
-
- pVisualServer->viewport_set_active( m_ViewPortId, true );
-}
-
-void GdRenderer::term()
-{
- safeFree( m_ViewPortId );
- safeFree( m_TextureId );
- safeFree( m_CanvasId );
- safeFree( m_CanvasItemId );
-}
-
-void GdRenderer::setTranslate( float fX, float fY )
-{
- VisualServer* pVisualServer = VisualServer::get_singleton();
- Transform2D trans;
-
-#if defined(GD_V4) || defined(SPRITESTUDIO_GODOT_EXTENSION)
- trans.translate_local( fX, fY );
-#endif
-#ifdef GD_V3
- trans.translate( fX, fY );
-#endif
-
- pVisualServer->viewport_set_canvas_transform( m_ViewPortId, m_CanvasId, trans );
-}
-
-void GdRenderer::setSize( int iWidth, int iHeight )
-{
- VisualServer* pVisualServer = VisualServer::get_singleton();
-
- m_Size = Rect2( 0, 0, iWidth, iHeight );
-
- pVisualServer->viewport_set_size( m_ViewPortId, iWidth, iHeight );
-}
-
-Rect2 GdRenderer::getSize() const
-{
- return m_Size;
-}
-
-RID GdRenderer::getTextureRid() const
-{
- return m_TextureId;
-}
-
-RID GdRenderer::getCanvasRid() const
-{
- return m_CanvasId;
-}
-
-RID GdRenderer::getCanvasItemRid() const
-{
- return m_CanvasItemId;
-}
diff --git a/gd_spritestudio/gd_renderer.h b/gd_spritestudio/gd_renderer.h
deleted file mode 100644
index 01bc809..0000000
--- a/gd_spritestudio/gd_renderer.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*!
-* \file gd_renderer.h
-* \author CRI Middleware Co., Ltd.
-*/
-#ifndef GD_RENDERER_H
-#define GD_RENDERER_H
-
-#include "gd_macros.h"
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-#include
-#include
-using namespace godot;
-#else
-#ifdef GD_V4
-#include "core/templates/rid.h"
-#endif
-#ifdef GD_V3
-#include "core/rid.h"
-#endif
-#include "core/math/rect2.h"
-#endif
-
-class GdRenderer
-{
-public :
- GdRenderer();
- virtual ~GdRenderer();
-
- void init();
- void term();
-
- void setTranslate( float fX, float fY );
- void setSize( int iWidth, int iHeight );
-
- Rect2 getSize() const;
-
- RID getTextureRid() const;
- RID getCanvasRid() const;
- RID getCanvasItemRid() const;
-
-private :
- RID m_ViewPortId;
- RID m_TextureId;
- RID m_CanvasId;
- RID m_CanvasItemId;
-
- Rect2 m_Size;
-};
-
-#endif // GD_RENDERER_H
diff --git a/gd_spritestudio/gd_renderer_item.cpp b/gd_spritestudio/gd_renderer_item.cpp
deleted file mode 100644
index 0d35e89..0000000
--- a/gd_spritestudio/gd_renderer_item.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-/*!
-* \file gd_renderer_item.cpp
-* \author CRI Middleware Co., Ltd.
-*/
-#include "gd_renderer_item.h"
-
-GdRendererItem::GdRendererItem()
-{
-}
-
-GdRendererItem::~GdRendererItem()
-{
-}
diff --git a/gd_spritestudio/gd_renderer_item.h b/gd_spritestudio/gd_renderer_item.h
deleted file mode 100644
index 43b4528..0000000
--- a/gd_spritestudio/gd_renderer_item.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/*!
-* \file gd_renderer_item.h
-* \author CRI Middleware Co., Ltd.
-*/
-#ifndef GD_RENDERER_ITEM_H
-#define GD_RENDERER_ITEM_H
-
-class GdRendererItem
-{
-public :
- GdRendererItem();
- virtual ~GdRendererItem();
-};
-
-#endif // GD_RENDERER_ITEM_H
diff --git a/gd_spritestudio/gd_resource_ssanimepack.cpp b/gd_spritestudio/gd_resource_ssanimepack.cpp
deleted file mode 100644
index f018f38..0000000
--- a/gd_spritestudio/gd_resource_ssanimepack.cpp
+++ /dev/null
@@ -1,99 +0,0 @@
-/*!
-* \file gd_resource_ssanimepack.cpp
-* \author CRI Middleware Co., Ltd.
-*/
-#include "gd_resource_ssanimepack.h"
-
-#include "ss_macros.h"
-#include "ss_container.h"
-#include "gd_notifier.h"
-
-SsSdkUsing
-
-GdResourceSsAnimePack::GdResourceSsAnimePack()
-{
- m_pAnimePack = NULL;
-}
-
-GdResourceSsAnimePack::~GdResourceSsAnimePack()
-{
- if ( m_pAnimePack ) {
- SsContainer::getInstance().unloadAnimePack( m_pAnimePack );
- m_pAnimePack = NULL;
- }
-}
-
-Error GdResourceSsAnimePack::loadFromFile( const String& strPath, const String& strOrgPath )
-{
- m_pAnimePack = SsContainer::getInstance().loadAnimePackFromFile( strPath, false );
-
- if ( !m_pAnimePack ) {
- ERR_PRINT( String( "SpriteStudio ssae file load failed : " ) + strPath );
- return FAILED;
- }
-
- return OK;
-}
-
-Error GdResourceSsAnimePack::saveToFile( const String& strPath, const Ref& res )
-{
- return FAILED;
-}
-
-int GdResourceSsAnimePack::getAnimationCount() const
-{
- if ( m_pAnimePack ) {
- return m_pAnimePack->animeList.size();
- }
-
- return 0;
-}
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-PackedStringArray GdResourceSsAnimePack::getAnimationNames() const
-#else
-Vector GdResourceSsAnimePack::getAnimationNames() const
-#endif
-{
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
- PackedStringArray vec;
-#else
- Vector vec;
-#endif
-
- if ( m_pAnimePack ) {
- for ( int i = 0; i < m_pAnimePack->animeList.size(); i++ ) {
- SsAnimation* pAnimation = m_pAnimePack->animeList[i];
-
- vec.push_back( Variant( String::utf8( pAnimation->name.c_str() ) ) );
- }
- }
-
- return vec;
-}
-
-SsAnimePack* GdResourceSsAnimePack::getAnimePack() const
-{
- return m_pAnimePack;
-}
-
-SsModel* GdResourceSsAnimePack::getModel() const
-{
- if ( m_pAnimePack ) {
- return &m_pAnimePack->Model;
- }
-
- return NULL;
-}
-
-SsAnimation* GdResourceSsAnimePack::findAnimation( String strName ) const
-{
- return NULL;
-}
-
-void GdResourceSsAnimePack::_bind_methods()
-{
- ClassDB::bind_method( D_METHOD( "get_animation_count" ), &GdResourceSsAnimePack::getAnimationCount );
-
- ClassDB::bind_method( D_METHOD( "get_animation_names" ), &GdResourceSsAnimePack::getAnimationNames );
-}
diff --git a/gd_spritestudio/gd_resource_ssanimepack.h b/gd_spritestudio/gd_resource_ssanimepack.h
deleted file mode 100644
index d61feb1..0000000
--- a/gd_spritestudio/gd_resource_ssanimepack.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*!
-* \file gd_resource_ssanimepack.h
-* \author CRI Middleware Co., Ltd.
-*/
-#ifndef GD_RESOURCE_SSANIMEPACK_H
-#define GD_RESOURCE_SSANIMEPACK_H
-
-#include "gd_macros.h"
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-#include
-using namespace godot;
-#else
-#ifdef GD_V4
-#include "core/io/resource.h"
-#endif
-#ifdef GD_V3
-#include "core/resource.h"
-#endif
-#endif
-
-#include "SpriteStudio6-SDK/Common/Loader/ssloader_ssae.h"
-
-#include "ss_macros.h"
-#include "gd_resource_sscellmap.h"
-
-SsSdkUsing
-
-class GdResourceSsAnimePack : public Resource
-{
- GDCLASS( GdResourceSsAnimePack, Resource );
-
-public :
- GdResourceSsAnimePack();
- virtual ~GdResourceSsAnimePack();
-
- void setCellMapResource( const Ref& resCellMap, int iIndex );
- Ref getCellMapResource( int iIndex ) const;
-
- Error loadFromFile( const String& strPath, const String& strOrgPath = "" );
- Error saveToFile( const String& strPath, const Ref& res );
-
- int getAnimationCount() const;
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
- PackedStringArray getAnimationNames() const;
-#else
- Vector getAnimationNames() const;
-#endif
-
- SsAnimePack* getAnimePack() const;
-
- SsModel* getModel() const;
-
- SsAnimation* findAnimation( String strName ) const;
-
-protected :
- GdMultilevelCall static void _bind_methods();
-
-private :
- SsAnimePack* m_pAnimePack;
-};
-
-#endif // GD_RESOURCE_SSANIMEPACK_H
diff --git a/gd_spritestudio/gd_resource_sscellmap.cpp b/gd_spritestudio/gd_resource_sscellmap.cpp
deleted file mode 100644
index a34f2ef..0000000
--- a/gd_spritestudio/gd_resource_sscellmap.cpp
+++ /dev/null
@@ -1,103 +0,0 @@
-/*!
-* \file gd_resource_sscellmap.cpp
-* \author CRI Middleware Co., Ltd.
-*/
-#include "gd_resource_sscellmap.h"
-
-#include "ss_macros.h"
-#include "ss_container.h"
-#include "gd_notifier.h"
-
-SsSdkUsing
-
-GdResourceSsCellMap::GdResourceSsCellMap()
-{
- m_pCellMap = NULL;
-}
-
-GdResourceSsCellMap::~GdResourceSsCellMap()
-{
- if ( m_pCellMap ) {
- SsContainer::getInstance().unloadCellMap( m_pCellMap );
- m_pCellMap = NULL;
- }
-}
-
-void GdResourceSsCellMap::setTexture( Ref texture )
-{
- m_Texture = texture;
-
- GdNotifier::getInstance().notifyResourceCellMapChanged( this );
-}
-
-Ref GdResourceSsCellMap::getTexture() const
-{
- return m_Texture;
-}
-
-Error GdResourceSsCellMap::loadFromFile( const String& strPath, const String& strOrgPath )
-{
- Error err;
- String strRel = strOrgPath.length() == 0 ? strPath : strOrgPath;
-
- m_pCellMap = SsContainer::getInstance().loadCellMapFromFile( strPath, false );
-
- if ( !m_pCellMap ) {
- ERR_PRINT( String( "SpriteStudio ssce file load failed : " ) + strPath );
- return FAILED;
- }
-
- {
- auto c = SsContainer::getInstance().getImageDir().utf8();
- SsString strRoot = c.ptr() ? SsString( c.ptr() ) : SsString( "" );
-
- m_pCellMap->imagePath = strRoot + m_pCellMap->imagePath;
- }
-
- auto c = strRel.utf8();
-
- m_pCellMap->fname = c.ptr() ? SsString( c.ptr() ) : SsString( "" );
-
- String str = String::utf8( m_pCellMap->imagePath.c_str() );
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
- m_Texture = ResourceLoader::get_singleton()->load( str, "", ResourceLoader::CACHE_MODE_REUSE);
- err = OK; // TODO: improve
-#else
-#ifdef GD_V4
- m_Texture = ResourceLoader::load( str, "", ResourceFormatLoader::CACHE_MODE_REUSE, &err );
-#endif
-#ifdef GD_V3
- m_Texture = ResourceLoader::load( str, "", false, &err );
-#endif
-#endif
-
- return err;
-}
-
-Error GdResourceSsCellMap::saveToFile( const String& strPath, const Ref& res )
-{
- return FAILED;
-}
-
-SsCellMap* GdResourceSsCellMap::getCellMap() const
-{
- return m_pCellMap;
-}
-
-void GdResourceSsCellMap::_bind_methods()
-{
- ClassDB::bind_method( D_METHOD( "set_texture", "texture" ), &GdResourceSsCellMap::setTexture );
- ClassDB::bind_method( D_METHOD( "get_texture" ), &GdResourceSsCellMap::getTexture );
-
- ADD_PROPERTY(
- PropertyInfo(
- Variant::OBJECT,
- "texture",
- PropertyHint::PROPERTY_HINT_RESOURCE_TYPE,
- "Texture"
- ),
- "set_texture",
- "get_texture"
- );
-}
diff --git a/gd_spritestudio/gd_resource_sscellmap.h b/gd_spritestudio/gd_resource_sscellmap.h
deleted file mode 100644
index 8e1c661..0000000
--- a/gd_spritestudio/gd_resource_sscellmap.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*!
-* \file gd_resource_sscellmap.h
-* \author CRI Middleware Co., Ltd.
-*/
-#ifndef GD_RESOURCE_SSCELLMAP_H
-#define GD_RESOURCE_SSCELLMAP_H
-
-#include "gd_macros.h"
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-#include
-#include
-using namespace godot;
-#else
-#ifdef GD_V4
-#include "core/io/resource.h"
-#endif
-#ifdef GD_V3
-#include "core/resource.h"
-#endif
-#include "scene/resources/texture.h"
-#endif
-
-#include "SpriteStudio6-SDK/Common/Loader/ssloader_ssce.h"
-
-#include "ss_macros.h"
-
-SsSdkUsing
-
-class GdResourceSsCellMap : public Resource
-{
- GDCLASS( GdResourceSsCellMap, Resource );
-
-public :
- GdResourceSsCellMap();
- virtual ~GdResourceSsCellMap();
-
- void setTexture( Ref texture );
- Ref getTexture() const;
-
- Error loadFromFile( const String& strPath, const String& strOrgPath = "" );
- Error saveToFile( const String& strPath, const Ref& res );
-
- SsCellMap* getCellMap() const;
- String getRoot() const;
-
-protected :
- GdMultilevelCall static void _bind_methods();
-
-private :
- SsCellMap* m_pCellMap;
-
- Ref m_Texture;
-};
-
-#endif // GD_RESOURCE_SSCELLMAP_H
diff --git a/gd_spritestudio/gd_resource_ssdocument.cpp b/gd_spritestudio/gd_resource_ssdocument.cpp
deleted file mode 100644
index e55b39f..0000000
--- a/gd_spritestudio/gd_resource_ssdocument.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-/*!
-* \file gd_resource_ssdocument.cpp
-* \author CRI Middleware Co., Ltd.
-*/
-#include "gd_resource_ssdocument.h"
-
-#include "gd_io.h"
-
-GdResourceSsDocument::GdResourceSsDocument()
-{
- m_strSource = "";
-}
-
-GdResourceSsDocument::~GdResourceSsDocument()
-{
-}
-
-Error GdResourceSsDocument::loadFromFile( const String& strPath, const String& strOrgPath )
-{
- m_strSource = GdIO::loadStringFromFile( strPath );
-
- return OK;
-}
-
-Error GdResourceSsDocument::saveToFile( const String& strPath, const Ref& res )
-{
- return FAILED;
-}
-
-String GdResourceSsDocument::getSource() const
-{
- return m_strSource;
-}
-
-void GdResourceSsDocument::_bind_methods()
-{
- ClassDB::bind_method( D_METHOD( "load_from_file", "path", "org_path" ), &GdResourceSsDocument::loadFromFile );
-}
diff --git a/gd_spritestudio/gd_resource_ssdocument.h b/gd_spritestudio/gd_resource_ssdocument.h
deleted file mode 100644
index c81250e..0000000
--- a/gd_spritestudio/gd_resource_ssdocument.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*!
-* \file gd_resource_ssdocument.h
-* \author CRI Middleware Co., Ltd.
-*/
-#ifndef GD_RESOURCE_SSDOCUMENT_H
-#define GD_RESOURCE_SSDOCUMENT_H
-
-#include "gd_macros.h"
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-#include
-using namespace godot;
-#else
-#ifdef GD_V4
-#include "core/io/resource.h"
-#endif
-#ifdef GD_V3
-#include "core/resource.h"
-#endif
-#endif
-
-class GdResourceSsDocument : public Resource
-{
- GDCLASS( GdResourceSsDocument, Resource );
-
-public :
- GdResourceSsDocument();
- virtual ~GdResourceSsDocument();
-
- Error loadFromFile( const String& strPath, const String& strOrgPath = "" );
- Error saveToFile( const String& strPath, const Ref& res );
-
- String getSource() const;
-
-protected :
- GdMultilevelCall static void _bind_methods();
-
-private :
- String m_strSource;
-};
-
-#endif // GD_RESOURCE_SSDOCUMENT_H
diff --git a/gd_spritestudio/gd_resource_sseffect.cpp b/gd_spritestudio/gd_resource_sseffect.cpp
deleted file mode 100644
index 365920b..0000000
--- a/gd_spritestudio/gd_resource_sseffect.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-/*!
-* \file gd_resource_sseffect.cpp
-* \author CRI Middleware Co., Ltd.
-*/
-#include "gd_resource_sseffect.h"
-
-#include "ss_macros.h"
-#include "ss_container.h"
-
-SsSdkUsing
-
-GdResourceSsEffect::GdResourceSsEffect()
-{
- m_pEffect = NULL;
-}
-
-GdResourceSsEffect::~GdResourceSsEffect()
-{
- if ( m_pEffect ) {
- SsContainer::getInstance().unloadEffect( m_pEffect );
- m_pEffect = NULL;
- }
-}
-
-Error GdResourceSsEffect::loadFromFile( const String& strPath, const String& strOrgPath )
-{
- m_pEffect = SsContainer::getInstance().loadEffectFromFile( strPath, false );
-
- if ( !m_pEffect ) {
- ERR_PRINT( String( "SpriteStudio ssee file load failed : " ) + strPath );
- return FAILED;
- }
-
- return OK;
-}
-
-Error GdResourceSsEffect::saveToFile( const String& strPath, const Ref& res )
-{
- return FAILED;
-}
-
-SsEffectFile* GdResourceSsEffect::getEffect() const
-{
- return m_pEffect;
-}
-
-void GdResourceSsEffect::_bind_methods()
-{
-}
diff --git a/gd_spritestudio/gd_resource_sseffect.h b/gd_spritestudio/gd_resource_sseffect.h
deleted file mode 100644
index 9540bff..0000000
--- a/gd_spritestudio/gd_resource_sseffect.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*!
-* \file gd_resource_sseffect.h
-* \author CRI Middleware Co., Ltd.
-*/
-#ifndef GD_RESOURCE_SSEFFECT_H
-#define GD_RESOURCE_SSEFFECT_H
-
-#include "gd_macros.h"
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-#include
-using namespace godot;
-#else
-#ifdef GD_V4
-#include "core/io/resource.h"
-#endif
-#ifdef GD_V3
-#include "core/resource.h"
-#endif
-#endif
-
-#include "SpriteStudio6-SDK/Common/Loader/ssloader_ssee.h"
-
-#include "ss_macros.h"
-
-SsSdkUsing
-
-class GdResourceSsEffect : public Resource
-{
- GDCLASS( GdResourceSsEffect, Resource );
-
-public :
- GdResourceSsEffect();
- virtual ~GdResourceSsEffect();
-
- Error loadFromFile( const String& strPath, const String& strOrgPath = "" );
- Error saveToFile( const String& strPath, const Ref& res );
-
- SsEffectFile* getEffect() const;
-
-protected :
- GdMultilevelCall static void _bind_methods();
-
-private :
- SsEffectFile* m_pEffect;
-};
-
-#endif // GD_RESOURCE_SSEFFECT_H
diff --git a/gd_spritestudio/gd_resource_ssplayer.cpp b/gd_spritestudio/gd_resource_ssplayer.cpp
deleted file mode 100644
index ee99e81..0000000
--- a/gd_spritestudio/gd_resource_ssplayer.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-/*!
-* \file gd_resource_ssplayer.cpp
-* \author CRI Middleware Co., Ltd.
-*/
-#include "gd_resource_ssplayer.h"
-
-#include "gd_notifier.h"
-
-GdResourceSsPlayer::GdResourceSsPlayer()
-{
-}
-
-GdResourceSsPlayer::~GdResourceSsPlayer()
-{
-}
-
-void GdResourceSsPlayer::setProjectResource( const Ref& resProject )
-{
- m_ResProject = resProject;
-
- GdNotifier::getInstance().notifyResourcePlayerChanged( this );
-}
-
-Ref GdResourceSsPlayer::getProjectResource() const
-{
- return m_ResProject;
-}
-
-void GdResourceSsPlayer::_bind_methods()
-{
- ClassDB::bind_method( D_METHOD( "set_project_resource", "res_project" ), &GdResourceSsPlayer::setProjectResource );
- ClassDB::bind_method( D_METHOD( "get_project_resource" ), &GdResourceSsPlayer::getProjectResource );
-
- ADD_PROPERTY(
- PropertyInfo(
- Variant::OBJECT,
- GdUiText( "res_project" ),
- PropertyHint::PROPERTY_HINT_RESOURCE_TYPE,
- "GdResourceSsProject"
- ),
- "set_project_resource",
- "get_project_resource"
- );
-}
diff --git a/gd_spritestudio/gd_resource_ssplayer.h b/gd_spritestudio/gd_resource_ssplayer.h
deleted file mode 100644
index 4a60c1b..0000000
--- a/gd_spritestudio/gd_resource_ssplayer.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*!
-* \file gd_resource_ssplayer.h
-* \author CRI Middleware Co., Ltd.
-*/
-#ifndef GD_RESOURCE_SSPLAYER_H
-#define GD_RESOURCE_SSPLAYER_H
-
-#include "gd_macros.h"
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-#include
-using namespace godot;
-#else
-#ifdef GD_V4
-#include "core/io/resource.h"
-#endif
-#ifdef GD_V3
-#include "core/resource.h"
-#endif
-#endif
-
-#include "gd_resource_ssproject.h"
-
-class GdResourceSsPlayer : public Resource
-{
- GDCLASS( GdResourceSsPlayer, Resource );
-
-public :
- GdResourceSsPlayer();
- virtual ~GdResourceSsPlayer();
-
- void setProjectResource( const Ref& resProject );
- Ref getProjectResource() const;
-
-protected :
- GdMultilevelCall static void _bind_methods();
-
-private :
- Ref m_ResProject;
-};
-
-
-#endif // GD_RESOURCE_SSPLAYER_H
diff --git a/gd_spritestudio/gd_resource_ssproject.cpp b/gd_spritestudio/gd_resource_ssproject.cpp
deleted file mode 100644
index 4159d44..0000000
--- a/gd_spritestudio/gd_resource_ssproject.cpp
+++ /dev/null
@@ -1,525 +0,0 @@
-/*!
-* \file gd_resource_ssproject.cpp
-* \author CRI Middleware Co., Ltd.
-*/
-#include "gd_resource_ssproject.h"
-
-#include "ss_macros.h"
-#include "ss_container.h"
-#include "gd_notifier.h"
-
-SsSdkUsing
-
-GdResourceSsProject::GdResourceSsProject()
-{
- m_pProject = NULL;
- m_strRoot = "";
-
- m_mapResAnimePack.clear();
- m_vecResCellMap.clear();
- m_vecResEffect.clear();
-}
-
-GdResourceSsProject::~GdResourceSsProject()
-{
- if ( m_pProject ) {
- SsContainer::getInstance().unloadProject( m_pProject );
- m_pProject = NULL;
- }
-
- m_mapResAnimePack.clear();
- m_vecResCellMap.clear();
- m_vecResEffect.clear();
-}
-
-void GdResourceSsProject::setAnimePackResource( const Ref& resAnimePack, const String& strName )
-{
- if ( !m_mapResAnimePack.has( strName ) ) {
- return;
- }
-
- m_mapResAnimePack[strName] = resAnimePack;
-
- NOTIFY_PROPERTY_LIST_CHANGED();
-
- GdNotifier::getInstance().notifyResourceProjectChanged( this );
-}
-
-Ref GdResourceSsProject::getAnimePackResource( const String& strName ) const
-{
- if ( !m_mapResAnimePack.has( strName ) ) {
- return NULL;
- }
-
- return m_mapResAnimePack[strName];
-}
-
-void GdResourceSsProject::setCellMapResource( const Ref& resCellMap, int iIndex )
-{
- if ( ( iIndex < 0 ) || ( iIndex >= getCellMapCount() ) ) {
- return;
- }
-
- m_vecResCellMap.set( iIndex, resCellMap );
-
- NOTIFY_PROPERTY_LIST_CHANGED();
-
- GdNotifier::getInstance().notifyResourceProjectChanged( this );
-}
-
-Ref GdResourceSsProject::getCellMapResourceFromIndex( int iIndex ) const
-{
- if ( ( iIndex < 0 ) || ( iIndex >= getCellMapCount() ) ) {
- return NULL;
- }
-
- return m_vecResCellMap.get( iIndex );
-}
-
-Ref GdResourceSsProject::getCellMapResourceFromName( const String& strName ) const
-{
- if ( m_pProject ) {
- for ( int i = 0; i < m_pProject->cellmapNames.size(); i++ ) {
- if ( m_pProject->cellmapNames[i].c_str() == strName ) {
- return getCellMapResourceFromIndex( i );
- }
- }
- }
-
- return NULL;
-}
-
-Ref GdResourceSsProject::getCellMapResource( const SsString& strName ) const
-{
- if ( m_pProject ) {
- for ( int i = 0; i < m_pProject->cellmapNames.size(); i++ ) {
- if ( m_pProject->cellmapNames[i] == strName ) {
- return getCellMapResourceFromIndex( i );
- }
- }
- }
-
- return NULL;
-}
-
-void GdResourceSsProject::setEffectResource( const Ref& resEffect, int iIndex )
-{
- if ( ( iIndex < 0 ) || ( iIndex >= getEffectCount() ) ) {
- return;
- }
-
- m_vecResEffect.set( iIndex, resEffect );
-
- NOTIFY_PROPERTY_LIST_CHANGED();
-
- GdNotifier::getInstance().notifyResourceProjectChanged( this );
-}
-
-Ref GdResourceSsProject::getEffectResource( int iIndex ) const
-{
- if ( ( iIndex < 0 ) || ( iIndex >= getEffectCount() ) ) {
- return NULL;
- }
-
- return m_vecResEffect.get( iIndex );
-}
-
-Error GdResourceSsProject::loadFromFile( const String& strPath, const String& strOrgPath )
-{
- Error err;
- String strRel = strOrgPath.length() == 0 ? strPath : strOrgPath;
-
- m_vecResCellMap.clear();
- m_vecResEffect.clear();
-
- m_pProject = SsContainer::getInstance().loadProjectFromFile( strPath, false );
- m_strRoot = "";
-
- if ( !m_pProject ) {
- ERR_PRINT( String( "SpriteStudio sspj file load failed : " ) + strPath );
- return FAILED;
- }
-
- m_strRoot = strRel.get_base_dir();
- m_strRoot = m_strRoot.replace( "res://", "" );
- if ( !EMPTY(m_strRoot) && !m_strRoot.ends_with( "/" ) )
- {
- m_strRoot += "/";
- }
-
- m_strAnimePack = m_strRoot + String::utf8( m_pProject->settings.animeBaseDirectory.c_str() );
- if ( EMPTY(m_strAnimePack) && !m_strAnimePack.ends_with( "/" ) )
- {
- m_strAnimePack += "/";
- }
- m_strCellMap = m_strRoot + String::utf8( m_pProject->settings.cellMapBaseDirectory.c_str() );
- if ( EMPTY(m_strCellMap) && !m_strCellMap.ends_with( "/" ) )
- {
- m_strCellMap += "/";
- }
- m_strImage = m_strRoot + String::utf8( m_pProject->settings.imageBaseDirectory.c_str() );
- if ( EMPTY(m_strImage) && !m_strImage.ends_with( "/" ) )
- {
- m_strImage += "/";
- }
- m_strEffect = m_strRoot + String::utf8( m_pProject->settings.effectBaseDirectory.c_str() );
- if ( EMPTY(m_strEffect) && !m_strEffect.ends_with( "/" ) )
- {
- m_strEffect += "/";
- }
-
- SsContainer::getInstance().setAnimePackDir( m_strAnimePack );
- SsContainer::getInstance().setCellMapDir( m_strCellMap );
- SsContainer::getInstance().setImageDir( m_strImage );
- SsContainer::getInstance().setEffectDir( m_strEffect );
-
- for ( int i = 0; i < m_pProject->animepackNames.size(); i++ ) {
- String strName = String::utf8( m_pProject->animepackNames[i].c_str() );
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
- Ref resAnimePack = ResourceLoader::get_singleton()->load( m_strAnimePack + strName, "", ResourceLoader::CacheMode::CACHE_MODE_REUSE);
- err = OK; // TODO: improve
-#else
-#ifdef GD_V4
- Ref resAnimePack = ResourceLoader::load( m_strAnimePack + strName, "", ResourceFormatLoader::CacheMode::CACHE_MODE_REUSE);
- err = OK; // TODO: improve
-#endif
-#ifdef GD_V3
- Ref resAnimePack = ResourceLoader::load( m_strAnimePack + strName, "", false, &err );
-#endif
-#endif
- m_mapResAnimePack[strName] = resAnimePack;
-
- if ( err != OK ) {
- ERR_PRINT( String( "SpriteStudio sspj ref ssae file load failed : " ) + strName );
- }
-
- SsAnimePack* pAnimePack = resAnimePack->getAnimePack();
-
- if ( !pAnimePack ) {
- continue;
- }
-
- m_pProject->animeList.push_back( std::move( std::unique_ptr( pAnimePack ) ) );
- }
-
- for ( int i = 0; i < m_pProject->cellmapNames.size(); i++ ) {
- String strName = String::utf8( m_pProject->cellmapNames[i].c_str() );
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
- Ref resCellMap = ResourceLoader::get_singleton()->load( m_strCellMap + strName, "", ResourceLoader::CacheMode::CACHE_MODE_REUSE);
- err = OK; // TODO: improve
-#else
-#ifdef GD_V4
- Ref resCellMap = ResourceLoader::load( m_strCellMap + strName, "", ResourceFormatLoader::CACHE_MODE_REUSE, &err );
-#endif
-#ifdef GD_V3
- Ref resCellMap = ResourceLoader::load( m_strCellMap + strName, "", false, &err );
-#endif
-#endif
-
- m_vecResCellMap.push_back( resCellMap );
-
- if ( err != OK ) {
- ERR_PRINT( String( "SpriteStudio sspj ref ssce file load failed : " ) + strName );
- }
-
- SsCellMap* pCellMap = resCellMap->getCellMap();
-
- if ( !pCellMap ) {
- continue;
- }
-
- auto c = strName.utf8();
-
- pCellMap->loadFilepath = c.ptr() ? SsString( c.ptr() ) : SsString( "" );
-
- m_pProject->cellmapList.push_back( std::move( std::unique_ptr( pCellMap ) ) );
- }
-
- for ( int i = 0; i < m_pProject->effectFileNames.size(); i++ ) {
- String strName = String::utf8( m_pProject->effectFileNames[i].c_str() );
-
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
- Ref resEffect = ResourceLoader::get_singleton()->load( m_strEffect + strName, "", ResourceLoader::CACHE_MODE_REUSE);
- err = OK; // TODO: improve
-#else
-#ifdef GD_V4
- Ref resEffect = ResourceLoader::load( m_strEffect + strName, "", ResourceFormatLoader::CACHE_MODE_REUSE, &err );
-#endif
-#ifdef GD_V3
- Ref resEffect = ResourceLoader::load( m_strEffect + strName, "", false, &err );
-#endif
-#endif
-
- m_vecResEffect.push_back( resEffect );
-
- if ( err != OK ) {
- ERR_PRINT( String( "SpriteStudio sspj ref ssee file load failed : " ) + strName );
- }
-
- SsEffectFile* pEffect = resEffect->getEffect();
-
- if ( !pEffect ) {
- continue;
- }
-
- ssloader_ssee::loadPostProcessing( pEffect, m_pProject );
-
- m_pProject->effectfileList.push_back( std::move( std::unique_ptr( pEffect ) ) );
- }
-
- SsContainer::getInstance().setAnimePackDir( "" );
- SsContainer::getInstance().setCellMapDir( "" );
- SsContainer::getInstance().setImageDir( "" );
- SsContainer::getInstance().setEffectDir( "" );
-
- return OK;
-}
-
-Error GdResourceSsProject::saveToFile( const String& strPath, const Ref& res )
-{
- return FAILED;
-}
-
-int GdResourceSsProject::getAnimePackCount() const
-{
- if ( m_pProject ) {
- return m_pProject->getAnimePackNum();
- }
-
- return 0;
-}
-
-int GdResourceSsProject::getCellMapCount() const
-{
- if ( m_pProject ) {
- return m_pProject->getCellMapNum();
- }
-
- return 0;
-}
-
-int GdResourceSsProject::getEffectCount() const
-{
- if ( m_pProject ) {
- return m_pProject->getEffectFileNum();
- }
-
- return 0;
-}
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-PackedStringArray GdResourceSsProject::getAnimePackNames() const
-#else
-Vector GdResourceSsProject::getAnimePackNames() const
-#endif
-{
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
- PackedStringArray vec;
-#else
- Vector vec;
-#endif
-
- if ( m_pProject ) {
- for ( int i = 0; i < m_pProject->getAnimePackNum(); i++ ) {
- SsString strPath = m_pProject->getAnimePackFilePath( i, false );
-
- vec.push_back( Variant( String::utf8( strPath.c_str() ) ) );
- }
- }
-
- return vec;
-}
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-PackedStringArray GdResourceSsProject::getCellMapNames() const
-#else
-Vector GdResourceSsProject::getCellMapNames() const
-#endif
-{
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
- PackedStringArray vec;
-#else
- Vector vec;
-#endif
-
- if ( m_pProject ) {
- for ( int i = 0; i < m_pProject->getCellMapNum(); i++ ) {
- SsString strPath = m_pProject->getCelMapFileOriginalPath( i );
-
- vec.push_back( Variant( String::utf8( strPath.c_str() ) ) );
- }
- }
-
- return vec;
-}
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-PackedStringArray GdResourceSsProject::getEffectNames() const
-#else
-Vector GdResourceSsProject::getEffectNames() const
-#endif
-{
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
- PackedStringArray vec;
-#else
- Vector vec;
-#endif
-
- if ( m_pProject ) {
- for ( int i = 0; i < m_pProject->getEffectFileNum(); i++ ) {
- SsString strPath = m_pProject->getEffectFilePath( i );
-
- vec.push_back( Variant( String::utf8( strPath.c_str() ) ) );
- }
- }
-
- return vec;
-}
-
-SsProject* GdResourceSsProject::getProject() const
-{
- return m_pProject;
-}
-
-String GdResourceSsProject::getRoot() const
-{
- return m_strRoot;
-}
-
-void GdResourceSsProject::_bind_methods()
-{
- ClassDB::bind_method( D_METHOD( "get_anime_pack_count" ), &GdResourceSsProject::getAnimePackCount );
- ClassDB::bind_method( D_METHOD( "get_cell_map_count" ), &GdResourceSsProject::getCellMapCount );
- ClassDB::bind_method( D_METHOD( "get_effect_count" ), &GdResourceSsProject::getEffectCount );
-
- ClassDB::bind_method( D_METHOD( "get_anime_pack_names" ), &GdResourceSsProject::getAnimePackNames );
- ClassDB::bind_method( D_METHOD( "get_cell_map_names" ), &GdResourceSsProject::getCellMapNames );
- ClassDB::bind_method( D_METHOD( "get_effect_names" ), &GdResourceSsProject::getEffectNames );
-
- ClassDB::bind_method( D_METHOD( "set_anime_pack_resource", "res_anime_pack", "name" ), &GdResourceSsProject::setAnimePackResource );
- ClassDB::bind_method( D_METHOD( "get_anime_pack_resource", "name" ), &GdResourceSsProject::getAnimePackResource );
-
- ClassDB::bind_method( D_METHOD( "set_cell_map_resource", "res_cell_map", "index" ), &GdResourceSsProject::setCellMapResource );
- ClassDB::bind_method( D_METHOD( "get_cell_map_resource_from_index", "index" ), &GdResourceSsProject::getCellMapResourceFromIndex );
- ClassDB::bind_method( D_METHOD( "get_cell_map_resource_from_name", "name" ), &GdResourceSsProject::getCellMapResourceFromName );
-
- ClassDB::bind_method( D_METHOD( "set_effect_resource", "res_effect", "index" ), &GdResourceSsProject::setEffectResource );
- ClassDB::bind_method( D_METHOD( "get_effect_resource", "index" ), &GdResourceSsProject::getEffectResource );
-
- ADD_GROUP( GdUiText( "Cellmap Settings" ), "" );
-// ADD_GROUP( GdUiText( "effect_settings" ), "" );
-}
-
-bool GdResourceSsProject::_set( const StringName& p_name, const Variant& p_property )
-{
- if ( !m_pProject ) {
- return false;
- }
-
- for ( int i = 0; i < getCellMapCount(); i++ ) {
- auto e = m_vecResCellMap[i];
- String strName = String::utf8( m_pProject->cellmapNames[i].c_str() );
-
- if ( p_name == strName ) {
- const Ref& resCellMap = p_property;
-
- if ( resCellMap.is_null() ) {
- continue;
- }
-
- SsCellMap* pCellMap = const_cast( resCellMap->getCellMap() );
-
- if ( !pCellMap ) {
- continue;
- }
-
- auto c = strName.utf8();
-
- pCellMap->loadFilepath = c.ptr() ? SsString( c.ptr() ) : SsString( "" );
-
- setCellMapResource( p_property, i );
-
- return true;
- }
- }
-/*
- for ( int i = 0; i < getEffectCount(); i++ ) {
- auto e = m_vecResEffect[i];
- String strName = String::utf8( m_pProject->effectFileNames[i].c_str() );
-
- if ( p_name == strName ) {
- setEffectResource( p_property, i );
-
- return true;
- }
- }
-*/
- return false;
-}
-
-bool GdResourceSsProject::_get( const StringName& p_name, Variant& r_property ) const
-{
- if ( !m_pProject ) {
- return false;
- }
-
- for ( int i = 0; i < getCellMapCount(); i++ ) {
- auto e = m_vecResCellMap[i];
- String strName = String::utf8( m_pProject->cellmapNames[i].c_str() );
-
- if ( p_name == strName ) {
- r_property = getCellMapResourceFromIndex( i );
-
- return true;
- }
- }
-/*
- for ( int i = 0; i < getEffectCount(); i++ ) {
- auto e = m_vecResEffect[i];
- String strName = String::utf8( m_pProject->effectFileNames[i].c_str() );
-
- if ( p_name == strName ) {
- r_property = getEffectResource( i );
-
- return true;
- }
- }
-*/
- return false;
-}
-
-void GdResourceSsProject::_get_property_list( List* p_list ) const
-{
- if ( !m_pProject ) {
- return;
- }
-
- PropertyInfo propertyInfo;
-
- for ( int i = 0; i < getCellMapCount(); i++ ) {
- auto e = m_vecResCellMap[i];
- String strName = String::utf8( m_pProject->cellmapNames[i].c_str() );
-
- propertyInfo.name = strName;
- propertyInfo.type = Variant::OBJECT;
- propertyInfo.hint_string = "GdResourceSsCellMap";
- propertyInfo.hint = PROPERTY_HINT_RESOURCE_TYPE;
-
- p_list->push_back( propertyInfo );
- }
-/*
- for ( int i = 0; i < getEffectCount(); i++ ) {
- auto e = m_vecResEffect[i];
- String strName = String::utf8( m_pProject->effectFileNames[i].c_str() );
-
- propertyInfo.name = strName;
- propertyInfo.type = Variant::OBJECT;
- propertyInfo.hint_string = "GdResourceSsEffect";
- propertyInfo.hint = PROPERTY_HINT_RESOURCE_TYPE;
-
- p_list->push_back( propertyInfo );
- }
-*/
-}
diff --git a/gd_spritestudio/gd_resource_ssproject.h b/gd_spritestudio/gd_resource_ssproject.h
deleted file mode 100644
index 477e9c4..0000000
--- a/gd_spritestudio/gd_resource_ssproject.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/*!
-* \file gd_resource_ssproject.h
-* \author CRI Middleware Co., Ltd.
-*/
-#ifndef GD_RESOURCE_SSPROJECT_H
-#define GD_RESOURCE_SSPROJECT_H
-
-#include "gd_macros.h"
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-#include
-#include
-#include
-using namespace godot;
-#else
-#ifdef GD_V4
-#include "core/io/resource.h"
-#include "core/io/resource_loader.h"
-#include "core/templates/hash_map.h"
-#endif
-#ifdef GD_V3
-#include "core/resource.h"
-#endif
-#endif
-
-#include "SpriteStudio6-SDK/Common/Loader/ssloader_sspj.h"
-
-#include "ss_macros.h"
-#include "gd_resource_ssanimepack.h"
-#include "gd_resource_sscellmap.h"
-#include "gd_resource_sseffect.h"
-
-SsSdkUsing
-
-class GdResourceSsProject : public Resource
-{
- GDCLASS( GdResourceSsProject, Resource );
-
-public :
- GdResourceSsProject();
- virtual ~GdResourceSsProject();
-
- void setAnimePackResource( const Ref& resAnimePack, const String& strName );
- Ref getAnimePackResource( const String& strName ) const;
-
- void setCellMapResource( const Ref& resCellMap, int iIndex );
- Ref getCellMapResourceFromIndex( int iIndex ) const;
- Ref getCellMapResourceFromName( const String& strName ) const;
- Ref getCellMapResource( const SsString& strName ) const;
-
- void setEffectResource( const Ref& resEffect, int iIndex );
- Ref getEffectResource( int iIndex ) const;
-
- Error loadFromFile( const String& strPath, const String& strOrgPath = "" );
- Error saveToFile( const String& strPath, const Ref& res );
-
- int getAnimePackCount() const;
- int getCellMapCount() const;
- int getEffectCount() const;
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
- PackedStringArray getAnimePackNames() const;
- PackedStringArray getCellMapNames() const;
- PackedStringArray getEffectNames() const;
-#else
- Vector getAnimePackNames() const;
- Vector getCellMapNames() const;
- Vector getEffectNames() const;
-#endif
-
- SsProject* getProject() const;
- String getRoot() const;
-
-protected :
- GdMultilevelCall static void _bind_methods();
-
- GdMultilevelCall bool _set( const StringName& p_name, const Variant& p_property );
- GdMultilevelCall bool _get( const StringName& p_name, Variant& r_property ) const;
- GdMultilevelCall void _get_property_list( List* p_list ) const;
-
-private :
- SsProject* m_pProject;
- String m_strRoot;
- String m_strAnimePack;
- String m_strCellMap;
- String m_strImage;
- String m_strEffect;
-
- HashMap> m_mapResAnimePack;
- Vector[> m_vecResCellMap;
- Vector][> m_vecResEffect;
-};
-
-#endif // GD_RESOURCE_SSPROJECT_H
diff --git a/gd_spritestudio/gd_saver_bssanimepack.cpp b/gd_spritestudio/gd_saver_bssanimepack.cpp
deleted file mode 100644
index 2f9d2c0..0000000
--- a/gd_spritestudio/gd_saver_bssanimepack.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-/*!
-* \file gd_saver_bssanimepack.cpp
-* \author CRI Middleware Co., Ltd.
-*/
-#include "gd_saver_bssanimepack.h"
-
-#include "gd_io.h"
-#include "gd_resource_ssdocument.h"
-
-#include "ss_io.h"
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-Error GdSaverBssAnimePack::_save(const Ref &p_resource, const String &p_path, uint32_t p_flags)
-#else
-#ifdef GD_V4
-Error GdSaverBssAnimePack::save( const Ref& p_resource, const String& p_path, uint32_t p_flags )
-#endif
-#ifdef GD_V3
-Error GdSaverBssAnimePack::save( const String& p_path, const RES& p_resource, uint32_t p_flags )
-#endif
-#endif
-{
- if ( !Object::cast_to( *p_resource ) ) {
- return FAILED;
- }
-
- Ref resDocument = p_resource;
-
- if ( resDocument.is_null() ) {
- return FAILED;
-}
-
- String strSource = resDocument->getSource();
-
- if ( strSource.length() == 0 ) {
- return FAILED;
- }
-
- return GdIO::saveVariantToFile( p_path, SsIO::toAnimePackVariant( strSource ) );
-}
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-bool GdSaverBssAnimePack::_recognize(const Ref &p_resource)
-#else
-#ifdef GD_V4
-bool GdSaverBssAnimePack::recognize( const Ref& p_resource ) const
-#endif
-#ifdef GD_V3
-bool GdSaverBssAnimePack::recognize( const RES& p_resource ) const
-#endif
-#endif
-{
- return ( Object::cast_to( *p_resource ) != NULL );
-}
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-PackedStringArray GdSaverBssAnimePack::_get_recognized_extensions(const Ref &resource)
-{
- PackedStringArray extensions;
- if (Object::cast_to(*resource)) {
- extensions.push_back("gdssae");
- }
- return extensions;
-}
-#else
-#ifdef GD_V4
-void GdSaverBssAnimePack::get_recognized_extensions( const Ref& p_resource, List* p_extensions ) const
-#endif
-#ifdef GD_V3
-void GdSaverBssAnimePack::get_recognized_extensions( const RES& p_resource, List* p_extensions ) const
-#endif
-{
- if ( Object::cast_to( *p_resource ) ) {
- p_extensions->push_back( "gdssae" );
- }
-}
-#endif
diff --git a/gd_spritestudio/gd_saver_bssanimepack.h b/gd_spritestudio/gd_saver_bssanimepack.h
deleted file mode 100644
index 5e9fe50..0000000
--- a/gd_spritestudio/gd_saver_bssanimepack.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*!
-* \file gd_saver_bssanimepack.h
-* \author CRI Middleware Co., Ltd.
-*/
-#ifndef GD_SAVER_BSSANIMEPACK_H
-#define GD_SAVER_BSSANIMEPACK_H
-
-#include "gd_macros.h"
-
-#ifdef SPRITESTUDIO_GODOT_EXTENSION
-#include
-#include ]