This tutorial is to make the console stretch in and out, instead of scrolling in and out. It's pretty simple code, some cvars to control it, and some code to make it stretch instead making it scroll. Anyway, on to the code: First declare some cvars (to control the if the console should stretch or not). Open up gl_screen.c, and after: cvar_t gl_triplebuffer = {"gl_triplebuffer", "1", true }; cvar_t scr_console_stretch = { "scr_console_stretch", "0" }; Cvar_RegisterVariable (&gl_triplebuffer); extern cvar_t scr_viewsize; extern cvar_t scr_console_stretch;
Now we have some cvars to control the stretching, we need to write the code for the stretching. if (r_console_subdivide_y.value < 1) { Cvar_SetValue("r_console_subdivide_y", 1); } if (scr_console_stretch.value) { y = 0; console.height = lines; //make it stretch } else { y = lines - vid.height; console.height = vid.height; } Now if you've done it right, it should stretch instead of scroll. |