Initial version
Committed on the Free edition of March Hare Software CVSNT Server. Upgrade to CVS Suite for more features and support: http://march-hare.com/cvsnt/ git-svn-id: http://moon:8086/svn/vhdl/trunk@664 cc03376c-175c-47c8-b038-4cd826a8556b
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
#ifndef GFX_H
|
||||
#define GFX_H
|
||||
|
||||
#include "libsys.h"
|
||||
|
||||
#define GFX_NUM_FRAME_BUFFERS 2
|
||||
#define GFX_FRAME_NOSYNC 0
|
||||
#define GFX_FRAME_SYNC 1
|
||||
|
||||
// -------------------------------------------------------------
|
||||
// Types
|
||||
// -------------------------------------------------------------
|
||||
typedef struct _sbox_t
|
||||
{
|
||||
UINT32 w, h;
|
||||
UINT32 *pSave;
|
||||
} box_t;
|
||||
|
||||
typedef struct _srect_t
|
||||
{
|
||||
UINT32 xmin, xmax;
|
||||
UINT32 ymin, ymax;
|
||||
} rect_t;
|
||||
|
||||
typedef struct _sbuf_t
|
||||
{
|
||||
UINT32 *pFB;
|
||||
struct _sbuf_t *pNext;
|
||||
struct _sbuf_t *pLast;
|
||||
UINT32 is_dirty;
|
||||
rect_t rect;
|
||||
UINT32 w, h;
|
||||
} buf_t;
|
||||
|
||||
typedef struct _sgfx_t
|
||||
{
|
||||
UINT32 w, h;
|
||||
buf_t *pBuf;
|
||||
UINT32 *pBG;
|
||||
|
||||
} gfx_t;
|
||||
|
||||
// -------------------------------------------------------------
|
||||
// Functions
|
||||
// -------------------------------------------------------------
|
||||
void __gfx_block_set_8(UINT32* pDst, UINT32 value);
|
||||
void __gfx_block_copy_8(UINT32* pDst, UINT32* pSrc);
|
||||
void __gfx_copy_32(UINT32* pDst, UINT32* pSrc, UINT32 nblocks);
|
||||
void GFX_init(gfx_t *pObj);
|
||||
void GFX_frame(gfx_t *pObj, UINT32 sync_mode);
|
||||
void GFX_show(gfx_t *pObj);
|
||||
void GFX_copy_front2back(gfx_t *pObj);
|
||||
void GFX_copy_back2front(gfx_t *pObj);
|
||||
void GFX_get_FB_front(gfx_t *pObj, UINT32 **ppFB);
|
||||
void box_create(box_t *pObj, UINT32 w, UINT32 h);
|
||||
void GFX_save(gfx_t *pObj, box_t *pBox, UINT32 posx, UINT32 posy);
|
||||
void GFX_restore(gfx_t *pObj, box_t *pBox, UINT32 posx, UINT32 posy);
|
||||
void GFX_box_draw(gfx_t *pObj, box_t *pBox, UINT32 posx, UINT32 posy, UINT32 color);
|
||||
|
||||
#endif // GFX_H
|
||||
Reference in New Issue
Block a user