sgdk: vdp_spr.h Source File

sgdk

- Main Page
- Related Pages
- Classes
- Files

- File List
- File Members

vdp_spr.h
Go to the documentation of this file.

    00001
    00011 #include "config.h"
    00012 #include "types.h"
    00013 #include "dma.h"
    00014
    00015 #ifndef _VDP_SPR_H_
    00016 #define _VDP_SPR_H_
    00017
    00022 #define MAX_VDP_SPRITE          80
    00023
    00033 #define SPRITE_SIZE(w, h)   ((((w) - 1) << 2) | ((h) - 1))
    00034
    00035
    00051 typedef struct
    00052 {
    00053     s16 y;
    00054     union
    00055     {
    00056         struct {
    00057             u8 size;
    00058             u8 link;
    00059         };
    00060         u16 size_link;
    00061     };
    00062     u16 attribut;
    00063     s16 x;
    00064 }  VDPSprite;
    00065
    00066
    00070 extern VDPSprite vdpSpriteCache[MAX_VDP_SPRITE];
    00071
    00076 extern VDPSprite* lastAllocatedVDPSprite;
    00086 extern s16 highestVDPSpriteIndex;
    00087
    00088
    00093 void VDP_resetSprites();
    00094
    00099 void VDP_releaseAllSprites();
    00100
    00119 s16 VDP_allocateSprites(u16 num);
    00135 void VDP_releaseSprites(u16 index, u16 num);
    00143 u16 VDP_getAvailableSprites();
    00154 s16 VDP_refreshHighestAllocatedSpriteIndex();
    00155
    00160 void VDP_clearSprites();
    00182 void VDP_setSpriteFull(u16 index, s16 x, s16 y, u8 size, u16 attribut, u8 link);
    00201 void VDP_setSprite(u16 index, s16 x, s16 y, u8 size, u16 attribut);
    00216 void VDP_setSpritePosition(u16 index, s16 x, s16 y);
    00229 void VDP_setSpriteSize(u16 index, u8 size);
    00242 void VDP_setSpriteAttribut(u16 index, u16 attribut);
    00255 void VDP_setSpriteLink(u16 index, u8 link);
    00268 VDPSprite* VDP_linkSprites(u16 index, u16 num);
    00269
    00288 void VDP_updateSprites(u16 num, TransferMethod tm);
    00289
    00290
    00291 #endif // _VDP_SPR_H_

All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines