Skip to content

Instantly share code, notes, and snippets.

@3846masa
Created May 16, 2017 05:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 3846masa/c601872fe8fc468cc2b8d296cb7c214f to your computer and use it in GitHub Desktop.
Save 3846masa/c601872fe8fc468cc2b8d296cb7c214f to your computer and use it in GitHub Desktop.
HSP でモザイクする例
#module
#deffunc mosaic int _x1, int _y1, int _x2, int _y2, int _level
_w = _x2 - _x1 : _h = _y2 - _y1
_csel = ginfo_sel : _cx = ginfo_cx : _cy = ginfo_cy
_bw = (_w / _level) | 0x01 : _bh = (_h / _level) | 0x01
buffer 99, _bw, _bh, 0
pos 0, 0
gzoom _bw, _bh, _csel, _x1, _y1, _w, _h, 0
gsel _csel, 0
pos _x1, _y1
gzoom _w, _h, 99, 0, 0, _bw, _bh, 0
pos _cx, _cy
return
#global
screen 0,640,480,0,0,0
picload dir_exe + "\\hsptv\\sozai3.jpg"
mosaic 300, 200, 500, 400, 20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment