#module
#deffunc slide int, int, int, int, int, int, int
mref id, 0 : mref px, 1 : mref py, 2 : mref sx, 3 : mref sy, 4 : mref times, 5 : mref dir, 6
i = csrx, csry
if times > 0 {
repeat times - 1, 1
i.2 = dir \ 2 = 0, dir \ 2 = 1
if dir < 2 {
i.4 = sx * cnt / times - sx, sy * cnt / times - sy
} else {
i.4 = sx - (sx * cnt / times), sy - (sy * cnt / times)
}
redraw 0
pos i.2 * i.4 + i.0, i.3 * i.5 + i.1
gcopy id, px, py, sx, sy
redraw 1
wait 1
loop
}
pos i.0, i.1 : gcopy id, px, py, sx, sy
return
#global
buffer 2
picload "sample/demo/oniinfo.jpg"
buffer 3
picload "sample/hspdx/hspdx.bmp"
gsel 0
gcopy 2, , , winx, winy // 元の背景画像
slide 3, , , winx, winy, 8, 0 // 左から右方向へ8ターンで切り替える
slide 2, , , winx, winy, 16, 1 // 上から下方向へ16ターンで切り替える
slide 3, , , winx, winy, 32, 2 // 右から左方向へ32ターンで切り替える
slide 2, , , winx, winy, 64, 3 // 下から上方向へ64ターンで切り替える
stop
|