summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2005-12-10 20:19:52 +0000
committerTim Angus <tim@ngus.net>2005-12-10 20:19:52 +0000
commitd28c9b3a4178a8d653dc479d385f60969c241bdb (patch)
treef8d124965c2c2543c43f4438a9ce3c91580dfb57 /src/ui
parentbf23ecf17f432cf8e47302ef7464612c17be9bbe (diff)
* s/Quake III Arena source code/Tremulous/
* De-quaked various bits and pieces * Integrated Tremulous into the ioq3 source * Relicensed Tremulous to be GPL * It compiles!!!!!!!!11111111!!!!1
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/keycodes.h157
-rw-r--r--src/ui/ui_atoms.c35
-rw-r--r--src/ui/ui_gameinfo.c35
-rw-r--r--src/ui/ui_local.h41
-rw-r--r--src/ui/ui_main.c49
-rw-r--r--src/ui/ui_players.c35
-rw-r--r--src/ui/ui_public.h35
-rw-r--r--src/ui/ui_shared.c35
-rw-r--r--src/ui/ui_shared.h42
-rw-r--r--src/ui/ui_syscalls.c35
10 files changed, 198 insertions, 301 deletions
diff --git a/src/ui/keycodes.h b/src/ui/keycodes.h
deleted file mode 100644
index cfa82223..00000000
--- a/src/ui/keycodes.h
+++ /dev/null
@@ -1,157 +0,0 @@
-// Copyright (C) 1999-2000 Id Software, Inc.
-//
-
-/*
- * Portions Copyright (C) 2000-2001 Tim Angus
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the OSML - Open Source Modification License v1.0 as
- * described in the file COPYING which is distributed with this source
- * code.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- */
-
-#ifndef __KEYCODES_H__
-#define __KEYCODES_H__
-
-//
-// these are the key numbers that should be passed to KeyEvent
-//
-
-// normal keys should be passed as lowercased ascii
-
-typedef enum {
- K_TAB = 9,
- K_ENTER = 13,
- K_ESCAPE = 27,
- K_SPACE = 32,
-
- K_BACKSPACE = 127,
-
- K_COMMAND = 128,
- K_CAPSLOCK,
- K_POWER,
- K_PAUSE,
-
- K_UPARROW,
- K_DOWNARROW,
- K_LEFTARROW,
- K_RIGHTARROW,
-
- K_ALT,
- K_CTRL,
- K_SHIFT,
- K_INS,
- K_DEL,
- K_PGDN,
- K_PGUP,
- K_HOME,
- K_END,
-
- K_F1,
- K_F2,
- K_F3,
- K_F4,
- K_F5,
- K_F6,
- K_F7,
- K_F8,
- K_F9,
- K_F10,
- K_F11,
- K_F12,
- K_F13,
- K_F14,
- K_F15,
-
- K_KP_HOME,
- K_KP_UPARROW,
- K_KP_PGUP,
- K_KP_LEFTARROW,
- K_KP_5,
- K_KP_RIGHTARROW,
- K_KP_END,
- K_KP_DOWNARROW,
- K_KP_PGDN,
- K_KP_ENTER,
- K_KP_INS,
- K_KP_DEL,
- K_KP_SLASH,
- K_KP_MINUS,
- K_KP_PLUS,
- K_KP_NUMLOCK,
- K_KP_STAR,
- K_KP_EQUALS,
-
- K_MOUSE1,
- K_MOUSE2,
- K_MOUSE3,
- K_MOUSE4,
- K_MOUSE5,
-
- K_MWHEELDOWN,
- K_MWHEELUP,
-
- K_JOY1,
- K_JOY2,
- K_JOY3,
- K_JOY4,
- K_JOY5,
- K_JOY6,
- K_JOY7,
- K_JOY8,
- K_JOY9,
- K_JOY10,
- K_JOY11,
- K_JOY12,
- K_JOY13,
- K_JOY14,
- K_JOY15,
- K_JOY16,
- K_JOY17,
- K_JOY18,
- K_JOY19,
- K_JOY20,
- K_JOY21,
- K_JOY22,
- K_JOY23,
- K_JOY24,
- K_JOY25,
- K_JOY26,
- K_JOY27,
- K_JOY28,
- K_JOY29,
- K_JOY30,
- K_JOY31,
- K_JOY32,
-
- K_AUX1,
- K_AUX2,
- K_AUX3,
- K_AUX4,
- K_AUX5,
- K_AUX6,
- K_AUX7,
- K_AUX8,
- K_AUX9,
- K_AUX10,
- K_AUX11,
- K_AUX12,
- K_AUX13,
- K_AUX14,
- K_AUX15,
- K_AUX16,
-
- K_LAST_KEY // this had better be <256!
-} keyNum_t;
-
-
-// The menu code needs to get both key and char events, but
-// to avoid duplicating the paths, the char events are just
-// distinguished by or'ing in K_CHAR_FLAG (ugly)
-#define K_CHAR_FLAG 1024
-
-#endif
diff --git a/src/ui/ui_atoms.c b/src/ui/ui_atoms.c
index dc6496b7..850a1ac2 100644
--- a/src/ui/ui_atoms.c
+++ b/src/ui/ui_atoms.c
@@ -1,18 +1,25 @@
-// Copyright (C) 1999-2000 Id Software, Inc.
-//
-
/*
- * Portions Copyright (C) 2000-2001 Tim Angus
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the OSML - Open Source Modification License v1.0 as
- * described in the file COPYING which is distributed with this source
- * code.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- */
+===========================================================================
+Copyright (C) 1999-2005 Id Software, Inc.
+Copyright (C) 2000-2006 Tim Angus
+
+This file is part of Tremulous.
+
+Tremulous is free software; you can redistribute it
+and/or modify it under the terms of the GNU General Public License as
+published by the Free Software Foundation; either version 2 of the License,
+or (at your option) any later version.
+
+Tremulous is distributed in the hope that it will be
+useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Tremulous; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+===========================================================================
+*/
/**********************************************************************
UI_ATOMS.C
diff --git a/src/ui/ui_gameinfo.c b/src/ui/ui_gameinfo.c
index 49d0cdb0..451e54af 100644
--- a/src/ui/ui_gameinfo.c
+++ b/src/ui/ui_gameinfo.c
@@ -1,18 +1,25 @@
-// Copyright (C) 1999-2000 Id Software, Inc.
-//
-
/*
- * Portions Copyright (C) 2000-2001 Tim Angus
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the OSML - Open Source Modification License v1.0 as
- * described in the file COPYING which is distributed with this source
- * code.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- */
+===========================================================================
+Copyright (C) 1999-2005 Id Software, Inc.
+Copyright (C) 2000-2006 Tim Angus
+
+This file is part of Tremulous.
+
+Tremulous is free software; you can redistribute it
+and/or modify it under the terms of the GNU General Public License as
+published by the Free Software Foundation; either version 2 of the License,
+or (at your option) any later version.
+
+Tremulous is distributed in the hope that it will be
+useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Tremulous; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+===========================================================================
+*/
//
// gameinfo.c
diff --git a/src/ui/ui_local.h b/src/ui/ui_local.h
index cdcfc57f..d867c929 100644
--- a/src/ui/ui_local.h
+++ b/src/ui/ui_local.h
@@ -1,26 +1,33 @@
-// Copyright (C) 1999-2000 Id Software, Inc.
-//
-
/*
- * Portions Copyright (C) 2000-2001 Tim Angus
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the OSML - Open Source Modification License v1.0 as
- * described in the file COPYING which is distributed with this source
- * code.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- */
+===========================================================================
+Copyright (C) 1999-2005 Id Software, Inc.
+Copyright (C) 2000-2006 Tim Angus
+
+This file is part of Tremulous.
+
+Tremulous is free software; you can redistribute it
+and/or modify it under the terms of the GNU General Public License as
+published by the Free Software Foundation; either version 2 of the License,
+or (at your option) any later version.
+
+Tremulous is distributed in the hope that it will be
+useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Tremulous; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+===========================================================================
+*/
#ifndef __UI_LOCAL_H__
#define __UI_LOCAL_H__
-#include "../game/q_shared.h"
-#include "../cgame/tr_types.h"
+#include "../qcommon/q_shared.h"
+#include "../renderer/tr_types.h"
#include "ui_public.h"
-#include "keycodes.h"
+#include "../client/keycodes.h"
#include "../game/bg_public.h"
#include "ui_shared.h"
diff --git a/src/ui/ui_main.c b/src/ui/ui_main.c
index 80a5bdb4..bf00c5fa 100644
--- a/src/ui/ui_main.c
+++ b/src/ui/ui_main.c
@@ -1,18 +1,25 @@
-// Copyright (C) 1999-2000 Id Software, Inc.
-//
-
/*
- * Portions Copyright (C) 2000-2001 Tim Angus
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the OSML - Open Source Modification License v1.0 as
- * described in the file COPYING which is distributed with this source
- * code.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- */
+===========================================================================
+Copyright (C) 1999-2005 Id Software, Inc.
+Copyright (C) 2000-2006 Tim Angus
+
+This file is part of Tremulous.
+
+Tremulous is free software; you can redistribute it
+and/or modify it under the terms of the GNU General Public License as
+published by the Free Software Foundation; either version 2 of the License,
+or (at your option) any later version.
+
+Tremulous is distributed in the hope that it will be
+useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Tremulous; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+===========================================================================
+*/
/*
=======================================================================
@@ -4155,7 +4162,7 @@ static void UI_RunMenuScript(char **args) {
trap_Cmd_ExecuteText( EXEC_APPEND, "vid_restart;" );
} else if (Q_stricmp(name, "RunDemo") == 0) {
trap_Cmd_ExecuteText( EXEC_APPEND, va("demo %s\n", uiInfo.demoList[uiInfo.demoIndex]));
- } else if (Q_stricmp(name, "Quake3") == 0) {
+ } else if (Q_stricmp(name, "Tremulous") == 0) {
trap_Cvar_Set( "fs_game", "");
trap_Cmd_ExecuteText( EXEC_APPEND, "vid_restart;" );
} else if (Q_stricmp(name, "closeJoin") == 0) {
@@ -5819,18 +5826,6 @@ void _UI_SetActiveMenu( uiMenuCommand_t menu ) {
trap_Cvar_Set("com_errorMessage", "");
}
}
-
-#define MIN_HUNKMEGS 100
-
- trap_Cvar_VariableStringBuffer( "com_hunkMegs", buf, sizeof( buf ) );
- if( strlen( buf ) && atoi( buf ) < MIN_HUNKMEGS )
- {
- trap_Cvar_Set( "com_hunkMegs", va( "%d", MIN_HUNKMEGS ) );
- trap_Cvar_Set( "com_errorMessage", "Your com_hunkMegs setting was too low. "
- "It has been changed to a suitable value, but you must restart Quake 3 "
- "for it to take effect." );
- Menus_ActivateByName( "error_popmenu" );
- }
return;
case UIMENU_TEAM:
trap_Key_SetCatcher( KEYCATCH_UI );
diff --git a/src/ui/ui_players.c b/src/ui/ui_players.c
index 71c4f5cc..5dbfdd3f 100644
--- a/src/ui/ui_players.c
+++ b/src/ui/ui_players.c
@@ -1,18 +1,25 @@
-// Copyright (C) 1999-2000 Id Software, Inc.
-//
-
/*
- * Portions Copyright (C) 2000-2001 Tim Angus
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the OSML - Open Source Modification License v1.0 as
- * described in the file COPYING which is distributed with this source
- * code.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- */
+===========================================================================
+Copyright (C) 1999-2005 Id Software, Inc.
+Copyright (C) 2000-2006 Tim Angus
+
+This file is part of Tremulous.
+
+Tremulous is free software; you can redistribute it
+and/or modify it under the terms of the GNU General Public License as
+published by the Free Software Foundation; either version 2 of the License,
+or (at your option) any later version.
+
+Tremulous is distributed in the hope that it will be
+useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Tremulous; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+===========================================================================
+*/
// ui_players.c
diff --git a/src/ui/ui_public.h b/src/ui/ui_public.h
index 9cf36d66..2308256d 100644
--- a/src/ui/ui_public.h
+++ b/src/ui/ui_public.h
@@ -1,18 +1,25 @@
-// Copyright (C) 1999-2000 Id Software, Inc.
-//
-
/*
- * Portions Copyright (C) 2000-2001 Tim Angus
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the OSML - Open Source Modification License v1.0 as
- * described in the file COPYING which is distributed with this source
- * code.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- */
+===========================================================================
+Copyright (C) 1999-2005 Id Software, Inc.
+Copyright (C) 2000-2006 Tim Angus
+
+This file is part of Tremulous.
+
+Tremulous is free software; you can redistribute it
+and/or modify it under the terms of the GNU General Public License as
+published by the Free Software Foundation; either version 2 of the License,
+or (at your option) any later version.
+
+Tremulous is distributed in the hope that it will be
+useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Tremulous; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+===========================================================================
+*/
#ifndef __UI_PUBLIC_H__
#define __UI_PUBLIC_H__
diff --git a/src/ui/ui_shared.c b/src/ui/ui_shared.c
index 43c25ff8..d5001b10 100644
--- a/src/ui/ui_shared.c
+++ b/src/ui/ui_shared.c
@@ -1,18 +1,25 @@
-//
-// string allocation/managment
-
/*
- * Portions Copyright (C) 2000-2001 Tim Angus
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the OSML - Open Source Modification License v1.0 as
- * described in the file COPYING which is distributed with this source
- * code.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- */
+===========================================================================
+Copyright (C) 1999-2005 Id Software, Inc.
+Copyright (C) 2000-2006 Tim Angus
+
+This file is part of Tremulous.
+
+Tremulous is free software; you can redistribute it
+and/or modify it under the terms of the GNU General Public License as
+published by the Free Software Foundation; either version 2 of the License,
+or (at your option) any later version.
+
+Tremulous is distributed in the hope that it will be
+useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Tremulous; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+===========================================================================
+*/
#include "ui_shared.h"
diff --git a/src/ui/ui_shared.h b/src/ui/ui_shared.h
index b41b97e5..09de834e 100644
--- a/src/ui/ui_shared.h
+++ b/src/ui/ui_shared.h
@@ -1,23 +1,33 @@
/*
- * Portions Copyright (C) 2000-2001 Tim Angus
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the OSML - Open Source Modification License v1.0 as
- * described in the file COPYING which is distributed with this source
- * code.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- */
+===========================================================================
+Copyright (C) 1999-2005 Id Software, Inc.
+Copyright (C) 2000-2006 Tim Angus
+
+This file is part of Tremulous.
+
+Tremulous is free software; you can redistribute it
+and/or modify it under the terms of the GNU General Public License as
+published by the Free Software Foundation; either version 2 of the License,
+or (at your option) any later version.
+
+Tremulous is distributed in the hope that it will be
+useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Tremulous; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+===========================================================================
+*/
#ifndef __UI_SHARED_H
#define __UI_SHARED_H
-#include "../game/q_shared.h"
-#include "../cgame/tr_types.h"
-#include "keycodes.h"
+#include "../qcommon/q_shared.h"
+#include "../renderer/tr_types.h"
+#include "../client/keycodes.h"
#include "../../ui/menudef.h"
@@ -331,7 +341,7 @@ typedef struct {
void (*setCVar)(const char *cvar, const char *value);
void (*drawTextWithCursor)(float x, float y, float scale, vec4_t color, const char *text, int cursorPos, char cursor, int limit, int style);
void (*setOverstrikeMode)(qboolean b);
- qboolean (*getOverstrikeMode)();
+ qboolean (*getOverstrikeMode)( void );
void (*startLocalSound)( sfxHandle_t sfx, int channelNum );
qboolean (*ownerDrawHandleKey)(int ownerDraw, int flags, float *special, int key);
int (*feederCount)(float feederID);
@@ -402,7 +412,7 @@ void Menu_New(int handle);
void Menu_PaintAll( void );
menuDef_t *Menus_ActivateByName(const char *p);
void Menu_Reset( void );
-qboolean Menus_AnyFullScreenVisible();
+qboolean Menus_AnyFullScreenVisible( void );
void Menus_Activate(menuDef_t *menu);
displayContextDef_t *Display_GetContext( void );
diff --git a/src/ui/ui_syscalls.c b/src/ui/ui_syscalls.c
index cef3b74f..d0a17b77 100644
--- a/src/ui/ui_syscalls.c
+++ b/src/ui/ui_syscalls.c
@@ -1,18 +1,25 @@
-// Copyright (C) 1999-2000 Id Software, Inc.
-//
-
/*
- * Portions Copyright (C) 2000-2001 Tim Angus
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the OSML - Open Source Modification License v1.0 as
- * described in the file COPYING which is distributed with this source
- * code.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- */
+===========================================================================
+Copyright (C) 1999-2005 Id Software, Inc.
+Copyright (C) 2000-2006 Tim Angus
+
+This file is part of Tremulous.
+
+Tremulous is free software; you can redistribute it
+and/or modify it under the terms of the GNU General Public License as
+published by the Free Software Foundation; either version 2 of the License,
+or (at your option) any later version.
+
+Tremulous is distributed in the hope that it will be
+useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Tremulous; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+===========================================================================
+*/
#include "ui_local.h"