Rotatesprite: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
One (talk | contribs)
No edit summary
major overhaul for clarity
Line 1: Line 1:
'''rotatesprite''' <x> <y> <z> <a> <tilenum> <shade> <pal> <[[orientation]]> <x1> <x2> <y1> <y2>
'''rotatesprite''' <[[x]]> <[[y]]> <[[z]]> <[[ang]]> <[[picnum|tilenum]]> <[[shade]]> <[[pal]]> <[[orientation]]> <x1> <y1> <x2> <y2>


Displays tiles onscreen. This commands is only allowed during events.
'''rotatesprite''' displays tiles onscreen. This command is only allowed during certain events.


<x> X coordinate, ranged 0-320
<[[x]]> X coordinate, ranged 0-320


<y> Y coordinate, ranged 0-200  
<[[y]]> Y coordinate, ranged 0-200  


<z> is the zoom.  Normal zoom is 65536. Ex: 131072 is zoomed in 2X and 32768 is zoomed out 2X.
<[[z]]> is the zoom.  Normal zoom is 65536. (ex: 131072 is zoomed in 2X and 32768 is zoomed out 2X)


<a> is the angle (0 is straight up).
<[[ang]]> is the angle (0 is normal).


<tilenum> is the tile number.
<[[picnum|tilenum]]> is the tile number.


<shade> is 0 normally but can be any standard shade up to 31 or 63.
<[[shade]]> is 0 normally but can be any standard shade up to 31 or 63.


<pal> can be from 0-255.
<[[pal]]> can be from 0-255.


<[[orientation]]> translucency, masking, etc...
<[[orientation]]> translucency, masking, etc...


<x1>, <y1>, <x2> and <y2> are boundaries on the screen that define where the tile may be drawn.
<x1>, <y1>, <x2>, and <y2> are boundaries on the screen that define where the tile may be drawn.  If you want to draw a menu, use orientation bit 8, and the boundaries,  <code>0 0 [[xdim]] [[ydim]]</code>.  If you want to draw a weapon, do not use bit 8 and use boundaries <code>[[windowx1]] [[windowy1]] [[windowx2]] [[windowy2]]</code>.  The difference is that xdim and ydim stay constant, while the other four shrink depending on the player's [[screen_size|screen size]].


If you want to draw a menu, you may use orientation bit '''8''', and for coordinates '''0 0 xdim ydim'''. This would give you total control of it. If you want to draw a weapon in EVENT_DISPLAYWEAPON, you may NOT use bit '''8''' and use coordinates '''[[windowx1]] [[windowy1]] [[windowx2]] [[windowy2]]''' which may turn it to automatically suit the size of the screen, etc.


 
  setvar x 164
  setvar x 30
  setvar y 176
  setvar y 30
  setvar z 65536
  setvar z 32768
  setvar ang 0
  setvar TEMP 0
  setvar tilenum RPGGUN
  setvar tilenum 3350
  setvar shade 0
  setvar shade 0
  setvar pal 0
  setvar pal 0
  setvar orientation 8
  setvar orientation 0
  '''rotatesprite''' x y z TEMP tilenum shade pal orientation 0 0 xdim ydim
  '''rotatesprite''' x y z ang tilenum shade pal orientation windowx1 windowy1 windowx2 windowy2
 


Note: This command is similar to the [[myospal]] and [[myospalx]] commands, but with much more control.
Note: This command is similar to the deprecated [[myospal]] and [[myospalx]] commands, but with much more control.


[[Category:EDuke32 specific commands]]
[[Category:EDuke32 specific commands]]
[[Category:Screen drawing commands]]
[[Category:Screen drawing commands]]

Revision as of 15:42, 23 December 2009

rotatesprite <x> <y> <z> <ang> <tilenum> <shade> <pal> <orientation> <x1> <y1> <x2> <y2>

rotatesprite displays tiles onscreen. This command is only allowed during certain events.

<x> X coordinate, ranged 0-320

<y> Y coordinate, ranged 0-200

<z> is the zoom. Normal zoom is 65536. (ex: 131072 is zoomed in 2X and 32768 is zoomed out 2X)

<ang> is the angle (0 is normal).

<tilenum> is the tile number.

<shade> is 0 normally but can be any standard shade up to 31 or 63.

<pal> can be from 0-255.

<orientation> translucency, masking, etc...

<x1>, <y1>, <x2>, and <y2> are boundaries on the screen that define where the tile may be drawn. If you want to draw a menu, use orientation bit 8, and the boundaries, 0 0 xdim ydim. If you want to draw a weapon, do not use bit 8 and use boundaries windowx1 windowy1 windowx2 windowy2. The difference is that xdim and ydim stay constant, while the other four shrink depending on the player's screen size.


setvar x 164
setvar y 176
setvar z 65536
setvar ang 0
setvar tilenum RPGGUN
setvar shade 0
setvar pal 0
setvar orientation 0
rotatesprite x y z ang tilenum shade pal orientation windowx1 windowy1 windowx2 windowy2

Note: This command is similar to the deprecated myospal and myospalx commands, but with much more control.