diff --git a/pmc/main.cc b/pmc/main.cc --- a/pmc/main.cc +++ b/pmc/main.cc @@ -14,7 +14,7 @@ #define STEP 1 #endif -#define MAX 3 +#define MAX 1 using namespace algebra; @@ -26,35 +26,28 @@ int height; + surface = new Surface (0, 0, 32); + if (argc != 2) { fprintf (stderr, "Usage: %s \n", argv[0]); - height = 250; + height = surface->getHeight () / 2; } else height = atoi (argv[1]); - if ((height < 10) || (height >= 360)) - height = 200; - Vector p1 (0, 0); Vector p2 (height, 0); - Vector p3 (height + 100, height + 100); - Vector p4 (100, height + 100); + Vector p3 (height, height); + Vector p4 (0, height); - surface = new Surface (1024, 768, 32); SDL_WM_SetCaption ("Pimp my Cube", NULL); - d[0] = new Rectangle (surface, p1, p2, p3, p4); - d[1] = new Cube (surface); - d[2] = new Cube (surface, p1, p2, p3, p4, height); + d[0] = new Cube (surface, p1, p2, p3, p4, height); bool running = true; int i, x, y; x = y = 0; - d[1]->move (Vector (3 * height, 25)); - d[2]->move (Vector (290, 0)); - while (running) { SDL_PollEvent (&event);