OPTPiX SpriteStudio SDK
Loading...
Searching...
No Matches
ssloader_sspj.h
Go to the documentation of this file.
1#ifndef __SSLOADER_SSPJ__
2#define __SSLOADER_SSPJ__
3
4#pragma warning(disable : 4819) //
5
6#include "sstypes.h"
7#include "ssarchiver.h"
8#include "ssstring_uty.h"
9
10#include "ssloader_ssae.h"
11#include "ssloader_ssce.h"
12#include "ssloader_ssee.h"
13#include "ssloader_ssqe.h"
14
15#include <memory>
16#include <utility>
17
18#define SPRITESTUDIO6_SSPJVERSION "2.00.00"
19
20namespace spritestudio6
21{
22
25// 編集時設定のためよまない
26// <ssaxImport> //!< .ssax インポート設定
27// <copyWhenImportImageIsOutside> //!< プロジェクトフォルダ外に画像ファイルがある場合にインポート先にコピーする。
28// <exportAnimeFileFormat> //!< エクスポート時のアニメーションファイルのフォーマット
29// <exportCellMapFileFormat> //!< エクスポート時のセルマップファイルのフォーマット
30// <exportCellMap> //!< セルマップをエクスポートする
31// <copyImageWhenExportCellmap> //!< セルマップのエクスポート時に画像ファイルをエクスポート先にコピーする
32// <ssaxExport> //!< .ssax エクスポート設定
33// <player> //!< 再生対象のプレイヤー。これにより使える機能に制限をかける。
34// <strictVer4> //!< Ver4互換
35// <availableAttributes> //!< 使用するアトリビュート
36// <defaultSetAttributes> //!< 新規キー作成でデフォルトでキーが打たれるアトリビュート
77
78
79typedef std::vector<std::unique_ptr<SsAnimePack>> SsAnimePackList;
80typedef SsAnimePackList::iterator SsAnimePackListItr;
81
82typedef std::vector<std::unique_ptr<SsCellMap>> SsSsCellMapList;
83typedef SsSsCellMapList::iterator SsSsCellMapListItr;
84
85
86typedef std::vector<std::unique_ptr<SsEffectFile>> SsEffectFileList;
87typedef SsEffectFileList::iterator SsEffectFileListItr;
88
89typedef std::vector<std::unique_ptr<SsSequencePack>> SsSequencePackList;
90typedef SsSequencePackList::iterator SsSequencePackListItr;
91
97{
98public:
99
102
103 std::vector<SsString> cellmapNames;
104 std::vector<SsString> animepackNames;
105 std::vector<SsString> effectFileNames;
106 std::vector<SsString> textureList;
107 std::vector<SsString> sequencepackNames;
108
113
114 //ロード時に作成されるワーク
116
117
119 virtual ~SsProject();
120
123
125 const size_t getAnimePackNum(){ return animepackNames.size(); }
126
128 const size_t getCellMapNum(){ return cellmapNames.size(); }
129
131 const size_t getEffectFileNum(){ return effectFileNames.size(); }
132
134 const size_t getSequencePackNum(){ return sequencepackNames.size(); }
135
136
139
142
143 //エフェクトファイルのリスト
145
148
151
154
155 //エフェクトファイルの各情報を取得する
157
160
161
162 //アニメパック名とアニメ名からアニメーションを取得する
163 SsAnimation* findAnimation( SsString& animePackName , SsString& AnimeName );
164
165 SsAnimePack* findAnimationPack( SsString& animePackName );
166
167 //エフェクトの名前からエフェクトを取得する
168 SsEffectFile* findEffect( SsString& effectName );
169
170
171 //シーケンスパック名とシーケンス名からシーケンスを取得する
172 SsSequence* findSequence( SsString& sequencePackName , SsString& SequenceName );
173
174 SsSequencePack* findSequencePack( SsString& sequencePackName );
175
176
177
179
180
183 {
190
191 }
192
193public:
194
196 void setFilepath( const SsString& path ) { m_proj_filepath = path; }
197
200
203
206
208
210
213
214
216 SsString getAnimePackFilePath( size_t index , bool add_basepath = true) {
217 if ( animepackNames.size() <= index ) return "";
218
219 if (add_basepath)
220 {
222 }else{
223 return animepackNames[index];
224 }
225 }
226
227
230 if ( cellmapNames.size() <= index ) return "";
232
233 std::string f = cellmapNames[index];
234
235 std::string ret = getFullPath( str , path2dir( cellmapNames[index] ) );
236 ret = ret + path2file( cellmapNames[index] );
237 ret = nomarizeFilename(ret);
238
239 //str = str + cellmapNames[index];
240 //return str ;
241 return ret;
242 }
243
245 if ( effectFileNames.size() <= index ) return "";
247 }
248
250 if ( cellmapNames.size() <= index ) return "";
251 return cellmapNames[index] ;
252 }
253
256 if ( sequencepackNames.size() <= index ) return "";
258 }
259
260};
261
264{
265private:
266
267public:
269 virtual ~ssloader_sspj(){}
270
271 static SsProject* Load(const std::string& filename );
272 static SsProject* Parse_ProjectOnly(const char* xml , size_t len);
273};
274
275
276} // namespace spritestudio6
277
278#endif
Definition ssloader_ssae.h:335
パーツを組み合わせた構造とその構造を使用するアニメーションを格納するデータです。 パーツの組み合わせ構造をSsModel、Modelを使用するアニメデータをSsAnimationで定義しています。
Definition ssloader_ssae.h:371
セルマップデータを表現するためのクラスです。
Definition ssloader_ssce.h:89
Definition ssloader_ssee.h:190
Definition ssloader_sspj.h:97
SsString getCellMapFilePath(size_t index)
CellMap(ssce)のファイル名をパス付きで取得する
Definition ssloader_sspj.h:229
virtual ~SsProject()
Definition ssloader_sspj.cpp:53
std::vector< SsString > textureList
セルマップから取得したテクスチャのリスト
Definition ssloader_sspj.h:106
SsCellMap * findCellMap(SsString &str)
Definition ssloader_sspj.cpp:301
SsAnimation * findAnimation(SsString &animePackName, SsString &AnimeName)
Definition ssloader_sspj.cpp:97
std::vector< SsString > sequencepackNames
シーケンスファイルのリスト
Definition ssloader_sspj.h:107
SPRITESTUDIO6SDK_SSAR_DECLARE(effectFileNames)
SsProjectSetting settings
プロジェクト設定
Definition ssloader_sspj.h:101
SsString version
Definition ssloader_sspj.h:100
const size_t getCellMapNum()
セルマップデータの数量を取得
Definition ssloader_sspj.h:128
SsString getSsqeBasepath()
ssqeデータの読み込み元の基準パスを取得する。
Definition ssloader_sspj.cpp:40
SsEffectFile * findEffect(SsString &effectName)
Definition ssloader_sspj.cpp:108
SsSsCellMapList cellmapList
セルマップリスト
Definition ssloader_sspj.h:110
SsEffectFile * getEffectFile(int index)
Definition ssloader_sspj.h:156
const SsString & getFilepath()
自身の読み込み元のファイルパスを取得する
Definition ssloader_sspj.h:199
const size_t getSequencePackNum()
シーケンスパックの数量を取得する
Definition ssloader_sspj.h:134
SsString getSsceBasepath()
ssceデータの読み込み元の基準パスを取得する。
Definition ssloader_sspj.cpp:23
SsString m_proj_filepath
Definition ssloader_sspj.h:115
SsString getSseeBasepath()
Definition ssloader_sspj.cpp:34
SsString getAnimePackFilePath(size_t index, bool add_basepath=true)
AnimePack(ssae)のファイル名をパス付きで取得する
Definition ssloader_sspj.h:216
SsSequencePackList & getSequencePackList()
シーケンスパックデータのコンテナを取得する
Definition ssloader_sspj.h:147
SsCellMap * getCellMap(int index)
セルマップデータの各情報を取得する
Definition ssloader_sspj.h:153
SPRITESTUDIO6SDK_SSAR_STRUCT_DECLARE(settings)
SsProject()
プロジェクトファイルのパス
Definition ssloader_sspj.h:118
std::vector< SsString > animepackNames
アニメファイルのリスト
Definition ssloader_sspj.h:104
SsAnimePackList animeList
アニメーションのリスト
Definition ssloader_sspj.h:109
SsSequence * findSequence(SsString &sequencePackName, SsString &SequenceName)
Definition ssloader_sspj.cpp:142
SsString getImageBasepath()
Definition ssloader_sspj.cpp:48
SPRITESTUDIO6SDK_SSAR_DECLARE(animepackNames)
SsString getSequencePackFilePath(size_t index)
SequencePack(ssqe)のファイル名をパス付きで取得する
Definition ssloader_sspj.h:255
SPRITESTUDIO6SDK_SSAR_DECLARE(cellmapNames)
SsString getCelMapFileOriginalPath(size_t index)
Definition ssloader_sspj.h:249
SsAnimePack * getAnimePack(int index)
アニメパックデータの各情報を取得する
Definition ssloader_sspj.h:150
std::vector< SsString > effectFileNames
エフェクトファイルのリスト
Definition ssloader_sspj.h:105
const size_t getEffectFileNum()
セルマップデータの数量を取得
Definition ssloader_sspj.h:131
SsAnimePackList & getAnimePackList()
アニメパックデータのコンテナを取得する
Definition ssloader_sspj.h:138
const size_t getAnimePackNum()
アニメパックの数量を取得する
Definition ssloader_sspj.h:125
SsString getSsaeBasepath()
ssaeデータの読み込み元の基準パスを取得する。
Definition ssloader_sspj.cpp:28
SPRITESTUDIO6SDK_SERIALIZE_BLOCK
シリアライズのための宣言です。
Definition ssloader_sspj.h:183
const SsProjectSetting & getProjectSetting()
プロジェクトの設定情報の取得
Definition ssloader_sspj.h:122
std::vector< SsString > cellmapNames
セルマップファイルのリスト
Definition ssloader_sspj.h:103
SsSsCellMapList & getCellMapList()
セルマップデータのコンテナを取得する
Definition ssloader_sspj.h:141
SsSequencePack * findSequencePack(SsString &sequencePackName)
Definition ssloader_sspj.cpp:124
SsEffectFileList & getEffectFileList()
Definition ssloader_sspj.h:144
SPRITESTUDIO6SDK_SSAR_DECLARE(sequencepackNames)
SsAnimePack * findAnimationPack(SsString &animePackName)
Definition ssloader_sspj.cpp:79
SsSequencePackList sequenceList
シーケンスのリスト
Definition ssloader_sspj.h:112
SsEffectFileList effectfileList
エフェクトのリスト
Definition ssloader_sspj.h:111
SsString getEffectFilePath(size_t index)
Definition ssloader_sspj.h:244
void setFilepath(const SsString &path)
自身のファイルパスを設定する
Definition ssloader_sspj.h:196
SsSequencePack * getSequencePack(int index)
シーケンスパックデータの各情報を取得する
Definition ssloader_sspj.h:159
Definition ssloader_sspj.h:38
SPRITESTUDIO6SDK_SSAR_DECLARE(imageBaseDirectory)
bool queryExportBaseDirectory
エクスポート先の基準ディレクトリ指定をさせるか?
Definition ssloader_sspj.h:50
SPRITESTUDIO6SDK_SSAR_DECLARE_ENUM(vertexAnimeFloat)
SPRITESTUDIO6SDK_SERIALIZE_BLOCK
シリアライズのための宣言です。
Definition ssloader_sspj.h:63
SsString animeBaseDirectory
アニメーションデータの読み書き基準ディレクトリ。
Definition ssloader_sspj.h:43
SPRITESTUDIO6SDK_SSAR_DECLARE(effectBaseDirectory)
SsString imageBaseDirectory
画像データの読み込み元先基準ディレクトリ。
Definition ssloader_sspj.h:45
SsString cellMapBaseDirectory
セルマップデータの読み書き基準ディレクトリ。
Definition ssloader_sspj.h:44
SsProjectSetting()
Definition ssloader_sspj.h:56
SsString effectBaseDirectory
Definition ssloader_sspj.h:46
SPRITESTUDIO6SDK_SSAR_DECLARE(cellMapBaseDirectory)
SsString exportBaseDirectory
エクスポート先の基準ディレクトリ。
Definition ssloader_sspj.h:49
SsTexFilterMode::_enum filterMode
テクスチャのフィルタモード
Definition ssloader_sspj.h:52
SsTexWrapMode::_enum wrapMode
テクスチャのラップモード
Definition ssloader_sspj.h:51
SPRITESTUDIO6SDK_SSAR_DECLARE_ENUM(filterMode)
SPRITESTUDIO6SDK_SSAR_DECLARE(queryExportBaseDirectory)
SPRITESTUDIO6SDK_SSAR_DECLARE(exportBaseDirectory)
int vertexAnimeFloat
頂点変形アトリビュートの少数対応
Definition ssloader_sspj.h:54
Definition ssloader_ssqe.h:41
アニメーションを組み合わせた構造とその構造を使用するシーケンスを格納するデータです。 アニメーションの組み合わせ構造をSsSequenceで定義しています。
Definition ssloader_ssqe.h:72
static SsProject * Parse_ProjectOnly(const char *xml, size_t len)
Definition ssloader_sspj.cpp:153
static SsProject * Load(const std::string &filename)
Definition ssloader_sspj.cpp:167
ssloader_sspj()
Definition ssloader_sspj.h:268
virtual ~ssloader_sspj()
Definition ssloader_sspj.h:269
GLdouble f
Definition glad.h:2085
GLuint index
Definition glad.h:3345
_enum
Definition sstypes.h:518
_enum
Definition sstypes.h:503
Definition ISsEffectRender.h:5
std::string getFullPath(const std::string &basePath, const std::string &relPath)
Definition ssstring_uty.cpp:99
std::vector< std::unique_ptr< SsEffectFile > > SsEffectFileList
Definition ssloader_sspj.h:86
SsAnimePackList::iterator SsAnimePackListItr
Definition ssloader_sspj.h:80
SsSsCellMapList::iterator SsSsCellMapListItr
Definition ssloader_sspj.h:83
std::vector< std::unique_ptr< SsSequencePack > > SsSequencePackList
Definition ssloader_sspj.h:89
SsSequencePackList::iterator SsSequencePackListItr
Definition ssloader_sspj.h:90
std::string nomarizeFilename(std::string path)
Definition ssstring_uty.cpp:179
std::vector< std::unique_ptr< SsCellMap > > SsSsCellMapList
Definition ssloader_sspj.h:82
std::string path2file(const std::string &path)
Definition ssstring_uty.cpp:65
SsEffectFileList::iterator SsEffectFileListItr
Definition ssloader_sspj.h:87
std::vector< std::unique_ptr< SsAnimePack > > SsAnimePackList
Definition ssloader_sspj.h:79
std::string SsString
Definition sstypes.h:30
std::string path2dir(const std::string &path)
Definition ssstring_uty.cpp:58
#define SPRITESTUDIO6SDK_SSAR_DECLARE_ATTRIBUTE(t)
Definition ssarchiver.h:216
#define SPRITESTUDIO6SDK_SSAR_DECLARE(t)
Definition ssarchiver.h:215