- use build in data types
git-svn-id: http://moon:8086/svn/mips@35 a8ebac50-d88d-4704-bea3-6648445a41b3
This commit is contained in:
+100
-100
@@ -12,7 +12,7 @@ static vga_hw_t *g_pRegs;
|
||||
// -------------------------------------------------------------
|
||||
// Functions
|
||||
// -------------------------------------------------------------
|
||||
void __gfx_block_set_8(UINT32* pDst, UINT32 value)
|
||||
void __gfx_block_set_8(uint32_t* pDst, uint32_t value)
|
||||
{
|
||||
__asm__ volatile
|
||||
(
|
||||
@@ -29,7 +29,7 @@ void __gfx_block_set_8(UINT32* pDst, UINT32 value)
|
||||
);
|
||||
}
|
||||
|
||||
void __gfx_block_copy_8(UINT32* pDst, UINT32* pSrc)
|
||||
void __gfx_block_copy_8(uint32_t* pDst, uint32_t* pSrc)
|
||||
{
|
||||
__asm__ volatile
|
||||
(
|
||||
@@ -59,7 +59,7 @@ void __gfx_block_copy_8(UINT32* pDst, UINT32* pSrc)
|
||||
);
|
||||
}
|
||||
|
||||
void _GFX_copy32(UINT32* pDst, UINT32* pSrc, UINT32 ndwords)
|
||||
void _GFX_copy32(uint32_t* pDst, uint32_t* pSrc, uint32_t ndwords)
|
||||
{
|
||||
while (ndwords > 3)
|
||||
{
|
||||
@@ -75,7 +75,7 @@ void _GFX_copy32(UINT32* pDst, UINT32* pSrc, UINT32 ndwords)
|
||||
}
|
||||
}
|
||||
|
||||
void _GFX_memset32(UINT32* pDst, UINT32 value, UINT32 ndwords)
|
||||
void _GFX_memset32(uint32_t* pDst, uint32_t value, uint32_t ndwords)
|
||||
{
|
||||
while (ndwords > 3)
|
||||
{
|
||||
@@ -90,10 +90,10 @@ void _GFX_memset32(UINT32* pDst, UINT32 value, UINT32 ndwords)
|
||||
}
|
||||
}
|
||||
|
||||
void _GFX_copy32_hw(UINT32* pDst, UINT32* pSrc, UINT32 ndwords, UINT32 wait_finish)
|
||||
void _GFX_copy32_hw(uint32_t* pDst, uint32_t* pSrc, uint32_t ndwords, uint32_t wait_finish)
|
||||
{
|
||||
g_pRegs->pVGA_src0 = (UINT32)pSrc;
|
||||
g_pRegs->pVGA_dst = (UINT32)pDst;
|
||||
g_pRegs->pVGA_src0 = (uint32_t)pSrc;
|
||||
g_pRegs->pVGA_dst = (uint32_t)pDst;
|
||||
g_pRegs->pVGA_src0_dimx = 0;
|
||||
g_pRegs->pVGA_dst_dimx = 0;
|
||||
g_pRegs->pVGA_nx = ndwords;
|
||||
@@ -111,9 +111,9 @@ void _GFX_copy32_hw(UINT32* pDst, UINT32* pSrc, UINT32 ndwords, UINT32 wait_fini
|
||||
|
||||
}
|
||||
|
||||
void _GFX_memset32_hw(UINT32* pDst, UINT32 value, UINT32 ndwords, UINT32 wait_finish)
|
||||
void _GFX_memset32_hw(uint32_t* pDst, uint32_t value, uint32_t ndwords, uint32_t wait_finish)
|
||||
{
|
||||
g_pRegs->pVGA_dst = (UINT32)pDst;
|
||||
g_pRegs->pVGA_dst = (uint32_t)pDst;
|
||||
g_pRegs->pVGA_src0_dimx = 0;
|
||||
g_pRegs->pVGA_dst_dimx = 0;
|
||||
g_pRegs->pVGA_nx = ndwords;
|
||||
@@ -131,10 +131,10 @@ void _GFX_memset32_hw(UINT32* pDst, UINT32 value, UINT32 ndwords, UINT32 wait_fi
|
||||
|
||||
}
|
||||
|
||||
void _GFX_BLIT_const(UINT32* pDst, UINT32 xdim_dst, UINT32 xmin, UINT32 ymin, UINT32 xmax, UINT32 ymax, UINT32 value)
|
||||
void _GFX_BLIT_const(uint32_t* pDst, uint32_t xdim_dst, uint32_t xmin, uint32_t ymin, uint32_t xmax, uint32_t ymax, uint32_t value)
|
||||
{
|
||||
UINT32 xmax8, x, y;
|
||||
UINT32 *pStart, *pEnd;
|
||||
uint32_t xmax8, x, y;
|
||||
uint32_t *pStart, *pEnd;
|
||||
|
||||
xmax8 = xmax - ((xmax-xmin)%8);
|
||||
for (y=ymin; y < ymax; y += xdim_dst)
|
||||
@@ -154,13 +154,13 @@ void _GFX_BLIT_const(UINT32* pDst, UINT32 xdim_dst, UINT32 xmin, UINT32 ymin, UI
|
||||
}
|
||||
}
|
||||
|
||||
void _GFX_BLIT_const_hw(UINT32* pDst, UINT32 xdim_dst, UINT32 xmin, UINT32 ymin, UINT32 xmax, UINT32 ymax, UINT32 value, UINT32 wait_finish)
|
||||
void _GFX_BLIT_const_hw(uint32_t* pDst, uint32_t xdim_dst, uint32_t xmin, uint32_t ymin, uint32_t xmax, uint32_t ymax, uint32_t value, uint32_t wait_finish)
|
||||
{
|
||||
UINT32 *pStart, *pEnd;
|
||||
uint32_t *pStart, *pEnd;
|
||||
|
||||
pStart = (UINT32*)&pDst[xmin + ymin*xdim_dst];
|
||||
pStart = (uint32_t*)&pDst[xmin + ymin*xdim_dst];
|
||||
|
||||
g_pRegs->pVGA_dst = (UINT32)pStart;
|
||||
g_pRegs->pVGA_dst = (uint32_t)pStart;
|
||||
g_pRegs->pVGA_dst_dimx = xdim_dst;
|
||||
g_pRegs->pVGA_nx = xmax - xmin + 1;
|
||||
g_pRegs->pVGA_ny = ymax - ymin + 1;
|
||||
@@ -185,14 +185,14 @@ void GFX_DirtyRectSetClean(gfx_t *pObj, buf_t *pBuf)
|
||||
pBuf->is_dirty = 0;
|
||||
}
|
||||
|
||||
void GFX_DirtyRectInit(gfx_t *pObj, buf_t *pBuf, UINT32 w, UINT32 h)
|
||||
void GFX_DirtyRectInit(gfx_t *pObj, buf_t *pBuf, uint32_t w, uint32_t h)
|
||||
{
|
||||
pBuf->w = w;
|
||||
pBuf->h = h;
|
||||
GFX_DirtyRectSetClean(pObj, pBuf);
|
||||
}
|
||||
|
||||
void GFX_DirtyRectUpdate(gfx_t *pObj, buf_t *pBuf, UINT32 xmin, UINT32 xmax, UINT32 ymin, UINT32 ymax)
|
||||
void GFX_DirtyRectUpdate(gfx_t *pObj, buf_t *pBuf, uint32_t xmin, uint32_t xmax, uint32_t ymin, uint32_t ymax)
|
||||
{
|
||||
|
||||
if (xmin < pBuf->dirty.xmin)
|
||||
@@ -231,9 +231,9 @@ void GFX_DirtyRectUpdate(gfx_t *pObj, buf_t *pBuf, UINT32 xmin, UINT32 xmax, UIN
|
||||
|
||||
void GFX_DirtyRectCopy(gfx_t *pObj, buf_t *pBuf)
|
||||
{
|
||||
UINT32 xmin, xmax, xmax8, ymin, ymax, x, y;
|
||||
UINT32 *pDst, *pDst_end;
|
||||
UINT32 *pSrc, *pSrc_end;
|
||||
uint32_t xmin, xmax, xmax8, ymin, ymax, x, y;
|
||||
uint32_t *pDst, *pDst_end;
|
||||
uint32_t *pSrc, *pSrc_end;
|
||||
|
||||
xmin = pBuf->dirty.xmin;
|
||||
xmax = pBuf->dirty.xmax;
|
||||
@@ -245,15 +245,15 @@ void GFX_DirtyRectCopy(gfx_t *pObj, buf_t *pBuf)
|
||||
ymax *= pBuf->w;
|
||||
|
||||
#ifdef USE_HW_BLITTER
|
||||
pSrc = (UINT32*)&pBuf->pLast->pFB[xmin + ymin];
|
||||
pDst = (UINT32*)&pBuf->pFB[xmin + ymin];
|
||||
pSrc = (uint32_t*)&pBuf->pLast->pFB[xmin + ymin];
|
||||
pDst = (uint32_t*)&pBuf->pFB[xmin + ymin];
|
||||
|
||||
g_pRegs->pVGA_src0 = (UINT32)pSrc;
|
||||
g_pRegs->pVGA_dst = (UINT32)pDst;
|
||||
g_pRegs->pVGA_src0_dimx = (UINT32)pBuf->w;
|
||||
g_pRegs->pVGA_dst_dimx = (UINT32)pBuf->w;
|
||||
g_pRegs->pVGA_nx = (UINT32)(pBuf->dirty.xmax-pBuf->dirty.xmin);
|
||||
g_pRegs->pVGA_ny = (UINT32)(pBuf->dirty.ymax-pBuf->dirty.ymin);
|
||||
g_pRegs->pVGA_src0 = (uint32_t)pSrc;
|
||||
g_pRegs->pVGA_dst = (uint32_t)pDst;
|
||||
g_pRegs->pVGA_src0_dimx = (uint32_t)pBuf->w;
|
||||
g_pRegs->pVGA_dst_dimx = (uint32_t)pBuf->w;
|
||||
g_pRegs->pVGA_nx = (uint32_t)(pBuf->dirty.xmax-pBuf->dirty.xmin);
|
||||
g_pRegs->pVGA_ny = (uint32_t)(pBuf->dirty.ymax-pBuf->dirty.ymin);
|
||||
g_pRegs->pVGA_ctrl &= ~SYS_VGA_BIT_BLIT_OP_CONSTCOL;
|
||||
|
||||
while (g_pRegs->pVGA_ctrl & SYS_VGA_BIT_BLIT_BSY);
|
||||
@@ -289,7 +289,7 @@ void GFX_init(gfx_t *pObj)
|
||||
{
|
||||
int i;
|
||||
buf_t *pBuf;
|
||||
UINT32 w, h, fps;
|
||||
uint32_t w, h, fps;
|
||||
|
||||
g_pRegs = (vga_hw_t*)SYS_VGA_CTRL;
|
||||
|
||||
@@ -305,19 +305,19 @@ void GFX_init(gfx_t *pObj)
|
||||
pObj->h = h;
|
||||
|
||||
// Init background buffer
|
||||
pObj->pBG = (UINT32*)calloc(w * h, sizeof(buf_t));
|
||||
pObj->pBG = (uint32_t*)calloc(w * h, sizeof(buf_t));
|
||||
|
||||
// Init framebuffers
|
||||
pObj->pBuf = (buf_t*)calloc(1, sizeof(buf_t));
|
||||
pBuf = pObj->pBuf;
|
||||
pBuf->pFB = (UINT32*)calloc((w+8) * h, sizeof(UINT32)); // w+8 because of dirty rectangle 8 byte min. x-size
|
||||
pBuf->pFB = (uint32_t*)calloc((w+8) * h, sizeof(uint32_t)); // w+8 because of dirty rectangle 8 byte min. x-size
|
||||
for (i=1; i < GFX_NUM_FRAME_BUFFERS; i++)
|
||||
{
|
||||
|
||||
pBuf->pNext = (buf_t*)calloc(1, sizeof(buf_t));
|
||||
pBuf->pNext->pLast = pBuf;
|
||||
pBuf = pBuf->pNext;
|
||||
pBuf->pFB = (UINT32*)calloc((w+8) * h, sizeof(UINT32)); // w+8 because of dirty rectangle 8 byte min. x-size
|
||||
pBuf->pFB = (uint32_t*)calloc((w+8) * h, sizeof(uint32_t)); // w+8 because of dirty rectangle 8 byte min. x-size
|
||||
}
|
||||
pObj->pBuf->pLast = pBuf;
|
||||
pBuf->pNext = pObj->pBuf;
|
||||
@@ -331,19 +331,19 @@ void GFX_init(gfx_t *pObj)
|
||||
pBuf = pBuf->pNext;
|
||||
}
|
||||
|
||||
g_pRegs->pVGA_front = (UINT32)pObj->pBuf->pLast->pFB;
|
||||
g_pRegs->pVGA_back = (UINT32)pObj->pBuf->pLast->pFB;
|
||||
g_pRegs->pVGA_front = (uint32_t)pObj->pBuf->pLast->pFB;
|
||||
g_pRegs->pVGA_back = (uint32_t)pObj->pBuf->pLast->pFB;
|
||||
g_pRegs->pVGA_ctrl |= SYS_VGA_BIT_MSTEN;
|
||||
|
||||
|
||||
}
|
||||
|
||||
void GFX_set_background(gfx_t *pObj, UINT32 *pImage, UINT32 image_nx, UINT32 image_ny, UINT32 image_scale_x, UINT32 image_scale_y)
|
||||
void GFX_set_background(gfx_t *pObj, uint32_t *pImage, uint32_t image_nx, uint32_t image_ny, uint32_t image_scale_x, uint32_t image_scale_y)
|
||||
{
|
||||
|
||||
UINT32 off_x, off_y;
|
||||
UINT32 i, j;
|
||||
UINT32 *pDst, *pSrc;
|
||||
uint32_t off_x, off_y;
|
||||
uint32_t i, j;
|
||||
uint32_t *pDst, *pSrc;
|
||||
buf_t *pBuf;
|
||||
|
||||
if (!pImage)
|
||||
@@ -354,15 +354,15 @@ void GFX_set_background(gfx_t *pObj, UINT32 *pImage, UINT32 image_nx, UINT32 ima
|
||||
|
||||
#ifdef USE_HW_BLITTER
|
||||
|
||||
pDst = ((UINT32*)pObj->pBG) + pObj->w*off_y + off_x;
|
||||
pDst = ((uint32_t*)pObj->pBG) + pObj->w*off_y + off_x;
|
||||
pSrc = pImage;
|
||||
|
||||
g_pRegs->pVGA_src0 = (UINT32)pSrc;
|
||||
g_pRegs->pVGA_dst = (UINT32)pDst;
|
||||
g_pRegs->pVGA_src0_dimx = (UINT32)0;
|
||||
g_pRegs->pVGA_dst_dimx = (UINT32)0;
|
||||
g_pRegs->pVGA_nx = (UINT32)image_ny*image_nx;
|
||||
g_pRegs->pVGA_ny = (UINT32)1;
|
||||
g_pRegs->pVGA_src0 = (uint32_t)pSrc;
|
||||
g_pRegs->pVGA_dst = (uint32_t)pDst;
|
||||
g_pRegs->pVGA_src0_dimx = (uint32_t)0;
|
||||
g_pRegs->pVGA_dst_dimx = (uint32_t)0;
|
||||
g_pRegs->pVGA_nx = (uint32_t)image_ny*image_nx;
|
||||
g_pRegs->pVGA_ny = (uint32_t)1;
|
||||
g_pRegs->pVGA_ctrl &= ~SYS_VGA_BIT_BLIT_OP_CONSTCOL;
|
||||
|
||||
while (g_pRegs->pVGA_ctrl & SYS_VGA_BIT_BLIT_BSY);
|
||||
@@ -374,12 +374,12 @@ void GFX_set_background(gfx_t *pObj, UINT32 *pImage, UINT32 image_nx, UINT32 ima
|
||||
pDst = pBuf->pFB;
|
||||
pSrc = pObj->pBG;
|
||||
|
||||
g_pRegs->pVGA_src0 = (UINT32)pSrc;
|
||||
g_pRegs->pVGA_dst = (UINT32)pDst;
|
||||
g_pRegs->pVGA_src0_dimx = (UINT32)0;
|
||||
g_pRegs->pVGA_dst_dimx = (UINT32)0;
|
||||
g_pRegs->pVGA_nx = (UINT32)image_ny*image_nx;
|
||||
g_pRegs->pVGA_ny = (UINT32)1;
|
||||
g_pRegs->pVGA_src0 = (uint32_t)pSrc;
|
||||
g_pRegs->pVGA_dst = (uint32_t)pDst;
|
||||
g_pRegs->pVGA_src0_dimx = (uint32_t)0;
|
||||
g_pRegs->pVGA_dst_dimx = (uint32_t)0;
|
||||
g_pRegs->pVGA_nx = (uint32_t)image_ny*image_nx;
|
||||
g_pRegs->pVGA_ny = (uint32_t)1;
|
||||
g_pRegs->pVGA_ctrl &= ~SYS_VGA_BIT_BLIT_OP_CONSTCOL;
|
||||
|
||||
while (g_pRegs->pVGA_ctrl & SYS_VGA_BIT_BLIT_BSY);
|
||||
@@ -390,7 +390,7 @@ void GFX_set_background(gfx_t *pObj, UINT32 *pImage, UINT32 image_nx, UINT32 ima
|
||||
|
||||
#else
|
||||
|
||||
pDst = ((UINT32*)pObj->pBG) + pObj->w*off_y + off_x;
|
||||
pDst = ((uint32_t*)pObj->pBG) + pObj->w*off_y + off_x;
|
||||
pSrc = pImage;
|
||||
|
||||
for (i=0; i < image_ny*image_nx; i += 8)
|
||||
@@ -423,13 +423,13 @@ void GFX_set_background(gfx_t *pObj, UINT32 *pImage, UINT32 image_nx, UINT32 ima
|
||||
|
||||
}
|
||||
|
||||
void GFX_frame(gfx_t *pObj, UINT32 sync_mode)
|
||||
void GFX_frame(gfx_t *pObj, uint32_t sync_mode)
|
||||
{
|
||||
|
||||
// Wait until back buffer becomes front
|
||||
if (sync_mode == GFX_FRAME_SYNC)
|
||||
{
|
||||
while(g_pRegs->pVGA_front == (UINT32)pObj->pBuf->pFB);
|
||||
while(g_pRegs->pVGA_front == (uint32_t)pObj->pBuf->pFB);
|
||||
}
|
||||
|
||||
GFX_copy_front2back(pObj);
|
||||
@@ -445,7 +445,7 @@ void GFX_frame(gfx_t *pObj, UINT32 sync_mode)
|
||||
void GFX_show(gfx_t *pObj)
|
||||
{
|
||||
|
||||
g_pRegs->pVGA_back = (UINT32)pObj->pBuf->pFB;
|
||||
g_pRegs->pVGA_back = (uint32_t)pObj->pBuf->pFB;
|
||||
pObj->pBuf = pObj->pBuf->pNext;
|
||||
|
||||
}
|
||||
@@ -469,22 +469,22 @@ void GFX_copy_front2back(gfx_t *pObj)
|
||||
}
|
||||
}
|
||||
|
||||
void GFX_get_FB_front(gfx_t *pObj, UINT32 **ppFB)
|
||||
void GFX_get_FB_front(gfx_t *pObj, uint32_t **ppFB)
|
||||
{
|
||||
*ppFB = pObj->pBuf->pLast->pFB;
|
||||
}
|
||||
|
||||
void box_create(box_t *pObj, UINT32 w, UINT32 h)
|
||||
void box_create(box_t *pObj, uint32_t w, uint32_t h)
|
||||
{
|
||||
pObj->w = w;
|
||||
pObj->h = h;
|
||||
}
|
||||
|
||||
void GFX_restore(gfx_t *pObj, box_t *pBox, UINT32 posx, UINT32 posy)
|
||||
void GFX_restore(gfx_t *pObj, box_t *pBox, uint32_t posx, uint32_t posy)
|
||||
{
|
||||
UINT32 xmin, xmax, xmax8, ymin, ymax, x, y, nx, ny;
|
||||
UINT32 *pDst, *pDst_end;
|
||||
UINT32 *pSrc, *pSrc_end;
|
||||
uint32_t xmin, xmax, xmax8, ymin, ymax, x, y, nx, ny;
|
||||
uint32_t *pDst, *pDst_end;
|
||||
uint32_t *pSrc, *pSrc_end;
|
||||
buf_t *pBuf;
|
||||
|
||||
if (pBox)
|
||||
@@ -529,15 +529,15 @@ void GFX_restore(gfx_t *pObj, box_t *pBox, UINT32 posx, UINT32 posy)
|
||||
ymax *= pObj->w;
|
||||
|
||||
#ifdef USE_HW_BLITTER
|
||||
pSrc = (UINT32*)&pObj->pBG[xmin + ymin];
|
||||
pDst = (UINT32*)&pBuf->pFB[xmin + ymin];
|
||||
pSrc = (uint32_t*)&pObj->pBG[xmin + ymin];
|
||||
pDst = (uint32_t*)&pBuf->pFB[xmin + ymin];
|
||||
|
||||
g_pRegs->pVGA_src0 = (UINT32)pSrc;
|
||||
g_pRegs->pVGA_dst = (UINT32)pDst;
|
||||
g_pRegs->pVGA_src0_dimx = (UINT32)pObj->w;
|
||||
g_pRegs->pVGA_dst_dimx = (UINT32)pObj->w;
|
||||
g_pRegs->pVGA_nx = (UINT32)nx;
|
||||
g_pRegs->pVGA_ny = (UINT32)ny;
|
||||
g_pRegs->pVGA_src0 = (uint32_t)pSrc;
|
||||
g_pRegs->pVGA_dst = (uint32_t)pDst;
|
||||
g_pRegs->pVGA_src0_dimx = (uint32_t)pObj->w;
|
||||
g_pRegs->pVGA_dst_dimx = (uint32_t)pObj->w;
|
||||
g_pRegs->pVGA_nx = (uint32_t)nx;
|
||||
g_pRegs->pVGA_ny = (uint32_t)ny;
|
||||
g_pRegs->pVGA_ctrl &= ~SYS_VGA_BIT_BLIT_OP_CONSTCOL;
|
||||
|
||||
while (g_pRegs->pVGA_ctrl & SYS_VGA_BIT_BLIT_BSY);
|
||||
@@ -569,10 +569,10 @@ void GFX_restore(gfx_t *pObj, box_t *pBox, UINT32 posx, UINT32 posy)
|
||||
|
||||
}
|
||||
|
||||
void GFX_box_draw_direct(gfx_t *pObj, box_t *pBox, UINT32 posx, UINT32 posy, UINT32 color)
|
||||
void GFX_box_draw_direct(gfx_t *pObj, box_t *pBox, uint32_t posx, uint32_t posy, uint32_t color)
|
||||
{
|
||||
UINT32 xmin, xmax, xmax8, ymin, ymax, x, y;
|
||||
UINT32 *pFB, *pFB_end;
|
||||
uint32_t xmin, xmax, xmax8, ymin, ymax, x, y;
|
||||
uint32_t *pFB, *pFB_end;
|
||||
buf_t *pBuf;
|
||||
|
||||
pBuf = pObj->pBuf->pLast;
|
||||
@@ -609,10 +609,10 @@ void GFX_box_draw_direct(gfx_t *pObj, box_t *pBox, UINT32 posx, UINT32 posy, UIN
|
||||
|
||||
}
|
||||
|
||||
void GFX_box_draw(gfx_t *pObj, box_t *pBox, UINT32 posx, UINT32 posy, UINT32 color)
|
||||
void GFX_box_draw(gfx_t *pObj, box_t *pBox, uint32_t posx, uint32_t posy, uint32_t color)
|
||||
{
|
||||
UINT32 xmin, xmax, xmax8, ymin, ymax, x, y, nx, ny;
|
||||
UINT32 *pFB, *pFB_end;
|
||||
uint32_t xmin, xmax, xmax8, ymin, ymax, x, y, nx, ny;
|
||||
uint32_t *pFB, *pFB_end;
|
||||
buf_t *pBuf;
|
||||
|
||||
xmin = posx;
|
||||
@@ -646,12 +646,12 @@ void GFX_box_draw(gfx_t *pObj, box_t *pBox, UINT32 posx, UINT32 posy, UINT32 col
|
||||
|
||||
#ifdef USE_HW_BLITTER
|
||||
|
||||
pFB = (UINT32*)&pBuf->pFB[xmin + ymin];
|
||||
pFB = (uint32_t*)&pBuf->pFB[xmin + ymin];
|
||||
|
||||
g_pRegs->pVGA_dst = (UINT32)pFB;
|
||||
g_pRegs->pVGA_dst_dimx = (UINT32)pObj->w;
|
||||
g_pRegs->pVGA_nx = (UINT32)nx;
|
||||
g_pRegs->pVGA_ny = (UINT32)ny;
|
||||
g_pRegs->pVGA_dst = (uint32_t)pFB;
|
||||
g_pRegs->pVGA_dst_dimx = (uint32_t)pObj->w;
|
||||
g_pRegs->pVGA_nx = (uint32_t)nx;
|
||||
g_pRegs->pVGA_ny = (uint32_t)ny;
|
||||
g_pRegs->pVGA_color = color;
|
||||
|
||||
while (g_pRegs->pVGA_ctrl & SYS_VGA_BIT_BLIT_BSY);
|
||||
@@ -681,10 +681,10 @@ void GFX_box_draw(gfx_t *pObj, box_t *pBox, UINT32 posx, UINT32 posy, UINT32 col
|
||||
#endif
|
||||
}
|
||||
|
||||
void GFX_box_draw_bg(gfx_t *pObj, box_t *pBox, UINT32 posx, UINT32 posy, UINT32 color)
|
||||
void GFX_box_draw_bg(gfx_t *pObj, box_t *pBox, uint32_t posx, uint32_t posy, uint32_t color)
|
||||
{
|
||||
UINT32 xmin, xmax, xmax8, ymin, ymax, x, y, nx, ny;
|
||||
UINT32 *pFB, *pFB_end;
|
||||
uint32_t xmin, xmax, xmax8, ymin, ymax, x, y, nx, ny;
|
||||
uint32_t *pFB, *pFB_end;
|
||||
|
||||
xmin = posx;
|
||||
xmax = pBox->w + posx - 0;
|
||||
@@ -705,12 +705,12 @@ void GFX_box_draw_bg(gfx_t *pObj, box_t *pBox, UINT32 posx, UINT32 posy, UINT32
|
||||
|
||||
#ifdef USE_HW_BLITTER
|
||||
|
||||
pFB = (UINT32*)&pObj->pBG[xmin + ymin];
|
||||
pFB = (uint32_t*)&pObj->pBG[xmin + ymin];
|
||||
|
||||
g_pRegs->pVGA_dst = (UINT32)pFB;
|
||||
g_pRegs->pVGA_dst_dimx = (UINT32)pObj->w;
|
||||
g_pRegs->pVGA_nx = (UINT32)nx;
|
||||
g_pRegs->pVGA_ny = (UINT32)ny;
|
||||
g_pRegs->pVGA_dst = (uint32_t)pFB;
|
||||
g_pRegs->pVGA_dst_dimx = (uint32_t)pObj->w;
|
||||
g_pRegs->pVGA_nx = (uint32_t)nx;
|
||||
g_pRegs->pVGA_ny = (uint32_t)ny;
|
||||
g_pRegs->pVGA_color = color;
|
||||
|
||||
while (g_pRegs->pVGA_ctrl & SYS_VGA_BIT_BLIT_BSY);
|
||||
@@ -739,15 +739,15 @@ void GFX_box_draw_bg(gfx_t *pObj, box_t *pBox, UINT32 posx, UINT32 posy, UINT32
|
||||
|
||||
}
|
||||
|
||||
void GFX_box_blit_bg(gfx_t *pObj, box_t *pBox, UINT32 pos_x_src, UINT32 pos_y_src, UINT32 pos_x_dst, UINT32 pos_y_dst)
|
||||
void GFX_box_blit_bg(gfx_t *pObj, box_t *pBox, uint32_t pos_x_src, uint32_t pos_y_src, uint32_t pos_x_dst, uint32_t pos_y_dst)
|
||||
{
|
||||
|
||||
UINT32 x_src, y_src, xmax8_src;
|
||||
UINT32 x_dst, y_dst, xmax8_dst;
|
||||
UINT32 xmin_src, xmax_src, ymin_src, ymax_src;
|
||||
UINT32 xmin_dst, xmax_dst, ymin_dst, ymax_dst;
|
||||
UINT32 *pDst, *pDst_end;
|
||||
UINT32 *pSrc, *pSrc_end;
|
||||
uint32_t x_src, y_src, xmax8_src;
|
||||
uint32_t x_dst, y_dst, xmax8_dst;
|
||||
uint32_t xmin_src, xmax_src, ymin_src, ymax_src;
|
||||
uint32_t xmin_dst, xmax_dst, ymin_dst, ymax_dst;
|
||||
uint32_t *pDst, *pDst_end;
|
||||
uint32_t *pSrc, *pSrc_end;
|
||||
buf_t *pBuf;
|
||||
pBuf = pObj->pBuf->pNext;
|
||||
|
||||
@@ -781,12 +781,12 @@ void GFX_box_blit_bg(gfx_t *pObj, box_t *pBox, UINT32 pos_x_src, UINT32 pos_y_sr
|
||||
pBuf = pObj->pBuf;
|
||||
|
||||
#ifdef USE_HW_BLITTER
|
||||
pSrc = (UINT32*)&pObj->pBG[xmin_src + ymin_src*pObj->w];
|
||||
pDst = (UINT32*)&pBuf->pFB[xmin_dst + ymin_dst*pObj->w];
|
||||
pSrc = (uint32_t*)&pObj->pBG[xmin_src + ymin_src*pObj->w];
|
||||
pDst = (uint32_t*)&pBuf->pFB[xmin_dst + ymin_dst*pObj->w];
|
||||
|
||||
g_pRegs->pVGA_src0 = (UINT32)pSrc;
|
||||
g_pRegs->pVGA_src0 = (uint32_t)pSrc;
|
||||
g_pRegs->pVGA_src0_dimx = pObj->w;
|
||||
g_pRegs->pVGA_dst = (UINT32)pDst;
|
||||
g_pRegs->pVGA_dst = (uint32_t)pDst;
|
||||
g_pRegs->pVGA_dst_dimx = pObj->w;
|
||||
g_pRegs->pVGA_nx = pBox->w;
|
||||
g_pRegs->pVGA_ny = pBox->h;
|
||||
|
||||
Reference in New Issue
Block a user