From c30baad4dd300aa29a408f96cbbe5e5e9dfb9602 Mon Sep 17 00:00:00 2001 From: dborth Date: Tue, 13 Oct 2009 05:09:43 +0000 Subject: [PATCH] code tidy --- source/ngc/video.cpp | 36 +++++++++++------------------------- 1 file changed, 11 insertions(+), 25 deletions(-) diff --git a/source/ngc/video.cpp b/source/ngc/video.cpp index 2b258ee..23de8ff 100644 --- a/source/ngc/video.cpp +++ b/source/ngc/video.cpp @@ -366,30 +366,6 @@ draw_square (Mtx v) GX_End (); } -/**************************************************************************** - * StartGX - * - * Initialises GX and sets it up for use - ***************************************************************************/ -static void -StartGX () -{ - GXColor background = { 0, 0, 0, 0xff }; - - /*** Clear out FIFO area ***/ - memset (&gp_fifo, 0, DEFAULT_FIFO_SIZE); - - /*** Initialise GX ***/ - GX_Init (&gp_fifo, DEFAULT_FIFO_SIZE); - GX_SetCopyClear (background, 0x00ffffff); - - GX_SetDispCopyGamma (GX_GM_1_0); - GX_SetCullMode (GX_CULL_NONE); - - vwidth = 100; - vheight = 100; -} - /**************************************************************************** * StopGX * @@ -566,9 +542,19 @@ InitGCVideo () VIDEO_Init(); GXRModeObj *rmode = FindVideoMode(); SetupVideoMode(rmode); - StartGX (); InitLUTs(); // init LUTs for hq2x LWP_CreateThread (&vbthread, vbgetback, NULL, vbstack, TSTACK, 68); + + // Initialize GX + GXColor background = { 0, 0, 0, 0xff }; + memset (&gp_fifo, 0, DEFAULT_FIFO_SIZE); + GX_Init (&gp_fifo, DEFAULT_FIFO_SIZE); + GX_SetCopyClear (background, 0x00ffffff); + GX_SetDispCopyGamma (GX_GM_1_0); + GX_SetCullMode (GX_CULL_NONE); + + vwidth = 100; + vheight = 100; } /****************************************************************************