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