More ... | hsp3util.as
; ; HSP3.0 Utility macros ; #ifndef __hsp3util__ #define __hsp3util__ #module #deffunc bmppalette str _fname ; BMPファイルのパレットを取り出す ; bmppalette "BMPファイル名" ; notesel a noteload _fname cols=lpeek(a,$2e) if cols=0 : goto *@f i=$36 repeat cols a1=peek(a,i):a2=peek(a,i+1):a3=peek(a,i+2) palette cnt,a1,a2,a3 i+=4 loop *@ dim a,0 noteunsel return #deffunc box int x1, int y1, int x2, int y2 ; box x1,y1,x2,y2 ; 画面上に、(p1,p2)と(p3,p4)を左上、右下の点として、 ; 現在の描画色で矩形(四角形)を描画します。 line x2, y1, x1, y1 line x2, y2 line x1, y2 line x1, y1 return #defcfunc ex_key_flag int param return param>>24&1 ; 拡張キーフラグを返す関数 #global #endif |