#pragma once
#include "Device.h"
#include "Texture.h"
using namespace System;
using namespace System::ComponentModel;
namespace Sunlight
{
namespace DirectX
{
namespace Graphics
{
__gc public class Sprite;
public __gc class SpriteManager
{
public:
__nogc struct SpriteVertex
{
float x, y, z, rhw; unsigned dwColor; float tu, tv; };
protected:
static const int VertexFormat = (int)(D3DFVF_XYZRHW|D3DFVF_DIFFUSE|D3DFVF_TEX1);
__gc class ObjectListElement
{
public:
ObjectListElement(Sprite *pSprite);
ObjectListElement(Sprite *pSprite, int nShadowDepth);
Texture *TextureObject;
SpriteVertex Vertices __nogc [4];
bool Shadowed;
};
IDirect3DVertexBuffer8 __nogc *m_vb;
int m_nVBSize;
Collections::ArrayList *m_plistObjects;
Device *m_pDevice;
void OnDeviceRelease(Object *sender, EventArgs *e);
void Destroy();
public:
SpriteManager();
~SpriteManager();
__property Device *get_DeviceObject();
__property void set_DeviceObject(Device *);
void Draw(Sprite *sprite);
void FinishDraw();
void AbortDraw();
};
}
}
}