こちらはHSP歴2ヶ月半の者です。
なお、C言語歴16年、C++言語歴7年だったりします。
最近、HSPでいろいろとツールソフトを作成し、
マニュアルとネット検索より gsquare 命令の使い方を覚えました。
そこで今日はシューティング・ゲームを試しに作ろうとしました。
そこで問題が発生します。
まずは次のサンプルを実行して見て下さい。
// 記号定数上記のサンプルは1段目の画像を gsquare で変形して buffer 2 にコピーしてます。
#const FIGHT_XSIZE (32) #const FIGHT_YSIZE (32) #const SLOPE_COUNT (7) // メイン部 *Main gosub *MakeImage : pos 0, 0 : gcopy 2,0,0,(FIGHT_XSIZE*SLOPE_COUNT),FIGHT_YSIZE gosub *CopyImage : pos 0,32 : gcopy 1,0,0,(FIGHT_XSIZE*SLOPE_COUNT),FIGHT_YSIZE stop // 自動画像生成 *MakeImage buffer 2,(FIGHT_XSIZE*SLOPE_COUNT),FIGHT_YSIZE font MSGOTHIC,FIGHT_YSIZE s="③","②","①","山","①","②","③" x=0 y=0 rrr=$00 : ggg=$99 : bbb=$00 repeat SLOPE_COUNT color rrr,ggg,bbb : boxf x,y,(x+FIGHT_XSIZE),(y+FIGHT_YSIZE) color $00,$66,$00 : pos x,y : mes s(cnt) x+=FIGHT_XSIZE ggg+=$11 loop gsel 0 return // 四角形のコピー *CopyImage buffer 1,(FIGHT_XSIZE*SLOPE_COUNT),FIGHT_YSIZE color $00,$00,$00 : boxf x=0 y=0 // ③ dstX=(x+8),(x+24),(x+24),(x+ 8) dstY=(y+8),(y+ 0),(y+32),(y+24) srcX=(x+0),(x+32),(x+32),(x+ 0) srcY=(y+0),(y+ 0),(y+32),(y+32) gsquare 2,dstX,dstY,srcX,srcY : x+=FIGHT_XSIZE // ② dstX=(x+4),(x+28),(x+28),(x+ 4) dstY=(y+8),(y+ 0),(y+32),(y+24) srcX=(x+0),(x+32),(x+32),(x+ 0) srcY=(y+0),(y+ 0),(y+32),(y+32) gsquare 2,dstX,dstY,srcX,srcY : x+=FIGHT_XSIZE // ① dstX=(x+0),(x+32),(x+32),(x+ 0) dstY=(y+4),(y+ 0),(y+32),(y+28) srcX=(x+0),(x+32),(x+32),(x+ 0) srcY=(y+0),(y+ 0),(y+32),(y+32) gsquare 2,dstX,dstY,srcX,srcY : x+=FIGHT_XSIZE // 山 dstX=(x+0),(x+32),(x+32),(x+ 0) dstY=(y+0),(y+ 0),(y+32),(y+32) srcX=(x+0),(x+32),(x+32),(x+ 0) srcY=(y+0),(y+ 0),(y+32),(y+32) gsquare 2,dstX,dstY,srcX,srcY : x+=FIGHT_XSIZE // ① dstX=(x+0),(x+32),(x+32),(x+ 0) dstY=(y+0),(y+ 4),(y+28),(y+32) srcX=(x+0),(x+32),(x+32),(x+ 0) srcY=(y+0),(y+ 0),(y+32),(y+32) gsquare 2,dstX,dstY,srcX,srcY : x+=FIGHT_XSIZE // ② dstX=(x+4),(x+28),(x+28),(x+ 4) dstY=(y+0),(y+ 8),(y+24),(y+32) srcX=(x+0),(x+32),(x+32),(x+ 0) srcY=(y+0),(y+ 0),(y+32),(y+32) gsquare 2,dstX,dstY,srcX,srcY : x+=FIGHT_XSIZE // ③ dstX=(x+8),(x+24),(x+24),(x+ 8) dstY=(y+0),(y+ 8),(y+24),(y+32) srcX=(x+0),(x+32),(x+32),(x+ 0) srcY=(y+0),(y+ 0),(y+32),(y+32) gsquare 2,dstX,dstY,srcX,srcY : x+=FIGHT_XSIZE gsel 0 return
この2段目の左側の3つの画像を見て下さい。
私の環境では③、②、①の右下隅が欠けてます。
皆さんの環境では正常に台形コピーできてますか?
同じ現象で右下隅が欠けていた場合は、どのように修正すれば良いのか?
教えて欲しいです。(HSPバグなのでしょうか?)