From 2ec65975046c3aa98f2958ca0988d20a36abf5fa Mon Sep 17 00:00:00 2001 From: pixel Date: Wed, 25 Dec 2002 14:26:31 +0000 Subject: Bleh --- src/test.cc | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) (limited to 'src') diff --git a/src/test.cc b/src/test.cc index cf8ef8f..011feb4 100644 --- a/src/test.cc +++ b/src/test.cc @@ -17,39 +17,8 @@ virtual int startup() throw (GeneralException) { verbosity = M_INFO; - mogltk::texture * mytex = new mogltk::texture(256, 256, true); + mogltk::texture * mytex = new mogltk::texture(&Input("pattern6.bmp"), true); - texture = (Uint8 *) mytex->GetSurface()->pixels; - - for (int y = 0; y < 256; y++) { - for (int x = 0; x < 256; x++) { - //int r = random() % 256; - int r = 255; - texture[(x + y * 256) * 4 + 0] = r; - texture[(x + y * 256) * 4 + 1] = r; - texture[(x + y * 256) * 4 + 2] = r; - texture[(x + y * 256) * 4 + 3] = 255; - } - } - - SDL_Surface * s; - - if (!(s = SDL_LoadBMP("pattern6.bmp"))) { - throw GeneralException("Error: could not load texture."); - } - SDL_BlitSurface(s, NULL, mytex->GetSurface(), NULL); - -/* - for (int y = 0; y < 256; y += 2) { - for (int x = 0; x < 256; x += 2) { - texture[(x + y * 256) * 4 + 0] = 0; - texture[(x + y * 256) * 4 + 1] = 0; - texture[(x + y * 256) * 4 + 2] = 255; - texture[(x + y * 256) * 4 + 3] = 0; - } - } -*/ - mogltk::glbase::Enter2DMode(); mytex->Bind(); -- cgit v1.2.3