; hgimg3 hgrotate bug ; hgrotateで奇数サイズを指定しても偶数サイズにされてしまうバグの動作確認 ; 16x16ドットの画像を、14x16, 15x16, 16x16, ... 21x16 で描画してみた ; たしかに、奇数サイズは偶数サイズになってしまった ; 2023/11/27, use HSP 3.7 beta 7 #include "hgimg3.as" #packopt name "10_hgrotate_bug2" ; file name #packopt type 0 ; generate ".exe" #define TEXFILE "tex.png" #pack TEXFILE #define KB_ESC $00080 screen 0, 512, 288, 0 ; initialize screen wdw_w = ginfo_winx ; get window size wdw_h = ginfo_winy hgini ; initialize hgimg3 ; load texture ; * texload : alpha channel not support ; * texload2 : alpha channel support texload2 TEXFILE texid = stat ; get texture ID clscolor $4080c0 ; set clear color *mainloop stick k, 0 ; check keyboard if k & KB_ESC : goto *job_end ; ESC key to exit hgdraw ; draw start repeat 8 ; draw image ; set src size 16x16 gmode gmode_rgb0, 16, 16 ; set position x = wdw_w / 2 y = 80 + (16 + 4) * cnt pos x, y src_x = 0 src_y = 0 rot = 0.0 dst_w = 14 + cnt dst_h = 16 hgrotate texid, src_x, src_y, rot, dst_w, dst_h ; draw texture loop hgsync 15 ; draw end and wait goto *mainloop *job_end hgbye ; release HGIMG3 plugin end