|
| | ImagePack (const char *ファイル名, int 総コマ数, int コマ割り横, int コマ割り縦) |
| | 1つの画像を分割して読み込む. More...
|
| |
| | ImagePack (const char *ファイル名, const char *拡張子, int 総コマ数, const char *書式="%03d.") |
| | 連番ファイルを一括して読み込む. More...
|
| |
| bool | Load (const char *ファイル名, int 総コマ数, int コマ割り横, int コマ割り縦) |
| | 1つの画像を分割して読み込む. More...
|
| |
| bool | Load (const char *ファイル名, const char *拡張子, int 総コマ数, const char *書式="%03d.") |
| | 連番ファイルを一括して読み込む. More...
|
| |
| void | Add (Image *追加イメージ) |
| | Imageを末尾に追加. More...
|
| |
| void | Add (const char *ファイル名) |
| | Imageを末尾に追加. More...
|
| |
| virtual void | Release () |
| | Imageをメモリから開放. More...
|
| |
| int | GetSize () const |
| | 要素数を取得. More...
|
| |
| int | GetWidth () const |
| | 最大幅を取得. More...
|
| |
| int | GetHeight () const |
| | 最大高さを取得. More...
|
| |
| void | SetColor (const Color &描画色) |
| | 描画色をまとめて変更. More...
|
| |
| void | AdjustWidth (std::vector< int > 幅) |
| | 先頭からimageの幅を差分修正. More...
|
| |
| Image * | operator[] (int index) |
| | オペレータ. More...
|
| |
| Image * | operator[] (int index) const |
| | オペレータ. More...
|
| |
| auto | begin () -> decltype(imageS.begin()) |
| | イテレータ用. More...
|
| |
| auto | end () -> decltype(imageS.end()) |
| | イテレータ用. More...
|
| |
| auto | begin () const -> decltype(imageS.begin()) |
| | イテレータ用. More...
|
| |
| auto | end () const -> decltype(imageS.end()) |
| | イテレータ用. More...
|
| |
複数のImageをまとめるクラス.
- Todo:
- リソース解放周り色々未実装
bool SampleImagePack()
{
using namespace SDX;
ImagePack imageA(
"data/number.png", 10, 10, 1);
ImagePack imageC(
"data/dekakabocha.png", 12, 3, 4);
int count = 0;
int direct = 0;
{
++count;
imageA[count / 60 % 10]->DrawExtend({ 200, 240, 30, 40 });
imageB[count / 5 % 10]->Draw({ 400, 240 });
int no = direct * 3 + (count / 12) % 2;
imageC[no]->Draw( pos );
{
pos.Move(0, -5);
direct = 3;
}
{
pos.Move(0, 5);
direct = 0;
}
{
pos.Move(-5, 0);
direct = 1;
}
{
pos.Move(5, 0);
direct = 2;
}
}
return true;
}