- use build in data types
git-svn-id: http://moon:8086/svn/mips@35 a8ebac50-d88d-4704-bea3-6648445a41b3
This commit is contained in:
+23
-23
@@ -11,18 +11,18 @@
|
||||
#include "mips_gfx.h"
|
||||
#include "mips_ps2.h"
|
||||
|
||||
static volatile INT32 mouse_x;
|
||||
static volatile INT32 mouse_y;
|
||||
static volatile int32_t mouse_x;
|
||||
static volatile int32_t mouse_y;
|
||||
static box_t box_even, box_odd, line_h_even, line_v_even, line_h_odd, line_v_odd, cross_v, cross_h;
|
||||
static gfx_t gfx;
|
||||
static volatile int _g_posx, _g_posy;
|
||||
static volatile g_btn_l, g_btn_r;
|
||||
static volatile UINT32 g_color;
|
||||
static volatile uint32_t g_color;
|
||||
|
||||
// -------------------------------------------------------------
|
||||
void handler5(void)
|
||||
{
|
||||
UINT32 volatile *pVGA_ctrl = (UINT32*)SYS_VGA_CTRL;
|
||||
uint32_t volatile *pVGA_ctrl = (uint32_t*)SYS_VGA_CTRL;
|
||||
|
||||
// Ack
|
||||
*pVGA_ctrl |= SYS_VGA_BIT_BUFCHG_FLAG;
|
||||
@@ -33,10 +33,10 @@ void handler6(void)
|
||||
{
|
||||
int p, i;
|
||||
ps2_if_t *pIF;
|
||||
UINT8 mouse_rsp[3];
|
||||
UINT32 timeout_count, key;
|
||||
uint8_t mouse_rsp[3];
|
||||
uint32_t timeout_count, key;
|
||||
|
||||
INT32 dx, dy;
|
||||
int32_t dx, dy;
|
||||
|
||||
for (p=0; p < PS2_get_num_if(); p++)
|
||||
{
|
||||
@@ -73,7 +73,7 @@ void handler6(void)
|
||||
{
|
||||
break;
|
||||
}
|
||||
mouse_rsp[i] = (UINT8)*pIF->pDATA;
|
||||
mouse_rsp[i] = (uint8_t)*pIF->pDATA;
|
||||
}
|
||||
if (!timeout_count)
|
||||
{
|
||||
@@ -121,18 +121,18 @@ int main(void)
|
||||
{
|
||||
|
||||
int i;
|
||||
UINT32 volatile *pVGA_ctrl = (UINT32*)SYS_VGA_CTRL;
|
||||
UINT32 volatile *pVGA_moffs_0 = (UINT32*)SYS_VGA_FB_FRONT;
|
||||
UINT32 volatile *pVGA_moffs_1 = (UINT32*)SYS_VGA_FB_BACK;
|
||||
UINT32 volatile *pVGA_cgcol = (UINT32*)SYS_VGA_CGCOL;
|
||||
UINT32 *pFlashPicture = (UINT32*)(SYS_FLASH_MEM + 0x00600000);
|
||||
UINT32 framecount;
|
||||
UINT32 start, end;
|
||||
UINT32 *pPic;
|
||||
UINT32 rmb_posx, rmb_posy, rmb_clicked;
|
||||
uint32_t volatile *pVGA_ctrl = (uint32_t*)SYS_VGA_CTRL;
|
||||
uint32_t volatile *pVGA_moffs_0 = (uint32_t*)SYS_VGA_FB_FRONT;
|
||||
uint32_t volatile *pVGA_moffs_1 = (uint32_t*)SYS_VGA_FB_BACK;
|
||||
uint32_t volatile *pVGA_cgcol = (uint32_t*)SYS_VGA_CGCOL;
|
||||
uint32_t *pFlashPicture = (uint32_t*)(SYS_FLASH_MEM + 0x00600000);
|
||||
uint32_t framecount;
|
||||
uint32_t start, end;
|
||||
uint32_t *pPic;
|
||||
uint32_t rmb_posx, rmb_posy, rmb_clicked;
|
||||
|
||||
pPic = (UINT32*)malloc(800*600*sizeof(UINT32));
|
||||
memcpy(pPic, pFlashPicture, 800*600*sizeof(UINT32));
|
||||
pPic = (uint32_t*)malloc(800*600*sizeof(uint32_t));
|
||||
memcpy(pPic, pFlashPicture, 800*600*sizeof(uint32_t));
|
||||
|
||||
interrupt_register(5, (void*)handler5);
|
||||
interrupt_register(6, (void*)handler6);
|
||||
@@ -181,11 +181,11 @@ int main(void)
|
||||
GFX_frame(&gfx, GFX_FRAME_SYNC);
|
||||
framecount--;
|
||||
|
||||
while ((_g_posx != (UINT32)mouse_x) || (_g_posy != (UINT32)mouse_y) || g_btn_r || g_btn_l)
|
||||
while ((_g_posx != (uint32_t)mouse_x) || (_g_posy != (uint32_t)mouse_y) || g_btn_r || g_btn_l)
|
||||
{
|
||||
|
||||
_g_posx = (UINT32)mouse_x;
|
||||
_g_posy = (UINT32)mouse_y;
|
||||
_g_posx = (uint32_t)mouse_x;
|
||||
_g_posy = (uint32_t)mouse_y;
|
||||
|
||||
GFX_restore(&gfx, NULL, _g_posx, _g_posy);
|
||||
|
||||
@@ -210,7 +210,7 @@ int main(void)
|
||||
if (g_btn_r)
|
||||
{
|
||||
if (!rmb_clicked)
|
||||
g_color = (UINT32)rand();
|
||||
g_color = (uint32_t)rand();
|
||||
|
||||
rmb_clicked = 1;
|
||||
rmb_posx = _g_posx;
|
||||
|
||||
Reference in New Issue
Block a user