void DrawConsole(size_t screenw, size_t screenh) { extern int ConBottom; // Draw notify messages if(gamestate == GS_FULLCONSOLE || gamestate == GS_STARTUP || gamestate == GS_DEMOSCREEN) { // Draw full console background DrawConsoleBackground(); // Draw console text DrawConsoleText(screenw, screenh); } if(ConsoleState != c_up) { // Darken behind partial console DimArea(0, 0, 1, ((float)ConBottom/screenh), 0.5); // Draw console text DrawConsoleText(screenw, screenh); } else { // Draw text input } }
void open_zoomer() { if (!bm_touchzoom) bm_touchzoom = GetResource("touchzoom", (ibitmap*) &touchzoom); th = header_font->height + 4; dw = bm_touchzoom->width + 80; dh = th + bm_touchzoom->height + menu_n_font->height + 40; dx = (ScreenWidth() - dw) / 2; dy = (ScreenHeight() - dh) / 2; isaves = BitmapFromScreen(dx, dy, dw + 4, dh + 4); DimArea(dx + 4, dy + 4, dw, dh, BLACK); new_scale = scale; new_rscale = rscale; new_reflow = reflow_mode; prevhandler = iv_seteventhandler(newzoomer_handler); if (ivstate.needupdate) { draw_new_zoomer(0); SoftUpdate(); } else { draw_new_zoomer(1); } }
void DrawMenu() { if(!menuactive) return; // Darken behind menu DimArea(0, 0, 1, 1, 0.5); extern int messageToPrint; if(messageToPrint) { } else { //extern void M_Drawer(); //M_Drawer(); // DRAW MENU int x = currentMenu->x; int y = currentMenu->y; int max = currentMenu->numitems; glColor4f(1,1,1,1); glEnable(GL_TEXTURE_2D); glEnable(GL_ALPHA_TEST); glDisable(GL_BLEND); glAlphaFunc(GL_GREATER, 0); for (int i = 0; i < max; i++) { if (currentMenu->menuitems[i].name[0]) { //screen->DrawPatchClean (W_GetNumForName(currentMenu->menuitems[i].name), x, y); int lump = W_GetNumForName(currentMenu->menuitems[i].name); patch_t *patch = (patch_t *)W_CacheLumpNum (lump, PU_CACHE); glpatch_t &glp = get_glpatch(lump, false); glBindTexture(GL_TEXTURE_2D, glp.texture); DrawTexturedQuad(x/320.0, y/200.0, patch->width()/320.0, patch->height()/200.0, glp.h, glp.w); } y += LINEHEIGHT; } // DRAW SKULL //if (drawSkull) { extern short whichSkull; extern char skullName[2][9]; //screen->DrawPatchClean (W_GetNumForName(skullName[whichSkull]), // x + SKULLXOFF, currentMenu->y - 5 + itemOn*LINEHEIGHT); int lump = W_GetNumForName(skullName[whichSkull]); patch_t *patch = (patch_t *)W_CacheLumpNum (lump, PU_CACHE); glpatch_t &glp = get_glpatch(lump, false); glBindTexture(GL_TEXTURE_2D, glp.texture); double xscale = 1.0/320.0; double yscale = 1.0/240.0; x += SKULLXOFF; y = currentMenu->y - 5 + itemOn*LINEHEIGHT; //DrawTexturedQuad(x*xscale, y*yscale, patch->width()*xscale, patch->height()*yscale, 1, 1); DrawTexturedQuad(x/320.0, y/200.0, patch->width()/320.0, patch->height()/200.0, glp.h, glp.w); } } }