Template:Orientation: Difference between revisions
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
orientation is a bitfield, the flags of which determine how a sprite is drawn. Here are the known bits and what they do. There may be others: | orientation is a bitfield, the flags of which determine how a sprite is drawn. Here are the known bits and what they do. There may be others: | ||
Bit 1 (1) is translucency level one (66% opacity). | Bit 1 (1) is translucency level one (66% opacity). | ||
Bit 2 (2) is scaling on 320x200 coordinates. It's considered internal in the case of CON commands because the CON interface automatically sets it when you use functions calling rotatesprite (rotatesprite as well as various text functions). | Bit 2 (2) is scaling on 320x200 coordinates. It's considered internal in the case of CON commands because the CON interface automatically sets it when you use functions calling rotatesprite (rotatesprite as well as various text functions). | ||
Bit 3 (4) is used to invert Y coordinates. | Bit 3 (4) is used to invert Y coordinates. | ||
Bit 4 (8) ? | Bit 4 (8) ? | ||
Bit 5 (16) forces the center of the sprite you're drawing to its top-left if set. If not, its center as set in editart will be drawn at the specified coordinates. | Bit 5 (16) forces the center of the sprite you're drawing to its top-left if set. If not, its center as set in editart will be drawn at the specified coordinates. | ||
Bit 6 (32) is translucency level two (33% opacity). It won't work unless bit 1 is also set. | Bit 6 (32) is translucency level two (33% opacity). It won't work unless bit 1 is also set. | ||
Bit 7 (64) forces masking off if set. It discards translucency too. | Bit 7 (64) forces masking off if set. It discards translucency too. | ||
As with [[cstat]], the bit values can be added together and used in combination. For example, orientation 33 (32+1) is transparency level two, and orientation 5 (4+1) is transparency level one with inverted Y coordinates. | As with [[cstat]], the bit values can be added together and used in combination. For example, orientation 33 (32+1) is transparency level two, and orientation 5 (4+1) is transparency level one with inverted Y coordinates. | ||
<!-- The information in this entry was supplied by Plagman in a forum post --> | <!-- The information in this entry was supplied by Plagman in a forum post --> |
Revision as of 09:10, 26 July 2006
orientation is a parameter used in several of the screen drawing commands, including digitalnumber and rotatesprite
orientation is a bitfield, the flags of which determine how a sprite is drawn. Here are the known bits and what they do. There may be others:
Bit 1 (1) is translucency level one (66% opacity).
Bit 2 (2) is scaling on 320x200 coordinates. It's considered internal in the case of CON commands because the CON interface automatically sets it when you use functions calling rotatesprite (rotatesprite as well as various text functions).
Bit 3 (4) is used to invert Y coordinates.
Bit 4 (8) ?
Bit 5 (16) forces the center of the sprite you're drawing to its top-left if set. If not, its center as set in editart will be drawn at the specified coordinates.
Bit 6 (32) is translucency level two (33% opacity). It won't work unless bit 1 is also set.
Bit 7 (64) forces masking off if set. It discards translucency too.
As with cstat, the bit values can be added together and used in combination. For example, orientation 33 (32+1) is transparency level two, and orientation 5 (4+1) is transparency level one with inverted Y coordinates.