1
Clans, Matches, and Tournaments / Re: Looking For Clan
« on: December 31, 2007, 04:09:47 PM »
Joined WsL for now, thanks guys.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Which distro are you on? I got it to work with Ubuntu.
Try C using the GCC compilerThat would work, but an IDE (Integrated Development Enviroment i.e Visual Studio) would really be better.
If you're using 64bit linux, try this patch: http://dplogin.com/files/clients/linux/paintball2_build019_linux_64bit_patch.tar.gz
If you're using 32bit linux, try installing gcrypt.
...setting mode 21: invalid mode
ref_gl::R_SetMode() - invalid mode
--- vid_so.c 2007-03-13 03:37:08.000000000 -0400
+++ vid_so.c 2007-06-21 20:58:49.347740190 -0400
@@ -41,6 +41,8 @@
cvar_t *vid_xpos; // X coordinate of window position
cvar_t *vid_ypos; // Y coordinate of window position
cvar_t *vid_fullscreen;
+cvar_t *vid_width;
+cvar_t *vid_height;
// Global variables used internally by this module
viddef_t viddef; // global video state; used by other modules
@@ -48,8 +50,6 @@
qboolean reflib_active = 0;
void *testlib;
-#define VID_NUM_MODES (sizeof(vid_modes) / sizeof(vid_modes[0]))
-
/** KEYBOARD **************************************************************/
void Do_Key_Event(int key, qboolean down);
@@ -164,15 +164,42 @@
// jitodo, custom resolution
};
-qboolean VID_GetModeInfo(int *width, int *height, int mode)
-{
- if (mode < 0 || mode >= VID_NUM_MODES)
- return false;
-
- *width = vid_modes[mode].width;
- *height = vid_modes[mode].height;
- return true;
+static int s_numVidModes = (sizeof(vid_modes) / sizeof(vid_modes[0]));
+qboolean VID_GetModeInfo( int *width, int *height, int mode )
+{
+ vidmode_t *vm;
+
+ if (mode < -1){
+ return false;
+ }
+
+ if (mode >= s_numVidModes){
+ return false;
+ }
+
+ if(mode == -1) {
+ *width = vid_width->value;
+ *height = vid_height->value;
+ return true;
+ }
+
+ vm = &vid_modes[mode];
+
+ *width = vm->width;
+ *height = vm->height;
+
+ return true;
+}
+
+void VID_ModeList_f(void)
+{
+ int i;
+
+ for( i=0; i < s_numVidModes; i++) {
+ Com_Printf("%s\n",vid_modes[i].description);
+ }
+ Com_Printf("For custom resolutions, set 'gl_mode' to -1 and use 'vid_width' / 'vid_height'\n");
}
/*
@@ -448,6 +475,9 @@
vid_ypos = Cvar_Get("vid_ypos", "22", CVAR_ARCHIVE);
vid_fullscreen = Cvar_Get("vid_fullscreen", "0", CVAR_ARCHIVE);
vid_gamma = Cvar_Get("vid_gamma", "1", CVAR_ARCHIVE);
+ vid_width= Cvar_Get ( "vid_width", "640", CVAR_ARCHIVE);
+ vid_height= Cvar_Get ( "vid_height", "480", CVAR_ARCHIVE);
+ Cmd_AddCommand ("vid_modelist", VID_ModeList_f);
/* Add some console commands that we want to handle */
Cmd_AddCommand ("vid_restart", VID_Restart_f);