code formatting

This commit is contained in:
dborth 2008-11-04 20:43:15 +00:00
parent 72b41f925a
commit e1feb6ea0b

View File

@ -31,9 +31,9 @@ static unsigned char snes9xgfx[1024 * 512 * 2];
extern unsigned int SMBTimer;
/*** 2D Video ***/
unsigned int *xfb[2] = { NULL, NULL }; /*** Double buffered ***/
int whichfb = 0; /*** Switch ***/
GXRModeObj *vmode; /*** Menu video mode ***/
unsigned int *xfb[2] = { NULL, NULL }; // Double buffered
int whichfb = 0; // Switch
GXRModeObj *vmode; // Menu video mode
int screenheight;
extern u32* backdrop;
@ -87,8 +87,8 @@ s16 square[] ATTRIBUTE_ALIGN (32) =
static camera cam = {
{0.0F, 0.0F, 0.0F},
{0.0F, 0.5F, 0.0F},
{0.0F, 0.0F, -0.5F}
{0.0F, 0.5F, 0.0F},
{0.0F, 0.0F, -0.5F}
};
@ -305,7 +305,6 @@ InitVideoThread ()
static void
copy_to_xfb (u32 arg)
{
if (copynow == GX_TRUE)
{
GX_CopyDisp (xfb[whichfb], GX_TRUE);
@ -347,7 +346,6 @@ draw_init ()
GX_LoadPosMtxImm (view, GX_PNMTX0);
GX_InvVtxCache (); // update vertex cache
}
static void
@ -472,7 +470,6 @@ InitGCVideo ()
// set VI position
TV_224p.viYOrigin = (VI_MAX_HEIGHT_PAL/2 - 448/2)/2;
TV_448i.viYOrigin = (VI_MAX_HEIGHT_PAL - 448)/2;
break;
case VI_NTSC:
@ -491,7 +488,6 @@ InitGCVideo ()
TV_224p.viYOrigin = (VI_MAX_HEIGHT_NTSC/2 - 448/2)/2;
TV_448i.viYOrigin = (VI_MAX_HEIGHT_NTSC - 448)/2;
break;
break;
default:
// 480 lines (PAL 60Hz)
@ -511,13 +507,13 @@ InitGCVideo ()
break;
}
#ifdef HW_DOL
/* we have component cables, but the preferred mode is interlaced
#ifdef HW_DOL
/* we have component cables, but the preferred mode is interlaced
* why don't we switch into progressive?
* on the Wii, the user can do this themselves on their Wii Settings */
if(VIDEO_HaveComponentCable())
vmode = &TVNtsc480Prog;
#endif
#endif
// check for progressive scan
if (vmode->viTVMode == VI_TVMODE_NTSC_PROG)
@ -576,7 +572,8 @@ ResetVideo_Emu ()
int i = -1;
if (GCSettings.render == 0) // original render mode
{
for (i=0; i<4; i++) {
for (i=0; i<4; i++)
{
if (tvmodes[i]->efbHeight == vheight)
break;
}
@ -590,8 +587,11 @@ ResetVideo_Emu ()
VIDEO_Configure (rmode);
VIDEO_Flush();
VIDEO_WaitVSync();
if (rmode->viTVMode & VI_NON_INTERLACE) VIDEO_WaitVSync();
else while (VIDEO_GetNextField()) VIDEO_WaitVSync();
if (rmode->viTVMode & VI_NON_INTERLACE)
VIDEO_WaitVSync();
else
while (VIDEO_GetNextField())
VIDEO_WaitVSync();
GX_SetViewport (0, 0, rmode->fbWidth, rmode->efbHeight, 0, 1);
@ -630,8 +630,11 @@ ResetVideo_Menu ()
VIDEO_ClearFrameBuffer (vmode, xfb[whichfb], COLOR_BLACK);
VIDEO_Flush();
VIDEO_WaitVSync();
if (vmode->viTVMode & VI_NON_INTERLACE) VIDEO_WaitVSync();
else while (VIDEO_GetNextField()) VIDEO_WaitVSync();
if (vmode->viTVMode & VI_NON_INTERLACE)
VIDEO_WaitVSync();
else
while (VIDEO_GetNextField())
VIDEO_WaitVSync();
GX_SetViewport (0, 0, vmode->fbWidth, vmode->efbHeight, 0, 1);
GX_SetDispCopyYScale ((f32) vmode->xfbHeight / (f32) vmode->efbHeight);
@ -732,7 +735,9 @@ update_video (int width, int height)
{
xscale = 256;
yscale = vheight / 2;
} else { // unfiltered and filtered mode
}
else // unfiltered and filtered mode
{
xscale = 320;
yscale = vheight;
}