SGDK
A free and open development kit for the Sega Mega Drive
Loading...
Searching...
No Matches
VDPSprite Struct Reference

VDP sprite definition structure replicating VDP hardware sprite. More...

#include <vdp_spr.h>

Public Attributes

s16 y
 
union { 
 
   struct { 
 
      u16   unused1: 4 
 
      u16   sizeH: 2 
 
      u16   sizeV: 2 
 
      u16   unused2: 1 
 
      u16   linkData: 7 
 
   }  
 
   struct { 
 
      u8   size 
 
      u8   link 
 
   }  
 
   u16   size_link 
 
};  
 
union { 
 
   u16   attribut 
 
   struct { 
 
      u16   priority: 1 
 
      u16   palette: 2 
 
      u16   flipV: 1 
 
      u16   flipH: 1 
 
      u16   tile: 11 
 
   }  
 
};  
 
s16 x
 

Detailed Description

VDP sprite definition structure replicating VDP hardware sprite.

Parameters
yY position - 0x80 (0x80 = 0 on screen). Valid values: [0 - 1023]
sizesprite size (see SPRITE_SIZE macro)
sizeHhorizontal size. Valid values: 0 -> 8, 1 -> 16, 2 -> 24, 3 -> 32
sizeVvertical size. Valid values: 0 -> 8, 1 -> 16, 2 -> 24, 3 -> 32
linksprite link, this information is used to define sprite drawing order (use 0 to force end of list)
attributtile index and sprite attribut (priority, palette, H/V flip), see TILE_ATTR_FULL macro
prioritysprite priority. Valid values: 0 -> low, 1 -> high
palettepalette index. Valid values: [0, 3]
flipVvertical flip. Valid values: 0 -> normal, 1 -> flipped
flipHhorizontal flip. Valid values: 0 -> normal, 1 -> flipped
tiletile index. Valid values: [0, 2047]
xX position - 0x80 (0x80 = 0 on screen). Valid values: [0 - 1023]

The documentation for this struct was generated from the following file: