HSP¥Ý¡¼¥¿¥ë
¥µ¥¤¥È¥Þ¥Ã¥× ¤ªÌ䤤¹ç¤ï¤»


HSPTV!·Ç¼¨ÈÄ


̤²ò·è ²ò·è Ää»ß ºï½üÍ×ÀÁ

2008
0810
¤Ô¤è¤­¤Á¤¢¤¿¤êȽÄê12̤²ò·è


¤Ô¤è¤­¤Á

¥ê¥ó¥¯

2008/8/10(Sun) 15:34:59|NO.18036

³§¤µ¤ó¤Ï¥²¡¼¥à¤Î¤¢¤¿¤êȽÄê¤ò¤É¤Î¤è¤¦¤Ë¤·¤Æ¤¤¤Þ¤¹¤«¡©
»ä¤Î¤ä¤êÊý¤Ï¤È¤Æ¤â¤³¤³¤Ë¤Î¤»¤é¤ì¤ë¤è¤¦¤Ê¤ä¤êÊý¤Ç¤Ï¤Ê¤¯¡¢
¤´¤Á¤ã¤´¤Á¤ã¤·¤Æ¤¤¤ë¤Î¤Ç´Êñ¤Ê¤ä¤êÊý¤ò¶µ¤¨¤Æ¤¯¤À¤µ¤¤¡£



¤³¤Îµ­»ö¤ËÊÖ¿®¤¹¤ë


Elfizm

¥ê¥ó¥¯

2008/8/10(Sun) 15:50:33|NO.18038

¤É¤Î¤è¤¦¤ÊÅö¤¿¤êȽÄê¤ò¹Ô¤¤¤¿¤¤¤Î¤«¡¢¤Ë¤è¤Ã¤ÆÊѤï¤ê¤Þ¤¹¡£
¥²¡¼¥à¤Î¥¸¥ã¥ó¥ë¤Ë¤è¤Ã¤ÆÅö¤¿¤êȽÄê¤Î¥¢¥ë¥´¥ê¥º¥à¤â°ã¤¤¤Þ¤¹¤«¤é¡¢
¤Þ¤º¤Ï¥¸¥ã¥ó¥ë¤ä¡¢Åö¤¿¤êȽÄê¤Î¥¿¡¼¥²¥Ã¥È¤ò¹Ê¤ë¤È¤è¤¤¤Ç¤¹¡£

¤Þ¤¿¡¢¤´¤Á¤ã¤´¤Á¤ã¤·¤Æ¤¤¤ë¤È¤·¤Æ¤â¡¢²óÅú¤Î¥Ò¥ó¥È¤Ë¤Ï¤Ê¤ê¤Þ¤¹¤«¤é
¤Ô¤è¤­¤Á¤µ¤ó¤Î¹Ô¤Ã¤¿¤¢¤¿¤êȽÄê¤Î¥¹¥¯¥ê¥×¥È¤ò°ìÉô¼¨¤·¤Æ¤¤¤¿¤À¤±¤ë¤È¤¦¤ì¤·¤¤¤Ç¤¹¡£



¤Ô¤è¤­¤Á

¥ê¥ó¥¯

2008/8/10(Sun) 16:11:14|NO.18039

»ä¤Ïº£¤Þ¤Ç¥·¥å¡¼¥Æ¥£¥ó¥°¥²¡¼¥à¤Î¤¢¤¿¤êȽÄꤷ¤«ºî¤Ã¤¿¤³¤È¤¬¤Ê¤¯¡¢
¤¤¤Þ¤Ä¤¯¤Ã¤¤¤ëʪ¤Ï²£¥¹¥¯¥í¡¼¥ë¥²¡¼¥à¤Ç¡¢
ÇÛÃÖ¤·¤¿¤È¤²¤ËÅö¤¿¤Ã¤Æ¤Ï¤¤¤±¤Ê¤¤¤È¤¤¤¦¤è¤¦¤Ê¤¢¤¿¤êȽÄ꤬ºî¤ê¤¿¤«¤Ã¤¿¤Î¤Ç¤¹¤¬¡¢
¥·¥å¡¼¥Æ¥£¥ó¥°¥²¡¼¥à¤ÎȽÄê¤ò±þÍѤ·¤è¤¦¤È¤·¤Æ¼ºÇÔ¤·¤Æ¤·¤Þ¤Ã¤¿¤Î¤Ç¤¦¤Þ¤¯¹Ô¤¯ÊýË¡¤ò¶µ¤¨¤Æ¤¯¤À¤µ¤¤¡£



K

¥ê¥ó¥¯

2008/8/10(Sun) 16:35:25|NO.18041

(ax1,ay1)¤ò¼«¥­¥ã¥é¤Îº¸¾å¡¢(ax2,ay2)¤ò¼«¥­¥ã¥é¤Î±¦²¼
(bx1,by1)¤ò¥È¥²¤Îº¸¾å¡¢(bx2,by2)¤ò¥È¥²¤Î±¦²¼
¤ÎºÂɸ¤È¤·¤Æ¡¢


if ax1>bx2 & ax2<bx1 & ay1>by2 & ay2<by1{ ;Åö¤¿¤Ã¤¿ }

¤³¤ó¤Ê¤â¤ó¤Ç¤·¤ç¤¦¤«¡©

¥½¡¼¥¹¤ò¼¨¤·¤Æ¤¤¤¿¤À¤±¤ë¤È¼ÁÌä¤Î°ÕÌ£¤¬¤è¤êʬ¤«¤ê¤ä¤¹¤¯¤Ê¤ë¤È»×¤¤¤Þ¤¹¡£



K

¥ê¥ó¥¯

2008/8/10(Sun) 16:37:43|NO.18042

¤¹¤ß¤Þ¤»¤ó¡£
µÕ¤Ç¤·¤¿¡£

if ax1<bx2 & ax2>bx1 & ay1<by2 & ay2>by1{ ;Åö¤¿¤Ã¤¿ }
¤Ç¤¹¡£



¤µ¤È¤¦

¥ê¥ó¥¯

2008/8/10(Sun) 16:56:23|NO.18043

¤È¤²¤Î·Á¤äÂ礭¤µ¡¢¤É¤Î¤¯¤é¤¤¤ÎȽÄêÀºÅÙ¤ò
Í׵᤹¤ë¤«¤Ë¤â¤è¤ê¤Þ¤¹¤¬»ä¤Ï
ºÂɸȽÄê
µ÷ΥȽÄê
¿§È½Äê¤Î3¤Ä¤ÎÊýË¡¤ò¿ÍѤ·¤Æ¤Þ¤¹
ºÂɸȽÄê¤Ç¤Ï°ìÈÖñ½ã¤Ç4¤Ä¤ÎÊý¸þ¤«¤é¡¢¤¢¤¿¤Ã¤Æ¤¤¤ë¤«¤É¤¦¤«¤ò¹Ê¤ê¹þ¤ß¤Þ¤¹
Î㤨¤Ð
¤È¤²¤ÎxºÂɸ¤¬300°Ê¾å340°ÊÆ⤫¤ÄyºÂɸ¤¬220°Ê¾å260°ÊÆâ
¤Ê¤é¤¢¤¿¤Ã¤Æ¤¤¤ë¤Èǧ¼±¤¹¤ë¤è¤¦¤Ê¥¢¥ë¥´¥ê¥º¥à¤Ç¤¹
¤·¤«¤·ÀºÅÙ¤òÍ׵᤹¤ë¾ì¹ç¤ä¼Ð¤á¤ËŤ¤¥ª¥Ö¥¸¥§¥¯¥È¤ÎȽ
Äê¤Ë¤Ï¸þ¤­¤Þ¤»¤ó
¼¡¤Ëµ÷ΥȽÄê¤Ç¤¹¤¬¡¢¤³¤ì¤Ï¥ª¥Ö¥¸¥§¥¯¥È¤«¤é¼«Ê¬¤Þ¤Ç¤Îµ÷Î¥¤ò·×»»¤·
¤½¤ÎÃͤ¬¤¤¤¯¤Ä°ÊÆâ¤À¤Ã¤¿¤éÅö¤¿¤Ã¤Æ¤¤¤ë¤Èǧ¼±¤¹¤ëÊýË¡¤Ç¤¹
µ÷Î¥¤Ï¥Ô¥¿¥´¥é¥¹¤ÎÄêÍý¤Ç¤Ç¤Þ¤¹
ºÇ¸å¤Ë¿§È½Äê¤Ç¤¹¤¬¤³¤ì¤Ï¾ò·ï¤¬¤«¤®¤é¤ì¤Þ¤¹
Î㤨¤ÐÇطʤ¬ÀĤǤȤ²¤¬À֤ʤ顢º£¼«Ê¬¤ÎΩ¤Ã¤Æ¤¤¤ëºÂɸ
¤Î¿§¤òpget¤ÇÆɤ߽Ф·¤½¤ì¤¬À֤ʤéÅö¤¿¤Ã¤Æ¤¤¤ë¤È¹Í¤¨¤ëÊýË¡¤Ç¤¹
¤·¤«¤·»É¤Î¿§¤äÇطʤ理â¤Þ¤µ¤«1¿§¤Ç¤Ï¤Ê¤¤¤Ç¤·¤ç¤¦¤«¤é
»ÈÍÑÍÑÅÓ¤ÏÇò¹õ¥²¡¼¥à¤Ê¤É¤Ë¸Â¤é¤ì¤Þ¤¹

¤Á¤Ê¤ß¤Ë»ä¤Ïµ÷ΥȽÄê¤ÈºÂɸȽÄê¤òÁȤ߹礻¤Æ»È¤Ã¤Æ¤Þ¤¹



̵̾¤·

¥ê¥ó¥¯

2008/8/10(Sun) 17:10:17|NO.18045

¥Þ¥Ã¥×¥Ç¡¼¥¿¤ò¤É¤Î¤è¤¦¤Ë¤·¤Æ¤Þ¤¹¤«¡©
ʸ»úÎó·¿1¼¡¸µÇÛÎó¤ËÆͤùþ¤ó¤Ç¤ë¤È¤«2¼¡¸µÀ°¿ô·¿¤ËÆþ¤ì¤Æ¤ë¤È¤«Á´Éô¥¹¥×¥é¥¤¥È¤À¤È¤«¡Ä
¥½¡¼¥¹¤¬¤¢¤ë¤Èʬ¤«¤ê¤ä¤¹¤¤¤«¤È



¤Ô¤è¤­¤Á

¥ê¥ó¥¯

2008/8/10(Sun) 17:36:43|NO.18046

¤è¤¦¤¹¤ë¤Ë¡¢Â¾ÎÏËÜ´ê¤Ê¤¬¤é²£¥¹¥¯¥í¡¼¥ë¥²¡¼¥à¤òºî¤ë¤¿¤á¤Ë
ÇÛÃÖ¤¹¤ë¤À¤±¤Ç¤½¤³¤ËÅö¤¿¤êȽÄ꤬¤Ç¤­¤ë¤è¤¦¤Ë¤·¤¿¤¤¤Î¤Ç¤¹¤¬
¤ä¤Ã¤¿¤³¤È¤¬¤Ê¤¤¤«¤é¤ï¤«¤é¤Ê¤¤¤Î¤Ç¶µ¤¨¤Æ¤Û¤·¤¤¤Î¤Ç¤¹¡¦¡¦¡¦
¤¢¤È¡¢¤µ¤È¤¦¤µ¤ó¤Î¤¤¤Ã¤Æ¤¤¤ë
¤È¤²¤ÎÀè¤Î°ÌÃÖ¤ò¤ò·×»»¤·¤¿¤ê¤¹¤ë¡©¤È¤³¤í¤Þ¤ÇÀºÌ©¤¸¤ã¤Ê¤¯¤Æ¤¤¤¤¤Ç¤¹¡£



¤Æ¤¹¤È

¥ê¥ó¥¯

2008/8/10(Sun) 18:29:52|NO.18047

¼«µ¡¤«¤Ê¤ó¤«ÃΤê¤Þ¤»¤ó¤¬¡¢¥×¥ì¥¤¥ä¡¼¤ÎÅö¤¿¤êȽÄ꤬ÅÀ¤Ê¤Î¤Ç¤è¤±¤ì¤Ð
¡¢¤Ê¤ª¤«¤Ä¤È¤²¤¬Æ°¤«¤Ê¤¤¡Ê¥Þ¥Ã¥×¤Ë¸ÇÄꤵ¤ì¤Æ¤¤¤ë¡Ë¤Î¤Ç¤¢¤ì¤Ð
ñ½ã¤Ë¥Þ¥Ã¥×ºÂɸ¤ò·×»»¤¹¤ì¤Ð¤¤¤¤¤À¤±¤Ç¤¹¡£

¤¤¤Þ¼«µ¡¤¬¥Þ¥Ã¥×Èֹ沿È֤ˤ¤¤ë¤Î¤«¤µ¤¨·×»»¤¹¤ì¤Ð¤¤¤¤¤À¤±¤Ç¤¹¡£
¤¢¤È¤Ï¡¢¤½¤Î¥Þ¥Ã¥×¥Ö¥í¥Ã¥¯¤Î°À­¡Ê0È֤ʤé¶õ´Ö¡¢1È֤ʤé¤È¤²¡¢2È֤ʤé¤Õ¤Ä¤¦¤ÎÊɤȤ«¡Ë
¤Ë¤·¤¿¤¬¤Ã¤Æ½èÍý¤òÆþ¤ì¤ì¤Ð¤è¤¤¤«¤È¡£

¥×¥ì¥¤¥ä¡¼¤ÎÅö¤¿¤êȽÄê¤ò»Í³Ñ·Á¤Ë¤·¤¿¤«¤Ã¤¿¤é¡¢¾å¤ÎºÂɸ·×»»¤ò4²ó¡Ê»Í³Ñ·Á¤Î»Í¶ù¡Ë¤Ç·×»»¤¹¤ì¤Ð¤¤¤¤¤À¤±¤Ç¤¹¡£




¤È¤²¤¬Æ°¤¤¤Æ¤¤¤ë¤Î¤Ç¤¢¤ì¤Ð³§¤µ¤ó¤¬½Ð¤·¤Æ¤¤¤ëÉáÄ̤ÎÅö¤¿¤êȽÄê(»Í³Ñ·Á¡Ë¤¬°ìÈÖ½èÍý¤¬Áᤤ¤Ç¤¹¡£
¤¢¤È¡¢ÉáÄ̤λͳѷÁ¤ÎÅö¤¿¤êȽÄê·×»»¤Ï¡¢if¤òÆþ¤ê¸Ì¤Ë¤·¤¿Êý¤¬Áᤤ¤È¤­¤â¤¢¤ê¤Þ¤¹¡£

²£¥¹¥¯¥í¡¼¥ë¤È¤¤¤¦»ö¤Ê¤Î¤Ç¡¢ºÇ¤âÀ®Î©¤·¤Ë¤¯¤¤YºÂɸ¤Îif¤òºÇ½é¤Ë¤·¤Æ¤ª¤±¤Ð̵Â̤ʽèÍý¤¬
¾Ê¤±¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡£



ash

¥ê¥ó¥¯

2008/8/10(Sun) 18:47:49|NO.18049

>³§¤µ¤ó¤Ï¥²¡¼¥à¤Î¤¢¤¿¤êȽÄê¤ò¤É¤Î¤è¤¦¤Ë¤·¤Æ¤¤¤Þ¤¹¤«¡©
>»ä¤Î¤ä¤êÊý¤Ï¤È¤Æ¤â¤³¤³¤Ë¤Î¤»¤é¤ì¤ë¤è¤¦¤Ê¤ä¤êÊý¤Ç¤Ï¤Ê¤¯¡¢
>¤´¤Á¤ã¤´¤Á¤ã¤·¤Æ¤¤¤ë¤Î¤Ç´Êñ¤Ê¤ä¤êÊý¤ò¶µ¤¨¤Æ¤¯¤À¤µ¤¤¡£
ñ½ã¤Ê¤â¤Î¤Ê¤é¡¢»ä¤Ï¡¢°Ê²¼¤Î£´¤Ä¤ÎÊýË¡¤ò»È¤¦¡¥

­¡ÀµÊý·Á¤ÎÅö¤¿¤êȽÄê

emx = ginfo_winx >> 1 emy = ginfo_winy >> 1 s = 20 *main boxf emx-s, emy-s, emx+s, emy+s if( (emx-mousex)/s==0 && (emy-mousey)/s==0 ) { dialog "hit" } await 10 goto *main
­¢±ß¤Î¤¢¤¿¤êȽÄê

emx = ginfo_winx >> 1 emy = ginfo_winy >> 1 r = 20 *main circle emx-r, emy-r, emx+r, emy+r x = emx - mousex y = emy - mousey if( (x*x + y*y) < r*r ) { dialog "hit" } await 10 goto *main
­£»Í³Ñ·Á¤ÎÅö¤¿¤êȽÄê

bsx = 128 ; ¥Ö¥í¥Ã¥¯¤ÎÉý bsy = 64 ; ¥Ö¥í¥Ã¥¯¤Î¹â¤µ bxc = 2 byc = 3 *main x = bsx*bxc y = bsy*byc boxf x, y, x+bsx, y+bsy ;title ""+mousex/bsx+" "+mousey/bsy if( mousex/bsx==bxc && mousey/bsy==byc ) { dialog "hit" } await 10 goto *main
­¤¿§¤ÇÅö¤¿¤êȽÄê

boxf 280, 200, 360, 280 *main pget mousex, mousey if( (ginfo_r | ginfo_g | ginfo_r) == 0 ) { ; ¹õ dialog "hit" } await 10 goto *main



ash

¥ê¥ó¥¯

2008/8/10(Sun) 22:55:13|NO.18050

NO.18049¤Îµ­»ö¡§
­¤¤ÎÊýË¡¤Ç
if( (ginfo_r | ginfo_g | ginfo_r) == 0 ) {	; ¹õ

¤Ï
if( (ginfo_r | ginfo_g | ginfo_b) == 0 ) {	; ¹õ
¤Ç¤·¤¿¡¥ginfo_b ¤¬ ginfo_r ¤Ë¤Ê¤Ã¤Æ¤¤¤¿¤Î¤Ç¡¢¤¢¤·¤«¤é¤º¡¥


¤½¤ì¤«¤é¡¢²¿¤«¤ÎÌò¤ËΩ¤Ä¤È»×¤¤¡¢Ä¾Àþ¾å¤Ë±ß¾õ¤Î¾ã³²Êª¤¬¤¢¤ë¤«Ä´¤Ù¤ë´Ø¿ô¤òºî¤Ã¤Æ¤ß¤¿¡¥

#module #defcfunc HitLine array lp, double bx, double by, int R /* | ¡Ú³µÍ×¡Û | ľÀþ¾å¤Ë±ß¾õ¤Î¾ã³²Êª¤¬¤¢¤ë¤«Ä´¤Ù¤ë¡¥ | ¡Ú°ú¿ô¡Û | HitLine array lp, int bx, int by, int R | lp : ľÀþ¤ÎºÂɸ¤¬ÂåÆþ¤µ¤ì¤¿ÇÛÎóÊÑ¿ô | »ÏÅÀ(lp.0, lp.1), ½ªÅÀ(lp.2, lp.3) | bx, by : ¾ã³²Êª¤ÎºÂɸ | R : ¾ã³²Êª¤ÎȾ·Â | ¡ÚÌá¤êÃÍ¡Û | ľÀþ¾å¤Ë¾ã³²Êª¤¬¤¢¤Ã¤¿¤é 1 ÊÖ¤·, ¤½¤¦¤Ç¤Ê¤¤¤Ê¤é 0 ¤òÊÖ¤¹¡¥ */ x1 = bx - lp(0) y1 = by - lp(1) x2 = bx - lp(2) y2 = by - lp(3) x3 = lp(2) - lp(0) y3 = lp(3) - lp(1) // ¾ã³²Êª¤È½Å¤Ê¤Ã¤Æ¤¤¤¤¤ë¤« a = x2*x2+y2*y2 if( a < R*R ) { return 1 } b = x3*by-y3*bx+lp(0)*lp(3)-lp(1)*lp(2) c = x3*x3 + y3*y3 if( c ) { // ľÀþÉÕ¶á¤Ë¾ã³²Êª¤¬¤¢¤ë¤« if( b*b/c < R*R ) { // 2ÅÀ´Ö¤Ë¾ã³²Êª¤¬¤¢¤ë¤« if( (x1*x1+y1*y1)<c && a<c ) { return 1 } } } return 0 #global R = 30 ; ¾ã³²Êª¤ÎȾ·Â obx = 320 ; ¾ã³²Êª¤Î x ºÂɸ oby = 240 ; ¾ã³²Êª¤Î y ºÂɸ ddim linepos, 4 linepos(0) = 320.0, 240.0 ; ľÀþ¤Î¸¶ÅÀ *main linepos(2) = double(mousex), double(mousey) ; ľÀþ¤Î½ªÅÀ if( HitLine(linepos, obx, oby, R) == 0 ) { a = atan( linepos(3)-linepos(1), linepos(2)-linepos(0) ) linepos(0) += 4.0*cos(a) linepos(1) += 4.0*sin(a) } redraw 0 color 255, 255, 255 : boxf color circle obx-R, oby-R, obx+R, oby+R line linepos(0), linepos(1), linepos(2), linepos(3) redraw 1 await 10 goto *main



GENKI

¥ê¥ó¥¯

2008/8/10(Sun) 23:54:41|NO.18051

¤³¤ÎÊդε­»ö¤Ê¤ó¤«»²¹Í¤Ë¤Ê¤é¤Ê¤¤¤Ç¤·¤ç¤¦¤«¡£
http://hspdev-wiki.net/?%BE%D7%C6%CD%C8%BD%C4%EA
http://hspdev-wiki.net/?%C5%F6%A4%BF%A4%EA%C8%BD%C4%EA%A5%E2%A5%B8%A5%E5%A1%BC%A5%EB

¾¤Ë²£¥¹¥¯¥í¡¼¥ë·¿¥²¡¼¥à¤ä¥¢¥¯¥·¥ç¥ó¥²¡¼¥à¡¢RPG¤Ê¤É¤Îµ­»ö¤¢¤¿¤ê¤¬»²¹Í¤Ë¤Ê¤ê¤½¤¦¤Êµ¤¤¬¤·¤Þ¤¹¡£



ash

¥ê¥ó¥¯

2008/8/11(Mon) 19:51:36|NO.18057

¥Í¥Ã¥È¾å¤Ë»²¹Í¤Ë¤Ê¤ê¤½¤¦¤Êʸ¸¥¤¬¤¢¤Ã¤¿¤Î¤Ç¤¢¤²
http://hikari-hinomoto.hp.infoseek.co.jp/PDF/DX7A02.pdf

ÀµÊý·ÁƱ»Î¤ÎÅö¤¿¤êȽÄê¤Ê¤é¡¢NO.18049¤Î­¡¤ÎÊýË¡¤Ç
¡¡tekix : Ũ¤ÎºÂɸX
¡¡tekiy : Ũ¤ÎºÂɸY
¡¡s : Ũ¤Î¥µ¥¤¥º¡Ü¸«Êý¤Î¥µ¥¤¥º
¡¡if ((tekix-mousex)/s | (tekiy-mousey)/s) == 0
¤È¤¹¤ë¤È¡¢HSP¤Ç¤Ï®¤¯È½Äê¤Ç¤ë¡¥
tekix = ginfo_winx >> 1		; Ũ¤ÎºÂɸ
tekiy = ginfo_winy >> 1 ; tekis = 20 ; Ũ¤Î¥µ¥¤¥º mikatas = 30 ; ¸«Êý¤Î¥µ¥¤¥º s = tekis + mikatas *main if( ((tekix-mousex)/s | (tekiy-mousey)/s) == 0 ) { dialog "hit" } redraw 0 color 255, 255, 255 : boxf : color boxf tekix-tekis, tekiy-tekis, tekix+tekis, tekiy+tekis boxf mousex-mikatas, mousey-mikatas, mousex+mikatas, mousey+mikatas redraw await 10 goto *main

¤½¤ì¤«¤é¡¢²¿¤«¤ÎÌò¤ËΩ¤Ä¤È»×¤¤¡¢¶ë·Á¤ÈÅÀ¤ÎÅö¤¿¤êȽÃǤò¤¹¤ë´Ø¿ô¤òºî¤Ã¤Æ¤ß¤¿¡¥
/*
|¡Ú¤¢¤ëÅÀ¤¬¶ë·Á¾å¤Ë¤¢¤ë¤«Ä´¤Ù¤ë¡Û | onsquare array rect_x, array rect_y, int mx, int my | rect_x : ¶ë·Á¤ÎĺÅÀ¤¬ÂåÆþ¤µ¤ì¤¿ÇÛÎóÊÑ¿ô (X ºÂɸ) | rect_y : ¶ë·Á¤ÎĺÅÀ¤¬ÂåÆþ¤µ¤ì¤¿ÇÛÎóÊÑ¿ô (Y ºÂɸ) | ÇÛÎó¤Ï¡¢º¸¾å(0),±¦¾å(1),±¦²¼(2),º¸²¼(3)¤Î½çÈÖ | mx : Ä´¤Ù¤ëÅÀ (X ºÂɸ) | my : Ä´¤Ù¤ëÅÀ (Y ºÂɸ) |¡ÚÌá¤êÃÍ¡Û | 0 : (mx, my)¤¬¶ë·Á¾å¤Ë¤Ê¤¤ | 1 : (mx, my)¤¬¶ë·Á¾å¤Ë¤¢¤ë */ #module #defcfunc onsquare array rect_x, array rect_y, int mx, int my x1 = mx - rect_x(0) y2 = my - rect_y(3) x2 = rect_x(3) - mx y1 = rect_y(0) - my flg = 1 repeat 2, 1 a = rect_x(cnt) - rect_x(0) b = rect_y(cnt) - rect_y(0) // Àþʬ¤ÈÀþʬ¤Î½Å¤Ê¤ê¤òÄ´¤Ù¤ë if( (a*y1+b*x1 ^ a*y2+b*x2) >> 31 ) { flg-- break } loop return flg #global
¥µ¥ó¥×¥ë¡§
	CX = ginfo_winx >> 1	; Ãæ¿´
CY = ginfo_winy >> 1 ; PI = 3.1415926535897932384627 bsx = 300 ; ¶ë·Á¤ÎÉý bsy = 150 ; ¶ë·Á¤Î¹â¤µ ang = 0.0 x = -bsx/2, bsx/2, -bsx/2, bsx/2 y = -bsy/2, -bsy/2, bsy/2, bsy/2 *main ang += 0.005 // ¶ë·Á¡§4¤Ä¤ÎĺÅÀ¤ÎºÂɸ¤òÂåÆþ¤¹¤ë repeat 4 rect_x(cnt) = CX + cos(ang)*x(cnt) - sin(ang)*y(cnt) rect_y(cnt) = CY + cos(ang)*y(cnt) + sin(ang)*x(cnt) loop // ¥Ò¥Ã¥È¥Á¥§¥Ã¥¯ if( onsquare(rect_x, rect_y, mousex, mousey) ) { title "hit" } else : title "" redraw 0 color 255, 255, 255 : boxf color grect CX, CY, ang, bsx, bsy redraw await 10 goto *main

¶ë·Á¤ÈÅÀ¤ÎÅö¤¿¤êȽÃǤò¤¹¤ë¥¢¥ë¥´¥ê¥º¥à¤Ï¼¡¤Î¤è¤¦¡¥
¡¡¶ë·Á¤ò¹½À®¤¹¤ëÀþʬ¤ÎÂоÝÀ­¤òÍøÍѤ·
¡¡¡¡(mx, my) : ¥Þ¥¦¥¹¤ÎºÂɸ
¡¡¡¡(gx, gy) : ¶ë·Á¤Î½Å¿´
¡¡¡¡(sx, sy) : (gx, gy) ¤òÃæÅÀ¤È¤·¤¿ (mx, my) ¤ÎÂоÎÅÀ
¡¡¤È¤·¤Æ¡¢¶ë·Á¾å¤ÎÀþʬ¤¬(sx, sy)¡¢(mx, my)Æâ¤Ë¤¢¤ë¤«Ä´¤Ù¤ë¡¥
¡¡¤³¤ì¤Ï2ËܤÎÀþʬ¤Ë¤Ä¤¤¤ÆÄ´¤Ù¤ë¤À¤±¤Ç¤è¤¤¡¥
¤³¤ì¤ò²ò¤¤¤Æ¡¢¼°ÊÑ·Á¤ò¤·¤Æ¤¤¤¯¤È¤«¤Ê¤ê´Êά²½¤Ç¤­¤ë¡¥



ONION software Copyright 1997-2023(c) All rights reserved.