サンプルのPIC/CUTファイルは、今はなき電脳倶楽部146号から、(連絡先がわからないので)無断で借りています。
不都合があればご連絡ください。
// 画像ファイルの表示
width(64)
//
vpriority(TPAGE,GPAGE0,GPAGE1,GPAGE2,GPAGE3)
vpage(B_TPAGE or B_GPAGE0 or B_GPAGE1 or B_GPAGE2 or B_GPAGE3,YES)
apage(GPAGE0)
//
// 全ファイルリストを得る
dim str fileList(256):// ()内は扱える最大ファイル数
int allcnt
int i,ret
str ext
//
// 拡張子(大文字小文字を区別するので注意)
// 正規表現
ext="PIC|pic|PNG|png|JPG|jpg|CUT|cut":
allcnt=files(fileList,"",ext,YES,FILES_FILE,YES)
if allcnt<=0 then {
locate(0,0)
print localizedString("画像ファイルがありません":"Graphic file not found.")
} else {
for i=0 to allcnt-1
locate(0,0):print fileList(i)
wipe()
str pext=pathExtension(fileList(i))
strupr(pext)
switch pext
case "PIC"
ret=picLoader(128,128,fileList(i))
if ret<>0 then {
locate(0,1):print "Error=";ret
}
break
case "CUT"
ret=cutLoader(128,128,fileList(i))
if ret<>0 then {
locate(0,1):print "Error=";ret
}
break
default:
ret=imgLoad(128,128,0,0,fileList(i))
break
endswitch
hitKey()
next
}
end
//---------
func hitKey()
setFunctionKey(0,localizedString("ここを押してください","Hit This Button"),'!')
displayFunctionKey(YES,0,0)
while inkey()=0
endwhile
cls()
displayFunctionKey(NO,0,0)
endfunc
//---------
func str localizedString(js;str,es;str)
if isLocalizeJapan() then return(js)
return (es)
endfunc
//---------
画像サンプルおよびアニメーションや変形に対応した改良版を含む圧縮ファイルはこちら XBpicloader.zip![]() |
| picLoader.bas |
![]() |
| picLoaderSc.bas |


0 件のコメント:
コメントを投稿