Browse Source

Made screen width and height into predefined constants.

master
Nico de Poel 3 years ago
parent
commit
2e56e6b8bf
  1. 11
      main.c

11
main.c

@ -27,6 +27,9 @@
#define OTLEN 256 #define OTLEN 256
#define SCREENWIDTH 320
#define SCREENHEIGHT 240
#define NUMVERTEXNORMALS 162 #define NUMVERTEXNORMALS 162
static int anorms[NUMVERTEXNORMALS][3] = { static int anorms[NUMVERTEXNORMALS][3] = {
#include "ps1anorms.h" #include "ps1anorms.h"
@ -93,12 +96,12 @@ void init(void)
ResetGraph(0); ResetGraph(0);
// Define display environments, first on top and second on bottom // Define display environments, first on top and second on bottom
SetDefDispEnv(&disp[0], 0, 0, 320, 240);
SetDefDispEnv(&disp[1], 0, 240, 320, 240);
SetDefDispEnv(&disp[0], 0, 0, SCREENWIDTH, SCREENHEIGHT);
SetDefDispEnv(&disp[1], 0, SCREENHEIGHT, SCREENWIDTH, SCREENHEIGHT);
// Define drawing environments, first on bottom and second on top // Define drawing environments, first on bottom and second on top
SetDefDrawEnv(&draw[0], 0, 240, 320, 240);
SetDefDrawEnv(&draw[1], 0, 0, 320, 240);
SetDefDrawEnv(&draw[0], 0, SCREENHEIGHT, SCREENWIDTH, SCREENHEIGHT);
SetDefDrawEnv(&draw[1], 0, 0, SCREENWIDTH, SCREENHEIGHT);
// Set and enable clear color // Set and enable clear color
setRGB0(&draw[0], 96, 0, 96); setRGB0(&draw[0], 96, 0, 96);

Loading…
Cancel
Save