diff --git a/src/Docs.doxygen b/src/Docs.doxygen deleted file mode 100644 index ea4ddd7..0000000 --- a/src/Docs.doxygen +++ /dev/null @@ -1,275 +0,0 @@ -# Doxyfile 1.4.7 - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- -PROJECT_NAME = OpenArena -PROJECT_NUMBER = 0.1.3 -OUTPUT_DIRECTORY = /Users/tomhicks/Desktop/OpenArena-Docs -CREATE_SUBDIRS = NO -OUTPUT_LANGUAGE = English -USE_WINDOWS_ENCODING = NO -BRIEF_MEMBER_DESC = YES -REPEAT_BRIEF = YES -ABBREVIATE_BRIEF = "The $name class" \ - "The $name widget" \ - "The $name file" \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the -ALWAYS_DETAILED_SEC = NO -INLINE_INHERITED_MEMB = NO -FULL_PATH_NAMES = YES -STRIP_FROM_PATH = /Volumes/Doxygen-1.4.7/ -STRIP_FROM_INC_PATH = -SHORT_NAMES = NO -JAVADOC_AUTOBRIEF = NO -MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = NO -INHERIT_DOCS = YES -SEPARATE_MEMBER_PAGES = NO -TAB_SIZE = 8 -ALIASES = -OPTIMIZE_OUTPUT_FOR_C = NO -OPTIMIZE_OUTPUT_JAVA = NO -BUILTIN_STL_SUPPORT = NO -DISTRIBUTE_GROUP_DOC = NO -SUBGROUPING = YES -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- -EXTRACT_ALL = YES -EXTRACT_PRIVATE = YES -EXTRACT_STATIC = YES -EXTRACT_LOCAL_CLASSES = YES -EXTRACT_LOCAL_METHODS = NO -HIDE_UNDOC_MEMBERS = NO -HIDE_UNDOC_CLASSES = NO -HIDE_FRIEND_COMPOUNDS = NO -HIDE_IN_BODY_DOCS = NO -INTERNAL_DOCS = NO -CASE_SENSE_NAMES = NO -HIDE_SCOPE_NAMES = NO -SHOW_INCLUDE_FILES = YES -INLINE_INFO = YES -SORT_MEMBER_DOCS = YES -SORT_BRIEF_DOCS = NO -SORT_BY_SCOPE_NAME = NO -GENERATE_TODOLIST = YES -GENERATE_TESTLIST = YES -GENERATE_BUGLIST = YES -GENERATE_DEPRECATEDLIST= YES -ENABLED_SECTIONS = -MAX_INITIALIZER_LINES = 30 -SHOW_USED_FILES = YES -SHOW_DIRECTORIES = NO -FILE_VERSION_FILTER = -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- -QUIET = NO -WARNINGS = YES -WARN_IF_UNDOCUMENTED = YES -WARN_IF_DOC_ERROR = YES -WARN_NO_PARAMDOC = NO -WARN_FORMAT = "$file:$line: $text" -WARN_LOGFILE = -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- -INPUT = /Users/tomhicks/Documents/workspaces/OpenArena/openarena/src -FILE_PATTERNS = *.c \ - *.cc \ - *.cxx \ - *.cpp \ - *.c++ \ - *.d \ - *.java \ - *.ii \ - *.ixx \ - *.ipp \ - *.i++ \ - *.inl \ - *.h \ - *.hh \ - *.hxx \ - *.hpp \ - *.h++ \ - *.idl \ - *.odl \ - *.cs \ - *.php \ - *.php3 \ - *.inc \ - *.m \ - *.mm \ - *.dox \ - *.py \ - *.C \ - *.CC \ - *.C++ \ - *.II \ - *.I++ \ - *.H \ - *.HH \ - *.H++ \ - *.CS \ - *.PHP \ - *.PHP3 \ - *.M \ - *.MM \ - *.PY -RECURSIVE = YES -EXCLUDE = -EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = -EXAMPLE_PATH = -EXAMPLE_PATTERNS = * -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = -INPUT_FILTER = -FILTER_PATTERNS = -FILTER_SOURCE_FILES = NO -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = NO -INLINE_SOURCES = NO -STRIP_CODE_COMMENTS = YES -REFERENCED_BY_RELATION = NO -REFERENCES_RELATION = NO -REFERENCES_LINK_SOURCE = YES -USE_HTAGS = NO -VERBATIM_HEADERS = NO -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- -ALPHABETICAL_INDEX = NO -COLS_IN_ALPHA_INDEX = 5 -IGNORE_PREFIX = -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- -GENERATE_HTML = YES -HTML_OUTPUT = html -HTML_FILE_EXTENSION = .html -HTML_HEADER = -HTML_FOOTER = -HTML_STYLESHEET = -HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = NO -CHM_FILE = -HHC_LOCATION = -GENERATE_CHI = NO -BINARY_TOC = NO -TOC_EXPAND = NO -DISABLE_INDEX = NO -ENUM_VALUES_PER_LINE = 4 -GENERATE_TREEVIEW = NO -TREEVIEW_WIDTH = 250 -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- -GENERATE_LATEX = NO -LATEX_OUTPUT = latex -LATEX_CMD_NAME = latex -MAKEINDEX_CMD_NAME = makeindex -COMPACT_LATEX = NO -PAPER_TYPE = a4wide -EXTRA_PACKAGES = -LATEX_HEADER = -PDF_HYPERLINKS = NO -USE_PDFLATEX = NO -LATEX_BATCHMODE = NO -LATEX_HIDE_INDICES = NO -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- -GENERATE_RTF = NO -RTF_OUTPUT = rtf -COMPACT_RTF = NO -RTF_HYPERLINKS = NO -RTF_STYLESHEET_FILE = -RTF_EXTENSIONS_FILE = -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- -GENERATE_MAN = NO -MAN_OUTPUT = man -MAN_EXTENSION = .3 -MAN_LINKS = NO -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- -GENERATE_XML = NO -XML_OUTPUT = xml -XML_SCHEMA = -XML_DTD = -XML_PROGRAMLISTING = YES -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- -GENERATE_AUTOGEN_DEF = NO -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- -GENERATE_PERLMOD = NO -PERLMOD_LATEX = NO -PERLMOD_PRETTY = YES -PERLMOD_MAKEVAR_PREFIX = -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- -ENABLE_PREPROCESSING = YES -MACRO_EXPANSION = NO -EXPAND_ONLY_PREDEF = NO -SEARCH_INCLUDES = YES -INCLUDE_PATH = -INCLUDE_FILE_PATTERNS = -PREDEFINED = -EXPAND_AS_DEFINED = -SKIP_FUNCTION_MACROS = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- -TAGFILES = -GENERATE_TAGFILE = -ALLEXTERNALS = NO -EXTERNAL_GROUPS = YES -PERL_PATH = /usr/bin/perl -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- -CLASS_DIAGRAMS = YES -HIDE_UNDOC_RELATIONS = YES -HAVE_DOT = NO -CLASS_GRAPH = YES -COLLABORATION_GRAPH = YES -GROUP_GRAPHS = YES -UML_LOOK = NO -TEMPLATE_RELATIONS = NO -INCLUDE_GRAPH = YES -INCLUDED_BY_GRAPH = YES -CALL_GRAPH = NO -CALLER_GRAPH = NO -GRAPHICAL_HIERARCHY = YES -DIRECTORY_GRAPH = YES -DOT_IMAGE_FORMAT = png -DOT_PATH = -DOTFILE_DIRS = -MAX_DOT_GRAPH_WIDTH = 1024 -MAX_DOT_GRAPH_HEIGHT = 1024 -MAX_DOT_GRAPH_DEPTH = 1000 -DOT_TRANSPARENT = NO -DOT_MULTI_TARGETS = NO -GENERATE_LEGEND = YES -DOT_CLEANUP = YES -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- -SEARCHENGINE = NO diff --git a/src/EventManager.cpp b/src/EventManager.cpp new file mode 100644 index 0000000..4d3843e --- /dev/null +++ b/src/EventManager.cpp @@ -0,0 +1,36 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +/** + * @file EventManager.cpp + * @breif Implementation of the EventManager class + * This file along with EventManager.h implement the EventManager + * class. The EventManager class collects and redistributes events + * in a fashion similar to AWT's EventListeners. + * + * @see EventManager.h + */ +#include "EventManager.h" + +namespace OpenArena +{ + EventManager::EventManager() + { + }; +}; \ No newline at end of file diff --git a/src/EventManager.h b/src/EventManager.h new file mode 100644 index 0000000..f1db6c6 --- /dev/null +++ b/src/EventManager.h @@ -0,0 +1,41 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef __OpenArena_EventMangaer_h__ +#define __OpenArena_EventMangaer_h__ + +/** + * @file EventManager.h + * @breif Specification of the EventManager class + * This file along with EventManager.cpp implement the EventManager + * class. The EventManager class collects and redistributes events + * in a fashion similar to AWT's EventListeners. + * + * @see EventManager.cpp + */ + +namespace OpenArena +{ + class EventManager + { + public: + EventManager(); + }; +} +#endif /*__OpenArena_EventMangaer_h__*/ diff --git a/src/Logger.h b/src/Logger.h index 52d4c50..e289aa6 100644 --- a/src/Logger.h +++ b/src/Logger.h @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #ifndef __Logger_h__ #define __Logger_h__ diff --git a/src/Makefile.macosx b/src/Makefile.macosx index 79de566..1462cd5 100644 --- a/src/Makefile.macosx +++ b/src/Makefile.macosx @@ -6,7 +6,7 @@ X11INCLUDEDIR = /usr/X11R6/include X11LIBDIR = /usr/X11R6/lib INCLUDE_DIRS = -I$(X11INCLUDEDIR) -DHAVE_CONFIG_H LIBRARY_DIRS = -L$(X11LIBDIR) -OBJECTS = screen.o bmp.o camera.o ctrls.o level.o mygl.o myglFont.o myglTexture.o player.o strmanip.o tga.o vector.o window.o keys.o main.o +OBJECTS = screen.o bmp.o camera.o ctrls.o level.o mygl.o myglFont.o myglTexture.o player.o strmanip.o tga.o vector.o window.o keys.o main.o x11.o EventManager.o LIBS = $(LIBRARY_DIRS) -lGL -lGLU -lXxf86vm -lX11 LIBRARIES = SO_LIBS = @@ -83,3 +83,9 @@ keys.o: keys.cpp keys.h config.h main.o: macosx.cpp main.h config.h $(CPP) -c $(INCLUDE_DIRS) -o main.o macosx.cpp + +x11.o: x11.cpp x11.h EventManager.h + $(CPP) -c $(INCLUDE_DIRS) -o x11.o x11.cpp + +EventManager.o: EventManager.cpp EventManager.h + $(CPP) -c $(INCLUDE_DIRS) -o EventManager.o EventManager.cpp diff --git a/src/Model.cpp b/src/Model.cpp index 9d0a589..ee38a84 100644 --- a/src/Model.cpp +++ b/src/Model.cpp @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #include "Model.h" namespace OpenArena diff --git a/src/Model.h b/src/Model.h index 831f5a1..000e3de 100644 --- a/src/Model.h +++ b/src/Model.h @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #ifndef MODEL_H_ #define MODEL_H_ diff --git a/src/NullVideoPlugin.cpp b/src/NullVideoPlugin.cpp index ed3f077..3772fea 100644 --- a/src/NullVideoPlugin.cpp +++ b/src/NullVideoPlugin.cpp @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #include "NullVideoPlugin.h" namespace OpenArena { diff --git a/src/NullVideoPlugin.h b/src/NullVideoPlugin.h index 2dcf571..165fc68 100644 --- a/src/NullVideoPlugin.h +++ b/src/NullVideoPlugin.h @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #ifndef __NullVideoPlugin_h__ #define __NullVideoPlugin_h__ diff --git a/src/Plugin.h b/src/Plugin.h index 8df6e0f..b410f5d 100644 --- a/src/Plugin.h +++ b/src/Plugin.h @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #ifndef __Plugin_h__ #define __Plugin_h__ diff --git a/src/PluginManager.cpp b/src/PluginManager.cpp index 77eb959..23f9df9 100644 --- a/src/PluginManager.cpp +++ b/src/PluginManager.cpp @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #include "PluginManager.h" #include "NullVideoPlugin.h" diff --git a/src/PluginManager.h b/src/PluginManager.h index f10c45a..e925422 100644 --- a/src/PluginManager.h +++ b/src/PluginManager.h @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #ifndef __PluginManager_h__ #define __PluginManager_h___ diff --git a/src/VideoPlugin.h b/src/VideoPlugin.h index 3a91caf..cdf50af 100644 --- a/src/VideoPlugin.h +++ b/src/VideoPlugin.h @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #ifndef __VideoPlugin_h__ #define __VideoPlugin_h__ diff --git a/src/WindowsLogger.cpp b/src/WindowsLogger.cpp index f3da627..fb3bf08 100644 --- a/src/WindowsLogger.cpp +++ b/src/WindowsLogger.cpp @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #ifdef WIN32 #include #include "WindowsLogger.h" diff --git a/src/WindowsLogger.h b/src/WindowsLogger.h index 38454d6..20dfc77 100644 --- a/src/WindowsLogger.h +++ b/src/WindowsLogger.h @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #ifndef __WindowsLogger_h__ #define __WindowsLogger_h__ diff --git a/src/bmp.cpp b/src/bmp.cpp index 691bfc2..e16c217 100644 --- a/src/bmp.cpp +++ b/src/bmp.cpp @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ //////////////////////////////////////////////////////////////////////////////// // // Module: bmp.cpp diff --git a/src/bmp.h b/src/bmp.h index fa6fe67..5f17327 100644 --- a/src/bmp.h +++ b/src/bmp.h @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #ifndef __bmp_h__ #define __bmp_h__ @@ -8,7 +27,7 @@ #include "texture.h" namespace OpenArena{ - /*! + /** * \brief * Loads a bitmap (*.bmp) file and returns a pointer to a TextureImage object. * diff --git a/src/camera.cpp b/src/camera.cpp index ed86737..d0b7fc9 100644 --- a/src/camera.cpp +++ b/src/camera.cpp @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ //////////////////////////////////////////////////////////////////////////////// // // Module: camera.cpp @@ -75,7 +94,6 @@ namespace OpenArena void Camera::SetViewByMouse(Window window) { - #if defined USE_GLX static double currentRotX = 0.0f; Vec2i pos; Vec2i middle; @@ -106,43 +124,6 @@ namespace OpenArena //RotateView((middle.x-pos.x)/1000.0, m_vUpVector.x, m_vUpVector.y, m_vUpVector.z); } } - #elif defined USE_AGL - #error unimplemented method - #elif defined USE_CGL - #error unimplemented method - #elif defined USE_WGL - static double currentRotX = 0.0f; - POINT mpos; - POINT middle; - double angleZ; - middle.x = window.GetWidth() / 2; - middle.y = window.GetHeight() / 2; - GetCursorPos(&mpos); - SetCursorPos(middle.x, middle.y); - if(mpos.x != middle.x || mpos.y != middle.y) - { - angleZ = double(middle.y - mpos.y) / 1000.0f; - currentRotX -= angleZ; - - if(currentRotX > 1.0f) - currentRotX = 1.0f; - else if(currentRotX < -1.0f) - currentRotX = -1.0f; - else - { - Vec3f axis = (_heading).cross(_up); - axis.normalize(); - - RotateView(angleZ, axis.x, axis.y, axis.z); - - //need to switch these two when I figure out stuff for flight - //till then I think the first is faster - - RotateView(double(middle.x - mpos.x) / 1000.0f, 0, 1, 0); - //RotateView(double(middle.x - mpos.x) / 1000.0f, m_vUpVector.x, m_vUpVector.y, m_vUpVector.z); - } - } - #endif } void Camera::MoveCamera(double speed) diff --git a/src/camera.h b/src/camera.h index 8e433fd..7e41494 100644 --- a/src/camera.h +++ b/src/camera.h @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ /*! * * diff --git a/src/carbon.h b/src/carbon.h new file mode 100644 index 0000000..c57332d --- /dev/null +++ b/src/carbon.h @@ -0,0 +1,4 @@ +#ifndef __carbon_h__ +#define __carbon_h__ + +#endif /*__carbon_h__*/ diff --git a/src/ctrls.cpp b/src/ctrls.cpp index 6352443..f00b956 100644 --- a/src/ctrls.cpp +++ b/src/ctrls.cpp @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ //////////////////////////////////////////////////////////////////////////////// // // Module: ctrls.cpp diff --git a/src/ctrls.h b/src/ctrls.h index 303a428..851942b 100644 --- a/src/ctrls.h +++ b/src/ctrls.h @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #ifndef __ctrls_h__ #define __ctrls_h__ diff --git a/src/datatypes.h b/src/datatypes.h index 4d48831..f186be8 100644 --- a/src/datatypes.h +++ b/src/datatypes.h @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #ifndef __datatypes_h__ #define __datatypes_h__ diff --git a/src/geometry.h b/src/geometry.h index e869321..b188f4b 100644 --- a/src/geometry.h +++ b/src/geometry.h @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #ifndef __geometry_h__ #define __geometry_h__ diff --git a/src/image.h b/src/image.h index e88d099..6a6c856 100644 --- a/src/image.h +++ b/src/image.h @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #ifndef __image_h__ #define __image_h__ diff --git a/src/keys.cpp b/src/keys.cpp index 1b8f094..33dcb01 100644 --- a/src/keys.cpp +++ b/src/keys.cpp @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #include "keys.h" char OpenArena::KeyToASCII(Keys key, bool shift) diff --git a/src/keys.h b/src/keys.h index 27d8396..ef63565 100644 --- a/src/keys.h +++ b/src/keys.h @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #ifndef __keys_h__ #define __keys_h__ diff --git a/src/level.cpp b/src/level.cpp index 416f3c2..65ac12c 100644 --- a/src/level.cpp +++ b/src/level.cpp @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ //////////////////////////////////////////////////////////////////////////////// // // Module: level.cpp diff --git a/src/level.h b/src/level.h index 630673f..9a5015f 100644 --- a/src/level.h +++ b/src/level.h @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #ifndef __LEVEL_H__ #define __LEVEL_H__ @@ -14,9 +33,9 @@ #if defined USE_GLX #include #elif defined USE_AGL -#error unimplemented method +#include #elif defined USE_CGL -#error unimplemented method +#include #elif defined USE_WGL #include #include diff --git a/src/linux.cpp b/src/linux.cpp index 135c43c..c779c83 100644 --- a/src/linux.cpp +++ b/src/linux.cpp @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ //////////////////////////////////////////////////////////////////////////////// // // Module: linux.cpp diff --git a/src/list.h b/src/list.h index fb09253..2417351 100644 --- a/src/list.h +++ b/src/list.h @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #ifndef __list_h__ #define __list_h__ diff --git a/src/macosx.cpp b/src/macosx.cpp index 6e52982..d60a984 100644 --- a/src/macosx.cpp +++ b/src/macosx.cpp @@ -891,4 +891,13 @@ void HandleConsoleKeyPress(OpenArena::Keys key) #error #endif +bool keys[256] = {0}; // Array for which keys are down now +bool keys2[256] = {0}; // Array for which keys are were down already +bool active = true; // Is window active flag +bool fullscreen = false; // Is window fullscreen flag +//bool showConsole = false;// Do we need to draw the console +OpenArena::Vec2i g_mousePosition; +float lastTime = 0.0f; // This will hold the time from the last frame +float currentTime; + #endif diff --git a/src/main.cpp b/src/main.cpp index 1a4b04a..a499da4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #if defined __APPLE__ #include #include diff --git a/src/main.h b/src/main.h index d3479e0..e64a0aa 100644 --- a/src/main.h +++ b/src/main.h @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #ifndef __main_h__ #define __main_h__ @@ -34,20 +53,19 @@ ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Variables -static bool keys[256]; // Array for which keys are down now -static bool keys2[256]; // Array for which keys are were down already -static bool active=true; // Is window active flag -static bool fullscreen=true; // Is window fullscreen flag -//static bool showConsole = false;// Do we need to draw the console -static OpenArena::Vec2i g_mousePosition; - +extern bool keys[256]; // Array for which keys are down now +extern bool keys2[256]; // Array for which keys are were down already +extern bool active; // Is window active flag +extern bool fullscreen; // Is window fullscreen flag +//extern bool showConsole = false;// Do we need to draw the console +extern OpenArena::Vec2i g_mousePosition; #ifdef WIN32 -static POINT mpos; +extern POINT mpos; #endif -static float lastTime = 0.0f; // This will hold the time from the last frame -static float currentTime; +extern float lastTime; // This will hold the time from the last frame +extern float currentTime; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Function Declarations diff --git a/src/mydefs.h b/src/mydefs.h index f85fbb9..d289aab 100644 --- a/src/mydefs.h +++ b/src/mydefs.h @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #ifndef __mydefs_h__ #define __mydefs_h__ diff --git a/src/mygl.cpp b/src/mygl.cpp index 146a319..921f8ae 100644 --- a/src/mygl.cpp +++ b/src/mygl.cpp @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #include "mygl.h" namespace OpenArena { diff --git a/src/mygl.h b/src/mygl.h index 29faa05..aee6ef5 100644 --- a/src/mygl.h +++ b/src/mygl.h @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #ifndef __MYGL_H__ #define __MYGL_H__ @@ -9,7 +28,10 @@ #include #include #elif defined USE_AGL -#error unimplemented method +#include +#include +#include +//#error unimplemented method #elif defined USE_CGL #error unimplemented method #elif defined USE_WGL diff --git a/src/myglFont.cpp b/src/myglFont.cpp index fd93510..2b80397 100644 --- a/src/myglFont.cpp +++ b/src/myglFont.cpp @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ //////////////////////////////////////////////////////////////////////////////// // // Module: myglFont.cpp diff --git a/src/myglFont.h b/src/myglFont.h index ec241e5..51e60fc 100644 --- a/src/myglFont.h +++ b/src/myglFont.h @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #ifndef __glPrint_h__ #define __glPrint_h__ diff --git a/src/myglTexture.cpp b/src/myglTexture.cpp index f9bc2cb..2ba1a2c 100644 --- a/src/myglTexture.cpp +++ b/src/myglTexture.cpp @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #include "myglTexture.h" using namespace OpenArena; diff --git a/src/myglTexture.h b/src/myglTexture.h index a4b8e1a..60369c8 100644 --- a/src/myglTexture.h +++ b/src/myglTexture.h @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #ifndef __myglTexture_h__ #define __myglTexture_h__ diff --git a/src/player.cpp b/src/player.cpp index 0385882..775569e 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #include "player.h" namespace OpenArena diff --git a/src/player.h b/src/player.h index 8f23c46..4617ccf 100644 --- a/src/player.h +++ b/src/player.h @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #ifndef __PLAYER_H__ #define __PLAYER_H__ diff --git a/src/screen.cpp b/src/screen.cpp index 88854b2..69c9f64 100644 --- a/src/screen.cpp +++ b/src/screen.cpp @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #include "screen.h" namespace OpenArena diff --git a/src/screen.h b/src/screen.h index 0e690b5..65705eb 100644 --- a/src/screen.h +++ b/src/screen.h @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #ifndef __screen_h__ #define __screen_h__ #include diff --git a/src/strmanip.cpp b/src/strmanip.cpp index 19364af..b96d87f 100644 --- a/src/strmanip.cpp +++ b/src/strmanip.cpp @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #include #include "strmanip.h" diff --git a/src/strmanip.h b/src/strmanip.h index e3ee2e8..6b9df74 100644 --- a/src/strmanip.h +++ b/src/strmanip.h @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #ifndef __strmanip_h__ #define __strmanip_h__ @@ -100,75 +119,72 @@ float Floating(string str); * Separate items with the '|' character. */ uint8 KeyName(string str); -/*! - * \brief + +/** + * @brief * Write brief comment for KeyString here. * - * \param - * Description of parameter . + * @param keyCode - Description of parameter . * - * \returns + * @returns * Write description of return value here. * - * \throws - * Description of criteria for throwing this exception. - * * Write detailed description for KeyString here. * - * \remarks + * @remarks * Write remarks for KeyString here. * - * \see + * @see * Separate items with the '|' character. */ -string KeyString(uint8); +string KeyString(uint8 keyCode); /*! - * \brief + * @brief * Write brief comment for Right here. * - * \param + * @param * Description of parameter . * - * \param + * @param * Description of parameter . * - * \returns + * @returns * Write description of return value here. * - * \throws + * @throws * Description of criteria for throwing this exception. * * Write detailed description for Right here. * - * \remarks + * @remarks * Write remarks for Right here. * - * \see + * @see * Separate items with the '|' character. */ string Right(string, uint32); /*! - * \brief + * @brief * Write brief comment for Left here. * - * \param + * @param * Description of parameter . * - * \param + * @param * Description of parameter . * - * \returns + * @returns * Write description of return value here. * - * \throws + * @throws * Description of criteria for throwing this exception. * * Write detailed description for Left here. * - * \remarks + * @remarks * Write remarks for Left here. * - * \see + * @see * Separate items with the '|' character. */ string Left(string, uint32); diff --git a/src/texture.h b/src/texture.h index 7ce9c03..e098c5c 100644 --- a/src/texture.h +++ b/src/texture.h @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #ifndef __texture_h__ #define __texture_h__ diff --git a/src/tga.cpp b/src/tga.cpp index b99682d..b91b8dd 100644 --- a/src/tga.cpp +++ b/src/tga.cpp @@ -1,4 +1,22 @@ - +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #include "tga.h" #include "datatypes.h" #ifdef WIN32 diff --git a/src/tga.h b/src/tga.h index 93d10a6..0b4db51 100644 --- a/src/tga.h +++ b/src/tga.h @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #ifndef __TGA_H__ #define __TGA_H__ diff --git a/src/vector.cpp b/src/vector.cpp index 4081a8b..076f720 100644 --- a/src/vector.cpp +++ b/src/vector.cpp @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #include "vector.h" namespace OpenArena{ diff --git a/src/vector.h b/src/vector.h index f70a7b9..27c3854 100644 --- a/src/vector.h +++ b/src/vector.h @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #ifndef __vector_h__ #define __vector_h__ diff --git a/src/version.h b/src/version.h index 3aca94b..95957a9 100644 --- a/src/version.h +++ b/src/version.h @@ -1,2 +1,21 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ //#define OPENARENA_VERSION "OpenArena: v0.1.2" #define OPENARENA_VERSION "OpenArena: CVS" diff --git a/src/window.cpp b/src/window.cpp index ffeeb19..52c7a58 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #include "window.h" void OpenArena::Window::SwapBuffers() @@ -405,7 +424,9 @@ OpenArena::Vec2i OpenArena::Window::GetMousePosition() return Vec2i(mouseX, mouseY); } #elif USE_AGL + #error unimplemented method #elif USE_CGL + #error unimplemented method #elif USE_WGL POINT pos; GetCursorPos(&pos); @@ -418,7 +439,9 @@ void OpenArena::Window::SetMousePosition(Vec2i pos) #if defined USE_GLX XWarpPointer(display, None, window, 0, 0, 0, 0, pos.x, pos.y); #elif defined USE_AGL + #error unimplemented method #elif defined USE_CGL + #error unimplemented method #elif defined USE_WGL SetCursorPos(pos.x, pos.y); #endif diff --git a/src/window.h b/src/window.h index 3c1715d..3cb2767 100644 --- a/src/window.h +++ b/src/window.h @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #ifndef __window_h__ #define __window_h__ diff --git a/src/windows.cpp b/src/windows.cpp index f56d25d..b9e68e8 100644 --- a/src/windows.cpp +++ b/src/windows.cpp @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ //////////////////////////////////////////////////////////////////////////////// // // Module: windows.cpp diff --git a/src/worlddefs.h b/src/worlddefs.h index 803c728..ceb4e6b 100644 --- a/src/worlddefs.h +++ b/src/worlddefs.h @@ -1,3 +1,22 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ #ifndef __WorldDefs_h__ #define __WorldDefs_h__ diff --git a/src/x11.cpp b/src/x11.cpp new file mode 100644 index 0000000..a8c492a --- /dev/null +++ b/src/x11.cpp @@ -0,0 +1,118 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +//////////////////////////////////////////////////////////////////////////////// +// +// Module: x11.cpp +// Author: Tom Hicks +// Creation: 10-08-2006 +// LastEdit: 10-08-2006 +// Editors: Tom Hicks +// +// Purpose: +// To implement the OpenArena SDK. +// +// Summary of Methods: +// Global +// -InitControls() +// Loads the defaultPlayer's configuration. +// -InitGL() +// Initializes OpenGL and is responsible for loading textures. +// -ResizeGLScene(GLsizei width, GLsizei height) +// Resizes the viewport to the current size of the visible area of the window specified by width and height. +// -KillGLWindow() +// Closes the window. +// -CreateGLWindow(string title, int width, int height, int bits, bool fullscreenflag) +// Creates the window with the specified parameters. +// -WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) +// Main procedure. +// -WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +// Window Procedure for the OpenGL window. +// +//////////////////////////////////////////////////////////////////////////////// +#include "x11.h" +#include "main.h" +#include "version.h" + +int DrawGLScene(); +unsigned char TranslateButton(int keyCode); +unsigned char TranslateKey(int keyCode); +void ResizeGLScene(GLsizei width, GLsizei height); +void HandleConsoleKeyPress(OpenArena::Keys key); + +bool RT() +{ + XEvent event; + bool done = false; + + while(XPending(g_Screen.GetDisplay()) > 0) + { + //Equivalent of WNDPROC + XNextEvent(g_Screen.GetDisplay(), &event); + switch(event.type) + { + case Expose: + if(event.xexpose.count != 0) + { + break; + } + DrawGLScene(); + break; + case ConfigureNotify: + if((event.xconfigure.width != g_Screen.GetWidth()) || (event.xconfigure.height != g_Screen.GetHeight())) + { + g_Screen.SetWidth(event.xconfigure.width); + g_Screen.SetHeight(event.xconfigure.height); + ResizeGLScene(event.xconfigure.width, event.xconfigure.height); + } + break; + case ButtonPress: + keys[TranslateButton(event.xbutton.button)] = true; + break; + case ButtonRelease: + keys[TranslateButton(event.xbutton.button)] = false; + keys2[TranslateButton(event.xbutton.button)] = false; + break; + case KeyPress: + if(level.showConsole) + { + HandleConsoleKeyPress((OpenArena::Keys)TranslateKey(XLookupKeysym(&event.xkey, 0))); + } + else + { + keys[TranslateKey(XLookupKeysym(&event.xkey, 0))] = true; + } + break; + case KeyRelease: + keys[TranslateKey(XLookupKeysym(&event.xkey, 0))] = false; + keys2[TranslateKey(XLookupKeysym(&event.xkey, 0))] = false; + break; + case ClientMessage: + if(*XGetAtomName(g_Screen.GetDisplay(), event.xclient.message_type) == *"WM_PROTOCOLS") + { + printf("Exiting sanely...\n"); + done = true; + } + break; + default: + break; + } + } //End Equivalent of WNDPROC + return done; +} diff --git a/src/x11.h b/src/x11.h new file mode 100644 index 0000000..077f118 --- /dev/null +++ b/src/x11.h @@ -0,0 +1,36 @@ +/*************************************************************************** + * Copyright (C) 2006 by Tom Hicks * + * tomhicks@cse.buffalo.edu * + * * + * This program 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. * + * * + * 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. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef __x11_h__ +#define __x11_h__ + +/** + * @file x11.h + * @breif Specification of an X11 Event loop + * This file along with x11.cpp implement an X11 Event loop to + * process and dispatch events to the specified EventManager. + * + * @see x11.cpp + */ + +#include "EventManager.h" + +bool RT(); + +#endif /*__x11_h__*/