The first messages on the console now wrap like they should, to the window

width instead of to 40 characters.
This commit is contained in:
Jeff Teunissen 2001-01-09 00:03:08 +00:00
parent 91bfddbf58
commit 8247d35d32
8 changed files with 15 additions and 28 deletions

View File

@ -45,12 +45,10 @@ cvar_t *vid_height;
void
VID_GetWindowSize (int def_w, int def_h)
{
int pnum;
int pnum;
vid_width =
Cvar_Get ("vid_width", va ("%d", def_w), CVAR_NONE, "screen width");
vid_height =
Cvar_Get ("vid_height", va ("%d", def_h), CVAR_NONE, "screen height");
vid_width = Cvar_Get ("vid_width", va ("%d", def_w), CVAR_NONE, "screen width");
vid_height = Cvar_Get ("vid_height", va ("%d", def_h), CVAR_NONE, "screen height");
if ((pnum = COM_CheckParm ("-width"))) {
if (pnum >= com_argc - 1)

View File

@ -219,6 +219,7 @@ VID_Init (unsigned char *palette)
GLint attribs[32];
VID_GetWindowSize (640, 480);
Con_CheckResize (); // Now that we have a window size, fix console
vid.maxwarpwidth = WARP_WIDTH;
vid.maxwarpheight = WARP_HEIGHT;

View File

@ -296,29 +296,7 @@ VID_Init (unsigned char *pal)
/* Go into async mode */
ggiSetFlags (ggivis, GGIFLAG_ASYNC);
/* check for command-line window size */
if ((pnum = COM_CheckParm ("-winsize"))) {
if (pnum >= com_argc - 2)
Sys_Error ("VID: -winsize <width> <height>\n");
vid.width = atoi (com_argv[pnum + 1]);
vid.height = atoi (com_argv[pnum + 2]);
if (!vid.width || !vid.height)
Sys_Error ("VID: Bad window width/height\n");
}
if ((pnum = COM_CheckParm ("-width"))) {
if (pnum >= com_argc - 1)
Sys_Error ("VID: -width <width>\n");
vid.width = atoi (com_argv[pnum + 1]);
if (!vid.width)
Sys_Error ("VID: Bad window width\n");
}
if ((pnum = COM_CheckParm ("-height"))) {
if (pnum >= com_argc - 1)
Sys_Error ("VID: -height <height>\n");
vid.height = atoi (com_argv[pnum + 1]);
if (!vid.height)
Sys_Error ("VID: Bad window height\n");
}
VID_GetWindowSize (320, 200);
scale = COM_CheckParm ("-scale");
@ -387,6 +365,7 @@ VID_Init (unsigned char *pal)
vid.width = realwidth;
vid.height = realheight;
}
Con_CheckResize (); // Now that we have a window size, fix console
if (mode.frames >= 2)
doublebuffer = 1;

View File

@ -145,6 +145,8 @@ VID_Init (unsigned char *palette)
};
VID_GetWindowSize (640, 480);
Con_CheckResize (); // Now that we have a window size, fix console
vid.maxwarpwidth = WARP_WIDTH;
vid.maxwarpheight = WARP_HEIGHT;
vid.colormap = host_colormap;

View File

@ -38,6 +38,7 @@
#include <SDL.h>
#include "console.h"
#include "cvar.h"
#include "d_local.h"
#include "host.h"
@ -143,6 +144,8 @@ VID_Init (unsigned char *palette)
// Set up display mode (width and height)
VID_GetWindowSize (BASEWIDTH, BASEHEIGHT);
Con_CheckResize (); // Now that we have a window size, fix console
vid.maxwarpwidth = WARP_WIDTH;
vid.maxwarpheight = WARP_HEIGHT;

View File

@ -189,6 +189,7 @@ VID_Init (unsigned char *palette)
vid.height = vid.conheight = min (vid.conheight, scr_height);
vid.width = vid.conwidth = min (vid.conwidth, scr_width);
Con_CheckResize (); // Now that we have a window size, fix console
vid.aspect = ((float) vid.height / (float) vid.width) * (320.0 / 240.0);
vid.numpages = 2;

View File

@ -601,6 +601,7 @@ VID_Init (unsigned char *palette)
/* Set vid parameters */
VID_SetMode (current_mode, palette);
Con_CheckResize (); // Now that we have a window size, fix console
VID_SetPalette (palette);
}

View File

@ -513,6 +513,8 @@ VID_Init (unsigned char *palette)
vid.width = vid_width->int_val;
vid.height = vid_height->int_val;
Con_CheckResize (); // Now that we have a window size, fix console
vid.maxwarpwidth = WARP_WIDTH;
vid.maxwarpheight = WARP_HEIGHT;
vid.numpages = 2;