>buffer 25030
のID部分を分割NOとバッファIDに別ける
上位下位ワードを別々の値として別ける方法もあるけど
今回は一つのバッファに読み込む数で別けた
#define PICSIZEX 640
#define PICSIZEY 480
#define PICDIVMAX 5 //一つのバッファに読み込む画像の数
#define ctype GetID(%1) ((%1)/PICDIVMAX)
#define ctype GetNO(%1) ((%1)\PICDIVMAX)
#define buffer2(%1,%2=640,%3=480,%4=0) :no@temp=GetNO(%1):id@temp(GetID(%1)) | 0 :if id@temp(GetID(%1))=0 {buffer GetID(%1),PICSIZEX*PICDIVMAX,PICSIZEY,%4 :celdiv GetID(%1),PICSIZEX,PICSIZEY: id@temp(GetID(%1))=1}else{gsel GetID(%1)}
#define picload2(%1,%2=0,%3=0) pos GetNO(no@temp)*PICSIZEX,0 :picload %1,1
#define celput2(%1,%2=0,%3=1.0,%4=1.0,%5=0.0) celput GetID(%1),GetNO(%1),%3,%4,%5
offsetid=25000
picloadmax=15
chdir dir_exe+"\\hsptv\\"
repeat picloadmax
buffer2 offsetid+cnt
picload2 "sozai"+str(1+cnt)+".jpg"
loop
gsel 0
repeat
pos 0,0
celput2 offsetid+rnd(15)
await 1000
loop