From a099991354e31b55a0d0903ba5755f13aeb43824 Mon Sep 17 00:00:00 2001 From: pixel Date: Fri, 4 Apr 2003 16:31:03 +0000 Subject: Backport fixing --- src/test.cc | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/test.cc b/src/test.cc index 729c972..ede84c3 100644 --- a/src/test.cc +++ b/src/test.cc @@ -20,16 +20,18 @@ virtual int startup() throw (GeneralException) { new Archive("datas.paq"); - mogltk::glbase * gl = new mogltk::glbase(); - mogltk::glshape * sh = new mogltk::glshape(); - mogltk::glfont * font = new mogltk::glfont(&Input("font-2.bin")); - -// mogltk::base * gl = new mogltk::base(); -// mogltk::shape * sh = new mogltk::shape(); -// mogltk::font * font = new mogltk::font(&Input("font-2.bin")); - +#if 1 + mogltk::base * gl = new mogltk::glbase(); + mogltk::shape * sh = new mogltk::glshape(); + mogltk::font * font = new mogltk::glfont(&Input("font-2.bin")); + mogltk::Sprite * s = new mogltk::glSprite(&Input("cursor.rgba"), 25, 25); +#else + mogltk::base * gl = new mogltk::base(); + mogltk::shape * sh = new mogltk::shape(); + mogltk::font * font = new mogltk::font(&Input("font-2.bin")); mogltk::Sprite * s = new mogltk::Sprite(&Input("cursor.rgba"), 25, 25); - +#endif + mogltk::engine::setcursorvisible(true); mogltk::engine::setappactive(true); @@ -46,12 +48,12 @@ virtual int startup() throw (GeneralException) { sy1 = 240 + 240 * sin(0.692 * t + 8.21); sy2 = 240 + 240 * sin(1.029 * t + 2.42); -// gl->Enter2DMode(); + gl->Enter2DMode(); -// sh->tbox(mytex, 50, 50, 561, 561, BLACK, RED, LIME, BLUE); -// sh->box(400, 100, 450, 150, BLACK, RED, LIME, BLUE); + sh->tbox(mytex, 50, 50, 561, 561, BLACK, RED, LIME, BLUE); + sh->box(400, 100, 450, 150, BLACK, RED, LIME, BLUE); -// sh->box(5, 5, 150, 80, CORNFLOWERBLUE, DEEPSKYBLUE, MIDNIGHTBLUE, NAVY); + sh->box(5, 5, 150, 80, CORNFLOWERBLUE, DEEPSKYBLUE, MIDNIGHTBLUE, NAVY); font->setshadow(1); font->putcursor(10, 30); font->setcolor(WHITE); @@ -73,7 +75,9 @@ virtual int startup() throw (GeneralException) { // sh->arc(320, 240, 50, 0, 0); sh->box(MIN(sx1, sx2), MIN(sy1, sy2), MAX(sx1, sx2), MAX(sy1, sy2), AlphaBlue); + mogltk::ColorP::Min.A = 200; sh->obox(MIN(sx1, sx2), MIN(sy1, sy2), MAX(sx1, sx2), MAX(sy1, sy2), AlphaBlue); + mogltk::ColorP::Min.A = 0; font->putcursor(550, 400); font->printf("FPS: %.2f\n", mogltk::engine::FPS()); @@ -83,7 +87,7 @@ virtual int startup() throw (GeneralException) { s->draw(mogltk::engine::mouseX() - 8, mogltk::engine::mouseY() - 6); -// gl->Leave2DMode(); + gl->Leave2DMode(); gl->Flip(); -- cgit v1.2.3