意図は「temp1の画像の指定領域をtemp2へ転送してtemp2から分割画像を取得する」というものです。
インデックスカラー形式の 768x816 のPNG画像があるとして、
以下のようなプログラムを組みましたが、
BltSoftImageのsrcX, srcYなどの引数をいくら変えても転送元の左上端は0,0になってしまいます。
これが最小コードではなかったらすみません。
int array1[ 2448 ] ;
int array2[ 2448 ] ;
int r, b, g ;
int temp1, temp2 ;
temp1 = loadSoftImage( "Gra.png" ) ;
CreateDivGraphFromSoftImage( temp1, 2448, 48, 51, 16, 16, array1 ) ;
temp2 = MakePAL8ColorSoftImage( 768, 816 ) ;
for ( int i = 0 ; i < 256 ; i ++ ) {
GetPaletteSoftImage( temp1, i, &r, &g, &b, 0 ) ;
SetPaletteSoftImage( temp2, i, r, g, b, 0 ) ;
}
BltSoftImage( 512, 464, 256, 320, temp1, 0, 0, temp2 ) ;
CreateDivGraphFromSoftImage( temp2, 2448, 48, 51, 16, 16, array2 ) ;
DeleteSoftImage( temp1 ) ;
DeleteSoftImage( temp2 ) ;