1
0
Fork 0
forked from fte/fteqw

Trying to break bigfoot's code. Well, if he won't maintain it...

git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3553 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2010-07-13 21:08:37 +00:00
parent ca2564fe4f
commit 3a5149f1dd

View file

@ -74,8 +74,6 @@ struct Screen *screen;
static void *pointermem;
static int real_width, real_height;
static void *TinyGL_GetSymbol(char *name)
{
void *ret = 0;
@ -362,48 +360,46 @@ qboolean GLVID_Init (rendererstate_t *info, unsigned char *palette)
gammaworks = 1;
}
vid.width = info->width;
vid.height = info->height;
vid.pixelwidth = info->width;
vid.pixelheight = info->height;
vid.numpages = 3;
vid.colormap = host_colormap;
if (vid.width <= 640)
if (vid.pixelwidth <= 640)
{
vid.conwidth = vid.width;
vid.conheight = vid.height;
vid.width = vid.pixelwidth;
vid.height = vid.pixelheight;
}
else
{
vid.conwidth = vid.width/2;
vid.conheight = vid.height/2;
vid.width = vid.pixelwidth/2;
vid.height = vid.pixelheight/2;
}
if ((i = COM_CheckParm("-conwidth")) && i + 1 < com_argc)
{
vid.conwidth = Q_atoi(com_argv[i + 1]);
vid.width = Q_atoi(com_argv[i + 1]);
// pick a conheight that matches with correct aspect
vid.conheight = vid.conwidth * 3 / 4;
vid.height = vid.conwidth * 3 / 4;
}
vid.conwidth &= 0xfff8; // make it a multiple of eight
vid.width &= 0xfff8; // make it a multiple of eight
if ((i = COM_CheckParm("-conheight")) && i + 1 < com_argc)
vid.conheight = Q_atoi(com_argv[i + 1]);
vid.height = Q_atoi(com_argv[i + 1]);
if (vid.conwidth < 320)
vid.conwidth = 320;
if (vid.width < 320)
vid.width = 320;
if (vid.conheight < 200)
vid.conheight = 200;
if (vid.height < 200)
vid.height = 200;
TinyGLBase = OpenLibrary("tinygl.library", 0);
if (TinyGLBase)
{
if (TinyGLBase->lib_Version > 50 || (TinyGLBase->lib_Version == 50 && TinyGLBase->lib_Revision >= 9))
{
vid.aspect = ((float)vid.height / (float)vid.width) * (320.0 / 240.0);
if (info->fullscreen)
{
screen = OpenScreenTags(0,
@ -464,16 +460,10 @@ qboolean GLVID_Init (rendererstate_t *info, unsigned char *palette)
lastwindowedmouse = 1;
#endif
real_width = vid.width;
real_height = vid.height;
if (vid.conheight > vid.height)
vid.conheight = vid.height;
if (vid.conwidth > vid.width)
vid.conwidth = vid.width;
vid.width = vid.conwidth;
vid.height = vid.conheight;
if (vid.height > vid.pixelheight)
vid.height = vid.pixelheight;
if (vid.width > vid.pixelwidth)
vid.width = vid.pixelwidth;
GL_Init(&TinyGL_GetSymbol);
@ -539,7 +529,7 @@ qboolean GLVID_Init (rendererstate_t *info, unsigned char *palette)
return false;
}
void GLVID_DeInit()
void GLVID_DeInit(void)
{
if (glctx)
{
@ -592,10 +582,8 @@ void GLVID_DeInit()
}
}
void GL_BeginRendering()
void GL_BeginRendering(void)
{
vid.pixelwidth = real_width;
vid.pixelheight = real_height;
}
void GL_EndRendering (void)
@ -658,11 +646,11 @@ void GLD_EndDirectRect (int x, int y, int width, int height)
{
}
void GLVID_UnlockBuffer()
void GLVID_UnlockBuffer(void)
{
}
void GLVID_LockBuffer()
void GLVID_LockBuffer(void)
{
}