HGIMG3でテクスチャのUV座標を変化させてスクロール

UV座標はevent_uv使わないと弄れない?

UV座標はevent_uv使わないと弄れない?

  • タグ:
  • タグはありません
; HSP 3.4
#include "hgimg3.as"

	hgini

	setfont 16, 16, 12, 1
	texload dir_exe + "/sample/hgimg3/fontchr.bmp"

	texload dir_exe + "/hsptv/hsptv_img.bmp"
	addplate id, 0, 400, 300, 0, 0, 120, 90, stat
	regobj bg, id
	setpos bg, , , -300

	setcolor 250, 250, 100
	addbox id, 10, 10
	regobj box, id

	clscolor $000080

*mainLoop

	delevent ev
	newevent ev
	event_uv ev, sin(0.022 * frm) * 100, cos(0.033 * frm) * 100
	setevent bg, ev

	setang bg, sin(0.0045 * frm), cos(0.0067 * frm), sin(0.0089 * frm)
	addang box, 0.02, 0.03, 0.04

	hgdraw

	fprt "" + frm, 10, 10

	hgsync 16

	frm++

	goto *mainLoop