Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 89 additions & 0 deletions README.ja.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
[**日本語**](./README.ja.md) | [**English**](./README.md)

# SpriteStudio 6 SDK
Copyright © CRI Middleware Co., Ltd.

## 概要
本SDKは、[OPTPiX SpriteStudio 6以降](http://www.webtech.co.jp/spritestudio/)で製作されたデータ(sspj,ssce,ssae,ssee)をユーザーの皆様の再生環境に応じて柔軟にご利用いただくためのライブラリ、およびツール群で構成されます。

* sspjLib :SpriteStudioのプロジェクトファイルsspjを解析するためのライブラリです。
* ローダー:SpriteStudio 6 形式'のファイル(sspj,ssce,ssae,ssee)の読み込みモジュール
* アニメータ:座標変換、補間計算などを行うアニメーションモジュール
* ドローワー:OpenGL を利用した描画モジュール
* Tools:ライブラリを使用して作成されたツールです。
* ビューアー:Windows/Mac 用ビューアーサンプル
* コンバータ:sspjファイルから再生プログラム用のファイル(.ssbp .json等)へ変換します。

### 想定する用途
本SDKの用途は、sspjを解析して新たなプラットフォーム用プレイヤーを作成したり、別のフォーマットにデータを加工、変換するツールの作成となります。
ゲームやアプリで使用する場合は、アニメーション制御に特化したプレイヤープログラムを公開しています。
またアニメーション編集に役立つ外部ツールも公開していますので、以下のリンクを参照してみてください。
* [OPTPiX ヘルプセンター](http://www.webtech.co.jp/help/ja/spritestudio/download/forprogrammer/)
* [GitHubのSpriteStudioリポジトリ](https://github.com/SpriteStudio?tab=repositories)

### 免責事項
本SDKは**リファレンス実装**を目指してメンテナンスされています。
特定のプラットフォームを意識した最適化は行わず、ある程度の冗長性を維持しています。
develop ブランチは最新の開発版のため、何らかの不具合が含まれている可能性があります。
安定版が必要な場合[Release](https://github.com/SpriteStudio/SpriteStudio6-SDK/releases)から取得してください。

## 更新履歴

- [master](https://github.com/SpriteStudio/SpriteStudio6-SDK/commits/master)
- [develop](https://github.com/SpriteStudio/SpriteStudio6-SDK/commits/develop)

## 対応する SpriteStudio のバージョン
**SDKバージョン_SpriteStudioバージョン** の形式 (例: 2.2.0_SS7.1.0) でリリースが作られています。
詳しくは[Releases](https://github.com/SpriteStudio/SpriteStudio6-SDK/releases) をご覧ください。

## ツール類

- ダウンロード
- [最新版](https://github.com/SpriteStudio/SpriteStudio6-SDK/releases/latest)
- [全バージョン](https://github.com/SpriteStudio/SpriteStudio6-SDK/releases)
- 使い方
- [コンバータ](./docs/how-to-use-converter.ja.md)
- [ビューア](./docs/viewer.ja.md)
- その他
- [SS6Playerシリーズとエンジニア向けツール](http://www.webtech.co.jp/help/ja/spritestudio/download/forprogrammer/)

## SDKのビルド方法
* [SDKのビルド方法](./docs/how-to-build-sdk.ja.md)
* [(参考) SS6Converter、ビューアーをビルドする方法](http://www.webtech.co.jp/help/ja/spritestudio/guide/output6/sdk/#viewer_build) _※ヘルプセンターのページにジャンプします。_

## データ構造とクラスリファレンス
[SpriteStudio6 SDK Document](https://spritestudio.github.io/SpriteStudio6-SDK/html/index.html)

## ブランチルール
SpriteStudioSDKにはmasterとdevelopがあり、プレイヤーを含む最新のコードはdevelopにコミットされます。
安定版と判断した段階で、developからmasterへマージしてバージョン番号を付与しています。

## Pull Request
Pull Request は大歓迎です!
リクエスト送信前にIssue化しておく必要はありません。
変更内容はコミット時のコメントに記入していただければ十分です。

## 使用しているオープンソースライブラリ
SDKでは以下のライブラリを使用しています。
各ライブラリのライセンス等については下記リンクよりご確認ください。
* ローダー
* [TinyXML2](http://www.grinninglizard.com/tinyxml/)
* レンダラー
* [OpenGL](http://www.opengl.org/)
* [glew ( Windows )](http://glew.sourceforge.net/)
* ビューアーサンプルのGUI
* [glfw3](http://www.glfw.org/)
* [JUCE 7](https://juce.com/)

## SpriteStudio 5 3rdParty
ご好意で提供していただいたプログラムを公開しています。
ご使用の前にこちらをお読みください。[SpriteStudio 5 3rdParty](http://spritestudio3rdparty.github.io/)

## お問い合わせ
ご質問、ご要望、不具合のご報告は [Issues](https://github.com/SpriteStudio/SpriteStudio6-SDK/issues) に投稿してください。
非公開でのお問い合わせを希望される場合は、[ヘルプセンター](https://www.webtech.co.jp/help/ja/spritestudio7/inquiries/ssplayer_tool/) よりお寄せください。
再現データなどの送付が必要な場合も、上記ヘルプセンター経由でファイルを送信してください。

株式会社CRI・ミドルウェア
[https://www.cri-mw.co.jp/](https://www.cri-mw.co.jp/)
Copyright © CRI Middleware Co., Ltd.
92 changes: 88 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,89 @@
### SpriteStudio 6 SDK
[**日本語**](./README.ja.md) | [**English**](./README.md)

ドキュメントはこちらです。
https://github.com/SpriteStudio/SpriteStudio6-SDK/wiki

# SpriteStudio 6 SDK
Copyright © CRI Middleware Co., Ltd.

## Overview
This SDK consists of libraries and tools for flexibly using data (sspj, ssce, ssae, ssee) created with [OPTPiX SpriteStudio 6 or later](http://www.webtech.co.jp/spritestudio/) in your own playback environment.

* sspjLib: A library for parsing SpriteStudio project files (sspj).
* Loader: Module for loading SpriteStudio 6 format files (sspj, ssce, ssae, ssee).
* Animator: Animation module that performs coordinate transformation, interpolation calculation, etc.
* Drawer: Drawing module using OpenGL.
* Tools: Tools created using the library.
* Viewer: Viewer sample for Windows/Mac.
* Converter: Converts sspj files into files for playback programs (.ssbp, .json, etc.).

### Intended Use
The purpose of this SDK is to parse sspj files to create players for new platforms, or to create tools for processing and converting data into other formats.
For use in games and apps, we provide player programs specialized for animation control.
We also provide external tools useful for animation editing, so please refer to the links below.
* [OPTPiX Help Center](http://www.webtech.co.jp/help/en/spritestudio/download/forprogrammer/)
* [SpriteStudio Repositories on GitHub](https://github.com/SpriteStudio?tab=repositories)

### Disclaimer
This SDK is maintained with the goal of being a **reference implementation**.
It maintains a certain degree of redundancy without performing optimizations for specific platforms.
Since the `develop` branch is the latest development version, it may contain some bugs.
If you need a stable version, please obtain it from [Releases](https://github.com/SpriteStudio/SpriteStudio6-SDK/releases).

## Update History

- [master](https://github.com/SpriteStudio/SpriteStudio6-SDK/commits/master)
- [develop](https://github.com/SpriteStudio/SpriteStudio6-SDK/commits/develop)

## Supported SpriteStudio Versions
Releases are created in the format **SDK Version_SpriteStudio Version** (e.g., 2.2.0_SS7.1.0).
For details, please see [Releases](https://github.com/SpriteStudio/SpriteStudio6-SDK/releases).

## Tools

- Download
- [Latest Version](https://github.com/SpriteStudio/SpriteStudio6-SDK/releases/latest)
- [All Versions](https://github.com/SpriteStudio/SpriteStudio6-SDK/releases)
- Usage
- [Converter](./docs/how-to-use-converter.md)
- [Viewer](./docs/viewer.md)
- Others
- [SS6Player Series and Tools for Engineers](http://www.webtech.co.jp/help/en/spritestudio/download/forprogrammer/)

## How to Build the SDK
* [How to Build the SDK](./docs/how-to-build-sdk.md)
* [(Reference) How to Build SS6Converter and Viewer](http://www.webtech.co.jp/help/ja/spritestudio/guide/output6/sdk/#viewer_build) _*Note: Jumps to the Help Center page._

## Data Structure and Class Reference
[SpriteStudio6 SDK Document](https://spritestudio.github.io/SpriteStudio6-SDK/html/index.html)

## Branch Rules
SpriteStudioSDK has `master` and `develop` branches. The latest code, including the player, is committed to `develop`.
Once judged to be a stable version, it is merged from `develop` to `master` and assigned a version number.

## Pull Requests
Pull Requests are very welcome!
There is no need to create an Issue before sending a request.
Providing details of the changes in the commit comments is sufficient.

## Open Source Libraries Used
The SDK uses the following libraries.
Please check the links below for the licenses of each library.
* Loader
* [TinyXML2](http://www.grinninglizard.com/tinyxml/)
* Renderer
* [OpenGL](http://www.opengl.org/)
* [glew (Windows)](http://glew.sourceforge.net/)
* Viewer Sample GUI
* [glfw3](http://www.glfw.org/)
* [JUCE 7](https://juce.com/)

## SpriteStudio 5 3rdParty
We publish programs provided by the community.
Please read this before use. [SpriteStudio 5 3rdParty](http://spritestudio3rdparty.github.io/)

## Contact
Please post questions, requests, and bug reports to [Issues](https://github.com/SpriteStudio/SpriteStudio6-SDK/issues).
If you prefer to contact us privately, please use the [Help Center](https://www.webtech.co.jp/help/en/spritestudio7/inquiries/ssplayer_tool/).
If you need to send reproduction data, please do so via the Help Center.

CRI Middleware Co., Ltd.
[https://www.cri-mw.co.jp/](https://www.cri-mw.co.jp/)
Copyright © CRI Middleware Co., Ltd.
13 changes: 10 additions & 3 deletions Scripts/generate_ssfb_code.bat
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,16 @@ rem Build flatc
rmdir /S /Q build
mkdir build
pushd build
cmake -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DENABLE_FLATC=ON .. || exit /b 1
cmake --build . --target flatc --parallel -- /p:Configuration=%BUILD_TYPE% || exit /b 1
set FLATC="%BUILDDIR%\Converter\build\_deps\flatbuffers-build\flatc.exe"
where ninja >nul 2>nul
if ERRORLEVEL 1 (
cmake -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DENABLE_FLATC=ON .. || exit /b 1
cmake --build . --target flatc --parallel --config %BUILD_TYPE% || exit /b 1
set FLATC="%BUILDDIR%\Converter\build\_deps\flatbuffers-build\%BUILD_TYPE%\flatc.exe"
) else (
cmake -G Ninja -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DENABLE_FLATC=ON .. || exit /b 1
cmake --build . --target flatc --parallel || exit /b 1
set FLATC="%BUILDDIR%\Converter\build\_deps\flatbuffers-build\flatc.exe"
)
popd

rem generate ssfb code
Expand Down
7 changes: 4 additions & 3 deletions Scripts/release_converter_win.bat
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,14 @@ pushd %BASEDIR%
rmdir /S /Q Ss6Converter
mkdir Ss6Converter

copy "%BUILDDIR%\Converter\build\Release\Ss6Converter.exe" Ss6Converter\
where ninja >nul 2>nul
if ERRORLEVEL 1 (
copy "%BUILDDIR%\Converter\build\Release\Ss6Converter.exe" Ss6Converter\ || exit /b 1
robocopy "%BUILDDIR%\Ss6ConverterGUI\Ss6ConverterGUI\build\Release" Ss6Converter /E
) else (
copy "%BUILDDIR%\Ss6ConverterGUI\Ss6ConverterGUI\build\Ss6ConverterGUI.exe" Ss6Converter\
%QT_PREFIX%\..\msvc2022_64\bin\windeployqt6.exe --qtpaths %QTPATHS% Ss6Converter\
copy "%BUILDDIR%\Converter\build\Ss6Converter.exe" Ss6Converter\ || exit /b 1
copy "%BUILDDIR%\Ss6ConverterGUI\Ss6ConverterGUI\build\Ss6ConverterGUI.exe" Ss6Converter\ || exit /b 1
%QT_PREFIX%\..\msvc2022_64\bin\windeployqt6.exe --qtpaths %QTPATHS% Ss6Converter\ || exit /b 1
)
set ZIPNAME=Ss6Converter_%TARGET_ARCH%
powershell compress-archive Ss6Converter %ZIPNAME%.zip
Expand Down
7 changes: 6 additions & 1 deletion Scripts/release_viewer2_win.bat
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ call "%CURDIR%\build_viewer2_win.bat" Release %TARGET_ARCH% || exit /b 1
pushd %BASEDIR%
rmdir /S /Q viewer_sample_2
mkdir viewer_sample_2
copy "%BUILDDIR%\Viewer2\cmakeBuild\SSView2_artefacts\Release\SSViewer2.exe" viewer_sample_2\
where ninja >nul 2>nul
if ERRORLEVEL 1 (
copy "%BUILDDIR%\Viewer2\cmakeBuild\SSView2_artefacts\Release\SSViewer2.exe" viewer_sample_2\ || exit /b 1
) else (
copy "%BUILDDIR%\Viewer2\cmakeBuild\SSView2_artefacts\SSViewer2.exe" viewer_sample_2\ || exit /b 1
)
set ZIPNAME=viewer_sample_2_%TARGET_ARCH%
powershell compress-archive viewer_sample_2 %ZIPNAME%.zip
move /y %ZIPNAME%.zip %TOOLSDIR%\
Expand Down
103 changes: 103 additions & 0 deletions docs/binary-file-format.ja.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
[**日本語**](./binary-file-format.ja.md) | [**English**](./binary-file-format.md)

# バイナリファイルのフォーマット
## 注意
情報が古いので、この内容は参考にしないでください。
## 概要
* 変換時に指定した sspj ファイルと登録されているssae, ssce すべての情報を1つにパックします。
* sspj,ssae,ssce ファイルが持つ情報のうち再生に必要な情報のみを含んでいます。
* アニメーションの補間計算はコンバート時に行われます。(実行時計算にも対応予定)
* 座標値はグローバル化せずローカル値のまま保持します。
## 詳細
* ファイル構造
ssbpファイルは次の情報で構成されています。
SS5PlayerData.hにssbp解析用の構造体が定義されています。
+ プロジェクト設定
- struct ProjectData
- dataId        ssbpファイルデータ確認用のID
- version       ssbpファイルのバージョン
- flags        予備
- imageBaseDir    リソースパス、コンバート時の引数で設定する
- cells        セル構造体へのポインタ(配列の先頭アドレス)
- animePacks     アニメパック構造体へのポインタ(配列の先頭アドレス)
- numCells      セルの数
- numAnimePacks    アニメーションの数
+ セル
- struct Cell
- name        セル名
- cellMap;      セルマップ構造体へのポインタ(配列の先頭アドレス)
- indexInCellMap   セル番号
- x          セル画像内の開始X座標
- y          セル画像内の開始Y座標
- width        セルの幅
- height       セルの高さ
- reserved      予備
+ セルマップ
- struct CellMap
- name        セルマップ名(ssce名)
- imagePath      テクスチャファイル名
- index        セルマップ番号
- reserved      予備
+ アニメパック
- struct AnimePackData
- name           モーション名
- parts           パーツ構造体へのポインタ
- animations;     アニメ(モーション)構造体へのポインタ
- numParts         パーツ数
- numAnimations      モーション数
+ アニメ
- struct AnimationData
- name           モーション名
- defaultData       パーツの初期値(配列の先頭アドレス)
- frameData        各フレームのパーツデータ(配列の先頭アドレス)
- userData         ユーザーデータ(配列の先頭アドレス)
- labelData        ラベルデータ(配列の先頭アドレス)
- numFrames        総フレーム
- fps           再生スピード
- labelNum        ラベルデータの数
+ パーツ初期値
- struct AnimationInitialData
- index           パーツインデックス、SS上のフレームコントロールの順番
- dummy           バイナリデータ出力用のアライメントダミーデータ
- flags           非表示、X反転、Y反転フラグ
- cellIndex         セルインデックス
- positionX         X座標初期値
- positionY         Y座標初期値
- opacity          透明度初期値
- anchorX          原点Xオフセット+セルに設定された原点Xオフセット初期値
- anchorY          原点Yオフセット+セルに設定された原点Yオフセット初期値
- rotationX         X回転初期値
- rotationY         Y回転初期値
- rotationZ         Z回転初期値
- scaleX           X拡大率初期値
- scaleY           Y拡大率初期値
- size_X           Xサイズ初期値
- size_Y           Yサイズ初期値
- uv_move_X         UV X移動初期値
- uv_move_Y         UV Y移動初期値
- uv_rotation        UV回転初期値
- uv_scale_X         UV Xスケール初期値
- uv_scale_Y         UV Yスケール初期値
- boundingRadius      当たり半径初期値
+ 各フレームのパーツデータ
- パーツデータは可変長で初期値と異なるデータのみが格納されています。
- ヘッダ部
* パーツインデックス
* フラグ
+ フラグにはビット対応でどのデータが含まれるかが入っています。
+ フラグの内容によってファイルからデータを読むか、初期値からデータを読むかを決定する。
+ 詳細はSS5Player cocos2d-xに含まれるSS5Player.cppのvoid Player::setFrame(int frameNo)を参照
+ ユーザーデータ
- struct UserData
- partName       このユーザーデータが設定されているパーツ名
- frameNo       このユーザーデータが設定されているフレーム
- flags        含まれるデータの種類
- integer       整数
- rect[4]       矩形データ
- point[2]       座標データ
- str         文字列
- strSize       文字列のサイズ
+ ラベルデータ
- struct LabelData
- str         ラベル名
- frameNo       ラベルを設定したフレーム
Loading
Loading