僕はゲームのメインループに次のようなコードを仕込んだものだ。
put the ticks into t
--処理1
add the ticks - t to item 1 of tt
put the ticks into t
--処理2
add the ticks - t to item 2 of tt
put the ticks into t
--処理3
add the ticks - t to item 3 of tt
put tt into msg
PgColorX2.31新機能(予定)
○suite機能(すいーと きのう)
PgColorX "SetSuite",3,1,cd fld "data"
PgColorX "DrawSuite","cd",3
cd fld "data"に書かれたデータを保存して、一発で描画できます。
データは以下のようなもの
「"Paint",,"#ffff00","0,0,64,64"
"CopyBits",1,,"0,0,32,32",rect of cd btn 1
"Cicn",,"cicn1","rect of cd btn 2"」
rect of cd btn 1だと、SetSuiteした時のrectになりますが、
"rect of cd btn 1"のようにすればDrawSuiteした時のrectになります。
これでボタンが移動してもばっちり追従するようにできます。
> 「HyperCard高速化」を読んでいで、中に
> 「send mouseUp to cd btn 〜より、send "mouseUp" to cd btn 〜とダブルクォートでくくったほうがほんの少し速い」
> とあったのですが、実験してみたところ特に違いはありませんでした。
> あと、ホームページの「中途半端ズ」や「FFN関西人化」など一部のファイルががこちらだとダウンロード出来ません。
on mouseUp
get the ticks
repeat 10000
send mouseDown to me
end repeat
put the ticks - it
end mouseUp