/* * "ESCREEN.C" * * Part of The Escotia Playstation Library * * Functions to make programming a chore not a pleasure * * Author: ScoTT Campbell * Date: 11/9/98 * */ #include "..\headers\escreen.h" void InitGraphics() /* Sets up the graphics mode to 16-bit, no dithering, GPU offset and the macros chosen in screen.h */ { SetVideoMode(VIDEO_MODE); // PAL or NTSC - defined in screen.h if(INTERLACE_MODE) { GsInitGraph(SCREEN_WIDTH, SCREEN_HEIGHT,5,0,0); GsDefDispBuff(0,0,0,0); // Define double buffers } else { GsInitGraph(SCREEN_WIDTH, SCREEN_HEIGHT,4,0,0); GsDefDispBuff(0,0,0,SCREEN_HEIGHT); // Define double buffers } if(SCREEN_HEIGHT == 256) GsDISPENV.screen.h = SCREEN_HEIGHT; // Fix 256 line bug }/* InitGraphics */ void Init3dGraphics() { // Initialise the graphics system // Function defined in escpslib.h InitGraphics(); // Initialise the PSX 3d system GsInit3D(); }/* Initialise3dGraphics */ void SetClearScreen(int r, int g, int b) { /* Clear the screen to black every frame */ GsDRAWENV.r0 = r; GsDRAWENV.g0 = g; GsDRAWENV.b0 = b; GsDRAWENV.isbg = 1; }/* SetClearScreen */