├── examples
├── mesh_bone
│ ├── .import
│ │ ├── .gdignore
│ │ ├── Effect.png-d03c4278de8b7d363a9353f9c8de5804.md5
│ │ ├── Knight.png-49400efa8b7f46aa9473bbf67dc7459d.md5
│ │ ├── icon.png-487276ed1e3a0c39cad0279d744ee560.md5
│ │ ├── icon.png-487276ed1e3a0c39cad0279d744ee560.stex
│ │ ├── Effect.png-d03c4278de8b7d363a9353f9c8de5804.stex
│ │ └── Knight.png-49400efa8b7f46aa9473bbf67dc7459d.stex
│ ├── icon.png
│ ├── MeshBone
│ │ ├── Effect.png
│ │ ├── Knight.png
│ │ ├── readme.txt
│ │ ├── Effect.png.import
│ │ ├── Knight.png.import
│ │ └── Effect.ssce
│ ├── default_env.tres
│ ├── mesh_bone.tscn
│ ├── project.godot
│ └── icon.png.import
├── feature_test
│ ├── .import
│ │ ├── .gdignore
│ │ ├── icon.png-487276ed1e3a0c39cad0279d744ee560.md5
│ │ ├── box_00_00.png-1ad09a80834c57eebf5f61de26db59ad.md5
│ │ ├── box_00_00.png-63c61a35f75aa7aac35472ada275e323.md5
│ │ ├── common.png-3543577bad7c2a1143177a91585f6b45.md5
│ │ ├── common.png-fc73545b807a8ca949681c397ba6c0a3.md5
│ │ ├── common_2.png-3867a3ebc82ba5dc9bf50193335e7b5b.md5
│ │ ├── icon.png-487276ed1e3a0c39cad0279d744ee560.stex
│ │ ├── common.png-3543577bad7c2a1143177a91585f6b45.stex
│ │ ├── common.png-fc73545b807a8ca949681c397ba6c0a3.stex
│ │ ├── box_00_00.png-1ad09a80834c57eebf5f61de26db59ad.stex
│ │ ├── box_00_00.png-63c61a35f75aa7aac35472ada275e323.stex
│ │ └── common_2.png-3867a3ebc82ba5dc9bf50193335e7b5b.stex
│ ├── icon.png
│ ├── ssdata
│ │ ├── common.png
│ │ ├── common_2.png
│ │ ├── box_00_00.png
│ │ ├── common.png.import
│ │ ├── common_2.png.import
│ │ ├── box_00_00.png.import
│ │ ├── sequence.ssqe
│ │ ├── effect.ssee
│ │ └── effect_checker.ssee
│ ├── basedir
│ │ ├── images
│ │ │ ├── common.png
│ │ │ └── common.png.import
│ │ ├── animes
│ │ │ └── NewEffect.ssee
│ │ └── effects
│ │ │ └── NewEffect.ssee
│ ├── default_env.tres
│ ├── start_on_ready.gd
│ ├── signal.gd
│ ├── project.godot
│ ├── texture_change.tscn
│ ├── user_data.gd
│ ├── icon.png.import
│ ├── sspj_load.tscn
│ ├── texture_change.gd
│ ├── base_dir.tscn
│ └── sspj_load.gd
├── particle_effect
│ ├── .import
│ │ ├── .gdignore
│ │ ├── icon.png-487276ed1e3a0c39cad0279d744ee560.md5
│ │ ├── ss_effect.png-9c981af3ec9dd96f0db7a11ae6881129.md5
│ │ ├── ss_effect_c.png-a21bfb164cd635521b99bf56fbbf46f3.md5
│ │ ├── icon.png-487276ed1e3a0c39cad0279d744ee560.stex
│ │ ├── ss_effect.png-9c981af3ec9dd96f0db7a11ae6881129.stex
│ │ └── ss_effect_c.png-a21bfb164cd635521b99bf56fbbf46f3.stex
│ ├── icon.png
│ ├── ParticleEffect
│ │ ├── readme.txt
│ │ ├── ss_effect.png
│ │ ├── ss_effect_c.png
│ │ ├── ss_effect.png.import
│ │ ├── ss_effect_c.png.import
│ │ ├── 029a.ssee
│ │ ├── 001d.ssee
│ │ ├── 001a.ssee
│ │ ├── 012b.ssee
│ │ └── 006a.ssee
│ ├── default_env.tres
│ ├── project.godot
│ └── icon.png.import
└── feature_test_gdextension
│ ├── signal.gd.uid
│ ├── user_data.gd.uid
│ ├── ssdata
│ ├── Mask.ssae.uid
│ ├── Mesh.ssae.uid
│ ├── Basic.ssae.uid
│ ├── BlendMode.ssae.uid
│ ├── Bounding.ssae.uid
│ ├── Effect.ssae.uid
│ ├── Instance.ssae.uid
│ ├── PartsColor.ssae.uid
│ ├── Shader.ssae.uid
│ ├── Signal.ssae.uid
│ ├── UserData.ssae.uid
│ ├── box_00_00.ssce.uid
│ ├── common.ssce.uid
│ ├── effect.ssee.uid
│ ├── v6_all.sspj.uid
│ ├── Interpolation.ssae.uid
│ ├── effect_checker.ssee.uid
│ ├── effect_test.ssae.uid
│ ├── v6_deprecated.sspj.uid
│ ├── DeprecatedFeatures.ssae.uid
│ ├── Instance_SourceAnime.ssae.uid
│ ├── common.png
│ ├── box_00_00.png
│ ├── common_2.png
│ ├── common.png.import
│ ├── common_2.png.import
│ ├── box_00_00.png.import
│ ├── sequence.ssqe
│ ├── effect.ssee
│ └── effect_checker.ssee
│ ├── sspj_load.gd.uid
│ ├── basedir
│ ├── BaseDir.sspj.uid
│ ├── animes
│ │ ├── NewEffect.ssee.uid
│ │ ├── NewAnimation.ssae.uid
│ │ └── NewEffect.ssee
│ ├── cellmaps
│ │ └── common.ssce.uid
│ ├── effects
│ │ ├── NewEffect.ssee.uid
│ │ └── NewEffect.ssee
│ └── images
│ │ ├── common.png
│ │ └── common.png.import
│ ├── start_on_ready.gd.uid
│ ├── texture_change.gd.uid
│ ├── icon.png
│ ├── default_env.tres
│ ├── start_on_ready.gd
│ ├── signal.gd
│ ├── texture_change.tscn
│ ├── project.godot
│ ├── user_data.gd
│ ├── sspj_load.tscn
│ ├── icon.png.import
│ ├── texture_change.gd
│ ├── base_dir.tscn
│ └── sspj_load.gd
├── gd_spritestudio
├── shader2def.bat
├── config.py
├── ss_container_item.cpp
├── addons
│ └── ss_importer
│ │ ├── plugin.cfg
│ │ ├── ss_importer.gd
│ │ ├── ss_importer_ssce.gd
│ │ ├── ss_importer_ssee.gd
│ │ ├── ss_importer_sspj.gd
│ │ └── ss_importer_ssae.gd
├── gd_renderer_item.cpp
├── gd_renderer_item.h
├── ss_loader_texture_impl.h
├── ss_macros.h
├── doc
│ └── classes
│ │ ├── GdResourceSsEffect.xml
│ │ ├── GdResourceSsCellMap.xml
│ │ ├── GdResourceSsPlayer.xml
│ │ ├── GdResourceSsDocument.xml
│ │ └── GdResourceSsAnimePack.xml
├── shader_alpha.h
├── shader_default.h
├── shader_alpha_add.h
├── shader_alpha_mix.h
├── shader_alpha_mul.h
├── shader_alpha_sub.h
├── shader_color_add.h
├── shader_color_mix.h
├── shader_color_mul.h
├── shader_color_sub.h
├── gd_notifier_item.cpp
├── register_types.h
├── gd_notifier_item.h
├── gd_notifier.h
├── gd_io.h
├── gd_resource_ssdocument.cpp
├── gd_resource_ssplayer.h
├── gd_resource_ssdocument.h
├── ss_loader_texture_impl.cpp
├── gd_renderer.h
├── gd_packet_sseffect.h
├── gd_packet_sscellmap.h
├── gd_packet_ssproject.h
├── gd_packet_ssanimepack.h
├── gd_packet_sseffect.cpp
├── gd_packet_sscellmap.cpp
├── gd_packet_ssproject.cpp
├── gd_resource_sseffect.cpp
├── gd_resource_sseffect.h
├── gd_packet_ssanimepack.cpp
├── gd_resource_ssplayer.cpp
├── gd_macros.h
├── gd_resource_sscellmap.h
├── ss_texture_impl.h
├── SCsub
├── ss_texture_impl.cpp
├── gd_saver_bsseffect.h
├── gd_saver_bsscellmap.h
├── gd_saver_bssproject.h
├── gd_saver_bssanimepack.h
├── ss_container.h
├── gd_resource_ssanimepack.h
├── gd_loader_sseffect.h
├── gd_loader_bsseffect.h
├── gd_loader_ssproject.h
├── gd_loader_bsscellmap.h
├── gd_loader_bssproject.h
├── gd_loader_bssanimepack.h
├── gd_loader_ssanimepack.h
├── gd_loader_sscellmap.h
├── gd_notifier.cpp
├── gd_loader_sseffect.cpp
├── gd_loader_bsseffect.cpp
├── gd_loader_ssproject.cpp
├── gd_loader_sscellmap.cpp
├── gd_loader_bsscellmap.cpp
├── gd_loader_bssproject.cpp
├── gd_loader_ssanimepack.cpp
├── ss_container_item.h
├── gd_loader_bssanimepack.cpp
├── gd_saver_bsseffect.cpp
├── gd_saver_bsscellmap.cpp
├── gd_saver_bssproject.cpp
└── gd_saver_bssanimepack.cpp
├── doc_images
└── ssnode_inspector.png
├── .gitmodules
├── scripts
├── release-windows.ps1
├── release-macos.sh
├── release-gdextension-windows.ps1
├── release-gdextension-linux.sh
├── release-gdextension-macos.sh
├── release-ios.sh
├── release-gdextension-web.sh
├── release-android.sh
├── release-gdextension-android.sh
└── release-gdextension-ios.sh
├── .github
└── actions
│ ├── setup-scons
│ └── action.yml
│ ├── setup-extension
│ └── action.yml
│ └── setup-godot
│ └── action.yml
├── misc
├── Info.ios.plist
├── Info.macos.plist
├── ccache
│ ├── osx_ccache.patch
│ └── macos_ccache.patch
├── ssplayer_godot_extension.gdextension
└── SSPlayerForGodot.ss-playersettings
└── LICENSE.txt
/examples/mesh_bone/.import/.gdignore:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/examples/feature_test/.import/.gdignore:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/examples/particle_effect/.import/.gdignore:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/signal.gd.uid:
--------------------------------------------------------------------------------
1 | uid://o10377qrscdm
2 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/user_data.gd.uid:
--------------------------------------------------------------------------------
1 | uid://5ohac202whw8
2 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/ssdata/Mask.ssae.uid:
--------------------------------------------------------------------------------
1 | uid://86dn35jmv3y8
2 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/ssdata/Mesh.ssae.uid:
--------------------------------------------------------------------------------
1 | uid://dxyx874720vik
2 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/sspj_load.gd.uid:
--------------------------------------------------------------------------------
1 | uid://cpsp2jqhkwjcw
2 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/basedir/BaseDir.sspj.uid:
--------------------------------------------------------------------------------
1 | uid://doy50jkd8i2lr
2 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/ssdata/Basic.ssae.uid:
--------------------------------------------------------------------------------
1 | uid://cnwgceor3xt8u
2 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/ssdata/BlendMode.ssae.uid:
--------------------------------------------------------------------------------
1 | uid://cl50klui3wnof
2 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/ssdata/Bounding.ssae.uid:
--------------------------------------------------------------------------------
1 | uid://r2dccky8uevc
2 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/ssdata/Effect.ssae.uid:
--------------------------------------------------------------------------------
1 | uid://digcourrfmk3x
2 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/ssdata/Instance.ssae.uid:
--------------------------------------------------------------------------------
1 | uid://dqrpxauyfjpob
2 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/ssdata/PartsColor.ssae.uid:
--------------------------------------------------------------------------------
1 | uid://560teujycltc
2 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/ssdata/Shader.ssae.uid:
--------------------------------------------------------------------------------
1 | uid://ci4ytnflsxf2f
2 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/ssdata/Signal.ssae.uid:
--------------------------------------------------------------------------------
1 | uid://bkxqwyf5ohu50
2 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/ssdata/UserData.ssae.uid:
--------------------------------------------------------------------------------
1 | uid://cog3yoo18xi5c
2 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/ssdata/box_00_00.ssce.uid:
--------------------------------------------------------------------------------
1 | uid://ce4jotsiauiw3
2 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/ssdata/common.ssce.uid:
--------------------------------------------------------------------------------
1 | uid://bq11secvgo662
2 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/ssdata/effect.ssee.uid:
--------------------------------------------------------------------------------
1 | uid://ckea63jp5k62c
2 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/ssdata/v6_all.sspj.uid:
--------------------------------------------------------------------------------
1 | uid://muiwihuggkjw
2 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/start_on_ready.gd.uid:
--------------------------------------------------------------------------------
1 | uid://dsxhdr615hpbk
2 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/texture_change.gd.uid:
--------------------------------------------------------------------------------
1 | uid://c2gyfjitsx44k
2 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/ssdata/Interpolation.ssae.uid:
--------------------------------------------------------------------------------
1 | uid://dv3aucihmkhfb
2 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/ssdata/effect_checker.ssee.uid:
--------------------------------------------------------------------------------
1 | uid://cny8c1jkj2drg
2 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/ssdata/effect_test.ssae.uid:
--------------------------------------------------------------------------------
1 | uid://cuw4vf5inyp3j
2 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/ssdata/v6_deprecated.sspj.uid:
--------------------------------------------------------------------------------
1 | uid://d5k1xrhfb132
2 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/basedir/animes/NewEffect.ssee.uid:
--------------------------------------------------------------------------------
1 | uid://cu0v2tx4h4cin
2 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/basedir/cellmaps/common.ssce.uid:
--------------------------------------------------------------------------------
1 | uid://befiue78bgaah
2 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/basedir/effects/NewEffect.ssee.uid:
--------------------------------------------------------------------------------
1 | uid://cx706e1ufvdgw
2 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/ssdata/DeprecatedFeatures.ssae.uid:
--------------------------------------------------------------------------------
1 | uid://q6tlinmfv0xt
2 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/ssdata/Instance_SourceAnime.ssae.uid:
--------------------------------------------------------------------------------
1 | uid://sx320sopiyn4
2 |
--------------------------------------------------------------------------------
/gd_spritestudio/shader2def.bat:
--------------------------------------------------------------------------------
1 | for %%i in (*.gdshader) do call argstr.exe -c String %%i
2 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/basedir/animes/NewAnimation.ssae.uid:
--------------------------------------------------------------------------------
1 | uid://c0e8om831gjvf
2 |
--------------------------------------------------------------------------------
/examples/mesh_bone/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SpriteStudio/SSPlayerForGodot/HEAD/examples/mesh_bone/icon.png
--------------------------------------------------------------------------------
/doc_images/ssnode_inspector.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SpriteStudio/SSPlayerForGodot/HEAD/doc_images/ssnode_inspector.png
--------------------------------------------------------------------------------
/examples/feature_test/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SpriteStudio/SSPlayerForGodot/HEAD/examples/feature_test/icon.png
--------------------------------------------------------------------------------
/examples/particle_effect/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SpriteStudio/SSPlayerForGodot/HEAD/examples/particle_effect/icon.png
--------------------------------------------------------------------------------
/examples/feature_test/ssdata/common.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SpriteStudio/SSPlayerForGodot/HEAD/examples/feature_test/ssdata/common.png
--------------------------------------------------------------------------------
/examples/mesh_bone/MeshBone/Effect.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SpriteStudio/SSPlayerForGodot/HEAD/examples/mesh_bone/MeshBone/Effect.png
--------------------------------------------------------------------------------
/examples/mesh_bone/MeshBone/Knight.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SpriteStudio/SSPlayerForGodot/HEAD/examples/mesh_bone/MeshBone/Knight.png
--------------------------------------------------------------------------------
/examples/mesh_bone/MeshBone/readme.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SpriteStudio/SSPlayerForGodot/HEAD/examples/mesh_bone/MeshBone/readme.txt
--------------------------------------------------------------------------------
/gd_spritestudio/config.py:
--------------------------------------------------------------------------------
1 | # config.py
2 |
3 | def can_build(env, platform):
4 | return True
5 |
6 | def configure(env):
7 | pass
8 |
--------------------------------------------------------------------------------
/examples/feature_test/ssdata/common_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SpriteStudio/SSPlayerForGodot/HEAD/examples/feature_test/ssdata/common_2.png
--------------------------------------------------------------------------------
/examples/feature_test/ssdata/box_00_00.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SpriteStudio/SSPlayerForGodot/HEAD/examples/feature_test/ssdata/box_00_00.png
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SpriteStudio/SSPlayerForGodot/HEAD/examples/feature_test_gdextension/icon.png
--------------------------------------------------------------------------------
/examples/feature_test/basedir/images/common.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SpriteStudio/SSPlayerForGodot/HEAD/examples/feature_test/basedir/images/common.png
--------------------------------------------------------------------------------
/gd_spritestudio/ss_container_item.cpp:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file ss_container_item.cpp
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #include "ss_container_item.h"
6 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/ssdata/common.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SpriteStudio/SSPlayerForGodot/HEAD/examples/feature_test_gdextension/ssdata/common.png
--------------------------------------------------------------------------------
/examples/particle_effect/ParticleEffect/readme.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SpriteStudio/SSPlayerForGodot/HEAD/examples/particle_effect/ParticleEffect/readme.txt
--------------------------------------------------------------------------------
/gd_spritestudio/addons/ss_importer/plugin.cfg:
--------------------------------------------------------------------------------
1 | [plugin]
2 |
3 | name="ss_importer"
4 | description=""
5 | author="ss"
6 | version="1"
7 | script="ss_importer.gd"
8 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/ssdata/box_00_00.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SpriteStudio/SSPlayerForGodot/HEAD/examples/feature_test_gdextension/ssdata/box_00_00.png
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/ssdata/common_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SpriteStudio/SSPlayerForGodot/HEAD/examples/feature_test_gdextension/ssdata/common_2.png
--------------------------------------------------------------------------------
/examples/particle_effect/ParticleEffect/ss_effect.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SpriteStudio/SSPlayerForGodot/HEAD/examples/particle_effect/ParticleEffect/ss_effect.png
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "gd_spritestudio/SpriteStudio6-SDK"]
2 | path = gd_spritestudio/SpriteStudio6-SDK
3 | url = https://github.com/SpriteStudio/SpriteStudio6-SDK.git
4 |
--------------------------------------------------------------------------------
/examples/feature_test/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.md5:
--------------------------------------------------------------------------------
1 | source_md5="47313fa4c47a9963fddd764e1ec6e4a8"
2 | dest_md5="26ea799ea0a3da9e753b3ebe822e0570"
3 |
4 |
--------------------------------------------------------------------------------
/examples/mesh_bone/.import/Effect.png-d03c4278de8b7d363a9353f9c8de5804.md5:
--------------------------------------------------------------------------------
1 | source_md5="6e2ba12921798af921858550c29e10d9"
2 | dest_md5="f2f362b5e84fa2c2b3c915e00fe9d1b0"
3 |
4 |
--------------------------------------------------------------------------------
/examples/mesh_bone/.import/Knight.png-49400efa8b7f46aa9473bbf67dc7459d.md5:
--------------------------------------------------------------------------------
1 | source_md5="ec3e8a1c50f0f1adc8b3749c484e3bda"
2 | dest_md5="5359c1e3e89cca5b5c5f43c7f12e250e"
3 |
4 |
--------------------------------------------------------------------------------
/examples/mesh_bone/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.md5:
--------------------------------------------------------------------------------
1 | source_md5="47313fa4c47a9963fddd764e1ec6e4a8"
2 | dest_md5="26ea799ea0a3da9e753b3ebe822e0570"
3 |
4 |
--------------------------------------------------------------------------------
/examples/particle_effect/ParticleEffect/ss_effect_c.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SpriteStudio/SSPlayerForGodot/HEAD/examples/particle_effect/ParticleEffect/ss_effect_c.png
--------------------------------------------------------------------------------
/examples/feature_test/.import/box_00_00.png-1ad09a80834c57eebf5f61de26db59ad.md5:
--------------------------------------------------------------------------------
1 | source_md5="d42cc602d24dc51a79b0ada9e8ef2f2f"
2 | dest_md5="f16bbc1f4d0c88b54dbf083fabf811c5"
3 |
4 |
--------------------------------------------------------------------------------
/examples/feature_test/.import/box_00_00.png-63c61a35f75aa7aac35472ada275e323.md5:
--------------------------------------------------------------------------------
1 | source_md5="d42cc602d24dc51a79b0ada9e8ef2f2f"
2 | dest_md5="f16bbc1f4d0c88b54dbf083fabf811c5"
3 |
4 |
--------------------------------------------------------------------------------
/examples/feature_test/.import/common.png-3543577bad7c2a1143177a91585f6b45.md5:
--------------------------------------------------------------------------------
1 | source_md5="1556b5407a5fc4804f0748d33f53d3ef"
2 | dest_md5="1521311a0c5dd9f0941a43430d76c358"
3 |
4 |
--------------------------------------------------------------------------------
/examples/feature_test/.import/common.png-fc73545b807a8ca949681c397ba6c0a3.md5:
--------------------------------------------------------------------------------
1 | source_md5="1556b5407a5fc4804f0748d33f53d3ef"
2 | dest_md5="1521311a0c5dd9f0941a43430d76c358"
3 |
4 |
--------------------------------------------------------------------------------
/examples/feature_test/.import/common_2.png-3867a3ebc82ba5dc9bf50193335e7b5b.md5:
--------------------------------------------------------------------------------
1 | source_md5="265de4ff2e883b869d742b3b9cf5d5d2"
2 | dest_md5="e94fcacedef84d0287055a2ce7322c92"
3 |
4 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/basedir/images/common.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SpriteStudio/SSPlayerForGodot/HEAD/examples/feature_test_gdextension/basedir/images/common.png
--------------------------------------------------------------------------------
/examples/particle_effect/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.md5:
--------------------------------------------------------------------------------
1 | source_md5="47313fa4c47a9963fddd764e1ec6e4a8"
2 | dest_md5="26ea799ea0a3da9e753b3ebe822e0570"
3 |
4 |
--------------------------------------------------------------------------------
/examples/particle_effect/.import/ss_effect.png-9c981af3ec9dd96f0db7a11ae6881129.md5:
--------------------------------------------------------------------------------
1 | source_md5="d4aa66f0d56dfe67fc81166a5086968f"
2 | dest_md5="a0a261dbdfb11884a7b0816942e420aa"
3 |
4 |
--------------------------------------------------------------------------------
/examples/particle_effect/.import/ss_effect_c.png-a21bfb164cd635521b99bf56fbbf46f3.md5:
--------------------------------------------------------------------------------
1 | source_md5="17f71e40c15b42bbdf19d10b65997b81"
2 | dest_md5="88d5f8035d397d09dcfa32cf7e644f3e"
3 |
4 |
--------------------------------------------------------------------------------
/examples/mesh_bone/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SpriteStudio/SSPlayerForGodot/HEAD/examples/mesh_bone/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex
--------------------------------------------------------------------------------
/examples/feature_test/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SpriteStudio/SSPlayerForGodot/HEAD/examples/feature_test/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex
--------------------------------------------------------------------------------
/examples/mesh_bone/.import/Effect.png-d03c4278de8b7d363a9353f9c8de5804.stex:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SpriteStudio/SSPlayerForGodot/HEAD/examples/mesh_bone/.import/Effect.png-d03c4278de8b7d363a9353f9c8de5804.stex
--------------------------------------------------------------------------------
/examples/mesh_bone/.import/Knight.png-49400efa8b7f46aa9473bbf67dc7459d.stex:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SpriteStudio/SSPlayerForGodot/HEAD/examples/mesh_bone/.import/Knight.png-49400efa8b7f46aa9473bbf67dc7459d.stex
--------------------------------------------------------------------------------
/examples/feature_test/.import/common.png-3543577bad7c2a1143177a91585f6b45.stex:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SpriteStudio/SSPlayerForGodot/HEAD/examples/feature_test/.import/common.png-3543577bad7c2a1143177a91585f6b45.stex
--------------------------------------------------------------------------------
/examples/feature_test/.import/common.png-fc73545b807a8ca949681c397ba6c0a3.stex:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SpriteStudio/SSPlayerForGodot/HEAD/examples/feature_test/.import/common.png-fc73545b807a8ca949681c397ba6c0a3.stex
--------------------------------------------------------------------------------
/examples/particle_effect/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SpriteStudio/SSPlayerForGodot/HEAD/examples/particle_effect/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex
--------------------------------------------------------------------------------
/examples/feature_test/.import/box_00_00.png-1ad09a80834c57eebf5f61de26db59ad.stex:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SpriteStudio/SSPlayerForGodot/HEAD/examples/feature_test/.import/box_00_00.png-1ad09a80834c57eebf5f61de26db59ad.stex
--------------------------------------------------------------------------------
/examples/feature_test/.import/box_00_00.png-63c61a35f75aa7aac35472ada275e323.stex:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SpriteStudio/SSPlayerForGodot/HEAD/examples/feature_test/.import/box_00_00.png-63c61a35f75aa7aac35472ada275e323.stex
--------------------------------------------------------------------------------
/examples/feature_test/.import/common_2.png-3867a3ebc82ba5dc9bf50193335e7b5b.stex:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SpriteStudio/SSPlayerForGodot/HEAD/examples/feature_test/.import/common_2.png-3867a3ebc82ba5dc9bf50193335e7b5b.stex
--------------------------------------------------------------------------------
/examples/mesh_bone/default_env.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="Environment" load_steps=2 format=2]
2 |
3 | [sub_resource type="ProceduralSky" id=1]
4 |
5 | [resource]
6 | background_mode = 2
7 | background_sky = SubResource( 1 )
8 |
--------------------------------------------------------------------------------
/examples/feature_test/default_env.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="Environment" load_steps=2 format=2]
2 |
3 | [sub_resource type="ProceduralSky" id=1]
4 |
5 | [resource]
6 | background_mode = 2
7 | background_sky = SubResource( 1 )
8 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/default_env.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="Environment" load_steps=2 format=2]
2 |
3 | [sub_resource type="Sky" id=1]
4 |
5 | [resource]
6 | background_mode = 2
7 | background_sky = SubResource( 1 )
8 |
--------------------------------------------------------------------------------
/examples/particle_effect/.import/ss_effect.png-9c981af3ec9dd96f0db7a11ae6881129.stex:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SpriteStudio/SSPlayerForGodot/HEAD/examples/particle_effect/.import/ss_effect.png-9c981af3ec9dd96f0db7a11ae6881129.stex
--------------------------------------------------------------------------------
/examples/particle_effect/default_env.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="Environment" load_steps=2 format=2]
2 |
3 | [sub_resource type="ProceduralSky" id=1]
4 |
5 | [resource]
6 | background_mode = 2
7 | background_sky = SubResource( 1 )
8 |
--------------------------------------------------------------------------------
/examples/particle_effect/.import/ss_effect_c.png-a21bfb164cd635521b99bf56fbbf46f3.stex:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SpriteStudio/SSPlayerForGodot/HEAD/examples/particle_effect/.import/ss_effect_c.png-a21bfb164cd635521b99bf56fbbf46f3.stex
--------------------------------------------------------------------------------
/gd_spritestudio/gd_renderer_item.cpp:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_renderer_item.cpp
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #include "gd_renderer_item.h"
6 |
7 | GdRendererItem::GdRendererItem()
8 | {
9 | }
10 |
11 | GdRendererItem::~GdRendererItem()
12 | {
13 | }
14 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_renderer_item.h:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_renderer_item.h
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #ifndef GD_RENDERER_ITEM_H
6 | #define GD_RENDERER_ITEM_H
7 |
8 | class GdRendererItem
9 | {
10 | public :
11 | GdRendererItem();
12 | virtual ~GdRendererItem();
13 | };
14 |
15 | #endif // GD_RENDERER_ITEM_H
16 |
--------------------------------------------------------------------------------
/gd_spritestudio/ss_loader_texture_impl.h:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file ss_loader_texture_impl.h
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #ifndef SS_LOADER_TEXTURE_IMPL_H
6 | #define SS_LOADER_TEXTURE_IMPL_H
7 |
8 | class SsLoaderTextureImpl
9 | {
10 | public :
11 | static void setCallbacks();
12 | };
13 |
14 | #endif // SS_LOADER_TEXTURE_IMPL_H
15 |
--------------------------------------------------------------------------------
/gd_spritestudio/ss_macros.h:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file ss_macros.h
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #ifndef SS_MACROS_H
6 | #define SS_MACROS_H
7 |
8 | #define SsSdkNameSpace spritestudio6
9 | #define SsSdkBegin namespace SsSdkNameSpace {
10 | #define SsSdkEnd }
11 | #define SsSdkUsing using namespace ::SsSdkNameSpace;
12 |
13 | #endif // SS_MACROS_H
14 |
--------------------------------------------------------------------------------
/scripts/release-windows.ps1:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env pwsh
2 |
3 | $baseDirectory = Split-Path -Parent $PSCommandPath
4 | $rootDirectory = Split-Path -Parent $baseDirectory
5 | $arch = (Get-Item Env:PROCESSOR_ARCHITECTURE).Value
6 |
7 | pushd $rootDirectory
8 |
9 | $targets= "editor", "template_release", "template_debug"
10 | foreach($target in $targets) {
11 | ./scripts/build.ps1 platform=windows compiledb=no strip=yes target=${target}
12 | }
13 |
14 | popd
--------------------------------------------------------------------------------
/examples/feature_test/start_on_ready.gd:
--------------------------------------------------------------------------------
1 | extends GdNodeSsPlayer
2 |
3 |
4 | # Declare member variables here. Examples:
5 | # var a = 2
6 | # var b = "text"
7 |
8 |
9 | # Called when the node enters the scene tree for the first time.
10 | func _ready():
11 | self.set_frame(0)
12 | self.set_loop(true)
13 | self.set_play(true)
14 |
15 | # Called every frame. 'delta' is the elapsed time since the previous frame.
16 | #func _process(delta):
17 | # pass
18 |
--------------------------------------------------------------------------------
/gd_spritestudio/doc/classes/GdResourceSsEffect.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/start_on_ready.gd:
--------------------------------------------------------------------------------
1 | extends GdNodeSsPlayer
2 |
3 |
4 | # Declare member variables here. Examples:
5 | # var a = 2
6 | # var b = "text"
7 |
8 |
9 | # Called when the node enters the scene tree for the first time.
10 | func _ready():
11 | self.set_frame(0)
12 | self.set_loop(true)
13 | self.set_play(true)
14 |
15 | # Called every frame. 'delta' is the elapsed time since the previous frame.
16 | #func _process(delta):
17 | # pass
18 |
--------------------------------------------------------------------------------
/scripts/release-macos.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env zsh
2 | set -e
3 |
4 | BASEDIR=$(dirname $0)
5 | BASEDIR=$(cd $BASEDIR && pwd -P)
6 | ROOTDIR=${BASEDIR}/..
7 | ROOTDIR=$(cd $ROOTDIR && pwd -P)
8 |
9 | pushd ${ROOTDIR} > /dev/null
10 |
11 | targets=("editor" "template_release" "template_debug")
12 | for target in ${targets[@]}; do
13 | scripts/build.sh platform=macos arch=universal compiledb=no strip=yes target=${target}
14 | done
15 |
16 | popd > /dev/null # ${ROOTDIR}
17 |
--------------------------------------------------------------------------------
/scripts/release-gdextension-windows.ps1:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env pwsh
2 |
3 | $baseDirectory = Split-Path -Parent $PSCommandPath
4 | $rootDirectory = Split-Path -Parent $baseDirectory
5 | $arch = (Get-Item Env:PROCESSOR_ARCHITECTURE).Value
6 |
7 | pushd $rootDirectory
8 |
9 | $targets= "editor", "template_release", "template_debug"
10 | foreach($target in $targets) {
11 | ./scripts/build-extension.ps1 platform=windows compiledb=no strip=yes target=${target}
12 | }
13 |
14 | popd
--------------------------------------------------------------------------------
/scripts/release-gdextension-linux.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env zsh
2 | set -e
3 |
4 | BASEDIR=$(dirname $0)
5 | BASEDIR=$(cd $BASEDIR && pwd -P)
6 | ROOTDIR=${BASEDIR}/..
7 | ROOTDIR=$(cd $ROOTDIR && pwd -P)
8 |
9 | pushd ${ROOTDIR} > /dev/null
10 |
11 | targets=("editor" "template_release" "template_debug")
12 | for target in ${targets[@]}; do
13 | scripts/build-extension.sh platform=linux compiledb=no strip=yes target=${target}
14 | done
15 |
16 | popd > /dev/null # ${ROOTDIR}
17 |
--------------------------------------------------------------------------------
/.github/actions/setup-scons/action.yml:
--------------------------------------------------------------------------------
1 | name: Setup scons
2 | description: Setup build dependencies for godot-cpp.
3 |
4 | runs:
5 | using: composite
6 | steps:
7 | - name: Setup Python (for SCons)
8 | uses: actions/setup-python@v5
9 | with:
10 | python-version: 3.x
11 |
12 | - name: Setup SCons
13 | shell: bash
14 | run: |
15 | python -c "import sys; print(sys.version)"
16 | python -m pip install --upgrade pip
17 | python -m pip install scons
18 | scons --version
19 |
--------------------------------------------------------------------------------
/examples/mesh_bone/mesh_bone.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=3 format=2]
2 |
3 | [ext_resource path="res://MeshBone/knight.sspj" type="GdResourceSsProject" id=1]
4 |
5 | [sub_resource type="GdResourceSsPlayer" id=1]
6 | res_project = ExtResource( 1 )
7 |
8 | [node name="Node" type="Node"]
9 |
10 | [node name="GdNodeSsPlayer" type="GdNodeSsPlayer" parent="."]
11 | position = Vector2( 607, 503 )
12 | res_player = SubResource( 1 )
13 | anime_pack = "Knight_arrow.ssae"
14 | animation = "Arrow_Attack"
15 | frame = 53
16 | loop = true
17 | playing = true
18 | texture_interpolate = true
19 |
--------------------------------------------------------------------------------
/scripts/release-gdextension-macos.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env zsh
2 | set -e
3 |
4 | BASEDIR=$(dirname $0)
5 | BASEDIR=$(cd $BASEDIR && pwd -P)
6 | ROOTDIR=${BASEDIR}/..
7 | ROOTDIR=$(cd $ROOTDIR && pwd -P)
8 |
9 | pushd ${ROOTDIR} > /dev/null
10 | BINDIR=$(pwd)/bin/macos
11 | /bin/rm -rf ${BINDIR}
12 | targets=("editor" "template_release" "template_debug")
13 | for target in ${targets[@]}; do
14 | scripts/build-extension.sh platform=macos arch=universal compiledb=no strip=yes target=${target}
15 | done
16 | /bin/rm -rf bin/macos/macos.framework
17 |
18 | popd > /dev/null # ${ROOTDIR}
19 |
--------------------------------------------------------------------------------
/scripts/release-ios.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env zsh
2 | set -e
3 |
4 | BASEDIR=$(dirname $0)
5 | BASEDIR=$(cd $BASEDIR && pwd -P)
6 | ROOTDIR=${BASEDIR}/..
7 | ROOTDIR=$(cd $ROOTDIR && pwd -P)
8 |
9 | pushd ${ROOTDIR} > /dev/null
10 |
11 | targets=("editor" "template_release" "template_debug")
12 | for target in ${targets[@]}; do
13 | scripts/build.sh platform=ios arch=arm64 compiledb=no strip=yes target=${target} ios_simulator=no
14 | scripts/build.sh platform=ios arch=universal compiledb=no strip=yes target=${target} ios_simulator=yes
15 | done
16 |
17 | popd > /dev/null # ${ROOTDIR}
18 |
--------------------------------------------------------------------------------
/gd_spritestudio/doc/classes/GdResourceSsCellMap.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/examples/feature_test/signal.gd:
--------------------------------------------------------------------------------
1 | extends GdNodeSsPlayer
2 |
3 |
4 | # Declare member variables here. Examples:
5 | # var a = 2
6 | # var b = "text"
7 |
8 |
9 | # Called when the node enters the scene tree for the first time.
10 | func _ready():
11 | pass # Replace with function body.
12 |
13 |
14 | # Called every frame. 'delta' is the elapsed time since the previous frame.
15 | #func _process(delta):
16 | # pass
17 |
18 |
19 | func _on_Signal_signal(command, value):
20 | pass # Replace with function body.
21 | print("on_signal()")
22 | print("command=" + command)
23 | print("value=" + str(value))
24 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/signal.gd:
--------------------------------------------------------------------------------
1 | extends GdNodeSsPlayer
2 |
3 |
4 | # Declare member variables here. Examples:
5 | # var a = 2
6 | # var b = "text"
7 |
8 |
9 | # Called when the node enters the scene tree for the first time.
10 | func _ready():
11 | pass # Replace with function body.
12 |
13 |
14 | # Called every frame. 'delta' is the elapsed time since the previous frame.
15 | #func _process(delta):
16 | # pass
17 |
18 |
19 | func _on_Signal_signal(command, value):
20 | pass # Replace with function body.
21 | print("on_signal()")
22 | print("command=" + command)
23 | print("value=" + str(value))
24 |
--------------------------------------------------------------------------------
/gd_spritestudio/shader_alpha.h:
--------------------------------------------------------------------------------
1 | static const char* shader_alpha = R"(
2 | /*!
3 | * \file shader_alpha.gdshader
4 | * \author CRI Middleware Co., Ltd.
5 | */
6 | shader_type canvas_item;
7 |
8 | uniform float src_ratio;
9 | uniform float dst_ratio;
10 | uniform float dst_src_ratio;
11 |
12 | uniform sampler2D color;
13 | uniform sampler2D alpha;
14 |
15 | vec4 getBlendColor( vec4 c, vec4 p )
16 | {
17 | return vec4( p.rgb * src_ratio + mix( vec3( 1.0 ), p.rgb, dst_src_ratio ) * c.rgb * dst_ratio, p.a * c.a );
18 | }
19 |
20 | void fragment()
21 | {
22 | COLOR = getBlendColor( COLOR, texture( TEXTURE, UV ) );
23 | }
24 | )";
25 |
--------------------------------------------------------------------------------
/scripts/release-gdextension-web.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env zsh
2 | set -e
3 |
4 | BASEDIR=$(dirname $0)
5 | BASEDIR=$(cd $BASEDIR && pwd -P)
6 | ROOTDIR=${BASEDIR}/..
7 | ROOTDIR=$(cd $ROOTDIR && pwd -P)
8 |
9 | pushd ${ROOTDIR} > /dev/null
10 | BINDIR=$(pwd)/bin/web
11 | /bin/rm -rf ${BINDIR}
12 | targets=("template_release" "template_debug")
13 | for target in ${targets[@]}; do
14 | scripts/build-extension.sh platform=web arch=wasm32 compiledb=no strip=yes target=${target}
15 | scripts/build-extension.sh platform=web arch=wasm32 compiledb=no strip=yes target=${target} threads=no
16 | done
17 |
18 | popd > /dev/null # ${ROOTDIR}
19 |
--------------------------------------------------------------------------------
/gd_spritestudio/doc/classes/GdResourceSsPlayer.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/gd_spritestudio/shader_default.h:
--------------------------------------------------------------------------------
1 | static const char* shader_default = R"(
2 | /*!
3 | * \file shader_default.gdshader
4 | * \author CRI Middleware Co., Ltd.
5 | */
6 | shader_type canvas_item;
7 |
8 | uniform float src_ratio;
9 | uniform float dst_ratio;
10 | uniform float dst_src_ratio;
11 |
12 | uniform sampler2D color;
13 | uniform sampler2D alpha;
14 |
15 | vec4 getBlendColor( vec4 c, vec4 p )
16 | {
17 | return vec4( p.rgb * src_ratio + mix( vec3( 1.0 ), p.rgb, dst_src_ratio ) * c.rgb * dst_ratio, p.a * c.a );
18 | }
19 |
20 | void fragment()
21 | {
22 | COLOR = getBlendColor( COLOR, texture( TEXTURE, UV ) );
23 | }
24 | )";
25 |
--------------------------------------------------------------------------------
/scripts/release-android.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env zsh
2 | set -e
3 |
4 | BASEDIR=$(dirname $0)
5 | BASEDIR=$(cd $BASEDIR && pwd -P)
6 | ROOTDIR=${BASEDIR}/..
7 | ROOTDIR=$(cd $ROOTDIR && pwd -P)
8 |
9 | pushd ${ROOTDIR} > /dev/null
10 |
11 | targets=("editor" "template_release" "template_debug")
12 | for target in ${targets[@]}; do
13 | scripts/build.sh platform=android arch=arm32 compiledb=no strip=yes target=${target}
14 | scripts/build.sh platform=android arch=arm64 compiledb=no strip=yes target=${target}
15 | scripts/build.sh platform=android arch=x86_64 compiledb=no strip=yes target=${target}
16 | done
17 |
18 | popd > /dev/null # ${ROOTDIR}
19 |
--------------------------------------------------------------------------------
/gd_spritestudio/shader_alpha_add.h:
--------------------------------------------------------------------------------
1 | static const char* shader_alpha_add = R"(
2 | /*!
3 | * \file shader_alpha_add.gdshader
4 | * \author CRI Middleware Co., Ltd.
5 | */
6 | shader_type canvas_item;
7 | render_mode blend_add;
8 |
9 | uniform float src_ratio;
10 | uniform float dst_ratio;
11 | uniform float dst_src_ratio;
12 |
13 | uniform sampler2D color;
14 | uniform sampler2D alpha;
15 |
16 | vec4 getBlendColor( vec4 c, vec4 p )
17 | {
18 | return vec4( p.rgb * src_ratio + mix( vec3( 1.0 ), p.rgb, dst_src_ratio ) * c.rgb * dst_ratio, p.a * c.a );
19 | }
20 |
21 | void fragment()
22 | {
23 | COLOR = getBlendColor( COLOR, texture( TEXTURE, UV ) );
24 | }
25 | )";
26 |
--------------------------------------------------------------------------------
/gd_spritestudio/shader_alpha_mix.h:
--------------------------------------------------------------------------------
1 | static const char* shader_alpha_mix = R"(
2 | /*!
3 | * \file shader_alpha_mix.gdshader
4 | * \author CRI Middleware Co., Ltd.
5 | */
6 | shader_type canvas_item;
7 | render_mode blend_mix;
8 |
9 | uniform float src_ratio;
10 | uniform float dst_ratio;
11 | uniform float dst_src_ratio;
12 |
13 | uniform sampler2D color;
14 | uniform sampler2D alpha;
15 |
16 | vec4 getBlendColor( vec4 c, vec4 p )
17 | {
18 | return vec4( p.rgb * src_ratio + mix( vec3( 1.0 ), p.rgb, dst_src_ratio ) * c.rgb * dst_ratio, p.a * c.a );
19 | }
20 |
21 | void fragment()
22 | {
23 | COLOR = getBlendColor( COLOR, texture( TEXTURE, UV ) );
24 | }
25 | )";
26 |
--------------------------------------------------------------------------------
/gd_spritestudio/shader_alpha_mul.h:
--------------------------------------------------------------------------------
1 | static const char* shader_alpha_mul = R"(
2 | /*!
3 | * \file shader_alpha_mul.gdshader
4 | * \author CRI Middleware Co., Ltd.
5 | */
6 | shader_type canvas_item;
7 | render_mode blend_mul;
8 |
9 | uniform float src_ratio;
10 | uniform float dst_ratio;
11 | uniform float dst_src_ratio;
12 |
13 | uniform sampler2D color;
14 | uniform sampler2D alpha;
15 |
16 | vec4 getBlendColor( vec4 c, vec4 p )
17 | {
18 | return vec4( p.rgb * src_ratio + mix( vec3( 1.0 ), p.rgb, dst_src_ratio ) * c.rgb * dst_ratio, p.a * c.a );
19 | }
20 |
21 | void fragment()
22 | {
23 | COLOR = getBlendColor( COLOR, texture( TEXTURE, UV ) );
24 | }
25 | )";
26 |
--------------------------------------------------------------------------------
/gd_spritestudio/shader_alpha_sub.h:
--------------------------------------------------------------------------------
1 | static const char* shader_alpha_sub = R"(
2 | /*!
3 | * \file shader_alpha_sub.gdshader
4 | * \author CRI Middleware Co., Ltd.
5 | */
6 | shader_type canvas_item;
7 | render_mode blend_sub;
8 |
9 | uniform float src_ratio;
10 | uniform float dst_ratio;
11 | uniform float dst_src_ratio;
12 |
13 | uniform sampler2D color;
14 | uniform sampler2D alpha;
15 |
16 | vec4 getBlendColor( vec4 c, vec4 p )
17 | {
18 | return vec4( p.rgb * src_ratio + mix( vec3( 1.0 ), p.rgb, dst_src_ratio ) * c.rgb * dst_ratio, p.a * c.a );
19 | }
20 |
21 | void fragment()
22 | {
23 | COLOR = getBlendColor( COLOR, texture( TEXTURE, UV ) );
24 | }
25 | )";
26 |
--------------------------------------------------------------------------------
/gd_spritestudio/shader_color_add.h:
--------------------------------------------------------------------------------
1 | static const char* shader_color_add = R"(
2 | /*!
3 | * \file shader_color_add.gdshader
4 | * \author CRI Middleware Co., Ltd.
5 | */
6 | shader_type canvas_item;
7 | render_mode blend_add;
8 |
9 | uniform float src_ratio;
10 | uniform float dst_ratio;
11 | uniform float dst_src_ratio;
12 |
13 | uniform sampler2D color;
14 | uniform sampler2D alpha;
15 |
16 | vec4 getBlendColor( vec4 c, vec4 p )
17 | {
18 | return vec4( p.rgb * src_ratio + mix( vec3( 1.0 ), p.rgb, dst_src_ratio ) * c.rgb * dst_ratio, p.a * c.a );
19 | }
20 |
21 | void fragment()
22 | {
23 | COLOR = getBlendColor( COLOR, texture( TEXTURE, UV ) );
24 | }
25 | )";
26 |
--------------------------------------------------------------------------------
/gd_spritestudio/shader_color_mix.h:
--------------------------------------------------------------------------------
1 | static const char* shader_color_mix = R"(
2 | /*!
3 | * \file shader_color_mix.gdshader
4 | * \author CRI Middleware Co., Ltd.
5 | */
6 | shader_type canvas_item;
7 | render_mode blend_mix;
8 |
9 | uniform float src_ratio;
10 | uniform float dst_ratio;
11 | uniform float dst_src_ratio;
12 |
13 | uniform sampler2D color;
14 | uniform sampler2D alpha;
15 |
16 | vec4 getBlendColor( vec4 c, vec4 p )
17 | {
18 | return vec4( p.rgb * src_ratio + mix( vec3( 1.0 ), p.rgb, dst_src_ratio ) * c.rgb * dst_ratio, p.a * c.a );
19 | }
20 |
21 | void fragment()
22 | {
23 | COLOR = getBlendColor( COLOR, texture( TEXTURE, UV ) );
24 | }
25 | )";
26 |
--------------------------------------------------------------------------------
/gd_spritestudio/shader_color_mul.h:
--------------------------------------------------------------------------------
1 | static const char* shader_color_mul = R"(
2 | /*!
3 | * \file shader_color_mul.gdshader
4 | * \author CRI Middleware Co., Ltd.
5 | */
6 | shader_type canvas_item;
7 | render_mode blend_mul;
8 |
9 | uniform float src_ratio;
10 | uniform float dst_ratio;
11 | uniform float dst_src_ratio;
12 |
13 | uniform sampler2D color;
14 | uniform sampler2D alpha;
15 |
16 | vec4 getBlendColor( vec4 c, vec4 p )
17 | {
18 | return vec4( p.rgb * src_ratio + mix( vec3( 1.0 ), p.rgb, dst_src_ratio ) * c.rgb * dst_ratio, p.a * c.a );
19 | }
20 |
21 | void fragment()
22 | {
23 | COLOR = getBlendColor( COLOR, texture( TEXTURE, UV ) );
24 | }
25 | )";
26 |
--------------------------------------------------------------------------------
/gd_spritestudio/shader_color_sub.h:
--------------------------------------------------------------------------------
1 | static const char* shader_color_sub = R"(
2 | /*!
3 | * \file shader_color_sub.gdshader
4 | * \author CRI Middleware Co., Ltd.
5 | */
6 | shader_type canvas_item;
7 | render_mode blend_sub;
8 |
9 | uniform float src_ratio;
10 | uniform float dst_ratio;
11 | uniform float dst_src_ratio;
12 |
13 | uniform sampler2D color;
14 | uniform sampler2D alpha;
15 |
16 | vec4 getBlendColor( vec4 c, vec4 p )
17 | {
18 | return vec4( p.rgb * src_ratio + mix( vec3( 1.0 ), p.rgb, dst_src_ratio ) * c.rgb * dst_ratio, p.a * c.a );
19 | }
20 |
21 | void fragment()
22 | {
23 | COLOR = getBlendColor( COLOR, texture( TEXTURE, UV ) );
24 | }
25 | )";
26 |
--------------------------------------------------------------------------------
/examples/mesh_bone/project.godot:
--------------------------------------------------------------------------------
1 | ; Engine configuration file.
2 | ; It's best edited using the editor UI and not directly,
3 | ; since the parameters that go here are not all obvious.
4 | ;
5 | ; Format:
6 | ; [section] ; section goes between []
7 | ; param=value ; assign values to parameters
8 |
9 | config_version=4
10 |
11 | [application]
12 |
13 | config/name="mesh_bone"
14 | run/main_scene="res://mesh_bone.tscn"
15 | config/icon="res://icon.png"
16 |
17 | [gui]
18 |
19 | common/drop_mouse_on_gui_input_disabled=true
20 |
21 | [physics]
22 |
23 | common/enable_pause_aware_picking=true
24 |
25 | [rendering]
26 |
27 | environment/default_environment="res://default_env.tres"
28 |
--------------------------------------------------------------------------------
/examples/feature_test/project.godot:
--------------------------------------------------------------------------------
1 | ; Engine configuration file.
2 | ; It's best edited using the editor UI and not directly,
3 | ; since the parameters that go here are not all obvious.
4 | ;
5 | ; Format:
6 | ; [section] ; section goes between []
7 | ; param=value ; assign values to parameters
8 |
9 | config_version=4
10 |
11 | [application]
12 |
13 | config/name="SS_v6_feature"
14 | run/main_scene="res://v6_feature.tscn"
15 | config/icon="res://icon.png"
16 |
17 | [gui]
18 |
19 | common/drop_mouse_on_gui_input_disabled=true
20 |
21 | [physics]
22 |
23 | common/enable_pause_aware_picking=true
24 |
25 | [rendering]
26 |
27 | environment/default_environment="res://default_env.tres"
28 |
--------------------------------------------------------------------------------
/examples/particle_effect/project.godot:
--------------------------------------------------------------------------------
1 | ; Engine configuration file.
2 | ; It's best edited using the editor UI and not directly,
3 | ; since the parameters that go here are not all obvious.
4 | ;
5 | ; Format:
6 | ; [section] ; section goes between []
7 | ; param=value ; assign values to parameters
8 |
9 | config_version=4
10 |
11 | [application]
12 |
13 | config/name="particle_effect"
14 | run/main_scene="res://particle_effect.tscn"
15 | config/icon="res://icon.png"
16 |
17 | [gui]
18 |
19 | common/drop_mouse_on_gui_input_disabled=true
20 |
21 | [physics]
22 |
23 | common/enable_pause_aware_picking=true
24 |
25 | [rendering]
26 |
27 | environment/default_environment="res://default_env.tres"
28 |
--------------------------------------------------------------------------------
/gd_spritestudio/doc/classes/GdResourceSsDocument.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_notifier_item.cpp:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_notifier_item.cpp
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #include "gd_notifier_item.h"
6 |
7 | GdNotifierItem::GdNotifierItem()
8 | {
9 | }
10 |
11 | GdNotifierItem::~GdNotifierItem()
12 | {
13 | }
14 |
15 | void GdNotifierItem::resourcePlayerChanged( const Ref& resPlayer )
16 | {
17 | }
18 |
19 | void GdNotifierItem::resourceProjectChanged( const Ref& resProject )
20 | {
21 | }
22 |
23 | void GdNotifierItem::resourceAnimePackChanged( const Ref& resAnimePack )
24 | {
25 | }
26 |
27 | void GdNotifierItem::resourceCellMapChanged( const Ref& resCellMap )
28 | {
29 | }
30 |
--------------------------------------------------------------------------------
/scripts/release-gdextension-android.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env zsh
2 | set -e
3 |
4 | BASEDIR=$(dirname $0)
5 | BASEDIR=$(cd $BASEDIR && pwd -P)
6 | ROOTDIR=${BASEDIR}/..
7 | ROOTDIR=$(cd $ROOTDIR && pwd -P)
8 |
9 | pushd ${ROOTDIR} > /dev/null
10 | BINDIR=$(pwd)/bin/android
11 | /bin/rm -rf ${BINDIR}
12 | targets=("template_release" "template_debug")
13 | for target in ${targets[@]}; do
14 | scripts/build-extension.sh platform=android arch=arm32 compiledb=no strip=yes target=${target}
15 | scripts/build-extension.sh platform=android arch=arm64 compiledb=no strip=yes target=${target}
16 | scripts/build-extension.sh platform=android arch=x86_64 compiledb=no strip=yes target=${target}
17 | done
18 |
19 | popd > /dev/null # ${ROOTDIR}
20 |
--------------------------------------------------------------------------------
/examples/feature_test/texture_change.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=5 format=2]
2 |
3 | [ext_resource path="res://ssdata/v6_all.sspj" type="GdResourceSsProject" id=1]
4 | [ext_resource path="res://texture_change.gd" type="Script" id=3]
5 | [ext_resource path="res://ssdata/common_2.png" type="Texture" id=4]
6 |
7 | [sub_resource type="GdResourceSsPlayer" id=20]
8 | res_project = ExtResource( 1 )
9 |
10 | [node name="Root" type="Node"]
11 |
12 | [node name="TextureChange" type="GdNodeSsPlayer" parent="."]
13 | position = Vector2( 252, 239 )
14 | res_player = SubResource( 20 )
15 | anime_pack = "Basic.ssae"
16 | animation = "anime_1"
17 | frame = 0
18 | loop = false
19 | play = false
20 | script = ExtResource( 3 )
21 | to_texture = ExtResource( 4 )
22 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/texture_change.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=5 format=2]
2 |
3 | [ext_resource path="res://ssdata/v6_all.sspj" type="GdResourceSsProject" id=1]
4 | [ext_resource path="res://texture_change.gd" type="Script" id=3]
5 | [ext_resource path="res://ssdata/common_2.png" type="Texture2D" id=4]
6 |
7 | [sub_resource type="GdResourceSsPlayer" id=20]
8 | res_project = ExtResource( 1 )
9 |
10 | [node name="Root" type="Node"]
11 |
12 | [node name="TextureChange" type="GdNodeSsPlayer" parent="."]
13 | position = Vector2( 252, 239 )
14 | res_player = SubResource( 20 )
15 | anime_pack = "Basic.ssae"
16 | animation = "anime_1"
17 | frame = 0
18 | loop = false
19 | play = false
20 | script = ExtResource( 3 )
21 | to_texture = ExtResource( 4 )
22 |
--------------------------------------------------------------------------------
/gd_spritestudio/doc/classes/GdResourceSsAnimePack.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/gd_spritestudio/register_types.h:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file register_types.h
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #ifndef GD_SPRITESTUDIO_REGISTER_TYPES_H
6 | #define GD_SPRITESTUDIO_REGISTER_TYPES_H
7 |
8 | #include "gd_macros.h"
9 |
10 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
11 | #include
12 | using namespace godot;
13 | #elif defined(GD_V4)
14 | #include "modules/register_module_types.h"
15 | #endif
16 |
17 | void register_gd_spritestudio_types();
18 | void unregister_gd_spritestudio_types();
19 |
20 | #if defined(GD_V4) || defined(SPRITESTUDIO_GODOT_EXTENSION)
21 | void initialize_gd_spritestudio_module( ModuleInitializationLevel p_level );
22 | void uninitialize_gd_spritestudio_module( ModuleInitializationLevel p_level );
23 | #endif
24 |
25 | #endif // GD_SPRITESTUDIO_REGISTER_TYPES_H
26 |
--------------------------------------------------------------------------------
/examples/feature_test/user_data.gd:
--------------------------------------------------------------------------------
1 | extends GdNodeSsPlayer
2 |
3 |
4 | # Declare member variables here. Examples:
5 | # var a = 2
6 | # var b = "text"
7 |
8 |
9 | # Called when the node enters the scene tree for the first time.
10 | func _ready():
11 | pass # Replace with function body.
12 |
13 |
14 | # Called every frame. 'delta' is the elapsed time since the previous frame.
15 | #func _process(delta):
16 | # pass
17 |
18 |
19 | func _on_UserData_user_data(flag, int_value, rect_value, point_value, string_value):
20 | #pass # Replace with function body.
21 | print("on_user_data()")
22 | print("flag=" + "true" if flag else "false")
23 | print("int_value=" + str(int_value))
24 | print("rect_value=" + str(rect_value))
25 | print("point_value=" + str(point_value))
26 | print("string_value=" + string_value)
27 |
28 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/project.godot:
--------------------------------------------------------------------------------
1 | ; Engine configuration file.
2 | ; It's best edited using the editor UI and not directly,
3 | ; since the parameters that go here are not all obvious.
4 | ;
5 | ; Format:
6 | ; [section] ; section goes between []
7 | ; param=value ; assign values to parameters
8 |
9 | config_version=5
10 |
11 | [application]
12 |
13 | config/name="SS_v6_feature_gdextension"
14 | run/main_scene="res://v6_feature.tscn"
15 | config/features=PackedStringArray("4.4")
16 | config/icon="res://icon.png"
17 |
18 | [gui]
19 |
20 | common/drop_mouse_on_gui_input_disabled=true
21 |
22 | [physics]
23 |
24 | common/enable_pause_aware_picking=true
25 |
26 | [rendering]
27 |
28 | textures/vram_compression/import_etc2_astc=true
29 | environment/defaults/default_environment="res://default_env.tres"
30 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/user_data.gd:
--------------------------------------------------------------------------------
1 | extends GdNodeSsPlayer
2 |
3 |
4 | # Declare member variables here. Examples:
5 | # var a = 2
6 | # var b = "text"
7 |
8 |
9 | # Called when the node enters the scene tree for the first time.
10 | func _ready():
11 | pass # Replace with function body.
12 |
13 |
14 | # Called every frame. 'delta' is the elapsed time since the previous frame.
15 | #func _process(delta):
16 | # pass
17 |
18 |
19 | func _on_UserData_user_data(flag, int_value, rect_value, point_value, string_value):
20 | #pass # Replace with function body.
21 | print("on_user_data()")
22 | print("flag=" + "true" if flag else "false")
23 | print("int_value=" + str(int_value))
24 | print("rect_value=" + str(rect_value))
25 | print("point_value=" + str(point_value))
26 | print("string_value=" + string_value)
27 |
28 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_notifier_item.h:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_notifier_item.h
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #ifndef GD_NOTIFIER_ITEM_H
6 | #define GD_NOTIFIER_ITEM_H
7 |
8 | #include "gd_resource_ssplayer.h"
9 | #include "gd_resource_ssproject.h"
10 | #include "gd_resource_ssanimepack.h"
11 | #include "gd_resource_sscellmap.h"
12 |
13 | class GdNotifierItem
14 | {
15 | public :
16 | GdNotifierItem();
17 | virtual ~GdNotifierItem();
18 |
19 | virtual void resourcePlayerChanged( const Ref& resPlayer );
20 | virtual void resourceProjectChanged( const Ref& resProject );
21 | virtual void resourceAnimePackChanged( const Ref& resAnimePack );
22 | virtual void resourceCellMapChanged( const Ref& resCellMap );
23 | };
24 |
25 | #endif // GD_NOTIFIER_ITEM_H
26 |
--------------------------------------------------------------------------------
/examples/feature_test/icon.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://icon.png"
13 | dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | process/normal_map_invert_y=false
32 | stream=false
33 | size_limit=0
34 | detect_3d=true
35 | svg/scale=1.0
36 |
--------------------------------------------------------------------------------
/examples/mesh_bone/icon.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://icon.png"
13 | dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | process/normal_map_invert_y=false
32 | stream=false
33 | size_limit=0
34 | detect_3d=true
35 | svg/scale=1.0
36 |
--------------------------------------------------------------------------------
/examples/particle_effect/icon.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://icon.png"
13 | dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | process/normal_map_invert_y=false
32 | stream=false
33 | size_limit=0
34 | detect_3d=true
35 | svg/scale=1.0
36 |
--------------------------------------------------------------------------------
/examples/feature_test/sspj_load.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=5 format=2]
2 |
3 | [ext_resource path="res://sspj_load.gd" type="Script" id=5]
4 |
5 | [sub_resource type="Animation" id=3]
6 | length = 0.001
7 | loop = true
8 |
9 | [sub_resource type="Animation" id=4]
10 | resource_name = "SsPlayer"
11 | length = 2.03337
12 | loop = true
13 | step = 0.0333333
14 |
15 | [sub_resource type="GdResourceSsPlayer" id=5]
16 |
17 | [node name="Root" type="Node"]
18 | script = ExtResource( 5 )
19 |
20 | [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
21 | anims/RESET = SubResource( 3 )
22 | anims/SsPlayer = SubResource( 4 )
23 |
24 | [node name="by_script" type="GdNodeSsPlayer" parent="."]
25 | position = Vector2( 345, 275 )
26 | res_player = SubResource( 5 )
27 |
28 | [connection signal="animation_finished" from="by_script" to="." method="_on_animation_finished"]
29 |
--------------------------------------------------------------------------------
/examples/feature_test/ssdata/common.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/common.png-fc73545b807a8ca949681c397ba6c0a3.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://ssdata/common.png"
13 | dest_files=[ "res://.import/common.png-fc73545b807a8ca949681c397ba6c0a3.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | process/normal_map_invert_y=false
32 | stream=false
33 | size_limit=0
34 | detect_3d=true
35 | svg/scale=1.0
36 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/sspj_load.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=5 format=2]
2 |
3 | [ext_resource path="res://sspj_load.gd" type="Script" id=5]
4 |
5 | [sub_resource type="Animation" id=3]
6 | length = 0.001
7 | loop = true
8 |
9 | [sub_resource type="Animation" id=4]
10 | resource_name = "SsPlayer"
11 | length = 2.03337
12 | loop = true
13 | step = 0.0333333
14 |
15 | [sub_resource type="GdResourceSsPlayer" id=5]
16 |
17 | [node name="Root" type="Node"]
18 | script = ExtResource( 5 )
19 |
20 | [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
21 | anims/RESET = SubResource( 3 )
22 | anims/SsPlayer = SubResource( 4 )
23 |
24 | [node name="by_script" type="GdNodeSsPlayer" parent="."]
25 | position = Vector2( 345, 275 )
26 | res_player = SubResource( 5 )
27 |
28 | [connection signal="animation_finished" from="by_script" to="." method="_on_animation_finished"]
29 |
--------------------------------------------------------------------------------
/examples/mesh_bone/MeshBone/Effect.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/Effect.png-d03c4278de8b7d363a9353f9c8de5804.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://MeshBone/Effect.png"
13 | dest_files=[ "res://.import/Effect.png-d03c4278de8b7d363a9353f9c8de5804.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | process/normal_map_invert_y=false
32 | stream=false
33 | size_limit=0
34 | detect_3d=true
35 | svg/scale=1.0
36 |
--------------------------------------------------------------------------------
/examples/mesh_bone/MeshBone/Knight.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/Knight.png-49400efa8b7f46aa9473bbf67dc7459d.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://MeshBone/Knight.png"
13 | dest_files=[ "res://.import/Knight.png-49400efa8b7f46aa9473bbf67dc7459d.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | process/normal_map_invert_y=false
32 | stream=false
33 | size_limit=0
34 | detect_3d=true
35 | svg/scale=1.0
36 |
--------------------------------------------------------------------------------
/gd_spritestudio/addons/ss_importer/ss_importer.gd:
--------------------------------------------------------------------------------
1 | tool
2 | extends EditorPlugin
3 |
4 | var importer_sspj
5 | var importer_ssae
6 | var importer_ssce
7 | var importer_ssee
8 |
9 | func _enter_tree():
10 | importer_sspj = preload("ss_importer_sspj.gd").new()
11 | importer_ssae = preload("ss_importer_ssae.gd").new()
12 | importer_ssce = preload("ss_importer_ssce.gd").new()
13 | importer_ssee = preload("ss_importer_ssee.gd").new()
14 | add_import_plugin(importer_sspj)
15 | add_import_plugin(importer_ssae)
16 | add_import_plugin(importer_ssce)
17 | add_import_plugin(importer_ssee)
18 |
19 | func _exit_tree():
20 | remove_import_plugin(importer_sspj)
21 | remove_import_plugin(importer_ssae)
22 | remove_import_plugin(importer_ssce)
23 | remove_import_plugin(importer_ssee)
24 | importer_sspj = null
25 | importer_ssae = null
26 | importer_ssce = null
27 | importer_ssee = null
28 |
--------------------------------------------------------------------------------
/misc/Info.ios.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleInfoDictionaryVersion
6 | 6.0
7 | CFBundlePackageType
8 | FMWK
9 | CFBundleExecutable
10 | ${BUNDLE_LIBRARY}
11 | CFBundleName
12 | ${BUNDLE_NAME}
13 | CFBundleIdentifier
14 | ${BUNDLE_IDENTIFIER}
15 | CFBundleVersion
16 | ${BUNDLE_VERSION}
17 | CFBundleShortVersionString
18 | ${BUNDLE_VERSION}
19 | MinimumOSVersion
20 | ${MIN_IOS_VERSION}
21 | DTPlatformName
22 | iphoneos
23 |
24 |
25 |
--------------------------------------------------------------------------------
/examples/feature_test/ssdata/common_2.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/common_2.png-3867a3ebc82ba5dc9bf50193335e7b5b.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://ssdata/common_2.png"
13 | dest_files=[ "res://.import/common_2.png-3867a3ebc82ba5dc9bf50193335e7b5b.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | process/normal_map_invert_y=false
32 | stream=false
33 | size_limit=0
34 | detect_3d=true
35 | svg/scale=1.0
36 |
--------------------------------------------------------------------------------
/examples/feature_test/ssdata/box_00_00.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/box_00_00.png-63c61a35f75aa7aac35472ada275e323.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://ssdata/box_00_00.png"
13 | dest_files=[ "res://.import/box_00_00.png-63c61a35f75aa7aac35472ada275e323.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | process/normal_map_invert_y=false
32 | stream=false
33 | size_limit=0
34 | detect_3d=true
35 | svg/scale=1.0
36 |
--------------------------------------------------------------------------------
/examples/feature_test/basedir/images/common.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/common.png-3543577bad7c2a1143177a91585f6b45.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://basedir/images/common.png"
13 | dest_files=[ "res://.import/common.png-3543577bad7c2a1143177a91585f6b45.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | process/normal_map_invert_y=false
32 | stream=false
33 | size_limit=0
34 | detect_3d=true
35 | svg/scale=1.0
36 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_notifier.h:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_notifier.h
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #ifndef GD_NOTIFIER_H
6 | #define GD_NOTIFIER_H
7 |
8 | #include "gd_notifier_item.h"
9 |
10 | class GdNotifier
11 | {
12 | private :
13 | GdNotifier();
14 |
15 | public :
16 | virtual ~GdNotifier();
17 |
18 | static GdNotifier& getInstance();
19 |
20 | void addItem( GdNotifierItem* pItem );
21 | void removeItem( GdNotifierItem* pItem );
22 |
23 | void notifyResourcePlayerChanged( const Ref& resPlayer );
24 | void notifyResourceProjectChanged( const Ref& resProject );
25 | void notifyResourceAnimePackChanged( const Ref& resAnimePack );
26 | void notifyResourceCellMapChanged( const Ref& resCellMap );
27 |
28 | private :
29 | Vector m_vecItem;
30 | };
31 |
32 | #endif // GD_NOTIFIER_H
33 |
--------------------------------------------------------------------------------
/examples/particle_effect/ParticleEffect/ss_effect.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/ss_effect.png-9c981af3ec9dd96f0db7a11ae6881129.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://ParticleEffect/ss_effect.png"
13 | dest_files=[ "res://.import/ss_effect.png-9c981af3ec9dd96f0db7a11ae6881129.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | process/normal_map_invert_y=false
32 | stream=false
33 | size_limit=0
34 | detect_3d=true
35 | svg/scale=1.0
36 |
--------------------------------------------------------------------------------
/gd_spritestudio/addons/ss_importer/ss_importer_ssce.gd:
--------------------------------------------------------------------------------
1 | tool
2 | extends EditorImportPlugin
3 |
4 | func get_preset_count():
5 | return 0
6 |
7 | func get_preset_name(preset):
8 | return ""
9 |
10 | func get_import_options(preset):
11 | return []
12 |
13 | func get_option_visibility(option, options):
14 | return false
15 |
16 | func import(source_file, save_path, options, r_platform_variants, r_gen_files):
17 | var doc = GdResourceSsDocument.new()
18 | doc.load_from_file(source_file,source_file)
19 |
20 | return ResourceSaver.save("%s.%s" % [save_path, get_save_extension()], doc)
21 |
22 | func get_importer_name():
23 | return "ssce_importer"
24 |
25 | func get_visible_name():
26 | return "ssce_importer"
27 |
28 | func get_recognized_extensions():
29 | return ["ssce"]
30 |
31 | func get_save_extension():
32 | return "gdssce"
33 |
34 | func get_resource_type():
35 | return "GdResourceSsCellMap"
36 |
--------------------------------------------------------------------------------
/gd_spritestudio/addons/ss_importer/ss_importer_ssee.gd:
--------------------------------------------------------------------------------
1 | tool
2 | extends EditorImportPlugin
3 |
4 | func get_preset_count():
5 | return 0
6 |
7 | func get_preset_name(preset):
8 | return ""
9 |
10 | func get_import_options(preset):
11 | return []
12 |
13 | func get_option_visibility(option, options):
14 | return false
15 |
16 | func import(source_file, save_path, options, r_platform_variants, r_gen_files):
17 | var doc = GdResourceSsDocument.new()
18 | doc.load_from_file(source_file,source_file)
19 |
20 | return ResourceSaver.save("%s.%s" % [save_path, get_save_extension()], doc)
21 |
22 | func get_importer_name():
23 | return "ssee_importer"
24 |
25 | func get_visible_name():
26 | return "ssee_importer"
27 |
28 | func get_recognized_extensions():
29 | return ["ssee"]
30 |
31 | func get_save_extension():
32 | return "gdssee"
33 |
34 | func get_resource_type():
35 | return "GdResourceSsEffect"
36 |
--------------------------------------------------------------------------------
/gd_spritestudio/addons/ss_importer/ss_importer_sspj.gd:
--------------------------------------------------------------------------------
1 | tool
2 | extends EditorImportPlugin
3 |
4 | func get_preset_count():
5 | return 0
6 |
7 | func get_preset_name(preset):
8 | return ""
9 |
10 | func get_import_options(preset):
11 | return []
12 |
13 | func get_option_visibility(option, options):
14 | return false
15 |
16 | func import(source_file, save_path, options, r_platform_variants, r_gen_files):
17 | var doc = GdResourceSsDocument.new()
18 | doc.load_from_file(source_file,source_file)
19 |
20 | return ResourceSaver.save("%s.%s" % [save_path, get_save_extension()], doc)
21 |
22 | func get_importer_name():
23 | return "sspj_importer"
24 |
25 | func get_visible_name():
26 | return "sspj_importer"
27 |
28 | func get_recognized_extensions():
29 | return ["sspj"]
30 |
31 | func get_save_extension():
32 | return "gdsspj"
33 |
34 | func get_resource_type():
35 | return "GdResourceSsProject"
36 |
--------------------------------------------------------------------------------
/examples/particle_effect/ParticleEffect/ss_effect_c.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/ss_effect_c.png-a21bfb164cd635521b99bf56fbbf46f3.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://ParticleEffect/ss_effect_c.png"
13 | dest_files=[ "res://.import/ss_effect_c.png-a21bfb164cd635521b99bf56fbbf46f3.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | process/normal_map_invert_y=false
32 | stream=false
33 | size_limit=0
34 | detect_3d=true
35 | svg/scale=1.0
36 |
--------------------------------------------------------------------------------
/gd_spritestudio/addons/ss_importer/ss_importer_ssae.gd:
--------------------------------------------------------------------------------
1 | tool
2 | extends EditorImportPlugin
3 |
4 | func get_preset_count():
5 | return 0
6 |
7 | func get_preset_name(preset):
8 | return ""
9 |
10 | func get_import_options(preset):
11 | return []
12 |
13 | func get_option_visibility(option, options):
14 | return false
15 |
16 | func import(source_file, save_path, options, r_platform_variants, r_gen_files):
17 | var doc = GdResourceSsDocument.new()
18 | doc.load_from_file(source_file,source_file)
19 |
20 | return ResourceSaver.save("%s.%s" % [save_path, get_save_extension()], doc)
21 |
22 | func get_importer_name():
23 | return "ssae_importer"
24 |
25 | func get_visible_name():
26 | return "ssae_importer"
27 |
28 | func get_recognized_extensions():
29 | return ["ssae"]
30 |
31 | func get_save_extension():
32 | return "gdssae"
33 |
34 | func get_resource_type():
35 | return "GdResourceSsAnimePack"
36 |
--------------------------------------------------------------------------------
/misc/Info.macos.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleInfoDictionaryVersion
6 | 6.0
7 | CFBundlePackageType
8 | FMWK
9 | CFBundleExecutable
10 | ${BUNDLE_LIBRARY}
11 | CFBundleName
12 | ${BUNDLE_NAME}
13 | CFBundleIdentifier
14 | ${BUNDLE_IDENTIFIER}
15 | CFBundleVersion
16 | ${BUNDLE_VERSION}
17 | CFBundleShortVersionString
18 | ${BUNDLE_VERSION}
19 | LSMinimumSystemVersion
20 | ${MIN_MACOS_VERSION}
21 | CFBundleSupportedPlatforms
22 |
23 | MacOSX
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/icon.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="CompressedTexture2D"
5 | uid="uid://df0i5ff43e10s"
6 | path="res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.ctex"
7 | metadata={
8 | "vram_texture": false
9 | }
10 |
11 | [deps]
12 |
13 | source_file="res://icon.png"
14 | dest_files=["res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.ctex"]
15 |
16 | [params]
17 |
18 | compress/mode=0
19 | compress/high_quality=false
20 | compress/lossy_quality=0.7
21 | compress/hdr_compression=1
22 | compress/normal_map=0
23 | compress/channel_pack=0
24 | mipmaps/generate=false
25 | mipmaps/limit=-1
26 | roughness/mode=0
27 | roughness/src_normal=""
28 | process/fix_alpha_border=true
29 | process/premult_alpha=false
30 | process/normal_map_invert_y=false
31 | process/hdr_as_srgb=false
32 | process/hdr_clamp_exposure=false
33 | process/size_limit=0
34 | detect_3d/compress_to=1
35 |
--------------------------------------------------------------------------------
/.github/actions/setup-extension/action.yml:
--------------------------------------------------------------------------------
1 | name: Setup extension
2 | description: Setup build dependencies for extension.
3 |
4 | inputs:
5 | platform:
6 | required: true
7 | description: Target platform.
8 | os:
9 | required: true
10 | description: build host os.
11 |
12 | runs:
13 | using: composite
14 | steps:
15 | - name: install zsh
16 | if: startsWith(inputs.os, 'ubuntu-')
17 | shell: bash
18 | run: sudo apt-get update; sudo apt-get install zsh
19 |
20 | - name: prepare scons
21 | uses: ./.github/actions/setup-scons
22 |
23 | - name: Setup Android dependencies
24 | if: inputs.platform == 'android'
25 | uses: nttld/setup-ndk@v1
26 | with:
27 | ndk-version: r23c
28 | link-to-sdk: true
29 |
30 | - name: Setup Web dependencies
31 | if: inputs.platform == 'web'
32 | uses: mymindstorm/setup-emsdk@v14
33 | with:
34 | no-cache: true
35 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/ssdata/common.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="CompressedTexture2D"
5 | uid="uid://rgkmpwxkdghm"
6 | path="res://.godot/imported/common.png-fc73545b807a8ca949681c397ba6c0a3.ctex"
7 | metadata={
8 | "vram_texture": false
9 | }
10 |
11 | [deps]
12 |
13 | source_file="res://ssdata/common.png"
14 | dest_files=["res://.godot/imported/common.png-fc73545b807a8ca949681c397ba6c0a3.ctex"]
15 |
16 | [params]
17 |
18 | compress/mode=0
19 | compress/high_quality=false
20 | compress/lossy_quality=0.7
21 | compress/hdr_compression=1
22 | compress/normal_map=0
23 | compress/channel_pack=0
24 | mipmaps/generate=false
25 | mipmaps/limit=-1
26 | roughness/mode=0
27 | roughness/src_normal=""
28 | process/fix_alpha_border=true
29 | process/premult_alpha=false
30 | process/normal_map_invert_y=false
31 | process/hdr_as_srgb=false
32 | process/hdr_clamp_exposure=false
33 | process/size_limit=0
34 | detect_3d/compress_to=1
35 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_io.h:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_io.h
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #ifndef GD_IO_H
6 | #define GD_IO_H
7 |
8 | #include "gd_macros.h"
9 |
10 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
11 | #include
12 | #include
13 | #include
14 | using namespace godot;
15 | #else
16 | #ifdef GD_V4
17 | #include "core/string/ustring.h"
18 | #endif
19 | #ifdef GD_V3
20 | #include "core/ustring.h"
21 | #endif
22 | #endif
23 |
24 | class GdIO
25 | {
26 | private :
27 | GdIO();
28 |
29 | public :
30 | virtual ~GdIO();
31 |
32 | static String loadStringFromFile( const String& strPath );
33 | static Error saveStringToFile( const String& strPath, const String& str );
34 | static Variant loadVariantFromFile( const String& strPath );
35 | static Error saveVariantToFile( const String& strPath, const Variant& val );
36 | };
37 |
38 | #endif // GD_IO_H
39 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_resource_ssdocument.cpp:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_resource_ssdocument.cpp
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #include "gd_resource_ssdocument.h"
6 |
7 | #include "gd_io.h"
8 |
9 | GdResourceSsDocument::GdResourceSsDocument()
10 | {
11 | m_strSource = "";
12 | }
13 |
14 | GdResourceSsDocument::~GdResourceSsDocument()
15 | {
16 | }
17 |
18 | Error GdResourceSsDocument::loadFromFile( const String& strPath, const String& strOrgPath )
19 | {
20 | m_strSource = GdIO::loadStringFromFile( strPath );
21 |
22 | return OK;
23 | }
24 |
25 | Error GdResourceSsDocument::saveToFile( const String& strPath, const Ref& res )
26 | {
27 | return FAILED;
28 | }
29 |
30 | String GdResourceSsDocument::getSource() const
31 | {
32 | return m_strSource;
33 | }
34 |
35 | void GdResourceSsDocument::_bind_methods()
36 | {
37 | ClassDB::bind_method( D_METHOD( "load_from_file", "path", "org_path" ), &GdResourceSsDocument::loadFromFile );
38 | }
39 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/ssdata/common_2.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="CompressedTexture2D"
5 | uid="uid://dvyy030kxtf1c"
6 | path="res://.godot/imported/common_2.png-3867a3ebc82ba5dc9bf50193335e7b5b.ctex"
7 | metadata={
8 | "vram_texture": false
9 | }
10 |
11 | [deps]
12 |
13 | source_file="res://ssdata/common_2.png"
14 | dest_files=["res://.godot/imported/common_2.png-3867a3ebc82ba5dc9bf50193335e7b5b.ctex"]
15 |
16 | [params]
17 |
18 | compress/mode=0
19 | compress/high_quality=false
20 | compress/lossy_quality=0.7
21 | compress/hdr_compression=1
22 | compress/normal_map=0
23 | compress/channel_pack=0
24 | mipmaps/generate=false
25 | mipmaps/limit=-1
26 | roughness/mode=0
27 | roughness/src_normal=""
28 | process/fix_alpha_border=true
29 | process/premult_alpha=false
30 | process/normal_map_invert_y=false
31 | process/hdr_as_srgb=false
32 | process/hdr_clamp_exposure=false
33 | process/size_limit=0
34 | detect_3d/compress_to=1
35 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/basedir/images/common.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="CompressedTexture2D"
5 | uid="uid://671occ8i2lwv"
6 | path="res://.godot/imported/common.png-3543577bad7c2a1143177a91585f6b45.ctex"
7 | metadata={
8 | "vram_texture": false
9 | }
10 |
11 | [deps]
12 |
13 | source_file="res://basedir/images/common.png"
14 | dest_files=["res://.godot/imported/common.png-3543577bad7c2a1143177a91585f6b45.ctex"]
15 |
16 | [params]
17 |
18 | compress/mode=0
19 | compress/high_quality=false
20 | compress/lossy_quality=0.7
21 | compress/hdr_compression=1
22 | compress/normal_map=0
23 | compress/channel_pack=0
24 | mipmaps/generate=false
25 | mipmaps/limit=-1
26 | roughness/mode=0
27 | roughness/src_normal=""
28 | process/fix_alpha_border=true
29 | process/premult_alpha=false
30 | process/normal_map_invert_y=false
31 | process/hdr_as_srgb=false
32 | process/hdr_clamp_exposure=false
33 | process/size_limit=0
34 | detect_3d/compress_to=1
35 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/ssdata/box_00_00.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="CompressedTexture2D"
5 | uid="uid://dgy313ikhh1u4"
6 | path="res://.godot/imported/box_00_00.png-63c61a35f75aa7aac35472ada275e323.ctex"
7 | metadata={
8 | "vram_texture": false
9 | }
10 |
11 | [deps]
12 |
13 | source_file="res://ssdata/box_00_00.png"
14 | dest_files=["res://.godot/imported/box_00_00.png-63c61a35f75aa7aac35472ada275e323.ctex"]
15 |
16 | [params]
17 |
18 | compress/mode=0
19 | compress/high_quality=false
20 | compress/lossy_quality=0.7
21 | compress/hdr_compression=1
22 | compress/normal_map=0
23 | compress/channel_pack=0
24 | mipmaps/generate=false
25 | mipmaps/limit=-1
26 | roughness/mode=0
27 | roughness/src_normal=""
28 | process/fix_alpha_border=true
29 | process/premult_alpha=false
30 | process/normal_map_invert_y=false
31 | process/hdr_as_srgb=false
32 | process/hdr_clamp_exposure=false
33 | process/size_limit=0
34 | detect_3d/compress_to=1
35 |
--------------------------------------------------------------------------------
/misc/ccache/osx_ccache.patch:
--------------------------------------------------------------------------------
1 | diff --git a/platform/osx/detect.py b/platform/osx/detect.py
2 | index a36e5a9d78..bc4d9c6930 100644
3 | --- a/platform/osx/detect.py
4 | +++ b/platform/osx/detect.py
5 | @@ -106,8 +106,13 @@ def configure(env):
6 | env["AS"] = mpprefix + "/libexec/llvm-" + mpclangver + "/bin/llvm-as"
7 | env.Append(CPPDEFINES=["__MACPORTS__"]) # hack to fix libvpx MM256_BROADCASTSI128_SI256 define
8 | else:
9 | - env["CC"] = "clang"
10 | - env["CXX"] = "clang++"
11 | + ccache_path = os.environ.get("CCACHE")
12 | + if ccache_path is None:
13 | + env["CC"] = "clang"
14 | + env["CXX"] = "clang++"
15 | + else:
16 | + env["CC"] = ccache_path + " clang"
17 | + env["CXX"] = ccache_path + " clang++"
18 |
19 | detect_darwin_sdk_path("osx", env)
20 | env.Append(CCFLAGS=["-isysroot", "$MACOS_SDK_PATH"])
21 |
--------------------------------------------------------------------------------
/misc/ccache/macos_ccache.patch:
--------------------------------------------------------------------------------
1 | diff --git a/platform/macos/detect.py b/platform/macos/detect.py
2 | index 382828a082..a48920a639 100644
3 | --- a/platform/macos/detect.py
4 | +++ b/platform/macos/detect.py
5 | @@ -151,8 +151,13 @@ def configure(env: "Environment"):
6 | env["RANLIB"] = mpprefix + "/libexec/llvm-" + mpclangver + "/bin/llvm-ranlib"
7 | env["AS"] = mpprefix + "/libexec/llvm-" + mpclangver + "/bin/llvm-as"
8 | else:
9 | - env["CC"] = "clang"
10 | - env["CXX"] = "clang++"
11 | + ccache_path = os.environ.get("CCACHE")
12 | + if ccache_path is None:
13 | + env["CC"] = "clang"
14 | + env["CXX"] = "clang++"
15 | + else:
16 | + env["CC"] = ccache_path + " clang"
17 | + env["CXX"] = ccache_path + " clang++"
18 |
19 | detect_darwin_sdk_path("macos", env)
20 | env.Append(CCFLAGS=["-isysroot", "$MACOS_SDK_PATH"])
21 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_resource_ssplayer.h:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_resource_ssplayer.h
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #ifndef GD_RESOURCE_SSPLAYER_H
6 | #define GD_RESOURCE_SSPLAYER_H
7 |
8 | #include "gd_macros.h"
9 |
10 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
11 | #include
12 | using namespace godot;
13 | #else
14 | #ifdef GD_V4
15 | #include "core/io/resource.h"
16 | #endif
17 | #ifdef GD_V3
18 | #include "core/resource.h"
19 | #endif
20 | #endif
21 |
22 | #include "gd_resource_ssproject.h"
23 |
24 | class GdResourceSsPlayer : public Resource
25 | {
26 | GDCLASS( GdResourceSsPlayer, Resource );
27 |
28 | public :
29 | GdResourceSsPlayer();
30 | virtual ~GdResourceSsPlayer();
31 |
32 | void setProjectResource( const Ref& resProject );
33 | Ref getProjectResource() const;
34 |
35 | protected :
36 | GdMultilevelCall static void _bind_methods();
37 |
38 | private :
39 | Ref m_ResProject;
40 | };
41 |
42 |
43 | #endif // GD_RESOURCE_SSPLAYER_H
44 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_resource_ssdocument.h:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_resource_ssdocument.h
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #ifndef GD_RESOURCE_SSDOCUMENT_H
6 | #define GD_RESOURCE_SSDOCUMENT_H
7 |
8 | #include "gd_macros.h"
9 |
10 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
11 | #include
12 | using namespace godot;
13 | #else
14 | #ifdef GD_V4
15 | #include "core/io/resource.h"
16 | #endif
17 | #ifdef GD_V3
18 | #include "core/resource.h"
19 | #endif
20 | #endif
21 |
22 | class GdResourceSsDocument : public Resource
23 | {
24 | GDCLASS( GdResourceSsDocument, Resource );
25 |
26 | public :
27 | GdResourceSsDocument();
28 | virtual ~GdResourceSsDocument();
29 |
30 | Error loadFromFile( const String& strPath, const String& strOrgPath = "" );
31 | Error saveToFile( const String& strPath, const Ref& res );
32 |
33 | String getSource() const;
34 |
35 | protected :
36 | GdMultilevelCall static void _bind_methods();
37 |
38 | private :
39 | String m_strSource;
40 | };
41 |
42 | #endif // GD_RESOURCE_SSDOCUMENT_H
43 |
--------------------------------------------------------------------------------
/gd_spritestudio/ss_loader_texture_impl.cpp:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file ss_loader_texture_impl.cpp
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #include "ss_loader_texture_impl.h"
6 |
7 | #include "SpriteStudio6-SDK/Common/Helper/IsshTexture.h"
8 |
9 | #include "ss_macros.h"
10 |
11 | SsSdkUsing
12 |
13 | static SSTextureLoader::DataHandle onLoadImageFromFile( const char* fileName, int* width, int* height, int* bpp )
14 | {
15 | return 0;
16 | }
17 |
18 | static void onDecodeEndImageFile( SSTextureLoader::DataHandle handle )
19 | {
20 | }
21 |
22 | static const char* onMessageGetFailureLoadFromFile()
23 | {
24 | return 0;
25 | }
26 |
27 | static bool onCheckSizePow2( int width, int height )
28 | {
29 | return true;
30 | }
31 |
32 | void SsLoaderTextureImpl::setCallbacks()
33 | {
34 | SSTextureLoader::FunctionLoadImageFromFile = onLoadImageFromFile;
35 | SSTextureLoader::FunctionDecodeEndImageFile = onDecodeEndImageFile;
36 | SSTextureLoader::FunctionMessageGetFailureLoadFromFile = onMessageGetFailureLoadFromFile;
37 | SSTextureLoader::FunctionCheckSizePow2 = onCheckSizePow2;
38 | }
39 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_renderer.h:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_renderer.h
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #ifndef GD_RENDERER_H
6 | #define GD_RENDERER_H
7 |
8 | #include "gd_macros.h"
9 |
10 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
11 | #include
12 | #include
13 | using namespace godot;
14 | #else
15 | #ifdef GD_V4
16 | #include "core/templates/rid.h"
17 | #endif
18 | #ifdef GD_V3
19 | #include "core/rid.h"
20 | #endif
21 | #include "core/math/rect2.h"
22 | #endif
23 |
24 | class GdRenderer
25 | {
26 | public :
27 | GdRenderer();
28 | virtual ~GdRenderer();
29 |
30 | void init();
31 | void term();
32 |
33 | void setTranslate( float fX, float fY );
34 | void setSize( int iWidth, int iHeight );
35 |
36 | Rect2 getSize() const;
37 |
38 | RID getTextureRid() const;
39 | RID getCanvasRid() const;
40 | RID getCanvasItemRid() const;
41 |
42 | private :
43 | RID m_ViewPortId;
44 | RID m_TextureId;
45 | RID m_CanvasId;
46 | RID m_CanvasItemId;
47 |
48 | Rect2 m_Size;
49 | };
50 |
51 | #endif // GD_RENDERER_H
52 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_packet_sseffect.h:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_packet_sseffect.h
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #ifndef GD_PACKET_SSEFFECT_H
6 | #define GD_PACKET_SSEFFECT_H
7 |
8 | #include "gd_macros.h"
9 |
10 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
11 | #include
12 | #include
13 | using namespace godot;
14 | #define PoolByteArray PackedByteArray
15 | #else
16 | #ifdef GD_V4
17 | #include "core/io/stream_peer.h"
18 | #define PoolByteArray PackedByteArray
19 | #endif
20 | #ifdef GD_V3
21 | #include "core/io/stream_peer.h"
22 | #endif
23 | #endif
24 |
25 | #include "SpriteStudio6-SDK/Common/Loader/ssloader_ssee.h"
26 |
27 | #include "ss_macros.h"
28 |
29 | SsSdkUsing
30 |
31 | class GdPacketSsEffect : public StreamPeerBuffer
32 | {
33 | public :
34 | GdPacketSsEffect();
35 | virtual ~GdPacketSsEffect();
36 |
37 | bool write( const String& strRaw );
38 |
39 | bool read( SsEffectFile* pEffect, const PoolByteArray& bytes );
40 |
41 | PoolByteArray getBytes() const;
42 | };
43 |
44 | #endif // GD_PACKET_SSEFFECT_H
45 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_packet_sscellmap.h:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_packet_sscellmap.h
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #ifndef GD_PACKET_SSCELLMAP_H
6 | #define GD_PACKET_SSCELLMAP_H
7 |
8 | #include "gd_macros.h"
9 |
10 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
11 | #include
12 | #include
13 | using namespace godot;
14 | #define PoolByteArray PackedByteArray
15 | #else
16 | #ifdef GD_V4
17 | #include "core/io/stream_peer.h"
18 | #define PoolByteArray PackedByteArray
19 | #endif
20 | #ifdef GD_V3
21 | #include "core/io/stream_peer.h"
22 | #endif
23 | #endif
24 |
25 | #include "SpriteStudio6-SDK/Common/Loader/ssloader_ssce.h"
26 |
27 | #include "ss_macros.h"
28 |
29 | SsSdkUsing
30 |
31 | class GdPacketSsCellMap : public StreamPeerBuffer
32 | {
33 | public :
34 | GdPacketSsCellMap();
35 | virtual ~GdPacketSsCellMap();
36 |
37 | bool write( const String& strRaw );
38 |
39 | bool read( SsCellMap* pCellMap, const PoolByteArray& bytes );
40 |
41 | PoolByteArray getBytes() const;
42 | };
43 |
44 | #endif // GD_PACKET_SSCELLMAP_H
45 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_packet_ssproject.h:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_packet_ssproject.h
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #ifndef GD_PACKET_SSPROJECT_H
6 | #define GD_PACKET_SSPROJECT_H
7 |
8 | #include "gd_macros.h"
9 |
10 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
11 | #include
12 | #include
13 | using namespace godot;
14 | #define PoolByteArray PackedByteArray
15 | #else
16 | #ifdef GD_V4
17 | #include "core/io/stream_peer.h"
18 | #define PoolByteArray PackedByteArray
19 | #endif
20 | #ifdef GD_V3
21 | #include "core/io/stream_peer.h"
22 | #endif
23 | #endif
24 |
25 | #include "SpriteStudio6-SDK/Common/Loader/ssloader_sspj.h"
26 |
27 | #include "ss_macros.h"
28 |
29 | SsSdkUsing
30 |
31 | class GdPacketSsProject : public StreamPeerBuffer
32 | {
33 | public :
34 | GdPacketSsProject();
35 | virtual ~GdPacketSsProject();
36 |
37 | bool write( const String& strRaw );
38 |
39 | bool read( SsProject* pProject, const PoolByteArray& bytes );
40 |
41 | PoolByteArray getBytes() const;
42 | };
43 |
44 | #endif // GD_PACKET_SSPROJECT_H
45 |
--------------------------------------------------------------------------------
/examples/feature_test/texture_change.gd:
--------------------------------------------------------------------------------
1 | extends GdNodeSsPlayer
2 |
3 |
4 | # Declare member variables here. Examples:
5 | # var a = 2
6 | # var b = "text"
7 |
8 | #class MyScript extends GdNodeSsPlayer
9 | export var to_texture: Texture
10 | export var change: bool = false
11 |
12 | var org_texture: Texture
13 | var prev_change = change
14 |
15 | # Called when the node enters the scene tree for the first time.
16 | func _ready():
17 | change = false
18 | print("to_texture:" + to_texture.resource_path)
19 |
20 | org_texture = self.res_player.res_project.get_cell_map_resource_from_name("common.ssce").texture
21 | print("org_texture:" + org_texture.resource_path)
22 |
23 | self.set_frame(0)
24 | self.set_loop(true)
25 | self.set_play(true)
26 |
27 | # Called every frame. 'delta' is the elapsed time since the previous frame.
28 | func _process(delta):
29 | if change != prev_change:
30 | var to_tex: Texture
31 | if change:
32 | to_tex = to_texture
33 | else:
34 | to_tex = org_texture
35 | self.res_player.res_project.get_cell_map_resource_from_name("common.ssce").texture = to_tex
36 | prev_change = change
37 |
38 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_packet_ssanimepack.h:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_packet_ssanimepack.h
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #ifndef GD_PACKET_SSANIMEPACK_H
6 | #define GD_PACKET_SSANIMEPACK_H
7 |
8 | #include "gd_macros.h"
9 |
10 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
11 | #include
12 | #include
13 | using namespace godot;
14 | #define PoolByteArray PackedByteArray
15 | #else
16 | #ifdef GD_V4
17 | #include "core/io/stream_peer.h"
18 | #define PoolByteArray PackedByteArray
19 | #endif
20 | #ifdef GD_V3
21 | #include "core/io/stream_peer.h"
22 | #endif
23 | #endif
24 |
25 | #include "SpriteStudio6-SDK/Common/Loader/ssloader_ssae.h"
26 |
27 | #include "ss_macros.h"
28 |
29 | SsSdkUsing
30 |
31 | class GdPacketSsAnimePack : public StreamPeerBuffer
32 | {
33 | public :
34 | GdPacketSsAnimePack();
35 | virtual ~GdPacketSsAnimePack();
36 |
37 | bool write( const String& strRaw );
38 |
39 | bool read( SsAnimePack* pAnimePack, const PoolByteArray& bytes );
40 |
41 | PoolByteArray getBytes() const;
42 | };
43 |
44 | #endif // GD_PACKET_SSANIMEPACK_H
45 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_packet_sseffect.cpp:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_packet_sseffect.cpp
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #include "gd_packet_sseffect.h"
6 |
7 | #include "ss_io.h"
8 |
9 | GdPacketSsEffect::GdPacketSsEffect()
10 | {
11 | }
12 |
13 | GdPacketSsEffect::~GdPacketSsEffect()
14 | {
15 | }
16 |
17 | bool GdPacketSsEffect::write( const String& strRaw )
18 | {
19 | auto c = strRaw.utf8();
20 |
21 | if ( c.length() > 0 ) {
22 | libXML::XMLDocument xml;
23 |
24 | if ( libXML::XML_SUCCESS == xml.Parse( c.get_data(), c.length() ) ) {
25 | SsXmlIArchiver ar( xml.GetDocument(), "SpriteStudioEffect" );
26 | SsEffectFile effect;
27 |
28 | effect.__Serialize( &ar );
29 |
30 | SsIO::push( *this, effect );
31 | }
32 | }
33 |
34 | return true;
35 | }
36 |
37 | bool GdPacketSsEffect::read( SsEffectFile* pEffect, const PoolByteArray& bytes )
38 | {
39 | if ( !pEffect ) {
40 | return false;
41 | }
42 |
43 | set_data_array( bytes );
44 |
45 | SsIO::pull( *this, *pEffect );
46 |
47 | return true;
48 | }
49 |
50 | PoolByteArray GdPacketSsEffect::getBytes() const
51 | {
52 | return get_data_array();
53 | }
54 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/texture_change.gd:
--------------------------------------------------------------------------------
1 | extends GdNodeSsPlayer
2 |
3 |
4 | # Declare member variables here. Examples:
5 | # var a = 2
6 | # var b = "text"
7 |
8 | #class MyScript extends GdNodeSsPlayer
9 | @export var to_texture: Texture2D
10 | @export var change: bool = false
11 |
12 | var org_texture: Texture2D
13 | var prev_change = change
14 |
15 | # Called when the node enters the scene tree for the first time.
16 | func _ready():
17 | change = false
18 | print("to_texture:" + to_texture.resource_path)
19 |
20 | org_texture = self.res_player.res_project.get_cell_map_resource_from_name("common.ssce").texture
21 | print("org_texture:" + org_texture.resource_path)
22 |
23 | self.set_frame(0)
24 | self.set_loop(true)
25 | self.set_play(true)
26 |
27 | # Called every frame. 'delta' is the elapsed time since the previous frame.
28 | func _process(delta):
29 | if change != prev_change:
30 | var to_tex: Texture2D
31 | if change:
32 | to_tex = to_texture
33 | else:
34 | to_tex = org_texture
35 | self.res_player.res_project.get_cell_map_resource_from_name("common.ssce").texture = to_tex
36 | prev_change = change
37 |
38 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_packet_sscellmap.cpp:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_packet_sscellmap.cpp
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #include "gd_packet_sscellmap.h"
6 |
7 | #include "ss_io.h"
8 |
9 | GdPacketSsCellMap::GdPacketSsCellMap()
10 | {
11 | }
12 |
13 | GdPacketSsCellMap::~GdPacketSsCellMap()
14 | {
15 | }
16 |
17 | bool GdPacketSsCellMap::write( const String& strRaw )
18 | {
19 | auto c = strRaw.utf8();
20 |
21 | if ( c.length() > 0 ) {
22 | libXML::XMLDocument xml;
23 |
24 | if ( libXML::XML_SUCCESS == xml.Parse( c.get_data(), c.length() ) ) {
25 | SsXmlIArchiver ar( xml.GetDocument(), "SpriteStudioCellMap" );
26 | SsCellMap cellMap;
27 |
28 | cellMap.__Serialize( &ar );
29 |
30 | SsIO::push( *this, cellMap );
31 | }
32 | }
33 |
34 | return true;
35 | }
36 |
37 | bool GdPacketSsCellMap::read( SsCellMap* pCellMap, const PoolByteArray& bytes )
38 | {
39 | if ( !pCellMap ) {
40 | return false;
41 | }
42 |
43 | set_data_array( bytes );
44 |
45 | SsIO::pull( *this, *pCellMap );
46 |
47 | return true;
48 | }
49 |
50 | PoolByteArray GdPacketSsCellMap::getBytes() const
51 | {
52 | return get_data_array();
53 | }
54 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_packet_ssproject.cpp:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_packet_ssproject.cpp
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #include "gd_packet_ssproject.h"
6 |
7 | #include "ss_io.h"
8 |
9 | GdPacketSsProject::GdPacketSsProject()
10 | {
11 | }
12 |
13 | GdPacketSsProject::~GdPacketSsProject()
14 | {
15 | }
16 |
17 | bool GdPacketSsProject::write( const String& strRaw )
18 | {
19 | auto c = strRaw.utf8();
20 |
21 | if ( c.length() > 0 ) {
22 | libXML::XMLDocument xml;
23 |
24 | if ( libXML::XML_SUCCESS == xml.Parse( c.get_data(), c.length() ) ) {
25 | SsXmlIArchiver ar( xml.GetDocument(), "SpriteStudioProject" );
26 | SsProject project;
27 |
28 | project.__Serialize( &ar );
29 |
30 | SsIO::push( *this, project );
31 | }
32 | }
33 |
34 | return true;
35 | }
36 |
37 | bool GdPacketSsProject::read( SsProject* pProject, const PoolByteArray& bytes )
38 | {
39 | if ( !pProject ) {
40 | return false;
41 | }
42 |
43 | set_data_array( bytes );
44 |
45 | SsIO::pull( *this, *pProject );
46 |
47 | return true;
48 | }
49 |
50 | PoolByteArray GdPacketSsProject::getBytes() const
51 | {
52 | return get_data_array();
53 | }
54 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_resource_sseffect.cpp:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_resource_sseffect.cpp
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #include "gd_resource_sseffect.h"
6 |
7 | #include "ss_macros.h"
8 | #include "ss_container.h"
9 |
10 | SsSdkUsing
11 |
12 | GdResourceSsEffect::GdResourceSsEffect()
13 | {
14 | m_pEffect = NULL;
15 | }
16 |
17 | GdResourceSsEffect::~GdResourceSsEffect()
18 | {
19 | if ( m_pEffect ) {
20 | SsContainer::getInstance().unloadEffect( m_pEffect );
21 | m_pEffect = NULL;
22 | }
23 | }
24 |
25 | Error GdResourceSsEffect::loadFromFile( const String& strPath, const String& strOrgPath )
26 | {
27 | m_pEffect = SsContainer::getInstance().loadEffectFromFile( strPath, false );
28 |
29 | if ( !m_pEffect ) {
30 | ERR_PRINT( String( "SpriteStudio ssee file load failed : " ) + strPath );
31 | return FAILED;
32 | }
33 |
34 | return OK;
35 | }
36 |
37 | Error GdResourceSsEffect::saveToFile( const String& strPath, const Ref& res )
38 | {
39 | return FAILED;
40 | }
41 |
42 | SsEffectFile* GdResourceSsEffect::getEffect() const
43 | {
44 | return m_pEffect;
45 | }
46 |
47 | void GdResourceSsEffect::_bind_methods()
48 | {
49 | }
50 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_resource_sseffect.h:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_resource_sseffect.h
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #ifndef GD_RESOURCE_SSEFFECT_H
6 | #define GD_RESOURCE_SSEFFECT_H
7 |
8 | #include "gd_macros.h"
9 |
10 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
11 | #include
12 | using namespace godot;
13 | #else
14 | #ifdef GD_V4
15 | #include "core/io/resource.h"
16 | #endif
17 | #ifdef GD_V3
18 | #include "core/resource.h"
19 | #endif
20 | #endif
21 |
22 | #include "SpriteStudio6-SDK/Common/Loader/ssloader_ssee.h"
23 |
24 | #include "ss_macros.h"
25 |
26 | SsSdkUsing
27 |
28 | class GdResourceSsEffect : public Resource
29 | {
30 | GDCLASS( GdResourceSsEffect, Resource );
31 |
32 | public :
33 | GdResourceSsEffect();
34 | virtual ~GdResourceSsEffect();
35 |
36 | Error loadFromFile( const String& strPath, const String& strOrgPath = "" );
37 | Error saveToFile( const String& strPath, const Ref& res );
38 |
39 | SsEffectFile* getEffect() const;
40 |
41 | protected :
42 | GdMultilevelCall static void _bind_methods();
43 |
44 | private :
45 | SsEffectFile* m_pEffect;
46 | };
47 |
48 | #endif // GD_RESOURCE_SSEFFECT_H
49 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_packet_ssanimepack.cpp:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_packet_ssanimepack.cpp
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #include "gd_packet_ssanimepack.h"
6 |
7 | #include "ss_io.h"
8 |
9 | GdPacketSsAnimePack::GdPacketSsAnimePack()
10 | {
11 | }
12 |
13 | GdPacketSsAnimePack::~GdPacketSsAnimePack()
14 | {
15 | }
16 |
17 | bool GdPacketSsAnimePack::write( const String& strRaw )
18 | {
19 | auto c = strRaw.utf8();
20 |
21 | if ( c.length() > 0 ) {
22 | libXML::XMLDocument xml;
23 |
24 | if ( libXML::XML_SUCCESS == xml.Parse( c.get_data(), c.length() ) ) {
25 | SsXmlIArchiver ar( xml.GetDocument(), "SpriteStudioAnimePack" );
26 | SsAnimePack animePack;
27 |
28 | animePack.__Serialize( &ar );
29 |
30 | SsIO::push( *this, animePack );
31 | }
32 | }
33 |
34 | return true;
35 | }
36 |
37 | bool GdPacketSsAnimePack::read( SsAnimePack* pAnimePack, const PoolByteArray& bytes )
38 | {
39 | if ( !pAnimePack ) {
40 | return false;
41 | }
42 |
43 | set_data_array( bytes );
44 |
45 | SsIO::pull( *this, *pAnimePack );
46 |
47 | return true;
48 | }
49 |
50 | PoolByteArray GdPacketSsAnimePack::getBytes() const
51 | {
52 | return get_data_array();
53 | }
54 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_resource_ssplayer.cpp:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_resource_ssplayer.cpp
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #include "gd_resource_ssplayer.h"
6 |
7 | #include "gd_notifier.h"
8 |
9 | GdResourceSsPlayer::GdResourceSsPlayer()
10 | {
11 | }
12 |
13 | GdResourceSsPlayer::~GdResourceSsPlayer()
14 | {
15 | }
16 |
17 | void GdResourceSsPlayer::setProjectResource( const Ref& resProject )
18 | {
19 | m_ResProject = resProject;
20 |
21 | GdNotifier::getInstance().notifyResourcePlayerChanged( this );
22 | }
23 |
24 | Ref GdResourceSsPlayer::getProjectResource() const
25 | {
26 | return m_ResProject;
27 | }
28 |
29 | void GdResourceSsPlayer::_bind_methods()
30 | {
31 | ClassDB::bind_method( D_METHOD( "set_project_resource", "res_project" ), &GdResourceSsPlayer::setProjectResource );
32 | ClassDB::bind_method( D_METHOD( "get_project_resource" ), &GdResourceSsPlayer::getProjectResource );
33 |
34 | ADD_PROPERTY(
35 | PropertyInfo(
36 | Variant::OBJECT,
37 | GdUiText( "res_project" ),
38 | PropertyHint::PROPERTY_HINT_RESOURCE_TYPE,
39 | "GdResourceSsProject"
40 | ),
41 | "set_project_resource",
42 | "get_project_resource"
43 | );
44 | }
45 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_macros.h:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_macros.h
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #ifndef GD_MACROS_H
6 | #define GD_MACROS_H
7 |
8 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
9 | #include
10 | #define EMPTY(x) ((x).is_empty())
11 | #define VARIANT_FLOAT Variant::FLOAT
12 | #define NOTIFY_PROPERTY_LIST_CHANGED() notify_property_list_changed()
13 | #else
14 | #include "core/version.h"
15 | #if VERSION_MAJOR>=4
16 | #define GD_V4 //!< バージョン4.xのgodotが使用されています。
17 | #define EMPTY(x) ((x).is_empty())
18 | #define VARIANT_FLOAT Variant::FLOAT
19 | #define NOTIFY_PROPERTY_LIST_CHANGED() notify_property_list_changed()
20 | #elif VERSION_MAJOR>=3
21 | #define GD_V3 //!< バージョン3.xのgodotが使用されています。
22 | #define EMPTY(x) ((x).empty())
23 | #define VARIANT_FLOAT Variant::REAL
24 | #define NOTIFY_PROPERTY_LIST_CHANGED() property_list_changed_notify()
25 | #else
26 | #error not supported godot version.
27 | #endif
28 | #endif
29 |
30 |
31 | /*!
32 | * 次の関数はObject派生クラスでオーバーライドできます。
33 | * これらの関数は仮想ではありません。仮想にしないでください。
34 | * オーバーライドのたびに呼び出され、前の関数は無効になりません(多重レベル呼出し)。
35 | */
36 | #define GdMultilevelCall
37 |
38 | #define GdUiText( _a ) _a
39 |
40 | #endif // GD_MACROS_H
41 |
--------------------------------------------------------------------------------
/scripts/release-gdextension-ios.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env zsh
2 | set -e
3 | set -x
4 |
5 | BASEDIR=$(dirname $0)
6 | BASEDIR=$(cd $BASEDIR && pwd -P)
7 | ROOTDIR=${BASEDIR}/..
8 | ROOTDIR=$(cd $ROOTDIR && pwd -P)
9 |
10 | pushd ${ROOTDIR} > /dev/null
11 | BINDIR=$(pwd)/bin/ios
12 | /bin/rm -rf ${BINDIR}
13 | targets=("template_release" "template_debug")
14 | for target in ${targets[@]}; do
15 | # scripts/build-extension.sh platform=ios arch=universal compiledb=no strip=yes target=${target} ios_simulator=yes
16 | scripts/build-extension.sh platform=ios arch=universal compiledb=no strip=yes target=${target} ios_simulator=no
17 | done
18 |
19 | pushd ${BINDIR}
20 |
21 | ## create xcframeworks
22 | #for target in ${targets[@]}; do
23 | # rm -rf tmp
24 | # mkdir -p tmp/ios tmp/ios-simulator
25 | # mv $BINDIR/libSSGodot.ios.${target}.framework tmp/ios/libSSGodot.ios.${target}.framework
26 | # mv $BINDIR/libSSGodot.ios.${target}.simulator.framework tmp/ios-simulator/libSSGodot.ios.${target}.framework
27 | # xcodebuild -create-xcframework -framework tmp/ios/libSSGodot.ios.${target}.framework -framework tmp/ios-simulator/libSSGodot.ios.${target}.framework -output libSSGodot.ios.${target}.xcframework
28 | #done
29 | #/bin/rm -rf tmp
30 |
31 | /bin/rm -rf ios.framework
32 | popd > /dev/null # ${BINDIR}
33 |
34 | popd > /dev/null # ${ROOTDIR}
35 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_resource_sscellmap.h:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_resource_sscellmap.h
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #ifndef GD_RESOURCE_SSCELLMAP_H
6 | #define GD_RESOURCE_SSCELLMAP_H
7 |
8 | #include "gd_macros.h"
9 |
10 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
11 | #include
12 | #include
13 | using namespace godot;
14 | #else
15 | #ifdef GD_V4
16 | #include "core/io/resource.h"
17 | #endif
18 | #ifdef GD_V3
19 | #include "core/resource.h"
20 | #endif
21 | #include "scene/resources/texture.h"
22 | #endif
23 |
24 | #include "SpriteStudio6-SDK/Common/Loader/ssloader_ssce.h"
25 |
26 | #include "ss_macros.h"
27 |
28 | SsSdkUsing
29 |
30 | class GdResourceSsCellMap : public Resource
31 | {
32 | GDCLASS( GdResourceSsCellMap, Resource );
33 |
34 | public :
35 | GdResourceSsCellMap();
36 | virtual ~GdResourceSsCellMap();
37 |
38 | void setTexture( Ref texture );
39 | Ref getTexture() const;
40 |
41 | Error loadFromFile( const String& strPath, const String& strOrgPath = "" );
42 | Error saveToFile( const String& strPath, const Ref& res );
43 |
44 | SsCellMap* getCellMap() const;
45 | String getRoot() const;
46 |
47 | protected :
48 | GdMultilevelCall static void _bind_methods();
49 |
50 | private :
51 | SsCellMap* m_pCellMap;
52 |
53 | Ref m_Texture;
54 | };
55 |
56 | #endif // GD_RESOURCE_SSCELLMAP_H
57 |
--------------------------------------------------------------------------------
/gd_spritestudio/ss_texture_impl.h:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file ss_texture_impl.h
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #ifndef SS_TEXTURE_IMPL_H
6 | #define SS_TEXTURE_IMPL_H
7 |
8 | #include "gd_macros.h"
9 |
10 | #include "SpriteStudio6-SDK/Common/Helper/IsshTexture.h"
11 |
12 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
13 | #include
14 | #include
15 | #include
16 | #include
17 | #include
18 | using namespace godot;
19 | #else
20 | #include "scene/resources/texture.h"
21 | #ifdef GD_V4
22 | #include "core/io/resource_loader.h"
23 | #endif
24 | #endif
25 |
26 | #include "ss_macros.h"
27 |
28 | SsSdkUsing
29 |
30 | class SsTextureImpl : public ISSTexture
31 | {
32 | public :
33 | SsTextureImpl();
34 | virtual ~SsTextureImpl();
35 |
36 | virtual int getWidth() override;
37 | virtual int getHeight() override;
38 |
39 | virtual bool Load( const char* filename ) override;
40 | virtual ISSTexture* create() override;
41 |
42 | void setTexture( Ref texture );
43 | Ref getTexture() const;
44 |
45 | private :
46 |
47 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
48 | Ref m_Texture;
49 | #else
50 | #ifdef GD_V4
51 | Ref m_Texture;
52 | #endif
53 | #ifdef GD_V3
54 | Ref m_Texture;
55 | #endif
56 | #endif
57 | };
58 |
59 | #endif // SS_TEXTURE_IMPL_H
60 |
--------------------------------------------------------------------------------
/gd_spritestudio/SCsub:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 |
3 | Import("env")
4 | Import("env_modules")
5 |
6 | env_gd_spritestudio = env_modules.Clone()
7 |
8 | env_gd_spritestudio.add_source_files(env.modules_sources, "*.cpp")
9 | env_gd_spritestudio.add_source_files(env.modules_sources, "SpriteStudio6-SDK/Common/Loader/tinyxml2/*.cpp")
10 | env_gd_spritestudio.add_source_files(env.modules_sources, "SpriteStudio6-SDK/Common/Loader/*.cpp")
11 | # env_gd_spritestudio.add_source_files(env.modules_sources, "SpriteStudio6-SDK/Common/Helper/*.cpp")
12 | env_gd_spritestudio.add_source_files(env.modules_sources, "SpriteStudio6-SDK/Common/Animator/*.cpp")
13 | env_gd_spritestudio.add_source_files(env.modules_sources, "SpriteStudio6-SDK/Common/Helper/DebugPrint.cpp")
14 | env_gd_spritestudio.add_source_files(env.modules_sources, "SpriteStudio6-SDK/Common/Helper/IsshTexture.cpp")
15 |
16 |
17 | env_gd_spritestudio.Append(CPPDEFINES = '_NOTUSE_STBI')
18 | env_gd_spritestudio.Append(CPPDEFINES = '_NOTUSE_TEXTURE_FULLPATH')
19 | env_gd_spritestudio.Append(CPPDEFINES = '_NOTUSE_EXCEPTION')
20 |
21 | env_gd_spritestudio.Append(
22 | CPPPATH=[
23 | "SpriteStudio6-SDK/Common/Loader",
24 | "SpriteStudio6-SDK/Common/Helper",
25 | "SpriteStudio6-SDK/Common/Animator",
26 | ])
27 |
28 | if not env_gd_spritestudio.msvc:
29 | env_gd_spritestudio.Append(CXXFLAGS=["-Wno-inconsistent-missing-override"])
30 |
31 | if env['platform'] == 'macos':
32 | env_gd_spritestudio.Append(LINKFLAGS=['-framework', 'Metal'])
33 |
--------------------------------------------------------------------------------
/examples/feature_test/base_dir.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=6 format=2]
2 |
3 | [ext_resource path="res://basedir/BaseDir.sspj" type="GdResourceSsProject" id=1]
4 | [ext_resource path="res://sspj_load.gd" type="Script" id=2]
5 |
6 |
7 | [sub_resource type="GdResourceSsPlayer" id=1]
8 | resProject = ExtResource( 1 )
9 |
10 | [sub_resource type="Animation" id=3]
11 | length = 0.001
12 | tracks/0/type = "value"
13 | tracks/0/path = NodePath("GdNodeSsPlayer:frame")
14 | tracks/0/interp = 1
15 | tracks/0/loop_wrap = true
16 | tracks/0/imported = false
17 | tracks/0/enabled = true
18 | tracks/0/keys = {
19 | "times": PoolRealArray( 0 ),
20 | "transitions": PoolRealArray( 1 ),
21 | "update": 1,
22 | "values": [ 0 ]
23 | }
24 |
25 | [sub_resource type="Animation" id=2]
26 | resource_name = "SsPlayer"
27 | loop = true
28 | tracks/0/type = "value"
29 | tracks/0/path = NodePath("GdNodeSsPlayer:frame")
30 | tracks/0/interp = 1
31 | tracks/0/loop_wrap = true
32 | tracks/0/imported = false
33 | tracks/0/enabled = true
34 | tracks/0/keys = {
35 | "times": PoolRealArray( 0, 1 ),
36 | "transitions": PoolRealArray( 1, 1 ),
37 | "update": 0,
38 | "values": [ 0, 30 ]
39 | }
40 |
41 | [node name="base_dir" type="Node2D"]
42 | script = ExtResource( 2 )
43 |
44 | [node name="GdNodeSsPlayer" type="GdNodeSsPlayer" parent="."]
45 | position = Vector2( 35, 34 )
46 | resPlayer = SubResource( 1 )
47 | animePack = "NewAnimation.ssae"
48 | animation = "anime_1"
49 | frame = 0
50 |
51 | [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
52 | anims/RESET = SubResource( 3 )
53 | anims/SsPlayer = SubResource( 2 )
54 |
--------------------------------------------------------------------------------
/gd_spritestudio/ss_texture_impl.cpp:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file ss_texture_impl.cpp
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #include "ss_texture_impl.h"
6 |
7 | #include "gd_macros.h"
8 |
9 | SsTextureImpl::SsTextureImpl()
10 | {
11 | }
12 |
13 | SsTextureImpl::~SsTextureImpl()
14 | {
15 | }
16 |
17 | int SsTextureImpl::getWidth()
18 | {
19 | if ( m_Texture.is_valid() ) {
20 | return m_Texture->get_width();
21 | }
22 |
23 | return 0;
24 | }
25 |
26 | int SsTextureImpl::getHeight()
27 | {
28 | if ( m_Texture.is_valid() ) {
29 | return m_Texture->get_height();
30 | }
31 |
32 | return 0;
33 | }
34 |
35 | bool SsTextureImpl::Load( const char* filename )
36 | {
37 | Error err;
38 |
39 |
40 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
41 | m_Texture = ResourceLoader::get_singleton()->load( filename, "", ResourceLoader::CACHE_MODE_REUSE);
42 | err = OK; // TODO: improve
43 | #else
44 | #ifdef GD_V4
45 | m_Texture = ResourceLoader::load( filename, "", ResourceFormatLoader::CacheMode::CACHE_MODE_REUSE);
46 | err = OK; // TODO: improve
47 | #endif
48 | #ifdef GD_V3
49 | m_Texture = ResourceLoader::load( filename, "", false, &err );
50 | #endif
51 | #endif
52 |
53 | if ( err != OK ) {
54 | ERR_PRINT( "SS Texture Load error : " + String( filename ) );
55 | return false;
56 | }
57 |
58 | return true;
59 | }
60 |
61 | ISSTexture* SsTextureImpl::create()
62 | {
63 | return new SsTextureImpl();
64 | }
65 |
66 | void SsTextureImpl::setTexture( Ref texture )
67 | {
68 | m_Texture = texture;
69 | }
70 |
71 | Ref SsTextureImpl::getTexture() const
72 | {
73 | return m_Texture;
74 | }
75 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/base_dir.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=6 format=2]
2 |
3 | [ext_resource path="res://basedir/BaseDir.sspj" type="GdResourceSsProject" id=1]
4 | [ext_resource path="res://sspj_load.gd" type="Script" id=2]
5 |
6 |
7 | [sub_resource type="GdResourceSsPlayer" id=1]
8 | resProject = ExtResource( 1 )
9 |
10 | [sub_resource type="Animation" id=3]
11 | length = 0.001
12 | tracks/0/type = "value"
13 | tracks/0/path = NodePath("GdNodeSsPlayer:frame")
14 | tracks/0/interp = 1
15 | tracks/0/loop_wrap = true
16 | tracks/0/imported = false
17 | tracks/0/enabled = true
18 | tracks/0/keys = {
19 | "times": PackedFloat32Array( 0 ),
20 | "transitions": PackedFloat32Array( 1 ),
21 | "update": 1,
22 | "values": [ 0 ]
23 | }
24 |
25 | [sub_resource type="Animation" id=2]
26 | resource_name = "SsPlayer"
27 | loop = true
28 | tracks/0/type = "value"
29 | tracks/0/path = NodePath("GdNodeSsPlayer:frame")
30 | tracks/0/interp = 1
31 | tracks/0/loop_wrap = true
32 | tracks/0/imported = false
33 | tracks/0/enabled = true
34 | tracks/0/keys = {
35 | "times": PackedFloat32Array( 0, 1 ),
36 | "transitions": PackedFloat32Array( 1, 1 ),
37 | "update": 0,
38 | "values": [ 0, 30 ]
39 | }
40 |
41 | [node name="base_dir" type="Node2D"]
42 | script = ExtResource( 2 )
43 |
44 | [node name="GdNodeSsPlayer" type="GdNodeSsPlayer" parent="."]
45 | position = Vector2( 35, 34 )
46 | resPlayer = SubResource( 1 )
47 | animePack = "NewAnimation.ssae"
48 | animation = "anime_1"
49 | frame = 0
50 |
51 | [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
52 | anims/RESET = SubResource( 3 )
53 | anims/SsPlayer = SubResource( 2 )
54 |
--------------------------------------------------------------------------------
/.github/actions/setup-godot/action.yml:
--------------------------------------------------------------------------------
1 | name: Setup godot
2 | description: Setup build dependencies for godot.
3 |
4 | inputs:
5 | platform:
6 | required: true
7 | description: Target platform.
8 |
9 | runs:
10 | using: composite
11 | steps:
12 | - name: prepare scons
13 | uses: ./.github/actions/setup-scons
14 |
15 | - name: install Vulkan SDK
16 | shell: bash
17 | run: |
18 | curl -L "https://sdk.lunarg.com/sdk/download/1.4.321.0/mac/vulkansdk-macos-1.4.321.0.zip" -o /tmp/vulkan-sdk.zip
19 | unzip /tmp/vulkan-sdk.zip -d /tmp/vulkan-sdk
20 | /tmp/vulkan-sdk/vulkansdk-macOS-1.4.321.0.app/Contents/MacOS/vulkansdk-macOS-1.4.321.0 --accept-licenses --default-answer --confirm-command install
21 | rm -f /tmp/vulkan-sdk.zip
22 | rm -rf /tmp/vulkan-sdk
23 | if: inputs.platform == 'macos'
24 |
25 | - name: Download Direct3D 12 SDK components
26 | shell: cmd
27 | run: python ./godot/misc/scripts/install_d3d12_sdk_windows.py
28 | if: inputs.platform == 'windows'
29 |
30 | - name: Download pre-built ANGLE static libraries
31 | uses: dsaltares/fetch-gh-release-asset@1.1.2
32 | with:
33 | repo: godotengine/godot-angle-static
34 | version: tags/chromium/6601.2
35 | file: godot-angle-static-x86_64-msvc-release.zip
36 | target: angle/angle.zip
37 | if: inputs.platform == 'windows'
38 |
39 | - name: Extract pre-built ANGLE static libraries
40 | shell: pwsh
41 | run: Expand-Archive -Force angle/angle.zip ${{github.workspace}}/
42 | if: inputs.platform == 'windows'
43 |
--------------------------------------------------------------------------------
/examples/feature_test/ssdata/sequence.ssqe:
--------------------------------------------------------------------------------
1 |
2 |
3 | sequence
4 |
5 |
6 |
7 | keep_lastframe
8 | 1
9 | KEEP
10 |
11 |
12 | Effect
13 | anime_1
14 | 1
15 |
16 |
17 | Mask
18 | anime_1
19 | 1
20 |
21 |
22 |
23 |
24 | loop_last
25 | 0
26 | LAST
27 |
28 |
29 | Effect
30 | anime_1
31 | 1
32 |
33 |
34 | Mask
35 | anime_1
36 | 1
37 |
38 |
39 |
40 |
41 | loop_whole
42 | 2
43 | TOP
44 |
45 |
46 | Effect
47 | anime_1
48 | 1
49 |
50 |
51 | Mask
52 | anime_1
53 | 1
54 |
55 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_saver_bsseffect.h:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_saver_bsseffect.h
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #ifndef GD_SAVER_BSSEFFECT_H
6 | #define GD_SAVER_BSSEFFECT_H
7 |
8 | #include "gd_macros.h"
9 |
10 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
11 | #include
12 | #include
13 | #include
14 | using namespace godot;
15 | #else
16 | #include "core/io/resource_saver.h"
17 | #endif
18 |
19 | class GdSaverBssEffect : public ResourceFormatSaver
20 | {
21 | GDCLASS( GdSaverBssEffect, ResourceFormatSaver );
22 |
23 | public :
24 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
25 | static void _bind_methods(){};
26 | Error _save(const Ref &p_resource, const String &p_path, uint32_t p_flags) override;
27 | bool _recognize(const Ref &p_resource);
28 | PackedStringArray _get_recognized_extensions(const Ref &p_resource);
29 | #else
30 | #ifdef GD_V4
31 | virtual Error save( const Ref& p_resource, const String& p_path, uint32_t p_flags = 0 ) override;
32 | virtual bool recognize( const Ref& p_resource ) const override;
33 | virtual void get_recognized_extensions( const Ref& p_resource, List* p_extensions ) const override;
34 | #endif
35 | #ifdef GD_V3
36 | virtual Error save( const String& p_path, const RES& p_resource, uint32_t p_flags = 0 ) override;
37 | virtual bool recognize( const RES& p_resource ) const override;
38 | virtual void get_recognized_extensions( const RES& p_resource, List* p_extensions ) const override;
39 | #endif
40 | #endif
41 | };
42 |
43 | #endif // GD_SAVER_BSSEFFECT_H
44 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_saver_bsscellmap.h:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_saver_bsscellmap.h
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #ifndef GD_SAVER_BSSCELLMAP_H
6 | #define GD_SAVER_BSSCELLMAP_H
7 |
8 | #include "gd_macros.h"
9 |
10 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
11 | #include
12 | #include
13 | #include
14 | using namespace godot;
15 | #else
16 | #include "core/io/resource_saver.h"
17 | #endif
18 |
19 | class GdSaverBssCellMap : public ResourceFormatSaver
20 | {
21 | GDCLASS( GdSaverBssCellMap, ResourceFormatSaver );
22 |
23 | public :
24 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
25 | static void _bind_methods(){};
26 | Error _save(const Ref &p_resource, const String &p_path, uint32_t p_flags) override;
27 | bool _recognize(const Ref &p_resource);
28 | PackedStringArray _get_recognized_extensions(const Ref &p_resource);
29 | #else
30 | #ifdef GD_V4
31 | virtual Error save( const Ref& p_resource, const String& p_path, uint32_t p_flags = 0 ) override;
32 | virtual bool recognize( const Ref& p_resource ) const override;
33 | virtual void get_recognized_extensions( const Ref& p_resource, List* p_extensions ) const override;
34 | #endif
35 | #ifdef GD_V3
36 | virtual Error save( const String& p_path, const RES& p_resource, uint32_t p_flags = 0 ) override;
37 | virtual bool recognize( const RES& p_resource ) const override;
38 | virtual void get_recognized_extensions( const RES& p_resource, List* p_extensions ) const override;
39 | #endif
40 | #endif
41 | };
42 |
43 | #endif // GD_SAVER_BSSCELLMAP_H
44 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_saver_bssproject.h:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_saver_bssproject.h
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #ifndef GD_SAVER_BSSPROJECT_H
6 | #define GD_SAVER_BSSPROJECT_H
7 |
8 | #include "gd_macros.h"
9 |
10 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
11 | #include
12 | #include
13 | #include
14 | using namespace godot;
15 | #else
16 | #include "core/io/resource_saver.h"
17 | #endif
18 |
19 | class GdSaverBssProject : public ResourceFormatSaver
20 | {
21 | GDCLASS( GdSaverBssProject, ResourceFormatSaver );
22 |
23 | public :
24 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
25 | static void _bind_methods(){};
26 | Error _save(const Ref &p_resource, const String &p_path, uint32_t p_flags) override;
27 | bool _recognize(const Ref &p_resource);
28 | PackedStringArray _get_recognized_extensions(const Ref &p_resource);
29 | #else
30 | #ifdef GD_V4
31 | virtual Error save( const Ref& p_resource, const String& p_path, uint32_t p_flags = 0 ) override;
32 | virtual bool recognize( const Ref& p_resource ) const override;
33 | virtual void get_recognized_extensions( const Ref& p_resource, List* p_extensions ) const override;
34 | #endif
35 | #ifdef GD_V3
36 | virtual Error save( const String& p_path, const RES& p_resource, uint32_t p_flags = 0 ) override;
37 | virtual bool recognize( const RES& p_resource ) const override;
38 | virtual void get_recognized_extensions( const RES& p_resource, List* p_extensions ) const override;
39 | #endif
40 | #endif
41 | };
42 |
43 | #endif // GD_SAVER_BSSPROJECT_H
44 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/ssdata/sequence.ssqe:
--------------------------------------------------------------------------------
1 |
2 |
3 | sequence
4 |
5 |
6 |
7 | keep_lastframe
8 | 1
9 | KEEP
10 |
11 |
12 | Effect
13 | anime_1
14 | 1
15 |
16 |
17 | Mask
18 | anime_1
19 | 1
20 |
21 |
22 |
23 |
24 | loop_last
25 | 0
26 | LAST
27 |
28 |
29 | Effect
30 | anime_1
31 | 1
32 |
33 |
34 | Mask
35 | anime_1
36 | 1
37 |
38 |
39 |
40 |
41 | loop_whole
42 | 2
43 | TOP
44 |
45 |
46 | Effect
47 | anime_1
48 | 1
49 |
50 |
51 | Mask
52 | anime_1
53 | 1
54 |
55 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_saver_bssanimepack.h:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_saver_bssanimepack.h
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #ifndef GD_SAVER_BSSANIMEPACK_H
6 | #define GD_SAVER_BSSANIMEPACK_H
7 |
8 | #include "gd_macros.h"
9 |
10 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
11 | #include
12 | #include
13 | #include
14 | using namespace godot;
15 | #else
16 | #include "core/io/resource_saver.h"
17 | #endif
18 |
19 | class GdSaverBssAnimePack : public ResourceFormatSaver
20 | {
21 | GDCLASS( GdSaverBssAnimePack, ResourceFormatSaver );
22 |
23 | public :
24 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
25 | static void _bind_methods(){};
26 | Error _save(const Ref &p_resource, const String &p_path, uint32_t p_flags) override;
27 | bool _recognize(const Ref &p_resource);
28 | PackedStringArray _get_recognized_extensions(const Ref &p_resource);
29 | #else
30 | #ifdef GD_V4
31 | virtual Error save( const Ref& p_resource, const String& p_path, uint32_t p_flags = 0 ) override;
32 | virtual bool recognize( const Ref& p_resource ) const override;
33 | virtual void get_recognized_extensions( const Ref& p_resource, List* p_extensions ) const override;
34 | #endif
35 | #ifdef GD_V3
36 | virtual Error save( const String& p_path, const RES& p_resource, uint32_t p_flags = 0 ) override;
37 | virtual bool recognize( const RES& p_resource ) const override;
38 | virtual void get_recognized_extensions( const RES& p_resource, List* p_extensions ) const override;
39 | #endif
40 | #endif
41 | };
42 |
43 | #endif // GD_SAVER_BSSANIMEPACK_H
44 |
--------------------------------------------------------------------------------
/gd_spritestudio/ss_container.h:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file ss_container.h
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #ifndef SS_CONTAINER_H
6 | #define SS_CONTAINER_H
7 |
8 | #include "ss_container_item.h"
9 |
10 | class SsContainer
11 | {
12 | private :
13 | SsContainer();
14 |
15 | public :
16 | virtual ~SsContainer();
17 |
18 | static SsContainer& getInstance();
19 |
20 | SsProject* loadProjectFromFile( const String& strPath, bool bAutoDelete = true );
21 | SsAnimePack* loadAnimePackFromFile( const String& strPath, bool bAutoDelete = true );
22 | SsCellMap* loadCellMapFromFile( const String& strPath, bool bAutoDelete = true );
23 | SsEffectFile* loadEffectFromFile( const String& strPath, bool bAutoDelete = true );
24 |
25 | void unloadProject( SsProject* pProject );
26 | void unloadAnimePack( SsAnimePack* pAnimePack );
27 | void unloadCellMap( SsCellMap* pCellMap );
28 | void unloadEffect( SsEffectFile* pEffect );
29 |
30 | void setAnimePackDir( const String& strPath );
31 | void setCellMapDir( const String& strPath );
32 | void setImageDir( const String& strPath );
33 | void setEffectDir( const String& strPath );
34 |
35 | const String& getAnimePackDir() const;
36 | const String& getCellMapDir() const;
37 | const String& getImageDir() const;
38 | const String& getEffectDir() const;
39 |
40 | private :
41 | Vector m_vecItemProject;
42 | Vector m_vecItemAnimePack;
43 | Vector m_vecItemCellMap;
44 | Vector m_vecItemEffect;
45 |
46 | String m_strAnimePack;
47 | String m_strCellMap;
48 | String m_strImage;
49 | String m_strEffect;
50 | };
51 |
52 | #endif // SS_CONTAINER_H
53 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_resource_ssanimepack.h:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_resource_ssanimepack.h
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #ifndef GD_RESOURCE_SSANIMEPACK_H
6 | #define GD_RESOURCE_SSANIMEPACK_H
7 |
8 | #include "gd_macros.h"
9 |
10 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
11 | #include
12 | using namespace godot;
13 | #else
14 | #ifdef GD_V4
15 | #include "core/io/resource.h"
16 | #endif
17 | #ifdef GD_V3
18 | #include "core/resource.h"
19 | #endif
20 | #endif
21 |
22 | #include "SpriteStudio6-SDK/Common/Loader/ssloader_ssae.h"
23 |
24 | #include "ss_macros.h"
25 | #include "gd_resource_sscellmap.h"
26 |
27 | SsSdkUsing
28 |
29 | class GdResourceSsAnimePack : public Resource
30 | {
31 | GDCLASS( GdResourceSsAnimePack, Resource );
32 |
33 | public :
34 | GdResourceSsAnimePack();
35 | virtual ~GdResourceSsAnimePack();
36 |
37 | void setCellMapResource( const Ref& resCellMap, int iIndex );
38 | Ref getCellMapResource( int iIndex ) const;
39 |
40 | Error loadFromFile( const String& strPath, const String& strOrgPath = "" );
41 | Error saveToFile( const String& strPath, const Ref& res );
42 |
43 | int getAnimationCount() const;
44 |
45 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
46 | PackedStringArray getAnimationNames() const;
47 | #else
48 | Vector getAnimationNames() const;
49 | #endif
50 |
51 | SsAnimePack* getAnimePack() const;
52 |
53 | SsModel* getModel() const;
54 |
55 | SsAnimation* findAnimation( String strName ) const;
56 |
57 | protected :
58 | GdMultilevelCall static void _bind_methods();
59 |
60 | private :
61 | SsAnimePack* m_pAnimePack;
62 | };
63 |
64 | #endif // GD_RESOURCE_SSANIMEPACK_H
65 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_loader_sseffect.h:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_loader_sseffect.h
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #ifndef GD_LOADER_SSEFFECT_H
6 | #define GD_LOADER_SSEFFECT_H
7 |
8 | #include "gd_macros.h"
9 |
10 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
11 | #include
12 | #include
13 | #include
14 | using namespace godot;
15 | #else
16 | #include "core/io/resource_loader.h"
17 | #endif
18 |
19 | class GdLoaderSsEffect : public ResourceFormatLoader
20 | {
21 | GDCLASS( GdLoaderSsEffect, ResourceFormatLoader );
22 |
23 | public :
24 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
25 | static void _bind_methods(){};
26 |
27 | PackedStringArray _get_recognized_extensions();
28 |
29 | bool _handles_type(const StringName &p_type);
30 |
31 | String _get_resource_type(const String &path);
32 |
33 | Variant _load(const String &p_path, const String &p_original_path, bool use_sub_threads, int32_t cache_mode);
34 | #else
35 | #ifdef GD_V4
36 | 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;
37 | #endif
38 | #ifdef GD_V3
39 | virtual RES load( const String& p_path, const String& p_original_path = "", Error* r_error = nullptr, bool p_no_subresource_cache = false ) override;
40 | #endif
41 | virtual void get_recognized_extensions( List* p_extensions ) const override;
42 | virtual bool handles_type( const String& p_type ) const override;
43 | virtual String get_resource_type( const String& p_path ) const override;
44 | #endif
45 | };
46 |
47 | #endif // GD_LOADER_SSEFFECT_H
48 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_loader_bsseffect.h:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_loader_bsseffect.h
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #ifndef GD_LOADER_BSSEFFECT_H
6 | #define GD_LOADER_BSSEFFECT_H
7 |
8 | #include "gd_macros.h"
9 |
10 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
11 | #include
12 | #include
13 | #include
14 | using namespace godot;
15 | #else
16 | #include "core/io/resource_loader.h"
17 | #endif
18 |
19 | class GdLoaderBssEffect : public ResourceFormatLoader
20 | {
21 | GDCLASS( GdLoaderBssEffect, ResourceFormatLoader );
22 |
23 | public :
24 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
25 | static void _bind_methods(){};
26 |
27 | PackedStringArray _get_recognized_extensions();
28 |
29 | bool _handles_type(const StringName &p_type);
30 |
31 | String _get_resource_type(const String &path);
32 |
33 | Variant _load(const String &p_path, const String &p_original_path, bool use_sub_threads, int32_t cache_mode);
34 | #else
35 | #ifdef GD_V4
36 | 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;
37 | #endif
38 | #ifdef GD_V3
39 | virtual RES load( const String& p_path, const String& p_original_path = "", Error* r_error = nullptr, bool p_no_subresource_cache = false ) override;
40 | #endif
41 | virtual void get_recognized_extensions( List* p_extensions ) const override;
42 | virtual bool handles_type( const String& p_type ) const override;
43 | virtual String get_resource_type( const String& p_path ) const override;
44 | #endif
45 | };
46 |
47 | #endif // GD_LOADER_BSSEFFECT_H
48 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_loader_ssproject.h:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_loader_ssproject.h
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #ifndef GD_LOADER_SSPROJECT_H
6 | #define GD_LOADER_SSPROJECT_H
7 |
8 | #include "gd_macros.h"
9 |
10 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
11 | #include
12 | #include
13 | #include
14 | using namespace godot;
15 | #else
16 | #include "core/io/resource_loader.h"
17 | #endif
18 |
19 | class GdLoaderSsProject : public ResourceFormatLoader
20 | {
21 | GDCLASS( GdLoaderSsProject, ResourceFormatLoader );
22 |
23 | public :
24 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
25 | static void _bind_methods(){};
26 |
27 | PackedStringArray _get_recognized_extensions();
28 |
29 | bool _handles_type(const StringName &p_type);
30 |
31 | String _get_resource_type(const String &path);
32 |
33 | Variant _load(const String &p_path, const String &p_original_path, bool use_sub_threads, int32_t cache_mode);
34 | #else
35 | #ifdef GD_V4
36 | 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;
37 | #endif
38 | #ifdef GD_V3
39 | virtual RES load( const String& p_path, const String& p_original_path = "", Error* r_error = nullptr, bool p_no_subresource_cache = false ) override;
40 | #endif
41 | virtual void get_recognized_extensions( List* p_extensions ) const override;
42 | virtual bool handles_type( const String& p_type ) const override;
43 | virtual String get_resource_type( const String& p_path ) const override;
44 | #endif
45 | };
46 |
47 | #endif // GD_LOADER_SSPROJECT_H
48 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_loader_bsscellmap.h:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_loader_bsscellmap.h
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #ifndef GD_LOADER_BSSCELLMAP_H
6 | #define GD_LOADER_BSSCELLMAP_H
7 |
8 | #include "gd_macros.h"
9 |
10 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
11 | #include
12 | #include
13 | #include
14 | using namespace godot;
15 | #else
16 | #include "core/io/resource_loader.h"
17 | #endif
18 |
19 | class GdLoaderBssCellMap : public ResourceFormatLoader
20 | {
21 | GDCLASS( GdLoaderBssCellMap, ResourceFormatLoader );
22 |
23 | public :
24 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
25 | static void _bind_methods(){};
26 |
27 | PackedStringArray _get_recognized_extensions();
28 |
29 | bool _handles_type(const StringName &p_type);
30 |
31 | String _get_resource_type(const String &path);
32 |
33 | Variant _load(const String &p_path, const String &p_original_path, bool use_sub_threads, int32_t cache_mode);
34 | #else
35 | #ifdef GD_V4
36 | 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;
37 | #endif
38 | #ifdef GD_V3
39 | virtual RES load( const String& p_path, const String& p_original_path = "", Error* r_error = nullptr, bool p_no_subresource_cache = false ) override;
40 | #endif
41 | virtual void get_recognized_extensions( List* p_extensions ) const override;
42 | virtual bool handles_type( const String& p_type ) const override;
43 | virtual String get_resource_type( const String& p_path ) const override;
44 | #endif
45 | };
46 |
47 | #endif // GD_LOADER_BSSCELLMAP_H
48 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_loader_bssproject.h:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_loader_bssproject.h
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #ifndef GD_LOADER_BSSPROJECT_H
6 | #define GD_LOADER_BSSPROJECT_H
7 |
8 | #include "gd_macros.h"
9 |
10 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
11 | #include
12 | #include
13 | #include
14 | using namespace godot;
15 | #else
16 | #include "core/io/resource_loader.h"
17 | #endif
18 |
19 | class GdLoaderBssProject : public ResourceFormatLoader
20 | {
21 | GDCLASS( GdLoaderBssProject, ResourceFormatLoader );
22 |
23 | public :
24 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
25 | static void _bind_methods(){};
26 |
27 | PackedStringArray _get_recognized_extensions();
28 |
29 | bool _handles_type(const StringName &p_type);
30 |
31 | String _get_resource_type(const String &path);
32 |
33 | Variant _load(const String &p_path, const String &p_original_path, bool use_sub_threads, int32_t cache_mode);
34 | #else
35 | #ifdef GD_V4
36 | 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;
37 | #endif
38 | #ifdef GD_V3
39 | virtual RES load( const String& p_path, const String& p_original_path = "", Error* r_error = nullptr, bool p_no_subresource_cache = false ) override;
40 | #endif
41 | virtual void get_recognized_extensions( List* p_extensions ) const override;
42 | virtual bool handles_type( const String& p_type ) const override;
43 | virtual String get_resource_type( const String& p_path ) const override;
44 | #endif
45 | };
46 |
47 | #endif // GD_LOADER_BSSPROJECT_H
48 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_loader_bssanimepack.h:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_loader_bssanimepack.h
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #ifndef GD_LOADER_BSSANIMEPACK_H
6 | #define GD_LOADER_BSSANIMEPACK_H
7 |
8 | #include "gd_macros.h"
9 |
10 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
11 | #include
12 | #include
13 | #include
14 | using namespace godot;
15 | #else
16 | #include "core/io/resource_loader.h"
17 | #endif
18 |
19 | class GdLoaderBssAnimePack : public ResourceFormatLoader
20 | {
21 | GDCLASS( GdLoaderBssAnimePack, ResourceFormatLoader );
22 |
23 | public :
24 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
25 | static void _bind_methods(){};
26 |
27 | PackedStringArray _get_recognized_extensions();
28 |
29 | bool _handles_type(const StringName &p_type);
30 |
31 | String _get_resource_type(const String &path);
32 |
33 | Variant _load(const String &p_path, const String &p_original_path, bool use_sub_threads, int32_t cache_mode);
34 | #else
35 | #ifdef GD_V4
36 | 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;
37 | #endif
38 | #ifdef GD_V3
39 | virtual RES load( const String& p_path, const String& p_original_path = "", Error* r_error = nullptr, bool p_no_subresource_cache = false ) override;
40 | #endif
41 | virtual void get_recognized_extensions( List* p_extensions ) const override;
42 | virtual bool handles_type( const String& p_type ) const override;
43 | virtual String get_resource_type( const String& p_path ) const override;
44 | #endif
45 | };
46 |
47 | #endif // GD_LOADER_BSSANIMEPACK_H
48 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_loader_ssanimepack.h:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_loader_ssanimepack.h
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #ifndef GD_LOADER_SSANIMEPACK_H
6 | #define GD_LOADER_SSANIMEPACK_H
7 |
8 | #include "gd_macros.h"
9 |
10 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
11 | #include
12 | #include
13 | #include
14 | using namespace godot;
15 | #else
16 | #include "core/io/resource_loader.h"
17 | #endif
18 |
19 | class GdLoaderSsAnimePack : public ResourceFormatLoader
20 | {
21 | GDCLASS( GdLoaderSsAnimePack, ResourceFormatLoader );
22 |
23 | public :
24 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
25 | static void _bind_methods(){};
26 |
27 | PackedStringArray _get_recognized_extensions();
28 |
29 | bool _handles_type(const StringName &p_type);
30 |
31 | String _get_resource_type(const String &p_path);
32 |
33 | Variant _load(const String &p_path, const String &p_original_path, bool p_use_sub_threads, int32_t p_cache_mode);
34 | #else
35 | #ifdef GD_V4
36 | 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;
37 | #endif
38 | #ifdef GD_V3
39 | virtual RES load( const String& p_path, const String& p_original_path = "", Error* r_error = nullptr, bool p_no_subresource_cache = false ) override;
40 | #endif
41 | virtual void get_recognized_extensions( List* p_extensions ) const override;
42 | virtual bool handles_type( const String& p_type ) const override;
43 | virtual String get_resource_type( const String& p_path ) const override;
44 | #endif
45 | };
46 |
47 | #endif // GD_LOADER_SSANIMEPACK_H
48 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_loader_sscellmap.h:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_loader_sscellmap.h
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #ifndef GD_LOADER_SSCELLMAP_H
6 | #define GD_LOADER_SSCELLMAP_H
7 |
8 | #include "gd_macros.h"
9 |
10 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
11 | #include
12 | #include
13 | #include
14 | using namespace godot;
15 | #else
16 | #include "core/io/resource_loader.h"
17 | #endif
18 |
19 | class GdLoaderSsCellMap : public ResourceFormatLoader
20 | {
21 | GDCLASS( GdLoaderSsCellMap, ResourceFormatLoader );
22 |
23 | public :
24 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
25 | static void _bind_methods(){};
26 |
27 | PackedStringArray _get_recognized_extensions();
28 |
29 | bool _handles_type(const StringName &p_type);
30 |
31 | String _get_resource_type(const String &path);
32 |
33 | 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);
34 | #else
35 | #ifdef GD_V4
36 | 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;
37 | #endif
38 | #ifdef GD_V3
39 | virtual RES load( const String& p_path, const String& p_original_path = "", Error* r_error = nullptr, bool p_no_subresource_cache = false ) override;
40 | #endif
41 | virtual void get_recognized_extensions( List* p_extensions ) const override;
42 | virtual bool handles_type( const String& p_type ) const override;
43 | virtual String get_resource_type( const String& p_path ) const override;
44 | #endif
45 | };
46 |
47 | #endif // GD_LOADER_SSCELLMAP_H
48 |
--------------------------------------------------------------------------------
/misc/ssplayer_godot_extension.gdextension:
--------------------------------------------------------------------------------
1 | [configuration]
2 |
3 | entry_symbol = "spritestudio_godot_library_init"
4 | compatibility_minimum = "4.4"
5 |
6 | [libraries]
7 |
8 | macos.editor = "macos/libSSGodot.macos.editor.framework"
9 | macos.debug = "macos/libSSGodot.macos.template_debug.framework"
10 | macos.release = "macos/libSSGodot.macos.template_release.framework"
11 |
12 | ios.debug = "ios/libSSGodot.ios.template_debug.framework"
13 | ios.release = "ios/libSSGodot.ios.template_debug.framework"
14 |
15 | windows.editor.x86_64 = "windows/libSSGodot.windows.editor.x86_64.dll"
16 | windows.debug.x86_64 = "windows/libSSGodot.windows.template_debug.x86_64.dll"
17 | windows.release.x86_64 = "windows/libSSGodot.windows.template_release.x86_64.dll"
18 |
19 | android.debug.x86_64 = "android/libSSGodot.android.template_debug.x86_64.so"
20 | android.release.x86_64 = "android/libSSGodot.android.template_release.x86_64.so"
21 |
22 | android.debug.arm32 = "android/libSSGodot.android.template_debug.arm32.so"
23 | android.release.arm32 = "android/libSSGodot.android.template_release.arm32.so"
24 |
25 | android.debug.arm64 = "android/libSSGodot.android.template_debug.arm64.so"
26 | android.release.arm64 = "android/libSSGodot.android.template_release.arm64.so"
27 |
28 | web.debug.threads.wasm32 = "web/libSSGodot.web.template_debug.wasm32.wasm"
29 | web.release.threads.wasm32 = "web/libSSGodot.web.template_release.wasm32.wasm"
30 |
31 | web.debug.wasm32 = "web/libSSGodot.web.template_debug.wasm32.nothreads.wasm"
32 | web.release.wasm32 = "web/libSSGodot.web.template_release.wasm32.nothreads.wasm"
33 |
34 | linux.editor.x86_64 = "linux/libSSGodot.linux.editor.x86_64.so"
35 | linux.debug.x86_64 = "linux/libSSGodot.linux.template_debug.x86_64.so"
36 | linux.release.x86_64 = "linux/libSSGodot.linux.template_release.x86_64.so"
37 |
--------------------------------------------------------------------------------
/examples/particle_effect/ParticleEffect/029a.ssee:
--------------------------------------------------------------------------------
1 |
2 |
3 | 029a
4 |
5 |
6 | 0
7 | 0
8 | 30
9 | FF000000
10 | 2
11 | 100
12 | 100
13 |
14 |
15 | Root
16 | Root
17 | 0
18 | -1
19 | 1
20 |
21 |
22 | Emitter_1
23 | Emmiter
24 | 1
25 | 0
26 | 1
27 |
28 | balllight
29 | ss_effect.ssce
30 | Add
31 |
32 |
33 | Basic
34 | 64
35 | 50
36 | 1
37 | 1
38 | 30
39 |
40 |
41 | 0
42 | 45
43 |
44 |
45 |
46 |
47 |
48 | Particle_1
49 | Particle
50 | 2
51 | 1
52 | 1
53 |
54 |
55 |
56 | Add
57 |
58 |
59 |
60 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/examples/feature_test/basedir/animes/NewEffect.ssee:
--------------------------------------------------------------------------------
1 |
2 |
3 | NewEffect
4 |
5 |
6 | 0
7 | 0
8 | 30
9 | FF000000
10 | 2
11 | 100
12 | 100
13 |
14 |
15 | Root
16 | Root
17 | 0
18 | -1
19 | 1
20 |
21 |
22 | Emitter_1
23 | Emmiter
24 | 1
25 | 0
26 | 1
27 |
28 | Check
29 | common.ssce
30 | Add
31 |
32 |
33 | Basic
34 | 64
35 | 20
36 | 1
37 | 1
38 | 30
39 |
40 |
41 | 0
42 | 45
43 |
44 |
45 |
46 |
47 |
48 | Particle_1
49 | Particle
50 | 2
51 | 1
52 | 1
53 |
54 |
55 |
56 | Add
57 |
58 |
59 |
60 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/examples/feature_test/basedir/effects/NewEffect.ssee:
--------------------------------------------------------------------------------
1 |
2 |
3 | NewEffect
4 |
5 |
6 | 0
7 | 0
8 | 30
9 | FF000000
10 | 2
11 | 100
12 | 100
13 |
14 |
15 | Root
16 | Root
17 | 0
18 | -1
19 | 1
20 |
21 |
22 | Emitter_1
23 | Emmiter
24 | 1
25 | 0
26 | 1
27 |
28 | Check
29 | common.ssce
30 | Add
31 |
32 |
33 | Basic
34 | 64
35 | 20
36 | 1
37 | 1
38 | 30
39 |
40 |
41 | 0
42 | 45
43 |
44 |
45 |
46 |
47 |
48 | Particle_1
49 | Particle
50 | 2
51 | 1
52 | 1
53 |
54 |
55 |
56 | Add
57 |
58 |
59 |
60 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/basedir/animes/NewEffect.ssee:
--------------------------------------------------------------------------------
1 |
2 |
3 | NewEffect
4 |
5 |
6 | 0
7 | 0
8 | 30
9 | FF000000
10 | 2
11 | 100
12 | 100
13 |
14 |
15 | Root
16 | Root
17 | 0
18 | -1
19 | 1
20 |
21 |
22 | Emitter_1
23 | Emmiter
24 | 1
25 | 0
26 | 1
27 |
28 | Check
29 | common.ssce
30 | Add
31 |
32 |
33 | Basic
34 | 64
35 | 20
36 | 1
37 | 1
38 | 30
39 |
40 |
41 | 0
42 | 45
43 |
44 |
45 |
46 |
47 |
48 | Particle_1
49 | Particle
50 | 2
51 | 1
52 | 1
53 |
54 |
55 |
56 | Add
57 |
58 |
59 |
60 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/basedir/effects/NewEffect.ssee:
--------------------------------------------------------------------------------
1 |
2 |
3 | NewEffect
4 |
5 |
6 | 0
7 | 0
8 | 30
9 | FF000000
10 | 2
11 | 100
12 | 100
13 |
14 |
15 | Root
16 | Root
17 | 0
18 | -1
19 | 1
20 |
21 |
22 | Emitter_1
23 | Emmiter
24 | 1
25 | 0
26 | 1
27 |
28 | Check
29 | common.ssce
30 | Add
31 |
32 |
33 | Basic
34 | 64
35 | 20
36 | 1
37 | 1
38 | 30
39 |
40 |
41 | 0
42 | 45
43 |
44 |
45 |
46 |
47 |
48 | Particle_1
49 | Particle
50 | 2
51 | 1
52 | 1
53 |
54 |
55 |
56 | Add
57 |
58 |
59 |
60 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_notifier.cpp:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_notifier.cpp
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #include "gd_notifier.h"
6 |
7 | GdNotifier::GdNotifier()
8 | {
9 | m_vecItem.clear();
10 | }
11 |
12 | GdNotifier::~GdNotifier()
13 | {
14 | m_vecItem.clear();
15 | }
16 |
17 | GdNotifier& GdNotifier::getInstance()
18 | {
19 | static GdNotifier m_Self;
20 |
21 | return m_Self;
22 | }
23 |
24 | void GdNotifier::addItem( GdNotifierItem* pItem )
25 | {
26 | if ( !pItem ) {
27 | return;
28 | }
29 |
30 | if ( m_vecItem.find( pItem ) >= 0 ) {
31 | return;
32 | }
33 |
34 | m_vecItem.push_back( pItem );
35 | }
36 |
37 | void GdNotifier::removeItem( GdNotifierItem* pItem )
38 | {
39 | int iIndex = m_vecItem.find( pItem );
40 |
41 | if ( iIndex < 0 ) {
42 | return;
43 | }
44 |
45 | #if defined(GD_V4) || defined(SPRITESTUDIO_GODOT_EXTENSION)
46 | m_vecItem.remove_at( iIndex );
47 | #endif
48 | #ifdef GD_V3
49 | m_vecItem.remove( iIndex );
50 | #endif
51 | }
52 |
53 | void GdNotifier::notifyResourcePlayerChanged( const Ref& resPlayer )
54 | {
55 | for ( int i = 0; i < m_vecItem.size(); i++ ) {
56 | auto e = m_vecItem[i];
57 |
58 | e->resourcePlayerChanged( resPlayer );
59 | }
60 | }
61 |
62 | void GdNotifier::notifyResourceProjectChanged( const Ref& resProject )
63 | {
64 | for ( int i = 0; i < m_vecItem.size(); i++ ) {
65 | auto e = m_vecItem[i];
66 |
67 | e->resourceProjectChanged( resProject );
68 | }
69 | }
70 |
71 | void GdNotifier::notifyResourceAnimePackChanged( const Ref& resAnimePack )
72 | {
73 | for ( int i = 0; i < m_vecItem.size(); i++ ) {
74 | auto e = m_vecItem[i];
75 |
76 | e->resourceAnimePackChanged( resAnimePack );
77 | }
78 | }
79 |
80 | void GdNotifier::notifyResourceCellMapChanged( const Ref& resCellMap )
81 | {
82 | for ( int i = 0; i < m_vecItem.size(); i++ ) {
83 | auto e = m_vecItem[i];
84 |
85 | e->resourceCellMapChanged( resCellMap );
86 | }
87 | }
88 |
--------------------------------------------------------------------------------
/examples/feature_test/ssdata/effect.ssee:
--------------------------------------------------------------------------------
1 |
2 |
3 | effect
4 |
5 |
6 | 0
7 | 0
8 | 30
9 | FF000000
10 | 2
11 | 100
12 | 100
13 |
14 |
15 | Root
16 | Root
17 | 0
18 | -1
19 | 1
20 |
21 |
22 | Emitter_1
23 | Emmiter
24 | 1
25 | 0
26 | 1
27 |
28 | 壱
29 | common.ssce
30 | Mix
31 |
32 |
33 | Basic
34 | 64
35 | 252
36 | 1
37 | 1
38 | 175
39 |
40 |
41 | 0
42 | 45
43 |
44 |
45 | init_vertexcolor
46 |
47 |
48 |
49 |
50 |
51 |
52 | Particle_1
53 | Particle
54 | 2
55 | 1
56 | 1
57 |
58 |
59 |
60 | Add
61 |
62 |
63 |
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/ssdata/effect.ssee:
--------------------------------------------------------------------------------
1 |
2 |
3 | effect
4 |
5 |
6 | 0
7 | 0
8 | 30
9 | FF000000
10 | 2
11 | 100
12 | 100
13 |
14 |
15 | Root
16 | Root
17 | 0
18 | -1
19 | 1
20 |
21 |
22 | Emitter_1
23 | Emmiter
24 | 1
25 | 0
26 | 1
27 |
28 | 壱
29 | common.ssce
30 | Mix
31 |
32 |
33 | Basic
34 | 64
35 | 252
36 | 1
37 | 1
38 | 175
39 |
40 |
41 | 0
42 | 45
43 |
44 |
45 | init_vertexcolor
46 |
47 |
48 |
49 |
50 |
51 |
52 | Particle_1
53 | Particle
54 | 2
55 | 1
56 | 1
57 |
58 |
59 |
60 | Add
61 |
62 |
63 |
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_loader_sseffect.cpp:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_loader_sseffect.cpp
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #include "gd_loader_sseffect.h"
6 |
7 | #include "gd_resource_sseffect.h"
8 |
9 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
10 | Variant GdLoaderSsEffect::_load(const String &p_path, const String &p_original_path, bool p_use_sub_threads, int32_t p_cache_mode)
11 | #else
12 | #ifdef GD_V4
13 | 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 )
14 | #endif
15 | #ifdef GD_V3
16 | RES GdLoaderSsEffect::load( const String& p_path, const String& p_original_path, Error* r_error, bool p_no_subresource_cache )
17 | #endif
18 | #endif
19 | {
20 | Ref res = memnew( GdResourceSsEffect );
21 | Error err = res->loadFromFile( p_path, p_original_path );
22 |
23 | if ( err != OK ) {
24 | ERR_PRINT( String( "load error: " ) + String::num( err ) );
25 | }
26 |
27 | #ifndef SPRITESTUDIO_GODOT_EXTENSION
28 | if ( r_error ) {
29 | *r_error = err;
30 | }
31 | #endif
32 |
33 | return res;
34 | }
35 |
36 |
37 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
38 | PackedStringArray GdLoaderSsEffect::_get_recognized_extensions()
39 | {
40 | PackedStringArray extensions;
41 | extensions.push_back("ssee");
42 | return extensions;
43 | }
44 | #else
45 | void GdLoaderSsEffect::get_recognized_extensions( List* p_extensions ) const
46 | {
47 | if ( !p_extensions->find( "ssee" ) ) {
48 | p_extensions->push_back( "ssee" );
49 | }
50 | }
51 | #endif
52 |
53 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
54 | bool GdLoaderSsEffect::_handles_type(const StringName &p_type)
55 | #else
56 | bool GdLoaderSsEffect::handles_type( const String& p_type ) const
57 | #endif
58 | {
59 | return ClassDB::is_parent_class( p_type, "GdResourceSsEffect" );
60 | }
61 |
62 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
63 | String GdLoaderSsEffect::_get_resource_type(const String &p_path)
64 | #else
65 | String GdLoaderSsEffect::get_resource_type( const String& p_path ) const
66 | #endif
67 | {
68 | return "GdResourceSsEffect";
69 | }
70 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_loader_bsseffect.cpp:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_loader_bsseffect.cpp
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #include "gd_loader_bsseffect.h"
6 |
7 | #include "gd_resource_sseffect.h"
8 |
9 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
10 | Variant GdLoaderBssEffect::_load(const String &p_path, const String &p_original_path, bool use_sub_threads, int32_t cache_mode)
11 | #else
12 | #ifdef GD_V4
13 | 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 )
14 | #endif
15 | #ifdef GD_V3
16 | RES GdLoaderBssEffect::load( const String& p_path, const String& p_original_path, Error* r_error, bool p_no_subresource_cache )
17 | #endif
18 | #endif
19 | {
20 | Ref res = memnew( GdResourceSsEffect );
21 | Error err = res->loadFromFile( p_path, p_original_path );
22 |
23 | if ( err != OK ) {
24 | ERR_PRINT( String( "load error: " ) + String::num( err ) );
25 | }
26 |
27 | #ifndef SPRITESTUDIO_GODOT_EXTENSION
28 | if ( r_error ) {
29 | *r_error = err;
30 | }
31 | #endif
32 |
33 | return res;
34 | }
35 |
36 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
37 | PackedStringArray GdLoaderBssEffect::_get_recognized_extensions()
38 | {
39 | PackedStringArray extensions;
40 | extensions.push_back("gdssee");
41 | return extensions;
42 | }
43 | #else
44 | void GdLoaderBssEffect::get_recognized_extensions( List* p_extensions ) const
45 | {
46 | if ( !p_extensions->find( "gdssee" ) ) {
47 | p_extensions->push_back( "gdssee" );
48 | }
49 | }
50 | #endif
51 |
52 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
53 | bool GdLoaderBssEffect::_handles_type(const StringName &p_type)
54 | #else
55 | bool GdLoaderBssEffect::handles_type( const String& p_type ) const
56 | #endif
57 | {
58 | return ClassDB::is_parent_class( p_type, "GdResourceSsEffect" );
59 | }
60 |
61 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
62 | String GdLoaderBssEffect::_get_resource_type(const String &path)
63 | #else
64 | String GdLoaderBssEffect::get_resource_type( const String& p_path ) const
65 | #endif
66 | {
67 | return "GdResourceSsEffect";
68 | }
69 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_loader_ssproject.cpp:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_loader_ssproject.cpp
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #include "gd_loader_ssproject.h"
6 |
7 | #include "gd_resource_ssproject.h"
8 |
9 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
10 | Variant GdLoaderSsProject::_load(const String &p_path, const String &p_original_path, bool use_sub_threads, int32_t cache_mode)
11 | #else
12 | #ifdef GD_V4
13 | 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 )
14 | #endif
15 | #ifdef GD_V3
16 | RES GdLoaderSsProject::load( const String& p_path, const String& p_original_path, Error* r_error, bool p_no_subresource_cache )
17 | #endif
18 | #endif
19 | {
20 | Ref res = memnew( GdResourceSsProject );
21 | Error err = res->loadFromFile( p_path, p_original_path );
22 |
23 | if ( err != OK ) {
24 | ERR_PRINT( String( "load error: " ) + String::num( err ) );
25 | }
26 |
27 | #ifndef SPRITESTUDIO_GODOT_EXTENSION
28 | if ( r_error ) {
29 | *r_error = err;
30 | }
31 | #endif
32 |
33 | return res;
34 | }
35 |
36 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
37 | PackedStringArray GdLoaderSsProject::_get_recognized_extensions()
38 | {
39 | PackedStringArray extensions;
40 | extensions.push_back("sspj");
41 | return extensions;
42 | }
43 | #else
44 | void GdLoaderSsProject::get_recognized_extensions( List* p_extensions ) const
45 | {
46 | if ( !p_extensions->find( "sspj" ) ) {
47 | p_extensions->push_back( "sspj" );
48 | }
49 | }
50 | #endif
51 |
52 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
53 | bool GdLoaderSsProject::_handles_type(const StringName &p_type)
54 | #else
55 | bool GdLoaderSsProject::handles_type( const String& p_type ) const
56 | #endif
57 | {
58 | return ClassDB::is_parent_class( p_type, "GdResourceSsProject" );
59 | }
60 |
61 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
62 | String GdLoaderSsProject::_get_resource_type(const String &path)
63 | #else
64 | String GdLoaderSsProject::get_resource_type( const String& p_path ) const
65 | #endif
66 | {
67 | return "GdResourceSsProject";
68 | }
69 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_loader_sscellmap.cpp:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_loader_sscellmap.cpp
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #include "gd_loader_sscellmap.h"
6 |
7 | #include "gd_resource_sscellmap.h"
8 |
9 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
10 | Variant GdLoaderSsCellMap::_load(const String &p_path, const String &p_original_path, bool p_use_sub_threads, int32_t p_cache_mode)
11 | #else
12 | #ifdef GD_V4
13 | 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 )
14 | #endif
15 | #ifdef GD_V3
16 | RES GdLoaderSsCellMap::load( const String& p_path, const String& p_original_path, Error* r_error, bool p_no_subresource_cache )
17 | #endif
18 | #endif
19 | {
20 | Ref res = memnew( GdResourceSsCellMap );
21 | Error err = res->loadFromFile( p_path, p_original_path );
22 |
23 | if ( err != OK ) {
24 | ERR_PRINT( String( "load error: " ) + String::num( err ) );
25 | }
26 |
27 | #ifndef SPRITESTUDIO_GODOT_EXTENSION
28 | if ( r_error ) {
29 | *r_error = err;
30 | }
31 | #endif
32 |
33 | return res;
34 | }
35 |
36 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
37 | PackedStringArray GdLoaderSsCellMap::_get_recognized_extensions()
38 | {
39 | PackedStringArray extensions;
40 | extensions.push_back("ssce");
41 | return extensions;
42 | }
43 | #else
44 | void GdLoaderSsCellMap::get_recognized_extensions( List* p_extensions ) const
45 | {
46 | if ( !p_extensions->find( "ssce" ) ) {
47 | p_extensions->push_back( "ssce" );
48 | }
49 | }
50 | #endif
51 |
52 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
53 | bool GdLoaderSsCellMap::_handles_type(const StringName &p_type)
54 | #else
55 | bool GdLoaderSsCellMap::handles_type( const String& p_type ) const
56 | #endif
57 | {
58 | return ClassDB::is_parent_class( p_type, "GdResourceSsCellMap" );
59 | }
60 |
61 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
62 | String GdLoaderSsCellMap::_get_resource_type(const String &p_path)
63 | #else
64 | String GdLoaderSsCellMap::get_resource_type( const String& p_path ) const
65 | #endif
66 | {
67 | return "GdResourceSsCellMap";
68 | }
69 |
--------------------------------------------------------------------------------
/examples/feature_test/ssdata/effect_checker.ssee:
--------------------------------------------------------------------------------
1 |
2 |
3 | effect_checker
4 |
5 |
6 | 1
7 | 1
8 | 30
9 | FF000000
10 | 2
11 | 100
12 | 100
13 |
14 |
15 | Root
16 | Root
17 | 0
18 | -1
19 | 1
20 |
21 |
22 | Emitter_1
23 | Emmiter
24 | 1
25 | 0
26 | 1
27 |
28 | Check
29 | common.ssce
30 | Add
31 |
32 |
33 | Basic
34 | 64
35 | 20
36 | 1
37 | 1
38 | 15
39 |
40 |
41 | 0
42 | 45
43 |
44 |
45 | init_rotation
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 | Particle_1
54 | Particle
55 | 2
56 | 1
57 | 1
58 |
59 |
60 |
61 | Add
62 |
63 |
64 |
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_loader_bsscellmap.cpp:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_loader_bsscellmap.cpp
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #include "gd_loader_bsscellmap.h"
6 |
7 | #include "gd_resource_sscellmap.h"
8 |
9 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
10 | Variant GdLoaderBssCellMap::_load(const String &p_path, const String &p_original_path, bool use_sub_threads, int32_t cache_mode)
11 | #else
12 | #ifdef GD_V4
13 | 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 )
14 | #endif
15 | #ifdef GD_V3
16 | RES GdLoaderBssCellMap::load( const String& p_path, const String& p_original_path, Error* r_error, bool p_no_subresource_cache )
17 | #endif
18 | #endif
19 | {
20 | Ref res = memnew( GdResourceSsCellMap );
21 | Error err = res->loadFromFile( p_path, p_original_path );
22 |
23 | if ( err != OK ) {
24 | ERR_PRINT( String( "load error: " ) + String::num( err ) );
25 | }
26 |
27 | #ifndef SPRITESTUDIO_GODOT_EXTENSION
28 | if ( r_error ) {
29 | *r_error = err;
30 | }
31 | #endif
32 |
33 | return res;
34 | }
35 |
36 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
37 | PackedStringArray GdLoaderBssCellMap::_get_recognized_extensions()
38 | {
39 | PackedStringArray extensions;
40 | extensions.push_back("gdssce");
41 | return extensions;
42 | }
43 | #else
44 | void GdLoaderBssCellMap::get_recognized_extensions( List* p_extensions ) const
45 | {
46 | if ( !p_extensions->find( "gdssce" ) ) {
47 | p_extensions->push_back( "gdssce" );
48 | }
49 | }
50 | #endif
51 |
52 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
53 | bool GdLoaderBssCellMap::_handles_type(const StringName &p_type)
54 | #else
55 | bool GdLoaderBssCellMap::handles_type( const String& p_type ) const
56 | #endif
57 | {
58 | return ClassDB::is_parent_class( p_type, "GdResourceSsCellMap" );
59 | }
60 |
61 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
62 | String GdLoaderBssCellMap::_get_resource_type(const String &path)
63 | #else
64 | String GdLoaderBssCellMap::get_resource_type( const String& p_path ) const
65 | #endif
66 | {
67 | return "GdResourceSsCellMap";
68 | }
69 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_loader_bssproject.cpp:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_loader_bssproject.cpp
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #include "gd_loader_bssproject.h"
6 |
7 | #include "gd_resource_ssproject.h"
8 |
9 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
10 | Variant GdLoaderBssProject::_load(const String &p_path, const String &p_original_path, bool use_sub_threads, int32_t cache_mode)
11 | #else
12 | #ifdef GD_V4
13 | 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 )
14 | #endif
15 | #ifdef GD_V3
16 | RES GdLoaderBssProject::load( const String& p_path, const String& p_original_path, Error* r_error, bool p_no_subresource_cache )
17 | #endif
18 | #endif
19 | {
20 | Ref res = memnew( GdResourceSsProject );
21 | Error err = res->loadFromFile( p_path, p_original_path );
22 |
23 | if ( err != OK ) {
24 | ERR_PRINT( String( "load error: " ) + String::num( err ) );
25 | }
26 |
27 | #ifndef SPRITESTUDIO_GODOT_EXTENSION
28 | if ( r_error ) {
29 | *r_error = err;
30 | }
31 | #endif
32 |
33 | return res;
34 | }
35 |
36 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
37 | PackedStringArray GdLoaderBssProject::_get_recognized_extensions()
38 | {
39 | PackedStringArray extensions;
40 | extensions.push_back("gdsspj");
41 | return extensions;
42 | }
43 | #else
44 | void GdLoaderBssProject::get_recognized_extensions( List* p_extensions ) const
45 | {
46 | if ( !p_extensions->find( "gdsspj" ) ) {
47 | p_extensions->push_back( "gdsspj" );
48 | }
49 | }
50 | #endif
51 |
52 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
53 | bool GdLoaderBssProject::_handles_type(const StringName &p_type)
54 | #else
55 | bool GdLoaderBssProject::handles_type( const String& p_type ) const
56 | #endif
57 | {
58 | return ClassDB::is_parent_class( p_type, "GdResourceSsProject" );
59 | }
60 |
61 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
62 | String GdLoaderBssProject::_get_resource_type(const String &path)
63 | #else
64 | String GdLoaderBssProject::get_resource_type( const String& p_path ) const
65 | #endif
66 | {
67 | return "GdResourceSsProject";
68 | }
69 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/ssdata/effect_checker.ssee:
--------------------------------------------------------------------------------
1 |
2 |
3 | effect_checker
4 |
5 |
6 | 1
7 | 1
8 | 30
9 | FF000000
10 | 2
11 | 100
12 | 100
13 |
14 |
15 | Root
16 | Root
17 | 0
18 | -1
19 | 1
20 |
21 |
22 | Emitter_1
23 | Emmiter
24 | 1
25 | 0
26 | 1
27 |
28 | Check
29 | common.ssce
30 | Add
31 |
32 |
33 | Basic
34 | 64
35 | 20
36 | 1
37 | 1
38 | 15
39 |
40 |
41 | 0
42 | 45
43 |
44 |
45 | init_rotation
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 | Particle_1
54 | Particle
55 | 2
56 | 1
57 | 1
58 |
59 |
60 |
61 | Add
62 |
63 |
64 |
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_loader_ssanimepack.cpp:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_loader_ssanimepack.cpp
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #include "gd_loader_ssanimepack.h"
6 |
7 | #include "gd_resource_ssanimepack.h"
8 |
9 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
10 | Variant GdLoaderSsAnimePack::_load(const String &p_path, const String &p_original_path, bool p_use_sub_threads, int32_t p_cache_mode)
11 | #else
12 | #ifdef GD_V4
13 | 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 )
14 | #endif
15 | #ifdef GD_V3
16 | RES GdLoaderSsAnimePack::load( const String& p_path, const String& p_original_path, Error* r_error, bool p_no_subresource_cache )
17 | #endif
18 | #endif
19 | {
20 | Ref res = memnew( GdResourceSsAnimePack );
21 | Error err = res->loadFromFile( p_path, p_original_path );
22 |
23 | if ( err != OK ) {
24 | ERR_PRINT( String( "load error: " ) + String::num( err ) );
25 | }
26 |
27 | #ifndef SPRITESTUDIO_GODOT_EXTENSION
28 | if ( r_error ) {
29 | *r_error = err;
30 | }
31 | #endif
32 |
33 | return res;
34 | }
35 |
36 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
37 | PackedStringArray GdLoaderSsAnimePack::_get_recognized_extensions()
38 | {
39 | PackedStringArray extensions;
40 | extensions.push_back("ssae");
41 | return extensions;
42 | }
43 | #else
44 | void GdLoaderSsAnimePack::get_recognized_extensions( List* p_extensions ) const
45 | {
46 | if ( !p_extensions->find( "ssae" ) ) {
47 | p_extensions->push_back( "ssae" );
48 | }
49 | }
50 | #endif
51 |
52 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
53 | bool GdLoaderSsAnimePack::_handles_type(const StringName &p_type)
54 | #else
55 | bool GdLoaderSsAnimePack::handles_type( const String& p_type ) const
56 | #endif
57 | {
58 | return ClassDB::is_parent_class( p_type, "GdResourceSsAnimePack" );
59 | }
60 |
61 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
62 | String GdLoaderSsAnimePack::_get_resource_type(const String &p_path)
63 | #else
64 | String GdLoaderSsAnimePack::get_resource_type( const String& p_path ) const
65 | #endif
66 | {
67 | return "GdResourceSsAnimePack";
68 | }
69 |
--------------------------------------------------------------------------------
/gd_spritestudio/ss_container_item.h:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file ss_container_item.h
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #ifndef SS_CONTAINER_ITEM_H
6 | #define SS_CONTAINER_ITEM_H
7 |
8 | #include "gd_macros.h"
9 |
10 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
11 | #include
12 | #include
13 | using namespace godot;
14 | #else
15 | #ifdef GD_V4
16 | #include "core/string/ustring.h"
17 | #endif
18 | #ifdef GD_V3
19 | #include "core/ustring.h"
20 | #endif
21 | #endif
22 |
23 | #include "SpriteStudio6-SDK/Common/Loader/ssloader_sspj.h"
24 |
25 | #include "ss_macros.h"
26 |
27 | SsSdkUsing
28 |
29 | template
30 | class SsContainerItem
31 | {
32 | public :
33 | SsContainerItem()
34 | {
35 | setAutoDelete( true );
36 | setRef( 0 );
37 | setKey( T() );
38 | setData( NULL );
39 | }
40 |
41 | virtual ~SsContainerItem()
42 | {
43 | if ( m_bAutoDelete && m_pData ) {
44 | delete m_pData;
45 | m_pData = NULL;
46 | }
47 | }
48 |
49 | void setAutoDelete( bool bAutoDelete )
50 | {
51 | m_bAutoDelete = bAutoDelete;
52 | }
53 |
54 | void incRef()
55 | {
56 | m_iRef++;
57 | }
58 |
59 | void decRef()
60 | {
61 | m_iRef--;
62 | }
63 |
64 | void setRef( int iRef )
65 | {
66 | m_iRef = iRef;
67 | }
68 |
69 | int getRef() const
70 | {
71 | return m_iRef;
72 | }
73 |
74 | void setKey( T key )
75 | {
76 | m_Key = key;
77 | }
78 |
79 | T getKey() const
80 | {
81 | return m_Key;
82 | }
83 |
84 | void setData( U* pData )
85 | {
86 | m_pData = pData;
87 | }
88 |
89 | U* getData() const
90 | {
91 | return m_pData;
92 | }
93 |
94 | private :
95 | bool m_bAutoDelete;
96 | int m_iRef;
97 | T m_Key;
98 | U* m_pData;
99 | };
100 |
101 | typedef SsContainerItem SsContainerItemProject;
102 | typedef SsContainerItem SsContainerItemAnimePack;
103 | typedef SsContainerItem SsContainerItemCellMap;
104 | typedef SsContainerItem SsContainerItemEffect;
105 |
106 | #endif // SS_CONTAINER_ITEM_H
107 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_loader_bssanimepack.cpp:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_loader_bssanimepack.cpp
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #include "gd_loader_bssanimepack.h"
6 |
7 | #include "gd_resource_ssanimepack.h"
8 |
9 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
10 | Variant GdLoaderBssAnimePack::_load(const String &p_path, const String &p_original_path, bool use_sub_threads, int32_t cache_mode)
11 | #else
12 | #ifdef GD_V4
13 | 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 )
14 | #endif
15 | #ifdef GD_V3
16 | RES GdLoaderBssAnimePack::load( const String& p_path, const String& p_original_path, Error* r_error, bool p_no_subresource_cache )
17 | #endif
18 | #endif
19 | {
20 | Ref res = memnew( GdResourceSsAnimePack );
21 | Error err = res->loadFromFile( p_path, p_original_path );
22 |
23 | if ( err != OK ) {
24 | ERR_PRINT( String( "load error: " ) + String::num( err ) );
25 | }
26 |
27 | #ifndef SPRITESTUDIO_GODOT_EXTENSION
28 | if ( r_error ) {
29 | *r_error = err;
30 | }
31 | #endif
32 |
33 | return res;
34 | }
35 |
36 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
37 | PackedStringArray GdLoaderBssAnimePack::_get_recognized_extensions()
38 | {
39 | PackedStringArray extensions;
40 | extensions.push_back("gdssae");
41 | return extensions;
42 | }
43 | #else
44 | void GdLoaderBssAnimePack::get_recognized_extensions( List* p_extensions ) const
45 | {
46 | if ( !p_extensions->find( "gdssae" ) ) {
47 | p_extensions->push_back( "gdssae" );
48 | }
49 | }
50 | #endif
51 |
52 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
53 | bool GdLoaderBssAnimePack::_handles_type(const StringName &p_type)
54 | #else
55 | bool GdLoaderBssAnimePack::handles_type( const String& p_type ) const
56 | #endif
57 | {
58 | return ClassDB::is_parent_class( p_type, "GdResourceSsAnimePack" );
59 | }
60 |
61 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
62 | String GdLoaderBssAnimePack::_get_resource_type(const String &path)
63 | #else
64 | String GdLoaderBssAnimePack::get_resource_type( const String& p_path ) const
65 | #endif
66 | {
67 | return "GdResourceSsAnimePack";
68 | }
69 |
--------------------------------------------------------------------------------
/examples/particle_effect/ParticleEffect/001d.ssee:
--------------------------------------------------------------------------------
1 |
2 |
3 | 001d
4 |
5 |
6 | 0
7 | 0
8 | 30
9 | FF000000
10 | 2
11 | 100
12 | 100
13 |
14 |
15 | Root
16 | Root
17 | 0
18 | -1
19 | 1
20 |
21 |
22 |
23 | Emmiter
24 | 1
25 | 0
26 | 1
27 |
28 | circle1
29 | ss_effect.ssce
30 | Add
31 |
32 |
33 | Basic
34 | 64
35 | 13
36 | 9
37 | 1
38 | 30
39 |
40 |
41 | 0
42 | 360
43 |
44 |
45 | init_rotation
46 |
47 |
48 |
49 |
50 | trans_colorfade
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | Particle
59 | 2
60 | 1
61 | 1
62 |
63 |
64 |
65 | Add
66 |
67 |
68 |
69 |
70 |
71 |
72 |
--------------------------------------------------------------------------------
/examples/particle_effect/ParticleEffect/001a.ssee:
--------------------------------------------------------------------------------
1 |
2 |
3 | 001a
4 |
5 |
6 | 1
7 | 1
8 | 30
9 | FF000000
10 |
11 |
12 | Root
13 | Root
14 | 0
15 | -1
16 | 1
17 |
18 |
19 |
20 | Emmiter
21 | 1
22 | 0
23 | 1
24 |
25 | grain
26 | ss_effect.ssce
27 | Add
28 |
29 |
30 | Basic
31 | 64
32 | 9
33 | 10
34 | 16
35 | 30
36 |
37 |
38 | 0
39 | 360
40 |
41 |
42 | init_rotation
43 |
44 |
45 |
46 |
47 | trans_rotation
48 | -1.42999994754791
49 | 50
50 |
51 |
52 | trans_colorfade
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 | Particle
61 | 2
62 | 1
63 | 1
64 |
65 |
66 |
67 | Add
68 |
69 |
70 |
71 |
72 |
73 |
74 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_saver_bsseffect.cpp:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_saver_bsseffect.cpp
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #include "gd_saver_bsseffect.h"
6 |
7 | #include "gd_io.h"
8 | #include "gd_resource_ssdocument.h"
9 |
10 | #include "ss_io.h"
11 |
12 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
13 | Error GdSaverBssEffect::_save(const Ref &p_resource, const String &p_path, uint32_t p_flags)
14 | #else
15 | #ifdef GD_V4
16 | Error GdSaverBssEffect::save( const Ref& p_resource, const String& p_path, uint32_t p_flags )
17 | #endif
18 | #ifdef GD_V3
19 | Error GdSaverBssEffect::save( const String& p_path, const RES& p_resource, uint32_t p_flags )
20 | #endif
21 | #endif
22 | {
23 | if ( !Object::cast_to( *p_resource ) ) {
24 | return FAILED;
25 | }
26 |
27 | Ref resDocument = p_resource;
28 |
29 | if ( resDocument.is_null() ) {
30 | return FAILED;
31 | }
32 |
33 | String strSource = resDocument->getSource();
34 |
35 | if ( strSource.length() == 0 ) {
36 | return FAILED;
37 | }
38 |
39 | return GdIO::saveVariantToFile( p_path, SsIO::toEffectVariant( strSource ) );
40 | }
41 |
42 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
43 | bool GdSaverBssEffect::_recognize(const Ref &p_resource)
44 | #else
45 | #ifdef GD_V4
46 | bool GdSaverBssEffect::recognize( const Ref& p_resource ) const
47 | #endif
48 | #ifdef GD_V3
49 | bool GdSaverBssEffect::recognize( const RES& p_resource ) const
50 | #endif
51 | #endif
52 | {
53 | return ( Object::cast_to( *p_resource ) != NULL );
54 | }
55 |
56 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
57 | PackedStringArray GdSaverBssEffect::_get_recognized_extensions(const Ref &resource)
58 | {
59 | PackedStringArray extensions;
60 | if (Object::cast_to(*resource)) {
61 | extensions.push_back("gdssee");
62 | }
63 | return extensions;
64 | }
65 | #else
66 | #ifdef GD_V4
67 | void GdSaverBssEffect::get_recognized_extensions( const Ref& p_resource, List* p_extensions ) const
68 | #endif
69 | #ifdef GD_V3
70 | void GdSaverBssEffect::get_recognized_extensions( const RES& p_resource, List* p_extensions ) const
71 | #endif
72 | {
73 | if ( Object::cast_to( *p_resource ) ) {
74 | p_extensions->push_back( "gdssee" );
75 | }
76 | }
77 | #endif
--------------------------------------------------------------------------------
/gd_spritestudio/gd_saver_bsscellmap.cpp:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_saver_bsscellmap.cpp
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #include "gd_saver_bsscellmap.h"
6 |
7 | #include "gd_io.h"
8 | #include "gd_resource_ssdocument.h"
9 |
10 | #include "ss_io.h"
11 |
12 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
13 | Error GdSaverBssCellMap::_save(const Ref &p_resource, const String &p_path, uint32_t p_flags)
14 | #else
15 | #ifdef GD_V4
16 | Error GdSaverBssCellMap::save( const Ref& p_resource, const String& p_path, uint32_t p_flags )
17 | #endif
18 | #ifdef GD_V3
19 | Error GdSaverBssCellMap::save( const String& p_path, const RES& p_resource, uint32_t p_flags )
20 | #endif
21 | #endif
22 | {
23 | if ( !Object::cast_to( *p_resource ) ) {
24 | return FAILED;
25 | }
26 |
27 | Ref resDocument = p_resource;
28 |
29 | if ( resDocument.is_null() ) {
30 | return FAILED;
31 | }
32 |
33 | String strSource = resDocument->getSource();
34 |
35 | if ( strSource.length() == 0 ) {
36 | return FAILED;
37 | }
38 |
39 | return GdIO::saveVariantToFile( p_path, SsIO::toCellMapVariant( strSource ) );
40 | }
41 |
42 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
43 | bool GdSaverBssCellMap::_recognize(const Ref &p_resource)
44 | #else
45 | #ifdef GD_V4
46 | bool GdSaverBssCellMap::recognize( const Ref& p_resource ) const
47 | #endif
48 | #ifdef GD_V3
49 | bool GdSaverBssCellMap::recognize( const RES& p_resource ) const
50 | #endif
51 | #endif
52 | {
53 | return ( Object::cast_to( *p_resource ) != NULL );
54 | }
55 |
56 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
57 | PackedStringArray GdSaverBssCellMap::_get_recognized_extensions(const Ref &resource)
58 | {
59 | PackedStringArray extensions;
60 | if (Object::cast_to(*resource)) {
61 | extensions.push_back("gdssce");
62 | }
63 | return extensions;
64 | }
65 | #else
66 | #ifdef GD_V4
67 | void GdSaverBssCellMap::get_recognized_extensions( const Ref& p_resource, List* p_extensions ) const
68 | #endif
69 | #ifdef GD_V3
70 | void GdSaverBssCellMap::get_recognized_extensions( const RES& p_resource, List* p_extensions ) const
71 | #endif
72 | {
73 | if ( Object::cast_to( *p_resource ) ) {
74 | p_extensions->push_back( "gdssce" );
75 | }
76 | }
77 | #endif
--------------------------------------------------------------------------------
/gd_spritestudio/gd_saver_bssproject.cpp:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_saver_bssproject.cpp
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #include "gd_saver_bssproject.h"
6 |
7 | #include "gd_io.h"
8 | #include "gd_resource_ssdocument.h"
9 |
10 | #include "ss_io.h"
11 |
12 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
13 | Error GdSaverBssProject::_save(const Ref &p_resource, const String &p_path, uint32_t p_flags)
14 | #else
15 | #ifdef GD_V4
16 | Error GdSaverBssProject::save( const Ref& p_resource, const String& p_path, uint32_t p_flags )
17 | #endif
18 | #ifdef GD_V3
19 | Error GdSaverBssProject::save( const String& p_path, const RES& p_resource, uint32_t p_flags )
20 | #endif
21 | #endif
22 | {
23 | if ( !Object::cast_to( *p_resource ) ) {
24 | return FAILED;
25 | }
26 |
27 | Ref resDocument = p_resource;
28 |
29 | if ( resDocument.is_null() ) {
30 | return FAILED;
31 | }
32 |
33 | String strSource = resDocument->getSource();
34 |
35 | if ( strSource.length() == 0 ) {
36 | return FAILED;
37 | }
38 |
39 | return GdIO::saveVariantToFile( p_path, SsIO::toProjectVariant( strSource ) );
40 | }
41 |
42 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
43 | bool GdSaverBssProject::_recognize(const Ref &p_resource)
44 | #else
45 | #ifdef GD_V4
46 | bool GdSaverBssProject::recognize( const Ref& p_resource ) const
47 | #endif
48 | #ifdef GD_V3
49 | bool GdSaverBssProject::recognize( const RES& p_resource ) const
50 | #endif
51 | #endif
52 | {
53 | return ( Object::cast_to( *p_resource ) != NULL );
54 | }
55 |
56 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
57 | PackedStringArray GdSaverBssProject::_get_recognized_extensions(const Ref &resource)
58 | {
59 | PackedStringArray extensions;
60 | if (Object::cast_to(*resource)) {
61 | extensions.push_back("gdsspj");
62 | }
63 | return extensions;
64 | }
65 | #else
66 | #ifdef GD_V4
67 | void GdSaverBssProject::get_recognized_extensions( const Ref& p_resource, List* p_extensions ) const
68 | #endif
69 | #ifdef GD_V3
70 | void GdSaverBssProject::get_recognized_extensions( const RES& p_resource, List* p_extensions ) const
71 | #endif
72 | {
73 | if ( Object::cast_to( *p_resource ) ) {
74 | p_extensions->push_back( "gdsspj" );
75 | }
76 | }
77 | #endif
--------------------------------------------------------------------------------
/examples/mesh_bone/MeshBone/Effect.ssce:
--------------------------------------------------------------------------------
1 |
2 |
3 | Effect
4 |
5 | SpriteStudio
6 | 0
7 | Effect.png
8 | 512 256
9 | 0
10 | clamp
11 | linear
12 |
13 |
14 |
15 | 4096 4096
16 | 1
17 | 0
18 | 0
19 | 1
20 |
21 |
22 |
23 | Flame
24 | 4 4
25 | 159 150
26 | 0 0
27 | 0
28 |
29 | 0
30 | 0
31 | unknown
32 |
33 |
34 |
35 |
36 | |
37 |
38 | Beam
39 | 314 4
40 | 41 177
41 | -0.0487800016999245 -0.468926995992661
42 | 0
43 |
44 | 0
45 | 0
46 | unknown
47 |
48 |
49 |
50 |
51 | |
52 |
53 | Slash
54 | 168 4
55 | 141 137
56 | -0.297872006893158 -0.357663989067078
57 | 0
58 |
59 | 0
60 | 0
61 | unknown
62 |
63 |
64 |
65 |
66 | |
67 |
68 | Shadow
69 | 360 4
70 | 75 75
71 | 0 0
72 | 0
73 |
74 | 0
75 | 0
76 | unknown
77 |
78 |
79 |
80 |
81 | |
82 |
83 |
84 |
--------------------------------------------------------------------------------
/gd_spritestudio/gd_saver_bssanimepack.cpp:
--------------------------------------------------------------------------------
1 | /*!
2 | * \file gd_saver_bssanimepack.cpp
3 | * \author CRI Middleware Co., Ltd.
4 | */
5 | #include "gd_saver_bssanimepack.h"
6 |
7 | #include "gd_io.h"
8 | #include "gd_resource_ssdocument.h"
9 |
10 | #include "ss_io.h"
11 |
12 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
13 | Error GdSaverBssAnimePack::_save(const Ref &p_resource, const String &p_path, uint32_t p_flags)
14 | #else
15 | #ifdef GD_V4
16 | Error GdSaverBssAnimePack::save( const Ref& p_resource, const String& p_path, uint32_t p_flags )
17 | #endif
18 | #ifdef GD_V3
19 | Error GdSaverBssAnimePack::save( const String& p_path, const RES& p_resource, uint32_t p_flags )
20 | #endif
21 | #endif
22 | {
23 | if ( !Object::cast_to( *p_resource ) ) {
24 | return FAILED;
25 | }
26 |
27 | Ref resDocument = p_resource;
28 |
29 | if ( resDocument.is_null() ) {
30 | return FAILED;
31 | }
32 |
33 | String strSource = resDocument->getSource();
34 |
35 | if ( strSource.length() == 0 ) {
36 | return FAILED;
37 | }
38 |
39 | return GdIO::saveVariantToFile( p_path, SsIO::toAnimePackVariant( strSource ) );
40 | }
41 |
42 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
43 | bool GdSaverBssAnimePack::_recognize(const Ref &p_resource)
44 | #else
45 | #ifdef GD_V4
46 | bool GdSaverBssAnimePack::recognize( const Ref& p_resource ) const
47 | #endif
48 | #ifdef GD_V3
49 | bool GdSaverBssAnimePack::recognize( const RES& p_resource ) const
50 | #endif
51 | #endif
52 | {
53 | return ( Object::cast_to( *p_resource ) != NULL );
54 | }
55 |
56 | #ifdef SPRITESTUDIO_GODOT_EXTENSION
57 | PackedStringArray GdSaverBssAnimePack::_get_recognized_extensions(const Ref &resource)
58 | {
59 | PackedStringArray extensions;
60 | if (Object::cast_to(*resource)) {
61 | extensions.push_back("gdssae");
62 | }
63 | return extensions;
64 | }
65 | #else
66 | #ifdef GD_V4
67 | void GdSaverBssAnimePack::get_recognized_extensions( const Ref& p_resource, List* p_extensions ) const
68 | #endif
69 | #ifdef GD_V3
70 | void GdSaverBssAnimePack::get_recognized_extensions( const RES& p_resource, List* p_extensions ) const
71 | #endif
72 | {
73 | if ( Object::cast_to( *p_resource ) ) {
74 | p_extensions->push_back( "gdssae" );
75 | }
76 | }
77 | #endif
78 |
--------------------------------------------------------------------------------
/examples/feature_test/sspj_load.gd:
--------------------------------------------------------------------------------
1 | extends Node
2 |
3 |
4 | # Declare member variables here. Examples:
5 | # var a = 2
6 | # var b = "text"
7 |
8 | onready var anime_player = $AnimationPlayer
9 |
10 | onready var ssnode = $by_script
11 | var cur_frame = 0
12 | var sspj_index = 0;
13 | var sspj_files = ["ssdata/v6_all.sspj", "basedir/BaseDir.sspj"]
14 | #var anime_pack_names = ["Basic.ssae", "NewAnimation.ssae"]
15 |
16 | # Called when the node enters the scene tree for the first time.
17 | func _ready():
18 | anime_player.play("SsPlayer");
19 |
20 | # sspj ファイル読み込み
21 | var sspj: GdResourceSsProject = ResourceLoader.load("ssdata/v6_all.sspj")
22 | if sspj == null:
23 | print("Failed to load sspj file")
24 | return
25 |
26 | ssnode.res_player.res_project = sspj
27 |
28 | # ssae 列挙
29 | var anime_pack_names = sspj.get_anime_pack_names()
30 | var anime_names
31 | for anime_pack_name in anime_pack_names:
32 | print("anime_pack_name:" + anime_pack_name)
33 | # AnimePack リソースを取得
34 | var anime_pack_resource = sspj.get_anime_pack_resource(anime_pack_name)
35 | # アニメーション名を列挙
36 | anime_names = anime_pack_resource.get_animation_names()
37 | for anime_name in anime_names:
38 | print("anime_name:" + anime_name)
39 |
40 | # 1つめのSSAEの1つ目のアニメを再生
41 | ssnode.set_anime_pack(anime_pack_names[0])
42 | var anime_name = anime_names[0]
43 | if anime_name == "Setup":
44 | anime_name = anime_names[1]
45 | print("play anime:" + anime_name + " in " + anime_pack_names[0])
46 | ssnode.set_animation(anime_name)
47 |
48 | # 開始・終了フレームの取得
49 | print("start_frame:" + str(ssnode.get_start_frame()))
50 | print("end_frame:" + str(ssnode.get_end_frame()))
51 |
52 | # アニメーション終了時コールバックの設定
53 | ssnode.connect("animation_finished", self, "_on_animation_finished")
54 |
55 | ssnode.set_loop(true)
56 | ssnode.play()
57 |
58 | # Called every frame. 'delta' is the elapsed time since the previous frame.
59 | func _process(delta):
60 | pass
61 |
62 | func _on_animation_finished(name):
63 | print("SIGNAL _on_animation_finished from " + name)
64 | # 別のsspjに変更
65 | if true:
66 | sspj_index += 1
67 | if sspj_index >= len(sspj_files): sspj_index = 0
68 | ssnode.res_player.res_project = ResourceLoader.load(sspj_files[sspj_index])
69 | var anime_pack_names = ssnode.res_player.res_project.get_anime_pack_names()
70 | ssnode.set_anime_pack(anime_pack_names[0])
71 | ssnode.set_animation("anime_1")
72 |
--------------------------------------------------------------------------------
/examples/feature_test_gdextension/sspj_load.gd:
--------------------------------------------------------------------------------
1 | extends Node
2 |
3 |
4 | # Declare member variables here. Examples:
5 | # var a = 2
6 | # var b = "text"
7 |
8 | @onready var anime_player = $AnimationPlayer
9 |
10 | @onready var ssnode = $by_script
11 | var cur_frame = 0
12 | var sspj_index = 0;
13 | var sspj_files = ["ssdata/v6_all.sspj", "basedir/BaseDir.sspj"]
14 | #var anime_pack_names = ["Basic.ssae", "NewAnimation.ssae"]
15 |
16 | # Called when the node enters the scene tree for the first time.
17 | func _ready():
18 | anime_player.play("SsPlayer");
19 |
20 | # sspj ファイル読み込み
21 | var sspj: GdResourceSsProject = ResourceLoader.load("ssdata/v6_all.sspj")
22 | if sspj == null:
23 | print("Failed to load sspj file")
24 | return
25 |
26 | ssnode.res_player.res_project = sspj
27 |
28 | # ssae 列挙
29 | var anime_pack_names = sspj.get_anime_pack_names()
30 | var anime_names
31 | for anime_pack_name in anime_pack_names:
32 | print("anime_pack_name:" + anime_pack_name)
33 | # AnimePack リソースを取得
34 | var anime_pack_resource = sspj.get_anime_pack_resource(anime_pack_name)
35 | # アニメーション名を列挙
36 | anime_names = anime_pack_resource.get_animation_names()
37 | for anime_name in anime_names:
38 | print("anime_name:" + anime_name)
39 |
40 | # 1つめのSSAEの1つ目のアニメを再生
41 | ssnode.set_anime_pack(anime_pack_names[0])
42 | var anime_name = anime_names[0]
43 | if anime_name == "Setup":
44 | anime_name = anime_names[1]
45 | print("play anime:" + anime_name + " in " + anime_pack_names[0])
46 | ssnode.set_animation(anime_name)
47 |
48 | # 開始・終了フレームの取得
49 | print("start_frame:" + str(ssnode.get_start_frame()))
50 | print("end_frame:" + str(ssnode.get_end_frame()))
51 |
52 | # アニメーション終了時コールバックの設定
53 | ssnode.connect("animation_finished", Callable(self, "_on_animation_finished"))
54 |
55 | ssnode.set_loop(true)
56 | ssnode.play()
57 |
58 | # Called every frame. 'delta' is the elapsed time since the previous frame.
59 | func _process(delta):
60 | pass
61 |
62 | func _on_animation_finished(name):
63 | print("SIGNAL _on_animation_finished from " + name)
64 | # 別のsspjに変更
65 | if true:
66 | sspj_index += 1
67 | if sspj_index >= len(sspj_files): sspj_index = 0
68 | ssnode.res_player.res_project = ResourceLoader.load(sspj_files[sspj_index])
69 | var anime_pack_names = ssnode.res_player.res_project.get_anime_pack_names()
70 | ssnode.set_anime_pack(anime_pack_names[0])
71 | ssnode.set_animation("anime_1")
72 |
--------------------------------------------------------------------------------
/misc/SSPlayerForGodot.ss-playersettings:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
4 | 1
5 | SSPlayerForGodot
6 | SSPlayerForGodot v1.2.0
7 | any
8 | sspj
9 | ssae
10 | ssce
11 | 6
12 |
13 |
- prio
14 |
15 |
16 | - CELL
17 | - POSX
18 | - POSY
19 | - POSZ
20 | - ROTX
21 | - ROTY
22 | - ROTZ
23 | - SCLX
24 | - SCLY
25 | - LSCX
26 | - LSCY
27 | - ALPH
28 | - LALP
29 | - PRIO
30 | - IFLH
31 | - IFLV
32 | - HIDE
33 | - PCOL
34 | - VCOL
35 | - SHDR
36 | - VERT
37 | - PVTX
38 | - PVTY
39 | - SIZX
40 | - SIZY
41 | - UVTX
42 | - UVTY
43 | - UVRZ
44 | - UVSX
45 | - UVSY
46 | - BNDR
47 | - USER
48 | - SIGN
49 | - IPRM
50 | - EFCT
51 | - DEFM
52 |
53 |
54 | - mix
55 |
56 |
57 | - mix
58 | - mul
59 | - add
60 | - sub
61 |
62 |
63 | - mix
64 | - mul
65 | - add
66 | - sub
67 |
68 |
69 | - quad
70 | - aabb
71 | - circle
72 | - circle_smin
73 | - circle_smax
74 |
75 |
76 | - effect
77 | - bone
78 | - mesh
79 |
80 |
81 | - all
82 |
83 | 1
84 | 0
85 | 0
86 | 0
87 | official
88 |
89 |
90 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) CRI Middleware Co., Ltd.
2 | All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without
5 | modification, are permitted provided that the following conditions are met:
6 |
7 | 1. Redistributions of source code must retain the above copyright notice,
8 | this list of conditions and the following disclaimer.
9 | 2. Redistributions in binary form must reproduce the above copyright notice,
10 | this list of conditions and the following disclaimer in the documentation
11 | and/or other materials provided with the distribution.
12 | 3. Neither the name of the CRI Middleware Co., Ltd. nor the names of its contributors
13 | may be used to endorse or promote products derived from this software
14 | without specific prior written permission.
15 |
16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
20 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 |
27 | ---------------
28 |
29 | Copyright (c) CRI Middleware Co., Ltd.
30 | All rights reserved.
31 |
32 | ソースコード形式かバイナリ形式か、変更するかしないかを問わず、以下の条件を
33 | 満たす場合に限り、再頒布および使用が許可されます。
34 |
35 | 1. ソースコードを再頒布する場合、上記の著作権表示、本条件一覧、および下記免責
36 | 条項を含めること。
37 | 2. バイナリ形式で再頒布する場合、頒布物に付属のドキュメント等の資料に、上記の
38 | 著作権表示、本条件一覧、および下記免責条項を含めること。
39 | 3. 書面による特別の許可なしに、本ソフトウェアから派生した製品の宣伝または販売
40 | 促進に、CRI Middleware Co., Ltd. の名前またはコントリビューターの名前を使用して
41 | はならない。
42 |
43 | 本ソフトウェアは、著作権者およびコントリビューターによって「現状のまま」提供
44 | されており、明示黙示を問わず、商業的な使用可能性、および特定の目的に対する
45 | 適合性に関する暗黙の保証も含め、またそれに限定されない、いかなる保証もありません。
46 | 著作権者もコントリビューターも、事由のいかんを問わず、 損害発生の原因いかんを
47 | 問わず、かつ責任の根拠が契約であるか厳格責任であるか(過失その他の)不法行為
48 | であるかを問わず、仮にそのような損害が発生する可能性を知らされていたとしても、
49 | 本ソフトウェアの使用によって発生した(代替品または代用サービスの調達、使用の
50 | 喪失、データの喪失、利益の喪失、業務の中断も含め、またそれに限定されない)
51 | 直接損害、間接損害、偶発的な損害、特別損害、懲罰的損害、または結果損害について、
52 | 一切責任を負わないものとします。
53 |
--------------------------------------------------------------------------------
/examples/particle_effect/ParticleEffect/012b.ssee:
--------------------------------------------------------------------------------
1 |
2 |
3 | 012b
4 |
5 |
6 | 16
7 | 1
8 | 30
9 | FF000000
10 | 2
11 | 100
12 | 100
13 |
14 |
15 | Root
16 | Root
17 | 0
18 | -1
19 | 1
20 |
21 |
22 | Emitter_1
23 | Emmiter
24 | 1
25 | 0
26 | 1
27 |
28 | circle1_c
29 | ss_effect_c.ssce
30 | Add
31 |
32 |
33 | Basic
34 | 54
35 | 15
36 | 4
37 | 38
38 | 18
39 |
40 |
41 | 0
42 | 360
43 |
44 |
45 | add_tangentiala
46 |
47 |
48 |
49 | trans_size
50 |
51 |
52 |
53 |
54 |
55 | trans_colorfade
56 |
57 |
58 |
59 |
60 |
61 |
62 | Particle_1
63 | Particle
64 | 2
65 | 1
66 | 1
67 |
68 |
69 |
70 | Add
71 |
72 |
73 |
74 |
75 |
76 |
77 |
--------------------------------------------------------------------------------
/examples/particle_effect/ParticleEffect/006a.ssee:
--------------------------------------------------------------------------------
1 |
2 |
3 | 006a
4 |
5 |
6 | 19
7 | 1
8 | 30
9 | FF000000
10 | 2
11 | 100
12 | 100
13 |
14 |
15 | Root
16 | Root
17 | 0
18 | -1
19 | 1
20 |
21 |
22 |
23 | Emmiter
24 | 1
25 | 0
26 | 1
27 |
28 | circle2
29 | ss_effect.ssce
30 | Add
31 |
32 |
33 | Basic
34 | 64
35 | 20
36 | 19
37 | 2
38 | 1
39 |
40 |
41 | 0
42 | 360
43 |
44 |
45 | trans_speed
46 |
47 |
48 |
49 | init_vertexcolor
50 |
51 |
52 |
53 | trans_size
54 |
55 |
56 |
57 |
58 |
59 | trans_colorfade
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 | Particle
68 | 2
69 | 1
70 | 1
71 |
72 |
73 |
74 | Add
75 |
76 |
77 |
78 |
79 |
80 |
81 |
--------------------------------------------------------------------------------