diff --git a/HACKING b/HACKING index c69a97b..b1a7c9b 100644 --- a/HACKING +++ b/HACKING @@ -13,3 +13,16 @@ at TODO in the top level source tree, or open a browser at http://bugs.quakeforge.net/bugs/cgi-bin/pkgreport.cgi?pkg=quake2&archive=no for the currently open bug reports. + + +Adding a new screen resolution +------------------------------ + +Open up src/vid_so.c and find the array "vid_modes". Append your resolution +to this array: + { "Mode n: RESxRES", RES, RES, n } + +Open up src/vid_menu.c and find the array "resolutions" in VID_MenuInit(). +Append your resolution so it is the same index as your addition to vid_modes. + +Save both, rebuild. diff --git a/TODO b/TODO index 7ffdb4a..33b0352 100644 --- a/TODO +++ b/TODO @@ -40,5 +40,5 @@ X Stencil buffered shadows - Adding a FPS counter - Quake2 MP3 Playback - Adding a skybox size variable -- Adding new video resolutions +X Adding new video resolutions - Drawing alias model bounding boxes diff --git a/src/vid_menu.c b/src/vid_menu.c index 27b663d..96a1e7f 100644 --- a/src/vid_menu.c +++ b/src/vid_menu.c @@ -235,6 +235,8 @@ void VID_MenuInit( void ) "[1280 1024]", "[1600 1200]", "[2048 1536]", /* irix/vid_menu.c -- jaq */ + "[1024 480 ]", /* sony vaio pocketbook */ + "[1152 768 ]", /* applie tibook */ 0 }; static const char *refs[] = diff --git a/src/vid_so.c b/src/vid_so.c index 8c89cec..c8e94ef 100644 --- a/src/vid_so.c +++ b/src/vid_so.c @@ -1,4 +1,8 @@ /* $Id$ + * + * Main windowed and fullscreen graphics interface module. This module + * is used for both the software and OpenGL rendering versions of the + * Quake refresh engine. * * Copyright (C) 1997-2001 Id Software, Inc. * Copyright (c) 2002 The Quakeforge Project. @@ -19,10 +23,6 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// Main windowed and fullscreen graphics interface module. This module -// is used for both the software and OpenGL rendering versions of the -// Quake refresh engine. - #ifdef HAVE_CONFIG_H # include "config.h" #endif @@ -179,7 +179,9 @@ vidmode_t vid_modes[] = { "Mode 7: 1152x864", 1152, 864, 7 }, { "Mode 8: 1280x1024", 1280, 1024, 8 }, { "Mode 9: 1600x1200", 1600, 1200, 9 }, - { "Mode 10: 2048x1536", 2048, 1536, 10 } + { "Mode 10: 2048x1536", 2048, 1536, 10 }, + { "Mode 11: 1024x480", 1024, 480, 11 }, /* Sony VAIO Pocketbook */ + { "Mode 12: 1152x768", 1152, 768, 12 } /* Apple TiBook */ }; qboolean VID_GetModeInfo( unsigned int *width, unsigned int *height, int mode )