diff --git a/.circleci/config.yml b/.circleci/config.yml index a9e773ea5..677522684 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -43,7 +43,7 @@ jobs: - v1-SRB2-APT - run: name: Install SDK - command: apt-get -qq -y --no-install-recommends install git build-essential nasm libpng-dev:i386 libsdl2-mixer-dev:i386 libgme-dev:i386 libcurl4-openssl-dev:i386 libopenmpt-dev:i386 gettext ccache wget gcc-multilib upx openssh-client + command: apt-get -qq -y --no-install-recommends install git build-essential libpng-dev:i386 libsdl2-mixer-dev:i386 libgme-dev:i386 libcurl4-openssl-dev:i386 libopenmpt-dev:i386 gettext ccache wget gcc-multilib upx openssh-client - save_cache: key: v1-SRB2-APT paths: diff --git a/Doxyfile b/Doxyfile deleted file mode 100644 index eb8c6ae9e..000000000 --- a/Doxyfile +++ /dev/null @@ -1,269 +0,0 @@ -# Doxyfile 1.4.3 - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- -PROJECT_NAME = SRB2 -PROJECT_NUMBER = 1.09 -OUTPUT_DIRECTORY = ./doc/SRB2 -CREATE_SUBDIRS = YES -OUTPUT_LANGUAGE = English -USE_WINDOWS_ENCODING = YES -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 = -STRIP_FROM_INC_PATH = -SHORT_NAMES = NO -JAVADOC_AUTOBRIEF = NO -MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = NO -INHERIT_DOCS = YES -DISTRIBUTE_GROUP_DOC = NO -SEPARATE_MEMBER_PAGES = NO -TAB_SIZE = 8 -ALIASES = -OPTIMIZE_OUTPUT_FOR_C = YES -OPTIMIZE_OUTPUT_JAVA = 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 = YES -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 = ./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 -RECURSIVE = YES -EXCLUDE = ./src/sdl/IMG_xpm.c \ - ./src/sdl/SRB2DC/scramble.c -EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = */src/hardware/*/* \ - */src/sdl/SDL_main/* \ - */src/*/*_private.h \ - */src/sdl/*/*help.? \ - */src/md5.? \ - */src/sdl/filter/* -EXAMPLE_PATH = -EXAMPLE_PATTERNS = * -EXAMPLE_RECURSIVE = NO -IMAGE_PATH = -INPUT_FILTER = -FILTER_PATTERNS = -FILTER_SOURCE_FILES = YES -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- -SOURCE_BROWSER = NO -INLINE_SOURCES = NO -STRIP_CODE_COMMENTS = YES -REFERENCED_BY_RELATION = NO -REFERENCES_RELATION = NO -#USE_HTAGS = NO -VERBATIM_HEADERS = YES -#--------------------------------------------------------------------------- -# 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 = YES -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 = YES -#--------------------------------------------------------------------------- -# 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 = DOXYGEN \ - HWRENDER \ - DIRECTFULLSCREEN \ - HW3SOUND \ - LOGMESSAGES \ - WALLSPLATS \ - FLOORSPLATS -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 -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/README.md b/README.md index 7fe87ca71..982ba4056 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,6 @@ [SRB2Kart](https://srb2.org/mods/) is a kart racing mod based on the 3D Sonic the Hedgehog fangame [Sonic Robo Blast 2](https://srb2.org/), based on a modified version of [Doom Legacy](http://doomlegacy.sourceforge.net/). ## Dependencies -- NASM (x86 builds only) - SDL2 (Linux/OS X only) - SDL2-Mixer (Linux/OS X only) - libupnp (Linux/OS X only) diff --git a/SRB2.cbp b/SRB2.cbp deleted file mode 100644 index acdc61c7f..000000000 --- a/SRB2.cbp +++ /dev/null @@ -1,2159 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/SRB2_Debug.props b/SRB2_Debug.props deleted file mode 100644 index 74177c6ef..000000000 --- a/SRB2_Debug.props +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - true - - - - _DEBUG;%(PreprocessorDefinitions) - - - EditAndContinue - Disabled - _DEBUG;%(PreprocessorDefinitions) - true - MultiThreadedDebugDLL - true - All - false - EnableFastChecks - - - Debug - true - - - - \ No newline at end of file diff --git a/SRB2_Release.props b/SRB2_Release.props deleted file mode 100644 index 905dfdcf9..000000000 --- a/SRB2_Release.props +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - false - - - - true - true - NDEBUG;%(PreprocessorDefinitions) - Full - OnlyExplicitInline - true - Speed - true - - - NDEBUG;%(PreprocessorDefinitions) - - - false - DebugFastLink - true - true - true - - - - \ No newline at end of file diff --git a/SRB2_common.props b/SRB2_common.props deleted file mode 100644 index 0f80ceb17..000000000 --- a/SRB2_common.props +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - $(SolutionDir)bin\VC10\$(Platform)\$(Configuration)\ - $(SolutionDir)objs\VC10\$(Platform)\$(Configuration)\$(ProjectName)\ - - - - Level3 - HAVE_PNG;COMPVERSION;HAVE_BLUA;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;%(PreprocessorDefinitions) - CompileAsC - true - true - false - true - 4244;4267 - - - advapi32.lib;ws2_32.lib;%(AdditionalDependencies) - Windows - false - true - - - - - USEASM;%(PreprocessorDefinitions) - - - false - - - nasm -g -o $(IntDir)%(Filename).obj -f win32 "%(FullPath)" - Compiling %(Filename).nas with NASM... - $(IntDir)%(Filename).obj;%(Outputs) - - - - - false - - - - \ No newline at end of file diff --git a/Srb2.dev b/Srb2.dev deleted file mode 100644 index 21683e7c3..000000000 --- a/Srb2.dev +++ /dev/null @@ -1,3093 +0,0 @@ -[Project] -FileName=Srb2.dev -Name=Srb2 -Ver=3 -IsCpp=0 -Type=0 -UnitCount=279 -Folders=A_Asm,B_Bot,BLUA,D_Doom,F_Frame,G_Game,H_Hud,Hw_Hardware,Hw_Hardware/r_opengl,I_Interface,I_Interface/Dummy,I_Interface/SDL,I_Interface/Win32,LUA,M_Misc,P_Play,R_Rend,S_Sounds,W_Wad -CommandLine= -CompilerSettings=00000000000100000111e1 -PchHead=-1 -PchSource=-1 -ProfilesCount=10 -ProfileIndex=2 - -[Unit1] -FileName=src\hardware\hw3dsdrv.h -Folder=Hw_Hardware -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit2] -FileName=src\hardware\hw3sound.c -Folder=Hw_Hardware -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit3] -FileName=src\hardware\hw3sound.h -Folder=Hw_Hardware -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit4] -FileName=src\hardware\hw_bsp.c -Folder=Hw_Hardware -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit5] -FileName=src\hardware\hw_cache.c -Folder=Hw_Hardware -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit6] -FileName=src\hardware\hw_data.h -Folder=Hw_Hardware -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit7] -FileName=src\hardware\hw_defs.h -Folder=Hw_Hardware -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit8] -FileName=src\hardware\hw_draw.c -Folder=Hw_Hardware -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit9] -FileName=src\hardware\hw_drv.h -Folder=Hw_Hardware -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit10] -FileName=src\hardware\hw_glide.h -Folder=Hw_Hardware -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit11] -FileName=src\hardware\hw_glob.h -Folder=Hw_Hardware -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit12] -FileName=src\hardware\hw_light.c -Folder=Hw_Hardware -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit13] -FileName=src\hardware\hw_light.h -Folder=Hw_Hardware -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit14] -FileName=src\hardware\hw_main.c -Folder=Hw_Hardware -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit15] -FileName=src\hardware\hw_main.h -Folder=Hw_Hardware -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit16] -FileName=src\hardware\hw_md2.c -Folder=Hw_Hardware -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit17] -FileName=src\hardware\hw_md2.h -Folder=Hw_Hardware -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit18] -FileName=src\hardware\hw_trick.c -Folder=Hw_Hardware -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit19] -FileName=src\d_clisrv.c -Folder=D_Doom -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit20] -FileName=src\d_clisrv.h -Folder=D_Doom -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit21] -FileName=src\d_event.h -Folder=D_Doom -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit23] -FileName=src\d_main.h -Folder=D_Doom -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit24] -FileName=src\d_net.c -Folder=D_Doom -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit25] -FileName=src\d_net.h -Folder=D_Doom -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit26] -FileName=src\d_netcmd.c -Folder=D_Doom -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit27] -FileName=src\d_netcmd.h -Folder=D_Doom -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit28] -FileName=src\d_netfil.c -Folder=D_Doom -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit29] -FileName=src\d_netfil.h -Folder=D_Doom -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit30] -FileName=src\d_player.h -Folder=D_Doom -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit31] -FileName=src\d_think.h -Folder=D_Doom -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit32] -FileName=src\d_ticcmd.h -Folder=D_Doom -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit33] -FileName=src\m_argv.c -Folder=M_Misc -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit34] -FileName=src\m_argv.h -Folder=M_Misc -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit35] -FileName=src\m_bbox.c -Folder=M_Misc -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit36] -FileName=src\m_bbox.h -Folder=M_Misc -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit37] -FileName=src\m_cheat.c -Folder=M_Misc -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit38] -FileName=src\m_cheat.h -Folder=M_Misc -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit39] -FileName=src\m_fixed.c -Folder=M_Misc -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit40] -FileName=src\m_fixed.h -Folder=M_Misc -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit41] -FileName=src\m_menu.c -Folder=M_Misc -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit42] -FileName=src\m_menu.h -Folder=M_Misc -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit44] -FileName=src\m_misc.h -Folder=M_Misc -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit45] -FileName=src\m_random.c -Folder=M_Misc -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit46] -FileName=src\m_random.h -Folder=M_Misc -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit47] -FileName=src\m_swap.h -Folder=M_Misc -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit48] -FileName=src\p_ceilng.c -Folder=P_Play -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit49] -FileName=src\p_enemy.c -Folder=P_Play -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit50] -FileName=src\p_fab.c -Folder=P_Play -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit51] -FileName=src\p_floor.c -Folder=P_Play -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit52] -FileName=src\p_inter.c -Folder=P_Play -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit53] -FileName=src\p_lights.c -Folder=P_Play -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit54] -FileName=src\p_local.h -Folder=P_Play -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit55] -FileName=src\p_map.c -Folder=P_Play -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit56] -FileName=src\p_maputl.c -Folder=P_Play -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit57] -FileName=src\p_maputl.h -Folder=P_Play -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit58] -FileName=src\p_mobj.c -Folder=P_Play -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit59] -FileName=src\p_mobj.h -Folder=P_Play -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit60] -FileName=src\p_pspr.h -Folder=P_Play -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit61] -FileName=src\p_saveg.c -Folder=P_Play -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit62] -FileName=src\p_saveg.h -Folder=P_Play -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit63] -FileName=src\p_setup.c -Folder=P_Play -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit64] -FileName=src\p_setup.h -Folder=P_Play -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit65] -FileName=src\p_sight.c -Folder=P_Play -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit66] -FileName=src\p_spec.c -Folder=P_Play -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit67] -FileName=src\p_spec.h -Folder=P_Play -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit68] -FileName=src\p_telept.c -Folder=P_Play -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit69] -FileName=src\p_tick.c -Folder=P_Play -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit70] -FileName=src\p_tick.h -Folder=P_Play -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit71] -FileName=src\p_user.c -Folder=P_Play -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit72] -FileName=src\r_bsp.c -Folder=R_Rend -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit73] -FileName=src\r_bsp.h -Folder=R_Rend -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit74] -FileName=src\r_data.c -Folder=R_Rend -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit75] -FileName=src\r_data.h -Folder=R_Rend -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit76] -FileName=src\r_defs.h -Folder=R_Rend -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit77] -FileName=src\r_draw.c -Folder=R_Rend -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit78] -FileName=src\r_draw.h -Folder=R_Rend -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit79] -FileName=src\r_draw16.c -Folder=R_Rend -Compile=0 -CompileCpp=0 -Link=0 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit80] -FileName=src\r_draw8.c -Folder=R_Rend -Compile=0 -CompileCpp=0 -Link=0 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit81] -FileName=src\r_local.h -Folder=R_Rend -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit82] -FileName=src\r_main.c -Folder=R_Rend -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit83] -FileName=src\r_main.h -Folder=R_Rend -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit84] -FileName=src\r_plane.c -Folder=R_Rend -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit85] -FileName=src\r_plane.h -Folder=R_Rend -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit86] -FileName=src\r_segs.c -Folder=R_Rend -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit87] -FileName=src\r_segs.h -Folder=R_Rend -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit88] -FileName=src\r_sky.c -Folder=R_Rend -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit89] -FileName=src\r_sky.h -Folder=R_Rend -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit90] -FileName=src\r_splats.c -Folder=R_Rend -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit91] -FileName=src\r_splats.h -Folder=R_Rend -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit92] -FileName=src\r_state.h -Folder=R_Rend -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit93] -FileName=src\r_things.c -Folder=R_Rend -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit94] -FileName=src\r_things.h -Folder=R_Rend -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit95] -FileName=src\am_map.c -Folder=H_Hud -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit96] -FileName=src\am_map.h -Folder=H_Hud -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit97] -FileName=src\byteptr.h -Folder=I_Interface -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit98] -FileName=src\command.c -Folder=H_Hud -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit99] -FileName=src\command.h -Folder=H_Hud -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit100] -FileName=src\console.c -Folder=H_Hud -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit101] -FileName=src\console.h -Folder=H_Hud -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit102] -FileName=src\dehacked.c -Folder=D_Doom -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit103] -FileName=src\dehacked.h -Folder=D_Doom -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit104] -FileName=src\Doomdata.h -Folder=D_Doom -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit105] -FileName=src\Doomdef.h -Folder=D_Doom -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit106] -FileName=src\Doomstat.h -Folder=D_Doom -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit107] -FileName=src\Doomtype.h -Folder=D_Doom -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit108] -FileName=src\F_finale.c -Folder=F_Frame -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit109] -FileName=src\F_finale.h -Folder=F_Frame -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit110] -FileName=src\F_wipe.c -Folder=F_Frame -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit111] -FileName=src\filesrch.h -Folder=I_Interface -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit112] -FileName=src\g_game.c -Folder=G_Game -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit113] -FileName=src\g_game.h -Folder=G_Game -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit114] -FileName=src\g_input.c -Folder=G_Game -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit115] -FileName=src\g_input.h -Folder=G_Game -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit116] -FileName=src\g_state.h -Folder=G_Game -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit117] -FileName=src\hu_stuff.c -Folder=H_Hud -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit118] -FileName=src\hu_stuff.h -Folder=H_Hud -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit119] -FileName=src\i_joy.h -Folder=I_Interface -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit120] -FileName=src\i_net.h -Folder=I_Interface -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit121] -FileName=src\i_sound.h -Folder=I_Interface -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit122] -FileName=src\i_system.h -Folder=I_Interface -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit123] -FileName=src\i_tcp.c -Folder=I_Interface -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit124] -FileName=src\i_tcp.h -Folder=I_Interface -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit125] -FileName=src\i_video.h -Folder=I_Interface -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit126] -FileName=src\info.c -Folder=P_Play -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit127] -FileName=src\info.h -Folder=P_Play -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit128] -FileName=src\keys.h -Folder=I_Interface -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit129] -FileName=src\md5.c -Folder=W_Wad -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit130] -FileName=src\md5.h -Folder=W_Wad -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit131] -FileName=src\mserv.c -Folder=I_Interface -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit132] -FileName=src\mserv.h -Folder=I_Interface -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit133] -FileName=src\s_sound.c -Folder=S_Sounds -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit134] -FileName=src\s_sound.h -Folder=S_Sounds -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit135] -FileName=src\screen.c -Folder=R_Rend -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit136] -FileName=src\screen.h -Folder=R_Rend -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit137] -FileName=src\sounds.c -Folder=S_Sounds -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit138] -FileName=src\sounds.h -Folder=S_Sounds -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit139] -FileName=src\st_stuff.c -Folder=H_Hud -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit140] -FileName=src\st_stuff.h -Folder=H_Hud -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit141] -FileName=src\tables.c -Folder=P_Play -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit142] -FileName=src\tables.h -Folder=P_Play -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit143] -FileName=src\v_video.c -Folder=R_Rend -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit144] -FileName=src\v_video.h -Folder=R_Rend -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit145] -FileName=src\w_wad.c -Folder=W_Wad -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit146] -FileName=src\w_wad.h -Folder=W_Wad -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit147] -FileName=src\Z_zone.c -Folder=D_Doom -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit148] -FileName=src\Z_zone.h -Folder=D_Doom -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit149] -FileName=src\tmap.nas -Folder=A_Asm -Compile=0 -CompileCpp=0 -Link=0 -Priority=1000 -OverrideBuildCmd=1 -BuildCmd=nasm.exe -g -o $@ -f win32 src/tmap.nas - -[Unit150] -FileName=src\asm_defs.inc -Folder=A_Asm -Compile=0 -CompileCpp=0 -Link=0 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit151] -FileName=src\vid_copy.s -Folder=A_Asm -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=1 -BuildCmd=$(CC) $(CFLAGS) -x assembler-with-cpp -c src/vid_copy.s -o $@ - -[Unit152] -FileName=src\y_inter.h -Folder=H_Hud -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit153] -FileName=src\y_inter.c -Folder=H_Hud -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit154] -FileName=src\hardware\hw_dll.h -Folder=Hw_Hardware -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit155] -FileName=src\hardware\hws_data.h -Folder=Hw_Hardware -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit156] -FileName=src\p5prof.h -Folder=A_Asm -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit157] -FileName=src\tmap_mmx.nas -Folder=A_Asm -Compile=0 -CompileCpp=0 -Link=0 -Priority=1000 -OverrideBuildCmd=1 -BuildCmd=nasm.exe -g -o $@ -f win32 src/tmap_mmx.nas - -[Unit159] -FileName=src\lzf.h -Folder=W_Wad -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit160] -FileName=src\lzf.c -Folder=W_Wad -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit161] -FileName=src\p_polyobj.h -Folder=P_Play -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit162] -FileName=src\p_polyobj.c -Folder=P_Play -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit163] -FileName=src\m_queue.h -Folder=M_Misc -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit164] -FileName=src\m_dllist.h -Folder=M_Misc -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit165] -FileName=src\m_queue.c -Folder=M_Misc -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit166] -FileName=src\dummy\i_cdmus.c -Folder=I_Interface/Dummy -Compile=0 -CompileCpp=0 -Link=0 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit167] -FileName=src\dummy\i_main.c -Folder=I_Interface/Dummy -Compile=0 -CompileCpp=0 -Link=0 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit168] -FileName=src\dummy\i_net.c -Folder=I_Interface/Dummy -Compile=0 -CompileCpp=0 -Link=0 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit169] -FileName=src\dummy\i_sound.c -Folder=I_Interface/Dummy -Compile=0 -CompileCpp=0 -Link=0 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit170] -FileName=src\dummy\i_system.c -Folder=I_Interface/Dummy -Compile=0 -CompileCpp=0 -Link=0 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit171] -FileName=src\dummy\i_video.c -Folder=I_Interface/Dummy -Compile=0 -CompileCpp=0 -Link=0 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit172] -FileName=src\filesrch.c -Folder=I_Interface -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit173] -FileName=src\win32\afxres.h -Folder=I_Interface/Win32 -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit174] -FileName=src\win32\dx_error.c -Folder=I_Interface/Win32 -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit175] -FileName=src\win32\dx_error.h -Folder=I_Interface/Win32 -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit176] -FileName=src\win32\fabdxlib.c -Folder=I_Interface/Win32 -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit177] -FileName=src\win32\fabdxlib.h -Folder=I_Interface/Win32 -Compile=1 -CompileCpp=0 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[VersionInfo] -Major=1 -Minor=1 -Release=1 -Build=1 -LanguageID=1033 -CharsetID=1252 -CompanyName= -FileVersion=0.1 -FileDescription=Developed using the Dev-C++ IDE -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename=wLegacy.exe -ProductName=wLegacy -ProductVersion=0.1 -AutoIncBuildNrOnRebuild=0 -AutoIncBuildNrOnCompile=0 - -[Unit181] -FileName=src\win32\resource.h -CompileCpp=0 -Folder=I_Interface/Win32 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit182] -FileName=src\win32\win_cd.c -CompileCpp=0 -Folder=I_Interface/Win32 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit22] -FileName=src\d_main.c -Folder=D_Doom -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= -CompileCpp=0 - -[Unit158] -FileName=src\string.c -CompileCpp=0 -Folder=M_Misc -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit183] -FileName=src\win32\win_dbg.c -CompileCpp=0 -Folder=I_Interface/Win32 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit184] -FileName=src\win32\win_dbg.h -CompileCpp=0 -Folder=I_Interface/Win32 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit185] -FileName=src\win32\win_dll.c -CompileCpp=0 -Folder=I_Interface/Win32 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit186] -FileName=src\win32\win_dll.h -CompileCpp=0 -Folder=I_Interface/Win32 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit187] -FileName=src\win32\win_main.c -CompileCpp=0 -Folder=I_Interface/Win32 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit188] -FileName=src\win32\win_main.h -CompileCpp=0 -Folder=I_Interface/Win32 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit189] -FileName=src\win32\win_net.c -CompileCpp=0 -Folder=I_Interface/Win32 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit190] -FileName=src\win32\win_snd.c -CompileCpp=0 -Folder=I_Interface/Win32 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit191] -FileName=src\win32\win_sys.c -CompileCpp=0 -Folder=I_Interface/Win32 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit43] -FileName=src\m_misc.c -CompileCpp=0 -Folder=M_Misc -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Profile1] -ProfileName=Dummy Release -Type=1 -ObjFiles= -Includes= -Libs= -ResourceIncludes= -MakeIncludes=comptime.mk;cpdebug.mk -Compiler=-DNDEBUG_@@_-fno-exceptions_@@_-DSTDC_HEADERS_@@_-Wall_@@_-Os_@@_-g_@@_-DNONET_@@_-DNOROPENGL_@@_-D__USE_MINGW_ANSI_STDIO=0_@@_-DHAVE_BLUA_@@_ -CppCompiler=-Os_@@_-g_@@_ -Linker= -PreprocDefines=NORMALSRB2_@@_ -CompilerSettings=0000000000100000011000 -Icon= -ExeOutput=bin\Dummy\Release -ObjectOutput=objs\Dummy\Release -OverrideOutput=1 -OverrideOutputName=srb2dummy.exe -HostApplication= -CommandLine= -UseCustomMakefile=0 -CustomMakefile= -IncludeVersionInfo=0 -SupportXPThemes=0 -CompilerSet=0 -CompilerType=0 - -[Profile2] -ProfileName=Dummy Debug -Type=1 -ObjFiles= -Includes= -Libs= -ResourceIncludes= -MakeIncludes=comptime.mk;cpdebug.mk -Compiler=-D_DEBUG_@@_-fno-exceptions_@@_-DSTDC_HEADERS_@@_-Wall_@@_-O0_@@_-g_@@_-DNONET_@@_-DNOROPENGL_@@_-D__USE_MINGW_ANSI_STDIO=0_@@_-DHAVE_BLUA_@@_ -CppCompiler=-O0_@@_-g_@@_ -Linker= -PreprocDefines=NORMALSRB2_@@_ -CompilerSettings=0000000000000010011000 -Icon= -ExeOutput=bin\Dummy\Debug -ObjectOutput=objs\Dummy\Debug -OverrideOutput=1 -OverrideOutputName=srb2dummy.exe -HostApplication= -CommandLine= -UseCustomMakefile=0 -CustomMakefile= -IncludeVersionInfo=0 -SupportXPThemes=0 -CompilerSet=0 -CompilerType=0 - -[Unit192] -FileName=src\win32\win_vid.c -CompileCpp=0 -Folder=I_Interface/Win32 -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit193] -FileName=src\win32\Srb2win.rc -CompileCpp=0 -Folder=I_Interface/Win32 -Compile=1 -Link=0 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit194] -FileName=src\sdl\dosstr.c -CompileCpp=0 -Folder=I_Interface/SDL -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit195] -FileName=src\sdl\endtxt.c -CompileCpp=0 -Folder=I_Interface/SDL -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit196] -FileName=src\sdl\endtxt.h -Folder=I_Interface/SDL -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= -CompileCpp=0 - -[Profile3] -ProfileName=Win32/DirectX Release -Type=0 -ObjFiles= -Includes=libs/libpng-src;libs/zlib;libs/gme/include;libs/fmodex/inc;libs -Libs=libs/libpng-src/projects;libs/zlib/win32;libs/miniupnpc/mingw32;libs/gme/win32;libs/gme/win32;libs/fmodex/lib -ResourceIncludes=src/win32 -MakeIncludes=comptime.mk;cpdebug.mk -Compiler=-DNDEBUG_@@_-fno-exceptions_@@_-DSTDC_HEADERS_@@_-Wall_@@_-Os_@@_-g_@@_-gdwarf-2_@@_-D_WINDOWS_@@_-DHAVE_PNG_@@_-DNOROPENGL_@@_-D__USE_MINGW_ANSI_STDIO=0_@@_-DHAVE_MINIUPNPC_@@_-DSTATIC_MINIUPNPC_@@_-DHAVE_BLUA_@@_-DHAVE_LIBGME_@@_ -CppCompiler=-Os_@@_-g_@@_-gdwarf-2_@@_ -Linker=-lgdi32_@@_-ldinput_@@_-ldxguid_@@_-lwinmm_@@_-lpng32_@@_-lz32_@@_-lminiupnpc_@@_-lws2_32_@@_-liphlpapi_@@_-mwindows_@@_-lgme.dll_@@_-lfmodex_@@_ -PreprocDefines=NORMALSRB2_@@_ -CompilerSettings=00000000001000000110e1 -Icon= -ExeOutput=bin\Mingw\Release -ObjectOutput=objs\Mingw\Release -OverrideOutput=1 -OverrideOutputName=srb2win.exe -HostApplication= -CommandLine= -UseCustomMakefile=0 -CustomMakefile= -IncludeVersionInfo=0 -SupportXPThemes=0 -CompilerSet=0 -CompilerType=0 - -[Profile4] -ProfileName=Win32/DirectX Debug -Type=0 -ObjFiles= -Includes=libs/libpng-src;libs/zlib;libs/gme/include;libs/fmodex/inc;libs -Libs=libs/libpng-src/projects;libs/zlib/win32;libs/miniupnpc/mingw32;libs/gme/win32;libs/fmodex/lib -ResourceIncludes=src/win32 -MakeIncludes=comptime.mk;cpdebug.mk -Compiler=-D_DEBUG_@@_-fno-exceptions_@@_-DSTDC_HEADERS_@@_-Wall_@@_-O0_@@_-g_@@_-gdwarf-2_@@_-D_WINDOWS_@@_-DHAVE_PNG_@@_-DNOROPENGL_@@_-D__USE_MINGW_ANSI_STDIO=0_@@_-DHAVE_MINIUPNPC_@@_-DSTATIC_MINIUPNPC_@@_-DHAVE_BLUA_@@_-DHAVE_LIBGME_@@_ -CppCompiler=-O0_@@_-g_@@_-gdwarf-2_@@_ -Linker=-lgdi32_@@_-ldinput_@@_-ldxguid_@@_-lwinmm_@@_-lpng32_@@_-lz32_@@_-lminiupnpc_@@_-lws2_32_@@_-liphlpapi_@@_-mconsole_@@_-lgme.dll_@@_-lfmodex_@@_ -PreprocDefines=NORMALSRB2_@@_ -CompilerSettings=00000000000000100110e1 -Icon= -ExeOutput=bin\Mingw\Debug -ObjectOutput=objs\Mingw\Debug -OverrideOutput=1 -OverrideOutputName=srb2win.exe -HostApplication= -CommandLine= -UseCustomMakefile=0 -CustomMakefile= -IncludeVersionInfo=0 -SupportXPThemes=0 -CompilerSet=0 -CompilerType=0 - -[Unit197] -FileName=src\sdl\hwsym_sdl.c -CompileCpp=0 -Folder=I_Interface/SDL -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit198] -FileName=src\sdl\hwsym_sdl.h -CompileCpp=0 -Folder=I_Interface/SDL -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit199] -FileName=src\sdl\i_cdmus.c -CompileCpp=0 -Folder=I_Interface/SDL -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit200] -FileName=src\sdl\i_main.c -CompileCpp=0 -Folder=I_Interface/SDL -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit201] -FileName=src\sdl\i_net.c -CompileCpp=0 -Folder=I_Interface/SDL -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit202] -FileName=src\sdl\sdl_sound.c -CompileCpp=0 -Folder=I_Interface/SDL -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit203] -FileName=src\sdl\i_system.c -CompileCpp=0 -Folder=I_Interface/SDL -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit204] -FileName=src\sdl\i_video.c -CompileCpp=0 -Folder=I_Interface/SDL -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit205] -FileName=src\sdl\IMG_xpm.c -CompileCpp=0 -Folder=I_Interface/SDL -Compile=0 -Link=0 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit206] -FileName=src\sdl\ogl_sdl.c -CompileCpp=0 -Folder=I_Interface/SDL -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit207] -FileName=src\sdl\ogl_sdl.h -CompileCpp=0 -Folder=I_Interface/SDL -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit208] -FileName=src\sdl\sdlmain.h -CompileCpp=0 -Folder=I_Interface/SDL -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit209] -FileName=src\hardware\r_opengl\ogl_win.c -CompileCpp=0 -Folder=Hw_Hardware/r_opengl -Compile=0 -Link=0 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit210] -FileName=src\hardware\r_opengl\r_opengl.c -CompileCpp=0 -Folder=Hw_Hardware/r_opengl -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit211] -FileName=src\hardware\r_opengl\r_opengl.h -CompileCpp=0 -Folder=Hw_Hardware/r_opengl -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Profile5] -ProfileName=Win32/SDL Release -Type=0 -ObjFiles= -Includes=libs/libpng-src;libs/zlib;libs -Libs=libs/libpng-src/projects;libs/zlib/win32;libs/miniupnpc/mingw32 -ResourceIncludes=src/win32 -MakeIncludes=comptime.mk;cpdebug.mk -Compiler=-DNDEBUG_@@_-fno-exceptions_@@_-DSTDC_HEADERS_@@_-Wall_@@_-Os_@@_-g_@@_-gdwarf-2_@@_-DUSE_WGL_SWAP_@@_-DDIRECTFULLSCREEN_@@_-DHAVE_SDL_@@_-DHWRENDER_@@_-DHW3SOUND_@@_-DHAVE_MIXER_@@_-DHAVE_PNG_@@_-D__USE_MINGW_ANSI_STDIO=0_@@_-DHAVE_MINIUPNPC_@@_-DSTATIC_MINIUPNPC_@@_-DHAVE_BLUA_@@_ -CppCompiler=-Os_@@_-g_@@_-gdwarf-2_@@_ -Linker=-lSDL_@@_-lSDL_Mixer_@@_-lpng32_@@_-lz32_@@_-lminiupnpc_@@_-lws2_32_@@_-liphlpapi_@@_-mconsole_@@_ -PreprocDefines=NORMALSRB2_@@_ -CompilerSettings=00000000001000000110e1 -Icon= -ExeOutput=bin\Mingw\SDL\Release -ObjectOutput=objs\Mingw\SDL\Release -OverrideOutput=1 -OverrideOutputName=srb2sdl.exe -HostApplication= -CommandLine= -UseCustomMakefile=0 -CustomMakefile= -IncludeVersionInfo=0 -SupportXPThemes=0 -CompilerSet=0 -CompilerType=0 - -[Unit212] -FileName=src\lua_baselib.c -CompileCpp=0 -Folder=LUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit213] -FileName=src\lua_hooklib.c -CompileCpp=0 -Folder=LUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit214] -FileName=src\lua_infolib.c -CompileCpp=0 -Folder=LUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit215] -FileName=src\lua_libs.h -CompileCpp=0 -Folder=LUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit216] -FileName=src\lua_hook.h -CompileCpp=0 -Folder=LUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Profile6] -ProfileName=Win32/SDL Debug -Type=0 -ObjFiles= -Includes=libs/libpng-src;libs/zlib;libs -Libs=libs/libpng-src/projects;libs/zlib/win32;libs/miniupnpc/mingw32 -ResourceIncludes=src/win32 -MakeIncludes=comptime.mk;cpdebug.mk -Compiler=-D_DEBUG_@@_-fno-exceptions_@@_-DSTDC_HEADERS_@@_-Wall_@@_-O0_@@_-g_@@_-gdwarf-2_@@_-DUSE_WGL_SWAP_@@_-DDIRECTFULLSCREEN_@@_-DHAVE_SDL_@@_-DHWRENDER_@@_-DHW3SOUND_@@_-DHAVE_MIXER_@@_-DHAVE_PNG_@@_-D__USE_MINGW_ANSI_STDIO=0_@@_-DHAVE_MINIUPNPC_@@_-DSTATIC_MINIUPNPC_@@_-DHAVE_BLUA_@@_ -CppCompiler=-O0_@@_-g_@@_-gdwarf-2_@@_ -Linker=-lSDL_@@_-lSDL_Mixer_@@_-lpng32_@@_-lz32_@@_-lminiupnpc_@@_-lws2_32_@@_-liphlpapi_@@_-mconsole_@@_ -PreprocDefines=NORMALSRB2_@@_ -CompilerSettings=00000000000000100110e1 -Icon= -ExeOutput=bin\Mingw\SDL\Debug -ObjectOutput=objs\Mingw\SDL\Debug -OverrideOutput=1 -OverrideOutputName=srb2sdl.exe -HostApplication= -CommandLine= -UseCustomMakefile=0 -CustomMakefile= -IncludeVersionInfo=0 -SupportXPThemes=0 -CompilerSet=0 -CompilerType=0 - -[Profile7] -ProfileName=Win64/DirectX Release -Type=0 -ObjFiles= -Includes=libs/libpng-src;libs/zlib;libs -Libs=libs/libpng-src/projects;libs/zlib/win32;libs/miniupnpc/mingw64 -ResourceIncludes=src/win32 -MakeIncludes=comptime.mk;cpdebug.mk -Compiler=-DNDEBUG_@@_-fno-exceptions_@@_-DSTDC_HEADERS_@@_-Wall_@@_-Os_@@_-g_@@_-D_WINDOWS_@@_-DHAVE_PNG_@@_-DNOROPENGL_@@_-D__USE_MINGW_ANSI_STDIO=0_@@_-DHAVE_MINIUPNPC_@@_-DSTATIC_MINIUPNPC_@@_-DHAVE_BLUA_@@_ -CppCompiler=-Os_@@_-g_@@_ -Linker=-lgdi32_@@_-ldinput_@@_-ldxguid_@@_-lwinmm_@@_-lpng64_@@_-lz64_@@_-lminiupnpc_@@_-lws2_32_@@_-liphlpapi_@@_-mwindows_@@_ -PreprocDefines=NORMALSRB2_@@_ -CompilerSettings=00000000001000000110tb -Icon= -ExeOutput=bin\Mingw64\Release -ObjectOutput=objs\Mingw64\Release -OverrideOutput=1 -OverrideOutputName=srb2win.exe -HostApplication= -CommandLine= -UseCustomMakefile=0 -CustomMakefile= -IncludeVersionInfo=0 -SupportXPThemes=0 -CompilerSet=9 -CompilerType=0 - -[Profile8] -ProfileName=Win64/DirectX Debug -Type=0 -ObjFiles= -Includes=libs/libpng-src;libs/zlib;libs -Libs=libs/libpng-src/projects;libs/zlib/win32;libs/miniupnpc/mingw64 -ResourceIncludes=src/win32 -MakeIncludes=comptime.mk;cpdebug.mk -Compiler=-D_DEBUG_@@_-fno-exceptions_@@_-DSTDC_HEADERS_@@_-Wall_@@_-O0_@@_-g_@@_-D_WINDOWS_@@_-DHAVE_PNG_@@_-DNOROPENGL_@@_-D__USE_MINGW_ANSI_STDIO=0_@@_-DHAVE_MINIUPNPC_@@_-DSTATIC_MINIUPNPC_@@_-DHAVE_BLUA_@@_ -CppCompiler=-O0_@@_-g_@@_ -Linker=-lgdi32_@@_-ldinput_@@_-ldxguid_@@_-lwinmm_@@_-lpng64_@@_-lz64_@@_-lminiupnpc_@@_-lws2_32_@@_-liphlpapi_@@_-mconsole_@@_ -PreprocDefines=NORMALSRB2_@@_ -CompilerSettings=00000000000000100110tb -Icon= -ExeOutput=bin\Mingw64\Debug -ObjectOutput=objs\Mingw64\Debug -OverrideOutput=1 -OverrideOutputName=srb2win.exe -HostApplication= -CommandLine= -UseCustomMakefile=0 -CustomMakefile= -IncludeVersionInfo=0 -SupportXPThemes=0 -CompilerSet=9 -CompilerType=0 - -[Profile9] -ProfileName=Win64/SDL Release -Type=0 -ObjFiles= -Includes=libs/libpng-src;libs/zlib;libs -Libs=libs/libpng-src/projects;libs/zlib/win32;libs/miniupnpc/mingw64 -ResourceIncludes=src/win32 -MakeIncludes=comptime.mk;cpdebug.mk -Compiler=-DNDEBUG_@@_-fno-exceptions_@@_-DSTDC_HEADERS_@@_-Wall_@@_-Os_@@_-g_@@_-DUSE_WGL_SWAP_@@_-DDIRECTFULLSCREEN_@@_-DHAVE_SDL_@@_-DHWRENDER_@@_-DHW3SOUND_@@_-DHAVE_MIXER_@@_-DHAVE_PNG_@@_-D__USE_MINGW_ANSI_STDIO=0_@@_-DHAVE_MINIUPNPC_@@_-DSTATIC_MINIUPNPC_@@_-DHAVE_BLUA_@@_ -CppCompiler=-Os_@@_-g_@@_ -Linker=-lSDL_@@_-lSDL_Mixer_@@_-lpng64_@@_-lz64_@@_-lminiupnpc_@@_-lws2_32_@@_-liphlpapi_@@_-mconsole_@@_ -PreprocDefines=NORMALSRB2_@@_ -CompilerSettings=00000000001000000110tb -Icon= -ExeOutput=bin\Mingw64\SDL\Release -ObjectOutput=objs\Mingw64\SDL\Release -OverrideOutput=1 -OverrideOutputName=srb2sdl.exe -HostApplication= -CommandLine= -UseCustomMakefile=0 -CustomMakefile= -IncludeVersionInfo=0 -SupportXPThemes=0 -CompilerSet=9 -CompilerType=0 - -[Profile10] -ProfileName=Win64/SDL Debug -Type=0 -ObjFiles= -Includes=libs/libpng-src;libs/zlib;libs -Libs=libs/libpng-src/projects;libs/zlib/win32;libs/miniupnpc/mingw64 -ResourceIncludes=src/win32 -MakeIncludes=comptime.mk;cpdebug.mk -Compiler=-D_DEBUG_@@_-fno-exceptions_@@_-DSTDC_HEADERS_@@_-Wall_@@_-O0_@@_-g_@@_-DUSE_WGL_SWAP_@@_-DDIRECTFULLSCREEN_@@_-DHAVE_SDL_@@_-DHWRENDER_@@_-DHW3SOUND_@@_-DHAVE_MIXER_@@_-DHAVE_PNG_@@_-D__USE_MINGW_ANSI_STDIO=0_@@_-DHAVE_MINIUPNPC_@@_-DSTATIC_MINIUPNPC_@@_-DHAVE_BLUA_@@_ -CppCompiler=-O0_@@_-g_@@_ -Linker=-lSDL_@@_-lSDL_Mixer_@@_-lpng64_@@_-lz64_@@_-lminiupnpc_@@_-lws2_32_@@_-liphlpapi_@@_-mconsole_@@_ -PreprocDefines=NORMALSRB2_@@_ -CompilerSettings=00000000000000100110tb -Icon= -ExeOutput=bin\Mingw64\SDL\Debug -ObjectOutput=objs\Mingw64\SDL\Debug -OverrideOutput=1 -OverrideOutputName=srb2sdl.exe -HostApplication= -CommandLine= -UseCustomMakefile=0 -CustomMakefile= -IncludeVersionInfo=0 -SupportXPThemes=0 -CompilerSet=9 -CompilerType=0 - -[Unit217] -FileName=src\lua_mathlib.c -CompileCpp=0 -Folder=LUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit218] -FileName=src\lua_mobjlib.c -CompileCpp=0 -Folder=LUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit219] -FileName=src\lua_script.c -CompileCpp=0 -Folder=LUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit220] -FileName=src\lua_script.h -CompileCpp=0 -Folder=LUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit221] -FileName=src\blua\lapi.h -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit222] -FileName=src\blua\lauxlib.h -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit223] -FileName=src\blua\lcode.h -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit224] -FileName=src\blua\ldebug.h -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit225] -FileName=src\blua\ldo.h -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit226] -FileName=src\blua\lfunc.h -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit227] -FileName=src\blua\lgc.h -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit228] -FileName=src\blua\llex.h -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit229] -FileName=src\blua\llimits.h -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit230] -FileName=src\blua\lmem.h -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit231] -FileName=src\blua\lobject.h -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit232] -FileName=src\blua\lopcodes.h -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit233] -FileName=src\blua\lparser.h -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit234] -FileName=src\blua\lstate.h -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit235] -FileName=src\blua\lstring.h -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit236] -FileName=src\blua\ltable.h -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit237] -FileName=src\blua\ltm.h -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit238] -FileName=src\blua\lua.h -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit239] -FileName=src\blua\luaconf.h -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit240] -FileName=src\blua\lualib.h -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit241] -FileName=src\blua\lundump.h -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit242] -FileName=src\blua\lvm.h -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit243] -FileName=src\blua\lzio.h -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit244] -FileName=src\blua\lapi.c -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit245] -FileName=src\blua\lauxlib.c -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit246] -FileName=src\blua\lbaselib.c -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit247] -FileName=src\blua\lcode.c -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit248] -FileName=src\blua\ldebug.c -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit249] -FileName=src\blua\ldo.c -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit250] -FileName=src\blua\ldump.c -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit251] -FileName=src\blua\lfunc.c -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit252] -FileName=src\blua\lgc.c -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit253] -FileName=src\blua\linit.c -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit254] -FileName=src\blua\llex.c -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit255] -FileName=src\blua\lmem.c -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit256] -FileName=src\blua\lobject.c -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit257] -FileName=src\blua\lopcodes.c -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit258] -FileName=src\blua\lparser.c -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit259] -FileName=src\blua\lstate.c -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit260] -FileName=src\blua\lstring.c -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit261] -FileName=src\blua\lstrlib.c -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit262] -FileName=src\blua\ltable.c -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit263] -FileName=src\blua\ltablib.c -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit264] -FileName=src\blua\ltm.c -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit265] -FileName=src\blua\lundump.c -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit266] -FileName=src\blua\lvm.c -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit267] -FileName=src\blua\lzio.c -CompileCpp=0 -Folder=BLUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit268] -FileName=src\lua_playerlib.c -CompileCpp=0 -Folder=LUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit269] -FileName=src\comptime.c -CompileCpp=0 -Folder=D_Doom -Compile=1 -Link=1 -Priority=1001 -OverrideBuildCmd=1 -BuildCmd=$(CC) -c src/comptime.c -o $@ $(CFLAGS) -DCOMPVERSION - -[Unit270] -FileName=src\b_bot.c -CompileCpp=0 -Folder=B_Bot -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit271] -FileName=src\b_bot.h -CompileCpp=0 -Folder=B_Bot -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit272] -FileName=src\m_cond.c -CompileCpp=0 -Folder=M_Misc -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit273] -FileName=src\m_cond.h -CompileCpp=0 -Folder=M_Misc -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit178] -FileName=src\lua_consolelib.c -CompileCpp=0 -Folder=LUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit179] -FileName=src\lua_thinkerlib.c -CompileCpp=0 -Folder=LUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit180] -FileName=src\lua_maplib.c -CompileCpp=0 -Folder=LUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit274] -FileName=src\sdl\mixer_sound.c -CompileCpp=0 -Folder=I_Interface/SDL -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit275] -FileName=src\m_anigif.c -CompileCpp=0 -Folder=M_Misc -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit276] -FileName=src\m_anigif.h -CompileCpp=0 -Folder=M_Misc -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit277] -FileName=src\lua_hudlib.c -CompileCpp=0 -Folder=LUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit278] -FileName=src\lua_skinlib.c -CompileCpp=0 -Folder=LUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= - -[Unit279] -FileName=src\lua_hud.h -CompileCpp=0 -Folder=LUA -Compile=1 -Link=1 -Priority=1000 -OverrideBuildCmd=0 -BuildCmd= diff --git a/appveyor.yml b/appveyor.yml index 474a2adb3..f4428a090 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -7,8 +7,6 @@ environment: # c:\mingw-w64 i686 has gcc 6.3.0, so use c:\msys64 7.3.0 instead MINGW_SDK: c:\msys64\mingw32 CFLAGS: -Wno-implicit-fallthrough - NASM_ZIP: nasm-2.12.01 - NASM_URL: http://www.nasm.us/pub/nasm/releasebuilds/2.12.01/win64/nasm-2.12.01-win64.zip UPX_ZIP: upx391w UPX_URL: http://upx.sourceforge.net/download/upx391w.zip CCACHE_EXE: ccache.exe @@ -40,17 +38,12 @@ environment: ASSET_CLEAN: 0 cache: -- nasm-2.12.01.zip - upx391w.zip - ccache.exe - C:\Users\appveyor\.ccache - C:\Users\appveyor\srb2_cache install: -- if not exist "%NASM_ZIP%.zip" appveyor DownloadFile "%NASM_URL%" -FileName "%NASM_ZIP%.zip" -- 7z x -y "%NASM_ZIP%.zip" -o%TMP% >null -- robocopy /S /xx /ns /nc /nfl /ndl /np /njh /njs "%TMP%\%NASM_ZIP%" "%MINGW_SDK%\bin" nasm.exe || exit 0 - - if not exist "%UPX_ZIP%.zip" appveyor DownloadFile "%UPX_URL%" -FileName "%UPX_ZIP%.zip" - 7z x -y "%UPX_ZIP%.zip" -o%TMP% >null - robocopy /S /xx /ns /nc /nfl /ndl /np /njh /njs "%TMP%\%UPX_ZIP%" "%MINGW_SDK%\bin" upx.exe || exit 0 @@ -65,7 +58,6 @@ configuration: before_build: - set "Path=%MINGW_SDK%\bin;%Path%" - mingw32-make --version -- nasm -v - if not [%NOUPX%] == [1] ( upx -V ) - ccache -V - ccache -s diff --git a/cmake/Modules/CMakeASM_YASMInformation.cmake b/cmake/Modules/CMakeASM_YASMInformation.cmake deleted file mode 100644 index 176518085..000000000 --- a/cmake/Modules/CMakeASM_YASMInformation.cmake +++ /dev/null @@ -1,46 +0,0 @@ - -#============================================================================= -# Copyright 2010 Kitware, Inc. -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) - -# support for the yasm assembler - -set(CMAKE_ASM_YASM_SOURCE_FILE_EXTENSIONS nasm yasm asm) - -if(NOT CMAKE_ASM_YASM_OBJECT_FORMAT) - if(WIN32) - if(CMAKE_C_SIZEOF_DATA_PTR EQUAL 8) - set(CMAKE_ASM_YASM_OBJECT_FORMAT win64) - else() - set(CMAKE_ASM_YASM_OBJECT_FORMAT win32) - endif() - elseif(APPLE) - if(CMAKE_C_SIZEOF_DATA_PTR EQUAL 8) - set(CMAKE_ASM_YASM_OBJECT_FORMAT macho64) - else() - set(CMAKE_ASM_YASM_OBJECT_FORMAT macho) - endif() - else() - if(CMAKE_C_SIZEOF_DATA_PTR EQUAL 8) - set(CMAKE_ASM_YASM_OBJECT_FORMAT elf64) - else() - set(CMAKE_ASM_YASM_OBJECT_FORMAT elf) - endif() - endif() -endif() - -set(CMAKE_ASM_YASM_COMPILE_OBJECT " -f ${CMAKE_ASM_YASM_OBJECT_FORMAT} -o ") - -# Load the generic ASMInformation file: -set(ASM_DIALECT "_YASM") -include(CMakeASMInformation) -set(ASM_DIALECT) diff --git a/cmake/Modules/CMakeDetermineASM_YASMCompiler.cmake b/cmake/Modules/CMakeDetermineASM_YASMCompiler.cmake deleted file mode 100644 index a5e7c9e58..000000000 --- a/cmake/Modules/CMakeDetermineASM_YASMCompiler.cmake +++ /dev/null @@ -1,27 +0,0 @@ - -#============================================================================= -# Copyright 2010 Kitware, Inc. -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) - -# Find the nasm assembler. yasm (http://www.tortall.net/projects/yasm/) is nasm compatible - -set(CMAKE_ASM_YASM_COMPILER_LIST nasm yasm) - -if(NOT CMAKE_ASM_YASM_COMPILER) - find_program(CMAKE_ASM_YASM_COMPILER yasm - "$ENV{ProgramFiles}/YASM") -endif() - -# Load the generic DetermineASM compiler file with the DIALECT set properly: -set(ASM_DIALECT "_YASM") -include(CMakeDetermineASMCompiler) -set(ASM_DIALECT) diff --git a/cmake/Modules/CMakeTestASM_YASMCompiler.cmake b/cmake/Modules/CMakeTestASM_YASMCompiler.cmake deleted file mode 100644 index 745f7125c..000000000 --- a/cmake/Modules/CMakeTestASM_YASMCompiler.cmake +++ /dev/null @@ -1,23 +0,0 @@ - -#============================================================================= -# Copyright 2010 Kitware, Inc. -# -# Distributed under the OSI-approved BSD License (the "License"); -# see accompanying file Copyright.txt for details. -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= -# (To distribute this file outside of CMake, substitute the full -# License text for the above reference.) - -# This file is used by EnableLanguage in cmGlobalGenerator to -# determine that the selected ASM_NASM "compiler" works. -# For assembler this can only check whether the compiler has been found, -# because otherwise there would have to be a separate assembler source file -# for each assembler on every architecture. - -set(ASM_DIALECT "_YASM") -include(CMakeTestASMCompiler) -set(ASM_DIALECT) diff --git a/comptime.props b/comptime.props deleted file mode 100644 index e727dfb1d..000000000 --- a/comptime.props +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - "$(SolutionDir)comptime.bat" "$(ProjectDir).." - Getting revision number from the SCM system - - - - \ No newline at end of file diff --git a/cpdebug.mk b/cpdebug.mk deleted file mode 100644 index 75f08c66f..000000000 --- a/cpdebug.mk +++ /dev/null @@ -1,32 +0,0 @@ -#Add-on Makefile for wxDev-C++ project file -ifdef ComSpec -COMSPEC=$(ComSpec) -endif -ifdef COMSPEC -OBJCOPY?=objcopy.exe -OBJDUMP?=objdump.exe -GZIP?=gzip.exe -else -OBJCOPY?=objcopy -OBJDUMP?=objdump -GZIP?=gzip -endif -DBGNAME=$(BIN).debug -OBJDUMP_OPTS?=--wide --source --line-numbers -GZIP_OPTS?=-9 -f -n -GZIP_OPT2=$(GZIP_OPTS) --rsyncable -UPX?=upx -UPX_OPTS?=--best --preserve-build-id -UPX_OPTS+=-q - -all-after: - $(OBJDUMP) $(OBJDUMP_OPTS) "$(BIN)" > "$(DBGNAME).txt" - $(OBJCOPY) $(BIN) $(DBGNAME) - $(OBJCOPY) --strip-debug $(BIN) - -$(OBJCOPY) --add-gnu-debuglink=$(DBGNAME) $(BIN) - -$(GZIP) $(GZIP_OPTS) "$(DBGNAME).txt" -ifndef COMSPEC - -$(GZIP) $(GZIP_OPT2) "$(DBGNAME).txt" -endif - -$(UPX) $(UPX_OPTS) $(BIN) - diff --git a/debian-template/README.source b/debian-template/README.source index f63a42cac..acd47d2f1 100644 --- a/debian-template/README.source +++ b/debian-template/README.source @@ -9,7 +9,6 @@ GNU/Linux Dependencies: SDL 1.2.7 or better (from libsdl.org) SDL_Mixer 1.2.2(.7 for file-less music playback) (from libsdl.org) - Nasm (use NOASM=1 if you don't have it or have an non-i386 system, I think) libPNG 1.2.7 Zlib 1.2.3 The Xiph.org libogg and libvorbis libraries diff --git a/doc/.gitignore b/doc/.gitignore deleted file mode 100644 index 36a49a811..000000000 --- a/doc/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/SRB2 diff --git a/doc/Doublescan.txt b/doc/Doublescan.txt deleted file mode 100644 index 5e492ec89..000000000 --- a/doc/Doublescan.txt +++ /dev/null @@ -1,93 +0,0 @@ - ================================================================ - How to add Low-res modes to your XF86Config under Linux MANUALLY - ================================================================ - - I TAKE NO RESPONSIBILITY FOR ANY DAMAGE DONE TO YOUR EQUIPMENT!!! - - This document explains how to add low-res modes like 320x200 to your - X-Server configuration, because some new setup tools for the X-Server - do not support this. ONLY RECOMMENDED FOR USERS WHO KNOW WHAT THEY DO! - - I do not take any responsibility for damage done to your monitor, your - videocard, your harddisk, your cat, your dog or anything else!!! - IMPORTANT IS, THAT YOUR "HorizSync" AND "VertRefresh" VALUES REALLY - MATCH YOUR MONITOR! OTHERWISE YOUR MONITOR CAN BLOW UP!!! - - OK, if you have read up to here, you either know what you do or really - die-hard want those low-res modes. Here is what to do: - Look up your XF86Config. Is is either in /etc or in /etc/X11. Here is - what you have to add to the definition of your modeslines: - -# Low-res Doublescan modes -# If your chipset does not support doublescan, you get a 'squashed' -# resolution like 320x400. - -# 320x200 @ 70 Hz, 31.5 kHz hsync, 8:5 aspect ratio -Modeline "320x200" 12.588 320 336 384 400 200 204 205 225 Doublescan -# 320x240 @ 60 Hz, 31.5 kHz hsync, 4:3 aspect ratio -Modeline "320x240" 12.588 320 336 384 400 240 245 246 262 Doublescan -# 320x240 @ 72 Hz, 36.5 kHz hsync -Modeline "320x240" 15.750 320 336 384 400 240 244 246 262 Doublescan -# 400x300 @ 56 Hz, 35.2 kHz hsync, 4:3 aspect ratio -ModeLine "400x300" 18 400 416 448 512 300 301 302 312 Doublescan -# 400x300 @ 60 Hz, 37.8 kHz hsync -Modeline "400x300" 20 400 416 480 528 300 301 303 314 Doublescan -# 400x300 @ 72 Hz, 48.0 kHz hsync -Modeline "400x300" 25 400 424 488 520 300 319 322 333 Doublescan - - If your video card only supports a specific set of discrete dotclocks - (RAMDAC) you may have to replace the dotclocks given here by one of the - specified (e.g in the first modeline the dotclock is 12.588 MHz). I believe - that nowadays all cards and monitors should work with these settings, but - if you have outdated hardware you better check the frequencies yourself. If - there is any uncertainty, please check the "XFree86 Video Timings HOWTO". - - - Then have a look at the section "Screen" with the appropriate driver - (usually either "svga" or "accel"). Under Subsection "Display" there - are modes for the given color depth. Add the desired modes. As an - example I give you my screens definition here with low-res modes in - 16 bit color depth: - -Section "Screen" - Driver "accel" - Device "3D Charger" - Monitor "Iiyama Pro 450" - DefaultColorDepth 16 - - Subsection "Display" - Depth 8 - Modes "1280x1024" "1024x768" "800x600" "640x480" - ViewPort 0 0 - Virtual 1280 1024 - EndSubsection - Subsection "Display" - Depth 16 - Modes "1152x864" "1024x768" "800x600" "640x480" "400x300" "320x200" <- THIS IS ACTUALLY WHAT YOU WANT!!! - ViewPort 0 0 ^^^^^^^^^^^^^^^^^^^ - Virtual 1152 864 - EndSubsection - Subsection "Display" - Depth 24 - Modes "800x600" "640x480" - ViewPort 0 0 - Virtual 800 600 - EndSubsection - Subsection "Display" - Depth 32 - Modes "800x600" "640x480" - ViewPort 0 0 - Virtual 800 600 - EndSubsection -EndSection - - Once again: important is, that you edit the correct Screen section. - If you use the SVGA Server and edit the ACCEL Server, you might - wonder where your new modes have gone. - - If everything went fine and you want to say thank you, just write - to "metzgermeister@users.sourceforge.net". If your monitor blew - up and you want to kill me, find me playing Legacy or Q3A on the net - and frag me (with your second monitor, hehe). - - - metzgermeister diff --git a/doc/Item Ranges.txt b/doc/Item Ranges.txt deleted file mode 100644 index 60251e547..000000000 --- a/doc/Item Ranges.txt +++ /dev/null @@ -1,212 +0,0 @@ -1-99 : Player Starts - 1 - Player 1 Start 1 - 2 - Player 2 Start 2 - 3 - Player 3 Start 3 - 4 - Player 4 Start 4 - 5 - Player 5 Start 4001 - 6 - Player 6 Start 4002 - 7 - Player 7 Start 4003 - 8 - Player 8 Start 4004 - 9 - Player 9 Start 4005 - 10 - Player 10 Start 4006 - 11 - Player 11 Start 4007 - 12 - Player 12 Start 4008 - 13 - Player 13 Start 4009 - 14 - Player 14 Start 4010 - 15 - Player 15 Start 4011 - 16 - Player 16 Start 4012 - 17 - Player 17 Start 4013 - 18 - Player 18 Start 4014 - 19 - Player 19 Start 4015 - 20 - Player 20 Start 4016 - 21 - Player 21 Start 4017 - 22 - Player 22 Start 4018 - 23 - Player 23 Start 4019 - 24 - Player 24 Start 4020 - 25 - Player 25 Start 4021 - 26 - Player 26 Start 4022 - 27 - Player 27 Start 4023 - 28 - Player 28 Start 4024 - 29 - Player 29 Start 4025 - 30 - Player 30 Start 4026 - 31 - Player 31 Start 4027 - 32 - Player 32 Start 4028 - 33 - Player Match Start 11 - 34 - Red Team Start 87 - 35 - Blue Team Start 89 - 36 - Tag start New - -100 - 199 : Enemies - 100 - Blue Crawla 3004 - 101 - Red Crawla 9 - 102 - GFZ Fish 58 - 103 - Gold Buzz 5005 - 104 - Red Buzz 5006 - 105 - Jetty-Syn Bomber 3005 - 106 - Jetty-Syn Gunner 22 - 107 - Crawla Commander 21 - 108 - Deton 71 - 109 - Skim 56 - 110 - THZ Turret 2004 - 111 - Pop-up Turret 42 - -200 - 299 : Bosses and their associated items (if any) - 200 - Boss 1 16 - 201 - Boss 2 2008 - 290 - Boss Fly Point 17 - 291 - EggTrap Center 2049 - -300 - 399 : Collectibles - 300 - Ring 2014 - 301 - Homing Ring 69 - 302 - Rail Ring 3003 - 303 - Infinity Ring 80 - 304 - Automatic Ring 26 - 305 - Explosion Ring 54 - 306 - Red CTF Flag 31 - 307 - Blue CTF Flag 34 - 308 - Special Stage Token 2013 - 309 - Emerald 1 420 - 310 - Emerald 2 421 - 311 - Emerald 3 422 - 312 - Emerald 4 423 - 313 - Emerald 5 424 - 314 - Emerald 6 425 - 315 - Emerald 7 426 - 316 - Hunting Emerald 1 64 - 317 - Hunting Emerald 2 3002 - 318 - Hunting Emerald 3 3001 - -400 - 499 : Boxes - 400 - Super Ring Box 2011 - 401 - Grey Ring Box 2012 - 402 - Ring Shield Box 48 - 403 - Fire Shield Box 2002 - 404 - Bomb Shield Box 2018 - 405 - Jump Shield Box 35 - 406 - Water Shield Box 2028 - 407 - Sneaker Box 25 - 408 - Invincibility Box 2022 - 409 - 1-Up Box 41 - 410 - Eggman Box 2005 - 411 - Mixup Box 78 - 412 - Question Box 3000 - -500 - 599 : Interactive Objects (friendly or otherwise - includes springs) - 500 - Bubble Patch 33 - 501 - Level End Sign 86 - 502 - Starpost 3006 - 520 - Spike Ball -1 - 521 - Special Stage Spike Ball 23 - 522 - Ceiling Spike 67 - 523 - Floor Spike 68 - 540 - Fan 32 - 541 - Steam Riser 30 - 550 - Yellow Spring 28 - 551 - Red Spring 79 - 552 - Blue Spring 5004 - 553 - Yellow Spring Down 65 - 554 - Red Spring Down 66 - 555 - Yellow Diagonal Spring 2015 - 556 - Red Diagonal Spring 38 - 557 - Yellow Diag Spring Down 20 - 558 - Red Diag Spring Down 39 - -600 - 699 : Special placement patterns - 600 - Vertical Rigns - Stack of 5 (suitable for Yellow Spring) 84 - 601 - Vertical Rings - Stack of 5 (suitable for Red Spring) 44 - 602 - Diagonal rings (5) 76 - 603 - Diagonal rings (10) 77 - 604 - A ring of rings 47 - 605 - A BIGGER ring of rings 2007 - 606 - A ring of wing items 2048 - 607 - A BIGGER ring of wing items 2010 - 608 - A ring of rings and wings (alternating) 2046 - 609 - A BIGGER ring of rings and wings (alternating) 2047 - -700 - 799 : Powerup indicators/environmental effects/miscellany - 700 - Ambient Water 1a (S) 2026 - 701 - Ambient Water 1b (S) 2024 - 702 - Ambient Water 2a (M) 2023 - 703 - Ambient Water 2b (M) 2045 - 704 - Ambient Water 3a (L) 83 - 705 - Ambient Water 3b (L) 2019 - 706 - Ambient Water 4a (XL) 2025 - 707 - Ambient Water 4b (XL) 27 - 708 - Random Ambient 1 14 - 709 - Random Ambient 2 43 - 750 - Chaos Spawner 8 - 751 - Teleport Point 5003 - 752 - Alternate View Point 5007 - 753 - Zoom Tube Waypoint 18 - 754 - Pusher 5001 - 755 - Puller 5002 - 756 - Street Light 2003 - -800 - 899 : Greenflower Scenery - 800 - Flower 1 36 - 801 - Flower 2 70 - 802 - Flower 3 73 - 804 - Berry Bush 74 - 805 - Bush 75 - -900 - 999 : Techno Hill Scenery - 900 - THZ Plant 2035 - 901 - Alarm 2006 - -1000 - 1099 : Deep Sea Scenery - 1000 - Gargoyle 81 - -1100 - 1199 : Castle Eggman Scenery - 1100 - Ceiling Chain 49 - 1101 - Torch Flame 24 - 1102 - Eggman Statue 52 - 1103 - CEZ Flower 2001 - -1200 - 1299 : Arid Canyon Scenery -1300 - 1399 : Red Volcano Scenery -1400 - 1499 : Dark City Scenery -1500 - 1599 : Doom Ship Scenery -1600 - 1699 : Egg Rock/Final Fight Scenery -1700 - 1799 : NiGHTS Items - 1700 - Axis 72 - 1701 - Axis Transfer (Normal) 61 - 1702 - Axis Transfer (Line) 46 - 1703 - Nights Drone 60 - 1704 - Nights Bumper 82 - 1705 - Hoop 57 - 1706 - Nights Wing 37 - 1707 - Super Loop Powerup 3007 - 1708 - Drill Refill Powerup 3008 - 1709 - Helper Powerup 3009 - 1710 - Egg Capsule 40 - -1800 - 1849 : Mario Items - 1800 - Coin 10005 - 1801 - Goomba 10000 - 1802 - Blue Goomba 10001 - 1803 - FireFlower 50 - 1804 - Shell 10 - 1805 - Puma 29 - 1806 - Koopa 19 - 1807 - Axe 12 - 1808 - Mario Bush 1 10002 - 1809 - Mario Bush 2 10003 - 1810 - Toad 10004 - -1850 - 1899 : Christmas Items - 1850 - Xmas Pole 5 - 1851 - Candy Cane 13 - 1852 - Snowman 6 - -1900 - 1999 : Misc Scenery - 1900 - Stalagmite 0 - 1901 - Stalagmite 1 - 1902 - Stalagmite 2 - 1903 - Stalagmite 3 - 1904 - Stalagmite 4 - 1905 - Stalagmite 5 - 1906 - Stalagmite 6 - 1907 - Stalagmite 7 - 1908 - Stalagmite 8 - 1909 - Stalagmite 9 diff --git a/doc/Linedef Ranges.txt b/doc/Linedef Ranges.txt deleted file mode 100644 index 81fa695a0..000000000 --- a/doc/Linedef Ranges.txt +++ /dev/null @@ -1,223 +0,0 @@ - Description OldNum NewNum Description - Old Water 14 Removed - - Level Parameters/Misc: - Per-Sector Gravity 64 1 - Custom Exit 71 2 - Zoom Tube Parameters 18 3 - Speed Pad 65 4 - Camera Scanner 63 5 - Disable Linedef 73 6 - Flat Alignment 66 7 - Sector Special Parameters New 8 - Mace Parameters New 9 - Sprite Cull Height New 10 - Rope Hang Parameters New 11 - Rock Spawner Parameters New 12 - - PolyObjects - Marks first line in PolyObject New 20 - Explicitly includes a PolyObject line New 21 - PolyObject: Parameters New 22 - PolyObject: Waving Flag New 31 - - Level-Load Effects: - Instant Floor Lower 26 50 - Instant Ceiling Raise 24 51 - Continuously Falling Sector 88 52 - Continuous Floor/Ceiling Mover 2 53 - Continuous Floor Mover 3 54 - Continuous Ceiling Mover 4 55 - Continuous Two-Speed Floor/Ceiling Mover 6 56 - Continuous Two-Speed Floor Mover 7 57 - Continuous Two-Speed Ceiling Mover 8 58 - Activate Floating Platform 232 59 - Activate Floating Platform (Adjustable Speed) 233 60 - Crusher 1 (Ceiling to Floor) 43 61 - Crusher 2 (Floor to Ceiling) 50 62 - Fake Floor/Ceiling 242 63 - Appearing/Disappearing FOF New 64 - Bridge Thinker New 65 - - Floor Over Floors: - "Floor Over Floor: Solid, Opaque, Shadowcasting " 25 100 - "Floor Over Floor: Solid, Opaque, Non-Shadowcasting " 33 101 - "Floor Over Floor: Solid, Translucent " 44 102 - "Floor Over Floor: Solid, Sides Only " 69 103 - "Floor Over Floor: Solid, No Sides " 51 104 - "Floor Over Floor: Solid, Invisible " 57 105 - - "Floor Over Floor: Water, Opaque " 48 120 - "Floor Over Floor: Water, Translucent " 45 121 - "Floor Over Floor: Water, Opaque, No Sides " 75 122 - "Floor Over Floor: Water, Translucent, No Sides " 74 123 - - "Floor Over Floor: Platform, Opaque " 59 140 - "Floor Over Floor: Platform, Translucent " 81 141 - "Floor Over Floor: Platform, Translucent, No Sides " 77 142 - - Floor Over Floor: Bobbing (Air) 38 150 - Floor Over Floor: Adjustable Bobbing (Air) 68 151 - Floor Over Floor: Reverse Adjustable Bobbing (Air) 72 152 - - "Floor Over Floor: Floating, Bobbing " 34 160 - - Floor Over Floor: Crumbling (Respawn) 36 170 - Floor Over Floor: Crumbling (No Respawn) 35 171 - "Floor Over Floor: Crumbling (Respawn), Platform " 79 172 - "Floor Over Floor: Crumbling (No Respawn), Platform " 80 173 - "Floor Over Floor: Crumbling (Respawn), Platform, Translucent " 82 174 - "Floor Over Floor: Crumbling (No Respawn), Platform, Translucent " 83 175 - "Floor Over Floor: Crumbling (Respawn), Floating, Bobbing " 39 176 - "Floor Over Floor: Crumbling (No Respawn), Floating, Bobbing " 1 177 - "Floor Over Floor: Crumbling (Respawn), Floating " 37 178 - "Floor Over Floor: Crumbling (No Respawn), Floating " 42 179 - "Floor Over Floor: Crumbling (Respawn), Bobbing (Air) " 40 180 - - "Floor Over Floor: Rising Platform, Solid, Opaque, Shadowcasting " 89 190 - "Floor Over Floor: Rising Platform, Solid, Opaque, Non-Shadowcasting " 90 191 - "Floor Over Floor: Rising Platform, Solid, Translucent " 91 192 - "Floor Over Floor: Rising Platform, Solid, Invisible " 94 193 - "Floor Over Floor: Rising Platform, Platform, Opaque " 92 194 - "Floor Over Floor: Rising Platform, Platform, Translucent " 93 195 - - Floor Over Floor: Light Block 49 200 - Floor Over Floor: Half Light Block 47 201 - Floor Over Floor: Fog Block 46 202 - - "Floor Over Floor: Intangible, Opaque " 62 220 - "Floor Over Floor: Intangible, Translucent " 52 221 - "Floor Over Floor: Intangible, Sides Only " 67 222 - "Floor Over Floor: Intangible, Invisible " 58 223 - - Floor Over Floor: Mario Block 41 250 - Floor Over Floor: Thwomp Block 54 251 - Floor Over Floor: Shatter Block 76 252 - "Floor Over Floor: Shatter Block, Translucent " 86 253 - Floor Over Floor: Bustable Block 55 254 - Floor Over Floor: Spin Bust Block 78 255 - "Floor Over Floor: Spin Bust Block, Translucent " 84 256 - Floor Over Floor: Quicksand Block 56 257 - Floor Over Floor: Laser Block 53 258 - Floor Over Floor: Custom 87 259 - - Linedef Executor Triggers: - Trigger Linedef Executor (Continuous) 96 300 - Trigger Linedef Executor (Each Time) 97 301 - Trigger Linedef Executor (Once) 98 302 - Trigger Linedef Executor (Ring Count - Continuous) 95 303 - Trigger Linedef Executor (Ring Count - Once) 99 304 - Trigger Linedef Executor (Character Ability - Continuous) 19 305 - Trigger Linedef Executor (Character Ability - Each Time) 20 306 - Trigger Linedef Executor (Character Ability - Once) 21 307 - "Trigger Linedef Executor (Race Only, Once) " 9 308 - Trigger Linedef Executor (CTF Red Team - Continuous) 10 309 - Trigger Linedef Executor (CTF Red Team - Each Time) 11 310 - Trigger Linedef Executor (CTF Blue Team - Continuous) 12 311 - Trigger Linedef Executor (CTF Blue Team - Each Time) 13 312 - Trigger Linedef Executor (No More Enemies - Once) 15 313 - Trigger Linedef Executor (# of Pushables - Continuous) New 314 - Trigger Linedef Executor (# of Pushables - Once) New 315 - Trigger Linedef Executors (PolyObject - Land On) New 316 - Trigger Linedef Executor (Level Load) New 399 - - Linedef Executor Options: - Linedef Executor: Set Tagged Sector's Floor Height/Pic 101 400 - Linedef Executor: Set Tagged Sector's Ceiling Height/Pic 102 401 - Linedef Executor: Set Tagged Sector's Light Level 103 402 - Linedef Executor: Move Tagged Sector's Floor 106 403 - Linedef Executor: Move Tagged Sector's Ceiling 107 404 - Linedef Executor: Lower Floor by Line 108 405 - Linedef Executor: Raise Floor by Line 109 406 - Linedef Executor: Lower Ceiling by Line 110 407 - Linedef Executor: Raise Ceiling by Line 111 408 - Linedef Executor: Change Calling Sector's Tag 112 409 - Linedef Executor: Change Front Sector's Tag 114 410 - Linedef Executor: Stop Plane Movement 116 411 - Linedef Executor: Teleport Player to Tagged Sector 104 412 - Linedef Executor: Change Music 105 413 - Linedef Executor: Play SFX 115 414 - Linedef Executor: Run Script 113 415 - Linedef Executor: Start Adjustable Fire Flicker 119 416 - Linedef Executor: Start Adjustable Glowing Light 120 417 - Linedef Executor: Start Adjustable Strobe Flash (unsynchronized) New 418 - Linedef Executor: Start Adjustable Strobe Flash (synchronized) New 419 - Linedef Executor: Fade Light Level 117 420 - Linedef Executor: Stop Lighting Effect 118 421 - Linedef Executor: Cut-Away View 121 422 - Linedef Executor: Change Sky 123 423 - Linedef Executor: Change Weather 124 424 - Linedef Executor: Change Object State 125 425 - Linedef Executor: Stop Object 122 426 - Linedef Executor: Award Score 126 427 - Linedef Executor: Start Platform Movement 127 428 - Linedef Executor: Crush Ceiling Once New 429 - Linedef Executor: Crush Floor Once New 430 - Linedef Executor: Crush Floor & Ceiling Once New 431 - Linedef Executor: Enable 2D Mode New 432 - Linedef Executor: Disable 2D Mode New 433 - Linedef Executor: Award Custom Power New 434 - Linedef Executor: Stop Conveyor New 435 - Linedef Executor: Start Conveyor New 436 - Linedef Executor: Disable Player Movement New 437 - - Linedef Executor: Execute Linedef Executor New 450 - - Linedef Executor: PolyObject: Door Slide New 480 - Linedef Executor: PolyObject: Door Swing New 481 - Linedef Executor: PolyObject: Move XY New 482 - Linedef Executor: PolyObject: Move XY w/ override New 483 - Linedef Executor: PolyObject: Rotate Right New 484 - Linedef Executor: PolyObject: Rotate Right w/ override New 485 - Linedef Executor: PolyObject: Rotate Left New 486 - Linedef Executor: PolyObject: Rotate Left w/ override New 487 - Linedef Executor: PolyObject: Start waypoint movement New 488 - Linedef Executor: PolyObject: Make Invisible New 489 - Linedef Executor: PolyObject: Make Visible New 490 - - Scrollers/Pushers: - Scroll Wall First Side Left 100 500 - Scroll Wall First Side Opposite Direction 85 501 - Scroll Wall According to Linedef 254 502 - Acc Scroll Wall According to Linedef 218 503 - Disp Scroll Wall According to Linedef 249 504 - Scroll Texture by Offsets 255 505 - - Scroll Floor Texture 251 510 - Acc Scroll Floor Texture 215 511 - Disp Scroll Floor Texture 246 512 - Scroll Ceiling Texture 250 513 - Acc Scroll Ceiling Texture 214 514 - Disp Scroll Ceiling Texture 245 515 - - Carry Objects on Floor (no scroll) 252 520 - Acc Carry Objects on Floor 216 521 - Disp Carry Objects on Floor 247 522 - Carry Objects on Ceiling 203 523 - Acc Carry Objects on Ceiling 205 524 - Disp Carry Objects on Ceiling 201 525 - - Scroll Floor Texture and Carry Objects 253 530 - Acc Scroll Floor Texture and Carry Objects 217 531 - Disp Scroll Floor Texture and Carry Objects 248 532 - Scroll Ceiling Texture and Carry Objects 202 533 - Acc Scroll Ceiling Texture and Carry Objects 204 534 - Disp Scroll Ceiling Texture and Carry Objects 200 535 - - Friction 223 540 - Horizontal Wind 224 541 - Upwards Wind 229 542 - Downwards Wind 230 543 - Horizontal Current 225 544 - Upwards Current 227 545 - Downwards Current 228 546 - Boom Push/Pull Thing 226 547 - - Lighting: - Floor Lighting 213 600 - Ceiling Lighting 5 601 - Adjustable Pulsating Light 60 602 - Adjustable Flickering Light 61 603 - Adjustable Blinking Light (unsynchronized) New 604 - Adjustable Blinking Light (synchronized) New 605 - Colormap 16 606 diff --git a/doc/SSN-Todo.xls b/doc/SSN-Todo.xls deleted file mode 100644 index c468b3476..000000000 Binary files a/doc/SSN-Todo.xls and /dev/null differ diff --git a/doc/Sector Ranges.txt b/doc/Sector Ranges.txt deleted file mode 100644 index 42760e133..000000000 --- a/doc/Sector Ranges.txt +++ /dev/null @@ -1,78 +0,0 @@ -Removed: - - Buttons 1-20 690-709 - - Button 21 (THZ2 A/740 B/741 D/742 E/745 710 - - Close Door Blazing (Tag 743) 711 - - Raise Ceiling to Highest (Tag 744) 981 - - THZ2 Slime Raise (B/712 W713 P714 D715 S716) 986 - -Stuff to Remove/Change: - - Light Blinks On Every 0.5 Seconds 2 Add Linedef Combine - - Light Blinks On Every 1 Second 3 Add Linedef Combine - - Light Pulses Smoothly 8 Remove - - Light Blinks On Every 0.5 Seconds (Sync) 12 Add Linedef Combine - - Lights Blinks On Every 1 Second (Sync) 13 Add Linedef Combine - - Light Flickers Like Fire 17 Remove - ? - Damage (Fire) and Current 519 Remove (convert to combination) - ? - Damage (Water) and Current 984 Remove (convert to combination) - -Section 1: - 1 - Damage (Generic) 11 - 2 - Damage (Water) 983 - 3 - Damage (Fire) 7 - 4 - Damage (Electrical) 18 - 5 - Spikes 4 - 6 - Death Pit (Camera Mod) 16 - 7 - Death Pit (No Camera Mod) 5 - 8 - Instant Kill 10 - 9 - Ring Drainer (Floor Touch) 978 - 10 - Ring Drainer (No Floor Touch) 980 - 11 - Special Stage Damage 9 - 12 - Space Countdown 6 - 13 - Ramp Sector (Increase step-up) 992 - 14 - Non-Ramp Sector (Don't step-down) 996 - 15 - Bouncy Sector (FOF Control Only) 14 - -Section 2: << 4 - 1 - Trigger Linedef Exec (Pushable Objects) 971 - 2 - Trigger LD Exec (Anywhere in Sec/All Pls) 972 - 3 - Trigger Linedef Exec (Floor Touch/All Pls) 973 - 4 - Trigger Linedef Exec (Anywhere in Sec) 974 - 5 - Trigger Linedef Exec (Floor Touch) 975 - 6 - Trigger Linedef Exec (Emerald Check) 967 - 7 - Trigger Linedef Exec (NiGHTS Mare) 968 - 8 - Check for linedef executor on FOFs (ANY) 970 - 9 - Egg Trap Capsule 666 - 10 - Special Stage Time/Rings, Par 990 - 11 - Custom Global Gravity 991 - -Section 3: << 8 - 1 - Ice/Sludge (required?!) 256 - 2 - Wind/Current (required?!) 512 - 3 - Ice/Sludge and Wind/Current 768 - 4 - Conveyor Belt 985 - 5 - Speed Pad (No Spin) 976 - 6 - Speed Pad (Spin) 977 - 7 - Bustable Block Sprite Parameter 1500-1515 - 8 - " - 9 - " - 10 - " - 11 - " - 12 - " - 13 - " - 14 - " - 15 - " - -Section 4: << 12 - 1 - Starpost Activator 993 - 2 - Special Stage Goal Combine 33 - 2 - Exit Sector Combine 982 - 2 - No Tag Zone Combine 987 - 2 - CTF: Flag Return Combine 995 - 3 - CTF: Red Team Base 988 - 4 - CTF: Blue Team Base 989 - 5 - Fan Sector 997 - 6 - Super Sonic Transform 969 - 7 - Spinner 979 - 8 - Zoom Tube Start 998 - 9 - Zoom Tube End 999 - 10 - Finish Line 994 \ No newline at end of file diff --git a/doc/copying b/doc/copying deleted file mode 100644 index a43ea2126..000000000 --- a/doc/copying +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 675 Mass Ave, Cambridge, MA 02139, USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - Appendix: How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) 19yy - - 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., 675 Mass Ave, Cambridge, MA 02139, USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) 19yy name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/doc/faq.txt b/doc/faq.txt deleted file mode 100644 index 26c75bbad..000000000 --- a/doc/faq.txt +++ /dev/null @@ -1,307 +0,0 @@ - SRB2 - Release v1.09, ? 2005. - - Last Updated: June 2005 - - Original game & sources by: Id Software. - Additions: (c)1998 by: Fabrice Denis & Boris Pereira - (c)1999 by: Fabrice Denis, Boris Pereira & Thierry Van Elsuwe - (c)2000 by: Boris Pereira & Thierry Van Elsuwe - (c)2004 By: AJ, Graue, Alam Arias, Logan Arias & Andrew Clunis - - Special thanks to Steven McGranahan, Lee Killough, Robert Bäuml and Bell Kin for - their large contribution and to other DooM LEGACY & SRB2 Team members. - - Web site: http://www.SRB2.org/ - e-mail: none@none.com - - OpenGL specific: - Web site: http://legacy.newdoom.com/gl - - - ----------------------------------------------------------------------- - F.A.Q. - ----------------------------------------------------------------------- - - - If you have any trouble with SRB2, you might find a solution - here. - - If you find a solution to a problem that was not listed here, - please tell us so that we can update the FAQ and help other people! - - Mail your hardware/software problems to: - - None@none.com subject: FAQ - - - -------- - CONTENTS - -------- - - [0] Miscellaneous - [1] Mouse/Joystick/Keyboard - [2] Video - [3] Sound - [4] Network - [5] Troubleshooting - - - ----------------- - [0] MISCELLANEOUS - ----------------- - - * under win95 or OS/2, I don't have enough memory. How can i handle with ? - - Tell win95 to put more dpmi memory for your dos box. - Or use the -mb option. - - - - --------------------------- - [1] MOUSE/JOYSTICK/KEYBOARD - --------------------------- - - * My mouse/joystick does not work in SRB2. - - First, check that the mouse/joystick is activated : go at the - console and type either 'use_mouse' (or use the respective - menuitem) or 'use_joystick'. - - If it tells '0' or off than the mouse/joystick is not used, - set the variable to 1. eg: 'use_mouse 1'. - - For the joystick, different values will support different - types of joystick, check the console documentation for the - command 'use_joystick' for more. - - Even if the mouse or joystick is activated, you have to - set up the contols into the Setup Controls menu. That is: - tell what use you will make of the mouse/joystick buttons. - - - --------- - [2] VIDEO - --------- - - - * Where are the other video modes ? I have only '320x200' in the - Video Modes menu. - - DOS - --- - - SRB2 adds new video modes only if a VESA2 (or better) driver - is present. The VESA2 driver is a standard of 'talking' between a - program and the huge amount of different graphics cards - available today. - - If you don't have a VESA2 driver, you can download UNIVBE, or - SMART DISPLAY DOCTOR from - - http://www.scitechsoft.com/products/ent/free_titles.html - - or if you have an S3 based card, you can download the free - software called 'S3VBE'. - - ftp://ftp.externet.hu/pub/mirror/sac/graph/s3vbe318.zip - ftp://ftp.digsys.bg/pub/simtelnet/msdos/graphics/s3vbe318.zip - http://www.filesearching.com/cgi-bin/s?q=s3vbe318.zip - http://www.google.com/search?q=s3vbe318.zip - - * The game doesn't restore the video mode I have chosen the last time - I played SRB2. - - The current video mode has to be made the 'default' so that it is - saved to the config : press the key 'D' on the Video Options menu - to set the current video mode the default. - - * I have some problems with OpenGL mode - - Have a look at the FAQ for OpenGL on the glLegacy web site: - - http://www.doomnation.com/gllegacy/faqe.htm - - # Linux: I only have a 1024x768 (or 800x600, 1280x1024, ...) resolution - in fullscreen mode under X and SRB2 is really really slow. Can I - have lower resolutions like 320x200 in fullscreen mode as well? - - Probably yes. SRB2 can only use the resolutions offered by the - X-Server. So if all fullscreen modes have a very high resolution you - have to modify /etc/XF86Config (or /etc/X11/XF86Config). Use XF86Setup - (or the appropriate tool coming with your distribution - sax, - xf86config, ...) to do this. - If you do not succeed there, you can enter them manually into your - XF86Config file. ONLY RECOMMENDED FOR USERS WHO KNOW WHAT THEY DO! - For a short guide on how to do this, have a look at the file - "Doublescan.txt". - In case of doubt consult the XFree86-HOWTO (or ask your system - administrator :). - - # Linux: I cannot have any fullscreen modes at all! - - You have only modes above 1024x768 in your XF86Config. Proceed as - described above. - - # Linux: After a certain idle time my screensaver jams the display of - SRB2. I can still operate SRB2, but I do not see what's happening - and the screensaver won't go away. - - You probably have KDE. The KDE screensaver does not obey the screensaver - rules (at least mine, version 1.1). The solution is to deactivate the - KDE screensaver and use another screensaver (like the xscreensaver, - e.g.). But the hell, when you started SRB2 you should have played it - as well and not left it alone!!! - - --------- - [3] SOUND - --------- - - + DOS:I can't have CD audio music, why ? - - Make sure that the MSCDEX driver version 2.0 or later is loaded. - If it says 'MSCDEX version xxx' at game startup, and you still - don't hear the cd music, then probably your card doesn't respond - when SRB2 tries to set the cd volume. If so, make sure your sound - card's mixer have the cd volume set up so that you can hear something. - - + When the CD plays, the game is very 'jerky'. It doesn't do that when - I type 'cd off' in the console. - - You have an old/bad cd driver, that can take up to a second to - respond to cd driver commands. Either get the latest version of - your driver, or turn cd update off. Check 'cd_udpate' in the - console documentation for more. - - * DOS:How can I *ALWAYS* disable the sounds or music of the game ? - - Edit the allegro.cfg file and set digicard/midicard to 0 (none) - - * DOS:My sterero sound is reversed, how can I set it the right way ? - - Change the console variable 'stereoreverse' to either 1 or 0. - Or, you can edit the allegro.cfg file, and set the 'flip_pan' variable. - - - * DOS:The sounds are too 'slow', or 'low-pitched' - - It seems to be a problem of the auto-detection of some 8bit sound - cards. You will have to set manually the 'sb_freq' value in the - allegro.cfg file to a lower value : 11906, 16129. - - * DOS:SRB2 doesn't play any sound/music, but I have a sound - blaster genuine/compatible card. - - If you have a genuine or compatible SoundBlaster card, it is very - important that you set the BLASTER environment variable. - - If you are playing under DOS, and never installed your sound card - under DOS, run the setup of your sound card for DOS. - - Check if the BLASTER variable was set: type 'SET' under dos - (or DOSbox) - - Do you see something like 'BLASTER=A220 I5 D1 ...' ? - - Yes? If you don't hear sounds/music, then tweak the settings in the - allegro.cfg file until you get something, first try changing the - type of the sound card, it is not always properly detected. - - No? You have to set this variable in order that your sound card is - detected. Run the setup that was shipped with your sound card, and - make sure you run the setup for DOS too, it will usually add a - line of the type 'SET BLASTER=... ...' in the autoexec.bat file. - - - * DOS:How can I have better midi music on my 8bit sound card ? - - Use the DIGMID driver, it is supported in SRB2. - - What the hell is this? Well, the Gravis Ultrasound uses digital - samples to play midi music. On a simple 8bit card, you can use digital - samples too, which will sound usually better than what is output - by the poor fm synthesis chip of 8bit cards. - - You will need to get a Gravis Ultrasound patch set, you can find - several ones for free on internet, it consists of a bunch of '.pat' - files which are the digital samples to play the midi instruments - (eg: piano, conga, guitar, ect.). - - Check the Allegro homepage for some links to GUS patches: - http://alleg.sourceforge.net/digmid.html - http://alleg.sourceforge.net/ - http://www.talula.demon.co.uk/allegro/digmid.html - http://www.talula.demon.co.uk/allegro/ - - Now to activate the DIGMID driver: - - Set the 'midi_card' value to 8 (DIGMID) in the allegro.cfg file. - Make sure you leave the 'digi_voices' blank, or set it to a low - value, because the midi music will use digital voices. - At the end of the allegro.cfg file, set the 'patches' value - to the path, where you have installed a Gravis Ultrasound midi - patch set. eg: patches = d:\music\midipat\ - - # Linux: CD music does not work or only works when run as root. - - We do not encourage you to run SRB2 as root (you never know - what SRB2 can do to your system - it's a mighty piece of code :). - There is a common problem with ATAPI CD-rom drives, which are - treated as harddisks. Usually there is a link /dev/cdrom pointing to - device hd[b,c,d]. As harddisks are not supposed to be read directly - via this device (especially not by a common user), there are no read - permissions for "all". For CD-roms you can savely set read permissions - unless you are very paranoid. Assuming your CD-rom drive is /dev/hdc, - set permissions with "chmod +r /dev/hdc" (as root). SCSI CD-rom drives - should not have this problem. But if they do, proceed as described - with ATAPI drives. - - # Linux: The CD music volume is not set properly. - - Go to the console and type "jigglecdvolume 1". - - ----------- - [4] NETWORK - ----------- - - * Where can I find Internet servers ? - - For the moment there is one public server. - http://srb2.servegame.org/ Master server web page - srb2.servegame.org:28910 current Master Server - - * When I start SRB2 with -server or -connect it say : - "BinToPort: Address already in use (EADDRINUSE)" - - It appears only when SRB2 crashes or when you leave with ctrl-break. - use -udpport 12345 (or any other free slot) on both sides (client and - server). - - This can also happens when there is already a SRB2 running on your - computer if you whant to try two SRB2 running on the same computer - use -clientport 12345 (or any other free slot). Then the second will - connect to the first one. - - * Do you use the tcp protocol ? - - No, we use the udp protocol which is faster, but don't worry udp is a - part of the internet protocol. - - - ------------------- - [5] Troubleshooting - ------------------- - - # Linux: SRB2 is hung in fullscreen mode and won´t let me leave. - What shall I do? - - Some people press the reset button, but hey, we are not in the - stoneage of operating systems! There are two "proper" ways to - get out: kill your X-Server. You can usually do this by pressing - "CTRL-ALT-BACKSPACE". But if you have other open applications with - important data (probably hacked away on your diploma thesis for 3 - weeks without saving once) you can also kill SRB2 directly. Press - "CTRL-ALT-F2" and you will get to a console. Log in, type - "killall llxSRB2" and switch back to the X-Server with "CTRL-ALT-F7". - Some X-Server crash on this procedure - blame the X-Server for the - loss of 3 weeks work on your diploma thesis :) diff --git a/doc/manual/manual.htm b/doc/manual/manual.htm deleted file mode 100644 index 3fea1b66f..000000000 --- a/doc/manual/manual.htm +++ /dev/null @@ -1,68 +0,0 @@ - - - - - Sonic Robo Blast 2 Manual - - - - - - - -

- SONIC -
- ROBO BLAST 2 -

-

- Manual -

- - - -
- -
- -
-
-

- - - -

- - diff --git a/doc/rules.txt b/doc/rules.txt deleted file mode 100644 index 4bbb8cdc1..000000000 --- a/doc/rules.txt +++ /dev/null @@ -1,39 +0,0 @@ -SVN-RULES - -- As you can see, there is sub-directory in the repository, one for eatch - platform (djgpp (dos),win32,SDL) the root directory is for all platform, - so take care of the order we have put in. -- do not commit/upload tests of bugged code, try to fix a maximum of know - bugs and update know bugs list in source.txt. If you must commit your source - make your code in #ifdef so we can disable it -- SRB2 is a modification of doom/Doom Legacy source. We allow additionnal feature - and visual addition. -- Maximize communications between members, do not impose your changes, if your - are not sure about a feature/change, talk about it in irc://irc.esper.net/srb2 chat room. - -CODE-RULES - -- We use no tab, 4 space indent, and tab size 8 (in case some tab have filtred - and for makefile) -- Self documented code, variable and function must have a name that help - understand the code, so do not call variable and function a,b, a2, ... -- the usage of extern in a c file is prohibited, except for declaration of a - function with body (so it is like public keyword in c++) - Also function protos haren't allowed for external function, put it un the - corresponding h file. -- Try to minimize #ifdef usage for : - - code readability - - the main code is for all port so if something is good for a platform all - platform can benefit by this feature -- Take care of platform dependent code, we would like to have code that work - on Dos, Win32, SDL, ... little and big endian, software/Glide/OpenGl. - -GOOD PRACTICE - -- Try to put as mush static variable and function on module so it help to - understand the role of the varaible/function in the module also this - help the compiler to optimize -- minimise global variable -- make a log of your work, so you don't need to put a lot of comment in - the code, this will also help us to update the what's new section of doc - when doing final release diff --git a/doc/source.txt b/doc/source.txt deleted file mode 100644 index 5926d95fb..000000000 --- a/doc/source.txt +++ /dev/null @@ -1,240 +0,0 @@ - -1. Compile SRB2 -2. Explanation of the code - 2.1 The memory model - 2.2 Hardware Texture model - -1. Compile SRB2 -================= - -DOS ---- - -need: -- djgpp 2.03 (http://www.delorie.com/djgpp/) -- allegro 3.12 (http://alleg.sourceforge.net/index.html) -( -- libsocket 0.7.4 (beta 4) or better - for use with Winsock 1.1 (example Windows 3.1) - (http://www.phekda.freeserve.co.uk/richdawe/lsck/lsck.htm) - OR -- Wattcp-32 v2.2 dev.rel 6 or better - For use with a packet driver - (http://www.bgnett.no/~giva/) - (http://groups.yahoo.com/group/watt-32/) - (http://groups.yahoo.com/group/watt-32/files/v2.2/) -) -- bcd 1.03 (inlcude in this package) -- gcc 2.95.2 is recommended -- nasm 0.98 (or better) (http://nasm.sourceforge.net/) - -compile: -make -make WATTCP=1 (to make a Wattcp-32 version) - -debug: -when craching SRB2 will return eip -type make asm, then you will have a 8 megs srb2.s (a assembler file) -the you can find the faulting instruction and function - ------------------------------------------------------------------------- - -Linux/SDL ------ - -need: -- tested with gcc 2.95 and 3.X. -- SDL 1.2 -- SDL_mixer 1.2 -- ibogg and libvorbis (http://Xiph.org/) -- nasm 0.98 (or better)(http://nasm.sourceforge.net/) only with 2.95, else add CC30=1 - -compile -make LINUX=1 - -debug: -gdb ? - ------------------------------------------------------------------------- - -Win32 ------ - -need : -- glide 3.x sdk (optional) (http://www.3dfx.com) -- directx6 sdk (or higher) (http://www.micosoft.com/directx) -- nasm 0.98 (or better) (http://nasm.sourceforge.net/) -- use src\win32\wLegacy.dsp -- VC6 should also work with VC5, and VS.NET 200X - -debug: -press on "step over" with the release version (there is some debug info -on it). Then change the eip in the regster window when you will type -enter the edi will go to the faulting instruction. don't forget that -you can follow the stack for calls. -You can also use trace with the debug version but add -win and -nomouse. - ------------------------------------------------------------------------- - -Win32/minGW/SDL ------ - -need: -- tested with gcc 2.95 and 3.X. -- can also use Dev-C++ 5.0 beta 9 (4.9.9.0) from http://www.bloodshed.net/dev/devcpp.html -- SDL 1.2 -- SDL_mixer 1.2 - -compile -make minGW=1 SDL=1 -or use src\SDL\Win32SDL.dev with Dev-C++ 4.9.9.0 or later - -debug: -gdb ? - ------------------------------------------------------------------------- - -WinCE/SDL WIP ------ - -need: -- ActiveSync 3.8 - http://www.microsoft.com/windowsmobile/downloads/activesync38.mspx - -- ActiveSync 3.7.1, if 3.8 isn't available for your language - http://www.microsoft.com/windowsmobile/downloads/activesync37.mspx - -- eMbedded Visual Tools 3.0 - 2002 Edition - http://www.microsoft.com/downloads/details.aspx?FamilyID=f663bf48-31ee-4cbe-aac5-0affd5fb27dd - -- Pocket PC 2000 SDK - http://www.microsoft.com/downloads/details.aspx?FamilyID=bb3f4d7b-de2a-4e1a-a175-26a68c301ac4 - -- Pocket PC 2002 SDK (eMVT 3.0 2002 Ed. comes with this) - http://www.microsoft.com/downloads/details.aspx?FamilyID=2dbee84a-bd94-4167-b817-2b2e548b2e92 - -- Pocket PC 2002 SDK Emulator Images (eMVT 3.0 2002 Ed. comes with this) - http://www.microsoft.com/downloads/details.aspx?FamilyID=25f4de97-ae80-477a-9df1-496b85b3d3e3 - -- eMbedded Visual C++ 4.0 - http://www.microsoft.com/downloads/details.aspx?familyid=1DACDB3D-50D1-41B2-A107-FA75AE960856 - -- eMbedded Visual C++ 4.0 SP3 (Win CE 4.0-4.2) - http://www.microsoft.com/downloads/details.aspx?FamilyID=5bb36f3e-5b3d-419a-9610-2fe53815ae3b - - OR - -- eMbedded Visual C++ 4.0 SP4 (No SH3 support,Win CE 4.0-5.0 support) - http://www.microsoft.com/downloads/details.aspx?FamilyID=4a4ed1f4-91d3-4dbe-986e-a812984318e5 - -- eMbedded Visual C++ 4.0 Update 5625 (SP4 only) - http://www.microsoft.com/downloads/details.aspx?FamilyID=aa282a6d-6f57-436d-8c10-0ec02d94f5b1 - -- Windows CE: Standard Software Development Kit - http://www.microsoft.com/downloads/details.aspx?familyid=a08f6991-16b0-4019-a174-0c40e6d25fe7 - -- SDK for Windows Mobile 2003-based Pocket PCs - http://www.microsoft.com/downloads/details.aspx?FamilyId=9996B314-0364-4623-9EDE-0B5FBB133652 - -- Emulator Images for Windows Mobile 2003 Second Edition software for Pocket PC - http://www.microsoft.com/downloads/details.aspx?familyid=5C53E3B5-F2A2-47D7-A41D-825FD68EBB6C - -- Microsoft Device Emulator 1.0 Community Preview - http://beta.microsoft.com Use Guest ID "MSDEVICE" to access the Community Preview website - -- Windows CE Utilities for Visual Studio .NET 2003 Add-on Pack 1.1 - (if you also have VS 2003 installed, you need this to install Win CE 5.0 SDK, else no need) - http://www.microsoft.com/downloads/details.aspx?FamilyId=7EC99CA6-2095-4086-B0CC-7C6C39B28762 - -- Windows CE 5.0: Standard Software Development Kit (eMC++ 4 SP4 only) - http://www.microsoft.com/downloads/details.aspx?FamilyID=fa1a3d66-3f61-4ddc-9510-ae450e2318c3 - -- SDL 1.27 (use patch and zip in tools\SDL1.2.7_CE) - -compile -use src\SDL\WinCE\SRB2CE.vcw - -debug: -? - - -2. Explanation of the code -========================== - - 2.1 The memory model (original) (z_zone.c) (by BP) - -------------------- - - SRB2 allocate a heap of 6/32/48 megs at begining and provide a Z_Malloc function - to allocate in this heap. - - Z_Malloc( int size,int tag,void* user ) - - size is the size in byte - tag can be : PU_STATIC allocated static (like malloc do) - call Z_Free to free it - PU_LEVEL same as static but the zone is "tagged" with the - tag PU_LEVEL, when calling - Z_FreeTag (PU_LEVEL, PU_LEVEL) all zone tagged - with PU_LEVEL are freed (at the end of the level) - PU_CACHE this one _can_ be freed automatiquely by one other - call to Z_Malloc. the *user point to a pointer - to this zone so when freed automatiquely the - pointer is set to NULL so eatch time you use it - you must check if the pointer is not NULL and - reload it. - - (...) - - 2.2 Hardware Texture model (by BP) - -------------------------- - - Eatch texture/patch/flats/pic in SRB2 are converted to hardware texture at - runtime (the GlideMipmap_s structure (hw_data.h)). I will call hardware - texture a gr_texture so there is no confusion. - - To remind you : - - Texture are set of patch and are associate to linedefs (walls) can be - upper, lower or middle texture. It can have hole on it. - - patch are sprites (the doom patch are run of vertical lines) - - flats are used for floors and ceiling of sectors and have size of 64x64 - it can't have hole on it - - pic are new legacy format for picture, it can only handle plain texture - like flats it is now used for hud in full screen for the main picture - of legacy and for coronas (the format was extended to handle 32 bit color - or intensity + alpha, not all are implemented at this time) - - Since patch, flat and pic are basic structure represented by only one lump in - the wad, the wad loader allocate for eatch lump a GlideMipmap_s (cache3Dfx) - and init data field to NULL. Since the data structure is allocated in - PU_3DFXCACHE (like PU_CACHE) the data will be initilised when needed - (hw_cache.c). - - The GlideMipmap_s structures for textures are initialized on - HWR_PrepLevelCache (hw_cache.c) it is called in P_SetupLevel (load level) - the number of textures is computed with TEXTURE1, TEXTURE2 lumps since this - can be changed in runtime in SRB2 (load a wad while runing) it must be - reallocated. Well, at this time it is realloceted at eatch level start. We - can do better, since numtextures change only when a wad is loaded. - - The 3dfx driver use glide3, it load gr_texture in gr_texture memory of the - card in fifo order when there is no more place it remove the first gr_texture, - the downloaded field of GlideMipmap_s go to false and when needed it is - reloaded in gr_texture memory. In OpenGl, since OpenGl keep texture in there - own memory and handle gr_texture memory of the card we no more need to - redownload it but if we not free time to time gr_texture memory in opengl, - it will get alot of memory, so the gr_texture memory is cleared at eatch - new level (same time of texture reallocation). Opengl and 3dfx link the - loaded gr_texture with the nextmipmap field of GlideMipmap_s so before clear - textures of the heap we MUST free gr_texture memory of OpenGl or 3dfx ! - - SRB2 can also draw patch with a differant colormap (thanks to Hurdler). - When needed it create the same gr_texture but just with a differant colormap. - This one is linked with the original in the GlideMipmap_s with the - nextcolormap field. - - So when a polygone with a gr_texture must be drawn, first we check if the - gr_textures is not allready loaded in hadware memory (downloaded field) if - not then we check if gr_texture data is there (not grabbed by z_malloc - function) if not we must recompute it eatch type of gr_texture (texture, - patch, flat, pic have there own methode) the we can send the gr_texture - to 3dfx or OpenGl. diff --git a/doc/specials.html b/doc/specials.html deleted file mode 100644 index 2cc840632..000000000 --- a/doc/specials.html +++ /dev/null @@ -1,1992 +0,0 @@ - - - - -Sonic Robo Blast II - Specials Reference Document - - - - -

SRB2 Specials Reference Document

- -

Last updated May 27, 2008

- -

For v1.1 Private Beta

- -

This is the SRB2 Specials Reference Document. It is designed to be the ultimate -reference for effects used in SRB2. As such, it is rather technical in areas and quite -concise, and is not something a beginner with level design should be dealing with.

- -

Thing Types

- -

In general, thing bitsets have 4 flags and 3 digits for their height. The bitset is -0xAAAB, where AAA is the object's height above ground, and B are the Easy, Normal, Hard, -and Deaf flags. To get the bitset on a normal object, multiply the height desired by 16, -and then add the existant B. Some objects use 32 as this number, and they will be noted. -Objects that multiply by 16 can be placed up to 4095 units in the air, while objects that -multiply by 32 can be placed up to 2047 units in the air. - -

    -
  • Player Starts
      -

      1 - Player 01 Start

      -

      This is the start for the first player in single player mode, cooperative mode, or race - mode. This start must be placed on every map, as it is what the game defaults to if the - start it is attempting to find isn't there. If there is no Player 1 Start on the map, and - the game is confused over where to spawn the player, the game will crash outright.

      -

      The Deaf tag will make the player spawn from the ceiling, and the object needs to be - multiplied by 32 to give height, not 16.

      -

      2 - Player 02 Start

      -

      This is the start for the second player in cooperative and race mode.

      -

      The Deaf tag will make the player spawn from the ceiling, and the object needs to be - multiplied by 32 to give height, not 16.

      -

      3 - Player 03 Start

      -

      See Thing 2 for more information.

      -

      4 - Player 04 Start

      -

      See Thing 2 for more information.

      -

      5 - Player 05 Start

      -

      See Thing 2 for more information.

      -

      6 - Player 06 Start

      -

      See Thing 2 for more information.

      -

      7 - Player 07 Start

      -

      See Thing 2 for more information.

      -

      8 - Player 08 Start

      -

      See Thing 2 for more information.

      -

      9 - Player 09 Start

      -

      See Thing 2 for more information.

      -

      10 - Player 10 Start

      -

      See Thing 2 for more information.

      -

      11 - Player 11 Start

      -

      See Thing 2 for more information.

      -

      12 - Player 12 Start

      -

      See Thing 2 for more information.

      -

      13 - Player 13 Start

      -

      See Thing 2 for more information.

      -

      14 - Player 14 Start

      -

      See Thing 2 for more information.

      -

      15 - Player 15 Start

      -

      See Thing 2 for more information.

      -

      16 - Player 16 Start

      -

      See Thing 2 for more information.

      -

      17 - Player 17 Start

      -

      See Thing 2 for more information.

      -

      18 - Player 18 Start

      -

      See Thing 2 for more information.

      -

      19 - Player 19 Start

      -

      See Thing 2 for more information.

      -

      20 - Player 20 Start

      -

      See Thing 2 for more information.

      -

      21 - Player 21 Start

      -

      See Thing 2 for more information.

      -

      22 - Player 22 Start

      -

      See Thing 2 for more information.

      -

      23 - Player 23 Start

      -

      See Thing 2 for more information.

      -

      24 - Player 24 Start

      -

      See Thing 2 for more information.

      -

      25 - Player 25 Start

      -

      See Thing 2 for more information.

      -

      26 - Player 26 Start

      -

      See Thing 2 for more information.

      -

      27 - Player 27 Start

      -

      See Thing 2 for more information.

      -

      28 - Player 28 Start

      -

      See Thing 2 for more information.

      -

      29 - Player 29 Start

      -

      See Thing 2 for more information.

      -

      30 - Player 30 Start

      -

      See Thing 2 for more information.

      -

      31 - Player 31 Start

      -

      See Thing 2 for more information.

      -

      32 - Player 32 Start

      -

      See Thing 2 for more information.

      -

      33 - Player Match Start

      -

      This is the start for players in Match and Chaos modes. They should also be placed in - Capture the Flag maps as well. There should be 32 of these in a map to assure proper - randomization. While it's unelegant, they can be stacked on top of each other without - negative effect.

      -

      The Deaf tag will make the player spawn from the ceiling, and the object needs to be - multiplied by 32 to give height, not 16.

      -

      34 - CTF Team Start (Red)

      -

      This is the start for players on the red team in Capture the Flag mode. There should be - 32 of these in a map to assure proper randomization. While it's unelegant, they can be - stacked on top of each other without negative effect.

      -

      The Deaf tag will make the player spawn from the ceiling, and the object needs to be - multiplied by 32 to give height, not 16.

      -

      35 - CTF Team Start (Blue)

      -

      This is the start for players on the blue team in Capture the Flag mode. There should - be 32 of these in a map to assure proper randomization. While it's unelegant, they can be - stacked on top of each other without negative effect.

      -

      The Deaf tag will make the player spawn from the ceiling, and the object needs to be - multiplied by 32 to give height, not 16.

      -

       

      -
    -
  • -
  • Enemies
      -

      100 - Crawla (Blue)

      -

      These are the blue ground enemies found in the one player stages. They can't move off - of cliffs and are exceedingly slow.

      -

      101 - Crawla (Red)

      -

      These are the red ground enemies found in the one player stages. They can't move off - cliffs and are relatively slow.

      -

      102 - Stupid Dumb Unnamed RoboFish (tm)

      -

      This is the little fish in Greenflower Zone. The angle determines the jump height, with - 0 being the old jump style. Note that the jump height is based on force, not units, so - experimentation will be necessary to get the correct height.

      -

      103 - Yellow Buzz

      -

      This enemy flies at a moderate speed directly at the player.

      -

      104 - Red Buzz

      -

      This enemy flies at a relatively high speed directly at the player.

      -

      105 - Jetty-Syn Bomber

      -

      This is a highly mobile flying enemy with a bomb that it drops on the player from - directly above. It is considered highly difficult to kill, and should only be used in - situations where the stage is supposed to be difficult.

      -

      106 - Jetty-Syn Gunner

      -

      This is a highly mobile flying enemy with a gun that it fires at the player with high - accuracy. It is considered highly difficult to kill, and should only be used in situations - where the stage is supposed to be difficult.

      -

      107 - Crawla Commander

      -

      This is the grey floating enemy in the opening room of Techno Hill Zone Act 2. It is - quite fast and will start bouncing after taking the first hit. It is significantly - challenging, although a spindash will kill it given time.

      -

      108 - Deton

      -

      This is the red spherical enemy in Techno Hill Zone Act 2. Upon seeing the player, it - makes a mad dash straight for them. With the exception of the Armageddon - Shield, Detons are invincible, and must be avoided by running behind a wall or another - enemy.

      -

      109 - Skim

      -

      This is an enemy that floats on the surface of the water, dropping bombs into the water - below. It is not currently used in any of the Single Player stages, but it is fully - operational. The designer does not have to put them on the surface of the water, they know - where it is.

      -

      110 - THZ Turret

      -

      This is the turret from Techno Hill Zone Act 2. It fires large bursts of laser fire at - the player with high accuracy. It is invincible unless it is somehow dipped into water.

      -

      111 - Popup Turret

      -

      This is a small turret that pops up now and then and shoots. The object's angle is a - value defining the delay between shooting.

      -

      112 - Sharp

      -

      This is a blue enemy with spikes on top if it. It starts off by slowly chasing the player, - then it fades to red and runs after the player, and is invincible until it fades back to red.

      -

      113 – Jet Jaw

      -

      This is an underwater enemy that tries to bite at the player, which can be found in - Deep Sea Zone.

      -

      114 – Snailer

      -

      This is an incomplete enemy.

      -

      115 – Bird Aircraft Strike Hazard (B.A.S.H.)

      -

      This is the red vulture-like enemy in Arid Canyon Zone. If it sees a player, it lifts off and - charges at him. Collision with a wall will send it plummeting.

      -

      116 – Pointy

      -

      This is the orbinaut enemy that has spikes circling around it. None of the single player stages - currently use him. You have to place him in a map by using a WAD editor, he can't be placed using - objectplace.

      -

      117 – Robo-Hood

      -

      This is the green enemy from Castle Eggman Zone, which shoots arrows at the player.

      -

      118 – CastleBot FaceStabber

      -

      This is the large grey enemy from Castle Eggman Zone. It slowly trudges towards the player, - and if the player in range, lunges at them with his sword.

      -

      119 – Egg Guard

      -

      This is the enemy from Castle Eggman Zone that wields a protective shield.

      -

      120 – Green Snapper

      -

      This is the green turtle enemy from Arid Canyon Zone. This enemy behaves exactly like a blue - crawla does. The circumference of its shell is covered with spikes, so the only way to destroy it - is by jumping on top of it.

      -

      121 – Minus

      -

      This is the digging enemy from Arid Canyon Zone. It burrows underground towards the player, and - once it's directly underneath, it bursts out from under the ground, jumping up and hurting the player.

      -

       

      -
    -
  • -
  • Bosses and their associated items (if any)
      -

      200 - Egg Mobile (Boss 1)

      -

      The boss of Greenflower Zone and Castle Eggman Zone. He moves around firing at the - player, and after taking six hits, he dashes at the player.

      -

      Giving the boss the Deaf flag will make him have spikeballs, like CEZ3, and giving him - the Multi flag will make the level end when he is dead. To place him above ground, - multiply by 32 to give height, not 16.

      -

      201 - Egg Slimer (Boss 2)

      -

      This is the boss of Techno Hill Zone. It requires an axis point at the center to - function, and it goes in a circle around the axis point dropping slime. After 6 hits, he - stops going in a circle, and bouncing at the player, spewing a lot more slime.

      -

      The Multi flag will make the level end when he is dead.

      -

      202 - Sea Egg (Boss 3)

      -

      This is the boss of Deep Sea Zone. More information will be supplied later.

      -

      The Multi flag will make the level end when he is dead.

      -

      203 - Eggscalibur (Boss 4)

      -

      This is the boss of Castle Eggman Zone. More information will be supplied later.

      -

      The Multi flag will make the level end when he is dead.

      -

      290 - Boss Flypoint

      -

      This is the location the boss will fly to after being killed.

      -

      291 - Egg Capsule Center

      -

       

      -
    -
  • -
  • Collectibles
      -

      300 - Ring

      -

      This is a normal ring. Pick this up to get one ring.

      -

      Giving the deaf tag to a ring will cause it to float 31 units above the ground. This - does stack with bitsets, allowing rings to be a total of 4127 units above the ground at - maximum.

      -

      301 - Bounce Ring

      -

      Picking this up gives you more ammo for this particular ring weapon. You cannot fire - the weapon, however, if you do not have the associated panel. -

      302 - Rail Ring

      -

      See thing #301.

      -

      304 - Automatic Ring

      -

      See thing #301.

      -

      305 - Explosion Ring

      -

      See thing #301.

      -

      306 - Scatter Ring

      -

      See thing #301.

      -

      307 - Grenade Ring

      -

      See thing #301.

      -

      310 - CTF Flag (Red)

      -

      This is the red team's flag in capture the flag mode. If the blue team takes this to - their team base (sector type 16384), they score a point.

      -

      311 - CTF Flag (Blue)

      -

      This is the blue team's flag in capture the flag mode. If the red team takes this to - their team base (sector type 12288), they score a point.

      -

      312 - Special Stage Token

      -

      This token gives the player a chance at the special stage after the current stage has - ended. If more than one token is collected, the player gets that many chances at the - special stages, continuing until they run out of tokens or have all the emeralds.

      -

      313 - Emerald 1 (Green)

      -

      This object gives the player the first emerald as a pickup object, instead of by - completing a special stage.

      -

      314 - Emerald 2 (Orange)

      -

      This object gives the player the second emerald as a pickup object, instead of by - completing a special stage.

      -

      315 - Emerald 3 (Pink)

      -

      This object gives the player the third emerald as a pickup object, instead of by - completing a special stage.

      -

      316 - Emerald 4 (Blue)

      -

      This object gives the player the fourth emerald as a pickup object, instead of by - completing a special stage.

      -

      317 - Emerald 5 (Red)

      -

      This object gives the player the fifth emerald as a pickup object, instead of by - completing a special stage.

      -

      318 - Emerald 6 (Light Blue)

      -

      This object gives the player the sixth emerald as a pickup object, instead of by - completing a special stage.

      -

      319 - Emerald 7 (Grey)

      -

      This object gives the player the seventh emerald as a pickup object, instead of by - completing a special stage.

      -

      320 - Emerald Hunt Location

      -

      This is one of the three emeralds to be used in Hunting mode.

      -

      323 - Emerald Spawn

      -

      Spawn location for emeralds in Match mode.

      -

      330 - Bounce Ring Panel

      -

      This is a match weapon panel. The Bounce Ring throws a slow ring that will bounce when - it hits walls.

      -

      Giving the deaf tag to a panel will cause it to float 31 units above the ground. This - does stack with bitsets, allowing panels to be a total of 4127 units above the ground at - maximum.

      -

      331 - Rail Ring Panel

      -

      This is a match weapon panel. The Rail Ring gives the player an instantaneous shot, that - strikes its target the instant its fired, however there is a long downtime between shots. - Being shot by a rail ring causes more kickback than normal.

      -

      Giving the deaf tag to a panel will cause it to float 31 units above the ground. This - does stack with bitsets, allowing panels to be a total of 4127 units above the ground at - maximum.

      -

      332 - Automatic Ring Panel

      -

      This is a match weapon panel. The Automatic Ring gives the player a fire rate of 17.5 - rings per second.

      -

      Giving the deaf tag to a panel will cause it to float 31 units above the ground. This - does stack with bitsets, allowing panels to be a total of 4127 units above the ground at - maximum.

      -

      333 - Explosion Ring Panel

      -

      This is a match weapon panel. The Explosion Ring throws a slow ring that explodes into - many fragments upon striking a wall or another player. Being struck directly by the - Explosion Ring causes more kickback than usual.

      -

      Giving the deaf tag to a panel will cause it to float 31 units above the ground. This - does stack with bitsets, allowing panels to be a total of 4127 units above the ground at - maximum.

      -

      334 - Scatter Ring Panel

      -

      This is a match weapon panel. The Scatter Ring throws 5 rings in a plus-shape.

      -

      Giving the deaf tag to a panel will cause it to float 31 units above the ground. This - does stack with bitsets, allowing panels to be a total of 4127 units above the ground at - maximum.

      -

      335 - Grenade Ring Panel

      -

      This is a match weapon panel. The Grenade Ring throws a grenade that will explode - if an opposing player gets too close to it. It will also explode automatically after a - while if left untouched.

      -

      Giving the deaf tag to a panel will cause it to float 31 units above the ground. This - does stack with bitsets, allowing panels to be a total of 4127 units above the ground at - maximum.

      -

       

      -
    -
  • -
  • Boxes
      -

      400 - Super Ring (10 Rings)

      -

      This monitor gives the player ten rings.

      -

      If monitors are given the Deaf tag, they will respawn as a random monitor type (not a ? - monitor) from the weighted table in modes that support respawn. Elsewise, they will - respawn as the same monitor.

      -

      402 - Attraction Shield

      -

      Also known as the yellow shield and god shield, this shield protects the player from a - single hit, then disappears. It also attracts all normal rings, spilled or on the map to - the player with the shield. It also protects the player from electric damage.

      -

      If monitors are given the Deaf tag, they will respawn as a random monitor type (not a ? - monitor) from the weighted table in modes that support respawn. Elsewise, they will - respawn as the same monitor.

      -

      403 - Force Shield

      -

      Also known as the blue shield, this shield protects the player from two hits, then - disappears. If the spin  button is pressed while jumping, it is also possible to - reflect many projectiles.

      -

      If monitors are given the Deaf tag, they will respawn as a random monitor type (not a ? - monitor) from the weighted table in modes that support respawn. Elsewise, they will - respawn as the same monitor.

      -

      404 - Armageddon Shield

      -

      Also known as the black shield, this shield protects the player from a single hit, - triggering upon a hit. The shield can also be triggered by jumping, and then hitting the - spin key in midair. When the shield is triggered, a flash of light damages everything - within a large radius, destroying the shield in the process.

      -

      If monitors are given the Deaf tag, they will respawn as a random monitor type (not a ? - monitor) from the weighted table in modes that support respawn. Elsewise, they will - respawn as the same monitor.

      -

      405 - Whirlwind Shield

      -

      This shield protects the player from a single hit, then disappears. If the player does - a jump-spin, they will do a second jump in midair, making the maximum height that the - player can jump with the shield 224.

      -

      Versions of SRB2 previous to 1.09 had the Basic Shield in this object number, so make - sure to note that if the player loads the map in an older version, that is what they will - see.

      -

      If monitors are given the Deaf tag, they will respawn as a random monitor type (not a ? - monitor) from the weighted table in modes that support respawn. Elsewise, they will - respawn as the same monitor.

      -

      406 - Elemental Shield

      -

      Also known as the green  shield, this shield protects the player from a single - hit, then disappears. While this shield is active, the player cannot drown. It also - protects the player from water, fire, and other damage. When the player with this shield - spin-dashes, it leaves a trail of fire, which deals fire damage to any enemy that touches - it.

      -

      If monitors are given the Deaf tag, they will respawn as a random monitor type (not a ? - monitor) from the weighted table in modes that support respawn. Elsewise, they will - respawn as the same monitor.

      -

      407 - Super Sneakers

      -

      This is a monitor powerup that gives the player about 2x running speed for 20 seconds.

      -

      408 - Invincibility

      -

      This is a monitor powerup that prevents all damage to the player for 20 seconds.

      -

      409 - Extra Life

      -

      This powerup monitor features the player's face, and provides an extra life when - struck.

      -

      If monitors are given the Deaf tag, they will respawn as a random monitor type (not a ? - monitor) from the weighted table in modes that support respawn. Elsewise, they will - respawn as the same monitor.

      -

      410 - Eggman

      -

      This monitor damages the player if they strike it.

      -

      If monitors are given the Deaf tag, they will respawn as a random monitor type (not a ? - monitor) from the weighted table in modes that support respawn. Elsewise, they will - respawn as the same monitor.

      -

      411 - Teleporter

      -

      This monitor mixes up all locations of players, teleporting them to the location of a - random other player. It has no effect in Single Player or in multiplayer modes while only - one player is in the game.

      -

      If monitors are given the Deaf tag, they will respawn as a random monitor type (not a ? - monitor) from the weighted table in modes that support respawn. Elsewise, they will - respawn as the same monitor.

      -

      412 - Random Box

      -

      Destroy this monitor and you will get a random powerup, like the boxes in Sonic 2 race - mode.

      -

      413 - Gravity Boots Box

      -

      Destroy this monitor and the gravity will be flipped for a short time.

      -

       

      -
    -
  • -
  • Interactive Objects (friendly or otherwise)
      -

      500 - Air Bubble Patch

      -

      This is the air bubble patch used underwater to give players air. It spawns big bubbles - randomly which replenish the player's air.

      -

      501 - End Level Sign

      -

      This is the sign at the end of the stage. When the player enters the Exit - Sector, this sign will start to spin, and end on the face of the player. This sign - does not make the stage end, it's just a visual effect for it.

      -

      502 - Star Post

      -

      Star Posts allow the player to respawn after dying at a point other than the beginning - of the stage. There can be up to 32 Star Posts in a map, and they work with the bitsets.

      -

      Instead of controlling the difficulty and deaf flags, the final digit of the bitset - determines the number of the Star Post. 0x0000 is the first one and 0x000f is the - sixteenth one. Note that since this overwrites all of the difficulty flags, they will - appear in all difficulties, even though 0x0000 would normally mean it wouldn't appear in - any difficulty level.

      -

      520 - Spikeball

      -

      Just like thing 521, except they do normal damage to the player on - contact.

      -

      521 - Spikeball (Special Stage)

      -

      These are the spikeballs used in the special stages. They harm the player for damage on - contact, but only if they are carrying rings.

      -

      522 - Ceiling Spike

      -

      This is a downward pointing spike for use on the ceiling. Touching the pointy end of - the spike deals damage to the player.

      -

      By default, it attaches itself to the ceiling, and the height part of the bitset - measures how far down from the ceiling, instead of up from the floor.

      -

      523 - Floor Spike

      -

      This is a upward pointing spike for use on the floor. Touching the pointy end of the - spike deals damage to the player.

      -

      524 - Big Floating Mine

      -

      When you get close, this mine will start to follow you. Touches you, and it explodes.

      -

      540 - THZ Fan

      -

      This is the fan used inside the secret passage in Techno Hill Zone Act 1. It pushes the - player slowly up until it reaches the maximum height it can. The maximum height is - determined by the angle, measured in normal fracunits (It can go above 360 just fine).

      -

      541 - THZ Gas Jet

      -

      This is the gas jet used at the end of Techno Hill Zone Act 1. It launches the player - straight up on regular intervals about the same height as a yellow spring pointing up.

      -

      550 - Yellow Spring (Up)

      -

      This is a yellow spring pointing straight up. It has a medium amount of force behind - it.

      -

      551 - Red Spring (Up)

      -

      This is a red spring pointing straight up. It has a large amount of force behind it.

      -

      552 - Blue Spring

      -

      This is a blue spring pointing straight up. It has a small amount of force behind it. - The intent is for this spring to be used underwater. It has about the same effect - underwater as a yellow spring does above water.

      -

      553 - Yellow Spring (Down)

      -

      This is a yellow spring pointing straight down. It has a medium amount of force behind - it.

      -

      554 - Red Spring (Down)

      -

      This is a red spring pointing straight down. It has a large amount of force behind it.

      -

      555 - Yellow Spring (Diagonal Up)

      -

      This is a yellow spring pointing upwards and in the direction the thing is facing. It - has a medium amount of force behind it. When the player touches this spring, he will - automatically turn to face the direction the spring is launching the player.

      -

      556 - Red Spring (Diagonal Up)

      -

      This is a red spring pointing upwards and in the direction the thing is facing. It has - a large amount of force behind it. When the player touches this spring, he will - automatically turn to face the direction the spring is launching the player.

      -

      557 - Yellow Spring (Diagonal Down)

      -

      This is a yellow spring pointing downwards and in the direction the thing is facing. It - has a medium amount of force behind it. When the player touches this spring, he will - automatically turn to face the direction the spring is launching the player.

      -

      558 - Red Spring (Diagonal Down)

      -

      This is a red spring pointing downward and in the direction the thing is facing. It has - a large amount of force behind it. When the player touches this spring, he will - automatically turn to face the direction the spring is launching the player.

      -

       

      -
    -
  • -
  • Special placement patterns
      -

      600 - 5 Vertical Rings (Yellow Spring)

      -

      This is a chain of five rings intended to be used with thing 550. - Do not use ring chain objects in any mode where items respawn, because ring chains do not - respawn. Use bitsets to create chains in any mode with item respawn.

      -

      601 - 5 Vertical Rings (Red Spring)

      -

      This is a chain of five rings intended to be used with thing 551. - Do not use ring chain objects in any mode where items respawn, because ring chains do not - respawn. Use bitsets to create chains in any mode with item respawn.

      -

      602 - 5 Diagonal Rings (Yellow Spring)

      -

      This is a chain of five rings intended to be used with thing 555. - Do not use ring chain objects in any mode where items respawn, because ring chains do not - respawn. Use bitsets to create chains in any mode with item respawn.

      -

      603 - 10 Diagonal Rings (Red Spring)

      -

      This is a chain of ten rings intended to be used with thing 556. Do - not use ring chain objects in any mode where items respawn, because ring chains do not - respawn. Use bitsets to create chains in any mode with item respawn.

      -

      604 - Nights: Circle of Rings

      -

      605 - Nights: Circle of Rings (Big)

      -

      606 - Nights: Circle of Wing Logos

      -

      607 - Nights: Circle of Wing Logos (Big)

      -

      608 - Nights: Circle of Rings and Wings

      -

      609 - Nights: Circle of Rings and Wings (Big)

      -

       

      -
    -
  • -
  • Powerup indicators/environmental effects/miscellany
      -

      700 - Ambient Water SFX 1A (Small)

      -

      701 - Ambient Water SFX 1B (Small)

      -

      702 - Ambient Water SFX 2A (Medium)

      -

      703 - Ambient Water SFX 2B (Medium)

      -

      704 - Ambient Water SFX 3A (Large)

      -

      705 - Ambient Water SFX 3B (Large)

      -

      706 - Ambient Water SFX 4A (Extra Large)

      -

      707 - Ambient Water SFX 4B (Extra Large)

      -

      708 - Random Ambience 1

      -

      709 - Random Ambience 2

      -

      750 - Chaos Mode Enemy Spawn

      -

      This is where the enemies spawn from in Chaos mode. There should be around 12 of these - points on a map with Chaos support.

      -

      751 - Teleport Destination

      -

      This is the thing to be used with linedef type 412, the linedef - executor that teleports a player. This thing is where the player will spawn in the tagged - sector.

      -

      752 - Alternate View Point

      -

      This is the thing to be used with linedef type 422, the linedef - executor that changes the camera view. This thing is where the camera will be moved to in - the tagged sector.

      -

      753 - Zoom Tube Waypoint

      -

      Waypoints for zoom tubes. Think of Sonic 2's Metropolis Zone, Sonic 3 & Knuckles's - Death Egg Zone, and Lava Reef Zone. The lower byte of the ANGLE field specifies the - waypoint's number in the sequence, and the upper byte specifies the sequence that the - waypoint belongs to. These are used in conjunction with sector type 32768 - and 36864.

      -

      754 - Push

      -

      755 - Pull

      -

      756 - Street Light Source

      -

      This produces a light in OpenGL. It is used in Starlit Warehouse Zone, one of the match - stages, as the street lights.

      -

      760 - PolyObject Anchor

      -

      This is the first of the two points used to set up 'how much to move' a polyobject by - when creating it. Angle is the PolyObject ID#.

      -

      761 - PolyObject SpawnPoint

      -

      This is the second of the two points used to set up 'how much to move' a polyobject by - when creating it. Angle is the PolyObject ID#.

      -

      762 - PolyObject SpawnPoint Crush

      -

      This is the second of the two points used to set up 'how much to move' a polyobject by - when creating it. Angle is the PolyObject ID#. This item tells the PolyObject that it - should hurt the player.

      -

       

      -
    -
  • -
  • Greenflower Scenery
      -

      800 - GFZ Flower (Normal)

      -

      This is a scenery object from Greenflower Zone. It is the orange flower seen all - throughout GFZ and most GFZ-themed custom maps.

      -

      801 - GFZ Sunflower

      -

      This is a scenery object from Greenflower Zone. It is the large blue sunflower seen all - throughout GFZ and most GFZ-themed custom maps.

      -

      802 - GFZ Budding Flower

      -

      This is a scenery object from Greenflower Zone. It is the small purple flower seen all - throughout GFZ and most GFZ-themed custom maps.

      -

      804 - Berry Bush

      -

      This is a scenery object from Greenflower Zone. It is the green bush with red berries - seen all throughout GFZ and most GFZ-themed custom maps.

      -

      805 - Bush

      -

      This is a scenery object from Greenflower Zone. It is the green bush without the - berries seen all throughout GFZ and most GFZ-themed custom maps.

      -

       

      -
    -
  • -
  • Techno Hill Scenery
      -

      900 - THZ Flower

      -

      This is a scenery object from Techno Hill Zone Act 1. It is the metallic white flower.

      -

      901 - THZ Alarm

      -

      This is a scenery object from Techno Hill Zone Act 2. It is the little alarm in the - passage with the first Star Post. It creates noise, but the red visual effect in THZ2 was - done with a colormap, not this object.

      -

       

      -
    -
  • -
  • Deep Sea Scenery
      -

      1000 - Gargoyle

      -

      Pushable gargoyle. Can be stood on top of as well.

      -

      Giving this the Deaf tag will prevent it from being pushable.

      -

      1001 - Seaweed

      -

      Animated seaweed. Intangible scenery.

      -

      1002 - Dripping Water

      -

      Water dripping from the ceiling. ANGLE value specifies start delay.

      -

       

      -
    -
  • -
  • Castle Eggman Scenery
      -

      1100 - Hanging Chain

      -

      This is a scenery object from Castle Eggman, a dungeon chain hanging from the ceiling.

      -

      By default, it attaches itself to the ceiling, and the height part of the bitset - measures how far down from the ceiling, instead of up from the floor.

      -

      1101 - CEZ Torch

      -

      This is the torch used in Castle Eggman Zone. It produces light in OpenGL, and it harms - the player for fire damage on contact.

      -

      1102 - Eggman Statue

      -

      This is the large Eggman statue in Castle Eggman Zone.

      -

      1103 - CEZ Flower

      -

      This is a scenery object from Castle Eggman Zone. It is the decaying flower.

      -

       

      -
    -
  • -
  • Arid Canyon Scenery
      -

      1200 – Big Tumbleweed

      -

      A large moveable tumbleweed that rolls along the floor.

      -

      1201 – Little Tumbleweed

      -

      A small movable tumbleweed that rolls along the floor.

      -

      1202 – Rock Spawner

      -

      An object which randomly spawns falling rocks, which damage the player on impact.
      - Description on how to use goes here.

      -
    -
  • -
  • Red Volcano Scenery
      -

      1300 – Horizontal Flame Jet

      -

      A stready stream of flames comes out horizontally.

      -

      1301 – Vertial Flame Jet

      -

      A stready stream of flames comes out vertially.

      -
    -
  • -
  • Dark City Scenery
      -
    -
  • -
  • Doom Ship Scenery
      -
    -
  • -
  • Egg Rock / Final Fight Scenery
      -
    -
  • -
  • NiGHTS Items
      -

      1700 - Nights: Axis

      -

      Lower 10 bits: Axis number in the mare (0-based) Upper 6 bits: Mare that axis belongs - to (0-based). ANGLE value determines the size of the axis to rotate around. If 16384 is - added to the ANGLE value, the axis will be inverted.

      -

      1701 - Nights: Axis Transfer (Normal)

      -

      1702 - Nights: Axis Transfer Line

      -

      1703 - Nights: Ideya Drone

      -

      Angle value sets the NiGHTS timer, in seconds.

      -

      1704 - Nights: Bumper

      -

      Lower 4 bits of the flags specify the angle of the bumper in 30 degree increments.

      -

      1705 - Nights: Hoop

      -

      1706 - Nights: Wing Logo

      -

      1707 - Nights: Super Loop

      -

      1708 - Nights: Drill Refill

      -

      1709 - Nights: Helper

      -

      1710 - Nights: Egg Capsule

      -

      The capsule you need to collect rings to break in NiGHTS. The value of its ANGLE field - determines how many rings you need to break it. Just like the axis points, the upper bits - (value >> 10) determine the mare it belongs to. For example, an angle value of 1024 - means it belongs to mare 1 (2nd mare, it's zero based), and requires 0 rings to break. - 1030 would be mare 1, and 6 rings to break. 2048 would be mare 2, no rings.

      -

       

      -
    -
  • -
  • Mario Items
      -

      1800 - Coin

      -

      This is a coin, which is essentially a ring with Mario graphics and sound effects.

      -

      1801 - Overworld Goomba

      -

      These are the enemies in Mario Koopa Blast 1, and are essentially Crawlas with a Mario - graphic.

      -

      1802 - Underworld Goomba

      -

      These are the enemies in Mario Koopa Blast 2, and are essentially Crawlas with a Mario - graphic.

      -

      1803 - Fire Flower

      -

      This is the powerup from the Mario Koopa Blast stages. It changes the player to a white - palette, and allows the player to throw fireballs with the fire button. The fireballs fly - in a Mario-style bounce trajectory until they hit an enemy or a wall.

      -

      1804 - Koopa Shell

      -

      This is the Koopa Shell in Mario Koopa Blast 1. It will bounce around, striking enemies - and players.

      -

      1805 - Puma (Mario Jumping Fireball)

      -

      This is the fireball used in Mario Koopa Blast 3. The angle determines the jump height, - with 0 being the old jump style. Note that the jump height is based on force, not units, - so experimentation will be necessary to get the correct height.

      -

      1806 - King Bowser

      -

      1807 - Axe

      -

      The axe used to defeat Bowser in the third Mario level.

      -

      1808 - Bush (Short)

      -

      This is a scenery object from Mario Koopa Blast

      -

      1809 - Bush (Tall)

      -

      This is a scenery object from Mario Koopa Blast

      -

      1810 - Toad

      -

      This is Toad at the end of Mario Koopa Blast 3.

      -

       

      -
    -
  • -
  • Xmas Items
      -

      1850 - Xmas Pole

      -

      X-Mas scenery object. Looks like a little barber shop pole.

      -

      1851 - Candy Cane

      -

      X-Mas scenery object. Looks like a candy cane.

      -

      Note that Mystic Realm 4 replaces this object with the Sonic 1 palm tree, so any maps - loaded while Mystic Realm 4 is loaded will overwrite the image, making any candy canes - look like palm trees, which can look kinda stupid.

      -

      1852 - Snowman

      -

      X-Mas scenery object. Pushable snowman with a happy face. Can be stood on top of as - well. Acts the same as thing 1000.

      -

      Giving this the Deaf tag will prevent it from being pushable.

      -

       

      -
    -
  • -

    Linedef Types

    -

    Lines may have flags applied to them. The following is a reference of their values. - Unless specified otherwise in a line type, the flags behave as follows:

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    NAMEVALUEDESCRIPTION
    EFFECT61Special use flag #6.
    BLOCKMONSTERS2Prevents an enemy from crossing the line. May not work for especially - speedy enemies.
    TWOSIDED4Flag used to indicate if a line is two sided. Do not modify.
    DONTPEGTOP8Unpeg upper texture. Good for moving floors.
    DONTPEGBOTTOM16Unpeg bottom texture. Good for moving ceilings.
    EFFECT132Special use flag #1.
    NOCLIMB64Don't allow Knuckles to climb on this wall.
    EFFECT2128Special use flag #2.
    EFFECT3256Special use flag #3.
    EFFECT4512Special use flag #4.
    EFFECT51024Special use flag #5.
    NOSONIC2048Disable line special if playing as Sonic (Single Player Only).
    NOTAILS4096Disable line special if playing as Tails (Single Player Only).
    NOKNUX8192Disable line special if playing as Knuckles (Single Player Only).
    BOUNCY16384Bounce the player off this line.
    TFERLINE32768Use this on a FOF line special to define the texture & offsets for - each side of the FOF. The control sector must have at LEAST the same # of sides as the - target sector(s).
    -

    -
  • Level Parameters / Miscellany
      -

      1 - Per-Sector Gravity

      -

      Sets the gravity of the tagged sector or sectors, as a percentage of global gravity - (which can be set separately using sector type 176). The floor height - of the control sector is used. If it is 1000, then the target sector will have 100% - gravity. If it is 500, the target sector will have 50% of the global gravity. Negative - values work as well, but players can't jump down; they'll get stuck to the ceiling, unless - the NOCLIMB flag is checked.

      -

      You can apply this special to the control sector of an intangible FOF to change the - gravity only inside that FOF.

      -

      2 - Custom Exit

      -

      Tag this to an Exit Sector (type 8192) to exit to a custom level, - overriding the one set in the map header. The map number you go to is indicated by the - front sector's floor. Additionally, if the control linedef's bitset is set to disallow - climbing (with the NOCLIMB attribute, whose value is 64), skip the - score tally screen when switching to the new map.

      -

      If the control linedef has the BLOCKMONSTERS flag set, - this effect does something super complicated and fun, going to a different level depending - on whether the player has all emeralds or not. If the player has seven emeralds, the - linedef's front sector's ceiling height will be used. Otherwise, go to the map number - indicated by the linedef's front sector's floor. That's only if you set the BLOCKMONSTERS flag.

      -

      If the EFFECT4 flag is set, the linedef's front side x offset - will be used as the new gametype after the map change, providing it is in range (from 0 to - 4, inclusive).

      -

      3 - Zoom Tube Parameters

      -

      X length = speed. Y length = waypoint sequence #. See sector type 32768 - for more information.

      -

      4 - Speed Pad

      -

      Creates a speed pad. The linedef direction and indicates the direction of the pad. The - target sector must have type 1280 or 1536 for - this to work.

      -

      If the EFFECT4 flag is set, you will not be teleported to the - center of the sector when the speed pad is activated.

      -

      5 - Camera Scanner

      -

      Modifies camera position while the player is in the target sector. The floor and - ceiling of the control sector and the angle of the control linedef are the values for - CAM_HEIGHT, CAM_DIST, and CAM_ROTATE, respectively. Camera position is reset when the - player steps outside the sector.

      -

      6 - Disable Linedef

      -

      Disables any linedef specials that share the same tag. Will be used in the future to - check if a particular level has been previously cleared or not.

      -

      7 - Flat Alignment

      -

      Aligns floor and/or ceiling flats. The x alignment is specified by the control - linedef's x distance (the difference between the x values of its two vertices), and the y - alignment is specified by the control linedef's y distance.

      -

      By default, works on both the floor and ceiling (however, note that skies cannot be - "aligned" ;). Adding the NOCLIMB flag to the linedef will - align the floor only, while the BLOCKMONSTERS flag will make - it align the ceiling only.

      -

      8 - Sector Special Parameters

      -

      Sets special behavior of a sector's type depending on the flag(s) checked:

      -

      NOCLIMB - Special only operates when touching ceiling

      -

      EFFECT4 - Special operates when touching either the floor or the - ceiling

      -

      EFFECT3 - Special operates by just touching the sector, rather - than having to be inside of it.

      -

      9 - Chain Parameters

      -

      Sets special behavior of a moving chain as such:

      -

      x length - # of links on the chain

      -

      y length - Overall speed (0-15)

      -

      X offset - Rotation speed on the X axis (0-15)

      -

      Y offset - Rotation speed on the Z axis (0-15)

      -

      floorheight - angle to start at (0-15)

      -

      ceilingheight - maximum rotation speed

      -

      10 - Culling Plane

      -

      Set like line 1, this creates an invisible plane in the sector. If - your view is above this plane, lots of things drawn below the height of this plane will be - discarded, and if your view is below the plane, a lot of things drawn above the height of - the plane will be discarded. This is to tell the game to not draw stuff that you aren't - going to see anyway. Do note that the view doesn't have to be in the current sector, you - can also be viewing from the side, which may be undesirable. To prevent this problem, you - can check the NOCLIMB flag, which will allow you to 'group' a set - of sectors to one control sector in which the culling will only take effect. For example, - you have a control sector set up for culling, and have two culling lines in the control - sector, tagged to sectors 'A' and 'B'. If the player is in sector 'A' or 'B', the culling - will occur, but if the player is in sector 'C', it will not.

      -

      11 - Rope Hang Parameters

      -

      X length = speed. Y length = waypoint sequence #.

      -

      EFFECT1 - Don't wrap movement

      -

      See sector type 45056 for more information.

      -

      12 - Rock Spawn Parameters

      -

      Sets special behavior of a rock spawner (#1202) as such:

      -

      length - momentum strength

      -

      line angle - momentum angle

      -

      X offset - # of tics to wait until another is spawned

      -

      Y offset - Rock crumble sprite to use (0-15)

      -

      NOCLIMB - add some randomization to the momentum

      -

       

      -

      13 - Heat Wave

      -

      Applies a heat effect to the screen. Tag this to a sector, or to the control sector of a FOF.

      -

       

      -
    -
  • -
  • Level Parameters / Miscellany
      -

      20 - Marks first line in PolyObject

      -

      Explain here.

      -

      21 - Explicitly include a PolyObject line

      -

      Explain here.

      -

      30 - PolyObject Parameters

      -

      Explain here.

      -

       

      -
    -
  • -
  • Level-Load Effects
      -

      50 - Instant Floor Lower

      -

      Makes the floor instantly lower on level load to be at the same height as the lowest - floor of any bordering sector.

      -

      51 - Instant Ceiling Raise

      -

      Makes the ceiling instantly rise on level load to be the same height as the highest - ceiling of any bordering sector.

      -

      52 - Continuously Falling Sector

      -

      Requires two control sectors. Sector continuously falls until its ceiling reaches the - floor of the line's back sector, then returns to its original position and keeps falling. - Linedef length determines speed. Good for things like intermittently falling lava. If the NOCLIMB flag is set, it falls upwards, instead of downwards.

      -

      53 - Continuous Floor/Ceiling Mover

      -

      Must be a two-sided linedef, tagged to another sector on the map. The tagged sector's - floor and ceiling will move, first so that they're equal to the floor and ceiling of the - linedef's front sector, then so they're equal to the floor and ceiling of the linedef's - back sector, then the front sector again, and so on.

      -

      The speed of the movement is determined by the linedef's length and uses the same units - as linetype 60.

      -

      54 - Continuous Floor Mover

      -

      Like linetype 53, but only moves the floor, not the ceiling. Can be - used to replace floating platforms in some cases, where only the floor was desired to - move.

      -

      55 - Continuous Ceiling Mover

      -

      Like linetype 53, but only moves the ceiling, not the floor.

      -

      56 - Continuous Two-Speed Floor/Ceiling Mover

      -

      Must be a two-sided linedef, tagged to another sector on the map. The tagged sector's - floor and ceiling will move, first so that they're equal to the floor and ceiling of the - linedef's front sector, then so they're equal to the floor and ceiling of the linedef's - back sector, then the front sector again, and so on.

      -

      The speed of the movement is determined by the linedef's x distance (the first way, - towards the front sector) and y distance (the second way, towards the back sector), using - the same units as linetype 60.

      -

      Unlike linetype 53, this effect does not slow down when it reaches - the end of its movement. Instead, it changes instantly from going in one direction to - going in the other. It's designed for making more sophisticated crushers than the crusher - type allows (i.e. crushers with varying rise/crush speeds, FOF crushers, crushers with - different start points).

      -

      57 - Continuous Two-Speed Floor Mover

      -

      Like linetype 56, but only moves the floor, not the ceiling.

      -

      58 - Continuous Two-Speed Ceiling Mover

      -

      Like linetype 56, but only moves the ceiling, not the floor.

      -

      59 - Activate Floating Platform

      -

      This is used to make floating platforms (that move up and down) as well as moving - water. In fact, you can use this to make any type of block move vertically. The way it - works is somewhat confusing - You use three control sectors, all connected by at least one - linedef. Easiest thing to do is make three square sectors together in a row. One of the - linedefs on the middle sector should contain the Floor Over Floor line special that you - want. This will be the Floor Over Floor control sector. The other two sectors represent - the bottommost position you want the Floor Over Floor to reach, and the topmost position - you want the Floor Over Floor to reach. The 59 line can be on any of these sectors, as - long as you tag it to the middle one. If you still don't understand, look at Greenflower - Zone Act 2. If the NOCLIMB flag is set, the platform will begin - moving upwards, rather than downwards.

      -

      60 - Activate Floating Platform (Adjustable Speed)

      -

      Speed is indicated by linedef length; one unit of speed here is 0.25 fracunits per tic. - (Floating platforms made with type 59 move at 2 fracunits per tic.) - Aside from the linedef length controlling speed, works exactly like linedef type 59.

      -

      61 - Crusher 1 (Ceiling to Floor)

      -

      The crush motion is from the ceiling to the floor. Linedef length indicates crusher - speed. See also linetype 62, Crusher 2.

      -

      62 - Crusher 2 (Floor to Ceiling)

      -

      Like linetype 61, Crusher 1, except that it starts in a different - place, not synchronised with any crushers that use the Crusher 1 type. The highest ceiling - this crusher reaches will be the highest ceiling height of any bordering sector.

      -

      63 - Fake Floor

      -

      Creates two fake planes, fake floor and fake ceiling. Main textures are not affected, - but as far as above/below textures and floor/ceiling flats are concerned, the floor and - ceiling height are those of the control sector. As far as collisions, walking, etc. are - concerned, the floor and ceiling flats are whatever they normally would be.

      -

      Fake floor is useful for railings (THZRAIL and WOODRAIL; see THZ2 for examples) and - snow effects (making a fake floor of snow just a few units above normal floor, so it looks - like the player's feet are buried in the snow).

      -

      64 - Appearing/Disappearing FOF

      -

      Tag this to any FOF line and this will cause it to appear and disappear - intermittently. The line's X length is the amount of time (in tics) that the FOF will - appear, and Y length is the amount of time (in tics) that the FOF will disappear. The - control sector's floor height allows you to specify an offset (in tics) of how much time - will pass before the appearing/disappearing kicks in.

      -

       

      -
    -
  • -
  • Floor-Over-Floors (FOFs)
      -

      100 - Floor Over Floor: Solid, Opaque, Shadowcasting

      -

      This is just a regular old FOF. As with any block, the ceiling of the control sector is - the top of the block, and the floor of the control sector is the bottom. - "Shadowcasting" means that the light value used in the control sector is used - for the area below where the actual FOF appears, as opposed to above it.

      - -

      101 - Floor Over Floor: Solid, Opaque, Non-Shadowcasting

      -

      See notes for 100. "Non-shadowcasting" means that the - light value you set in the control sector will be used for the area above the FOF, instead - of below it.

      - -

      102 - Floor Over Floor: Solid, Translucent

      -

      Useful for windows. The GLASSTEX texture is good for this purpose. You can change the - alpha value of the translucency by setting the control linedef's Above texture to a # - followed by a three-digit decimal number, 000 to 255. #000 is most transparent, #255 is - most opaque. Note that in software mode, there are actually only ten different values that - serve as a 'best guess'.

      - -

      103 - Floor Over Floor: Solid, Sides Only

      -

      A solid FOF that renders sides only, not planes (floor and ceiling). You were supposed - to be able to use it to place railings (THZRAIL, WOODRAIL, etc.) on FOFs. It doesn't work - for that, because the railings use a different kind of transparency and software mode - won't draw them on FOFs. So this one is going on the list of useless effects, right next - to linetype 104.

      - -

      104 - Floor Over Floor: Solid, No Sides

      -

      Like a 3D floor of type 101, except that sides are not drawn. - Supposedly a little bit faster than a normal 3D floor. You can use it when the sides - wouldn't be visible anyway.

      -

      This type of 3D floor will have shadows if and only if you set the control linedef's NOCLIMB flag.

      - -

      105 - Floor Over Floor: Solid, Invisible

      -

      For making invisible walls and other strange effects.

      - -
      -

      120 - Floor Over Floor: Water, Opaque

      -

      This one looks exactly like linetype 100 ingame, but is a block of - water instead of solid.

      -

      The block will have the attribute of linetype 200 if the NOCLIMB flag is set.

      -

      To use the light level of the target sector, utilize the EFFECT4 - flag.

      -

      If this is used as lava (Fire Damage), and you set the BLOCKMONSTERS - flag, you can still pass through the lava.

      - -

      121 - Floor Over Floor: Water, Translucent

      -

      This one looks exactly like linetype 102 ingame, but is a block of - water instead of solid.

      -

      The block will have the attribute of linetype 200 if the NOCLIMB flag is set.

      -

      To use the light level of the target sector, utilize the EFFECT4 - flag.

      -

      If this is used as lava (Fire Damage), and you set the BLOCKMONSTERS - flag, you can still pass through the lava.

      - -

      122 - Floor Over Floor: Water, Opaque, No Sides

      -

      Like linetype 120, but doesn't render sides.

      -

      The block will have the attribute of linetype 200 if the NOCLIMB flag is set.

      -

      To use the light level of the target sector, utilize the EFFECT4 - flag.

      -

      If this is used as lava (Fire Damage), and you set the BLOCKMONSTERS - flag, you can still pass through the lava.

      - -

      123 - Floor Over Floor: Water, Translucent, No Sides

      -

      Like linetype 121, but doesn't render sides. Most of the time this - won't make a difference. It can be useful, however, for windows that have water on one - side and not on the other.

      -

      The block will have the attribute of linetype 200 if the NOCLIMB flag is set.

      -

      To use the light level of the target sector, utilize the EFFECT4 - flag.

      -

      If this is used as lava (Fire Damage), and you set the BLOCKMONSTERS - flag, you can still pass through the lava.

      - -
      -

      140 - Floor Over Floor: Intangible from Bottom, Opaque

      -

      This sector type is solid from the top and walls, but is not solid from the bottom. - This allows the designer to create one-way passages as well as simulate 2D design by - having platforms that players can jump up to from below.

      -

      This type of 3D floor will have shadows unless you set the control linedef's NOCLIMB flag.

      - -

      141 - Floor Over Floor: Intangible from Bottom, Translucent

      -

      A copy of linetype 140 that is also translucent.

      - -

      142 - Floor Over Floor: Intangible from Bottom, Translucent, No - Sides

      -

      A platform you can jump up through, like linetype 140 (and decides - the same way whether to have shadows or not), with translucency and that doesn't render - sides. Alpha value supported the same way as linetype 102.

      - -
      -

      150 - Floor Over Floor: Bobbing (Air)

      -

      FOF that moves down 16 units when you step on, then returns to its former position when - you step off. The control sector must be connected to another sector with the same floor - and ceiling height. This seemingly redundant sector is used for resetting the heights. (If - you forget to put it in, the bobbing floor when stepped on will go down, keep going down, - and never stop or come back up.) See also linetypes 151 and 152. This linedef is obsolete. Please use linetype 190-195.

      - -

      151 - Floor Over Floor: Adjustable Bobbing (Air)

      -

      Like linetype 150, except that instead of the floor moving down 16 - units when you step on it, it moves down the number of units of the control linedef's - length. This linedef is obsolete. Please use linetype 190-195.

      - -

      152 - Floor Over Floor: Reverse Bobbing (Air)

      -

      Like linetype 151, except in reverse. The platform goes up - when you step on it and back down when you step off. This linedef is obsolete. - Please use linetype 190-195.

      - -
      -

      160 - Floor Over Floor: Floating, Bobbing

      -

      Bobs and floats in water. The floating part means that if the water moves or rises, - this platform will rise with it.

      - -
      -

      170 - Floor Over Floor: Crumbling (Respawn)

      -

      Crumbles and falls away, then reappears 15 seconds later.

      - -

      171 - Floor Over Floor: Crumbling (No Respawn)

      -

      Crumbles and falls away and never comes back.

      - -

      172 - Floor Over Floor: Crumbling (Respawn)

      -

      A copy of linetype 140 that also crumbles when stood on and - reappears after 15 seconds.

      - -

      173 - Floor Over Floor: Crumbling (No Respawn)

      -

      A copy of linetype 172 that stays gone forever after crumbling.

      - -

      174 - Floor Over Floor: Intangible from Bottom, Crumbling - (Respawn), Translucent

      -

      A copy of linetype 141 that also crumbles when stood on and - reappears after 15 seconds.

      - -

      175 - Floor Over Floor: Intangible from Bottom, Crumbling (No - Respawn), Translucent

      -

      A copy of linetype 174 that stays gone forever after crumbling.

      - -

      176 - Floor Over Floor: Crumbling (Respawn), Floating, Bobbing

      -

      Crumbles and falls, then floats on water, then bobs when you step on it.

      - -

      177 - Floor Over Floor: Crumbling (No Respawn), Floating, Bobbing

      -

      Crumbles and falls, then floats on water, then bobs when you step on it. Unlike - linetype 176, does not return to its former position.

      - -

      178 - Floor Over Floor: Crumbling (Respawn), Floating

      -

      Crumbles and falls, then floats on water, then reappears up in the air 15 seconds - later.

      - -

      179 - Floor Over Floor: Crumbling (No Respawn), Floating

      -

      Crumbles and falls, then spends the rest of its days floating on water, never to - reappear up in the air.

      - -

      180 - Floor Over Floor: Crumbling (Respawn), Bobbing (Air)

      -

      Bobs, crumbles, and falls when stepped on.

      - -
      -

      190 - Floor Over Floor: Rising Platform, Solid, Opaque, - Shadowcasting

      -

      Just like 100, except when a player steps on it, it will rise up to - the control sector's highest adjacent sector. You set the control sectors for this up like - special 59. Linedef length controls speed like 60. - If the NOCLIMB flag is set, it will require the player to spindash - to raise the platform.

      -

      191 - Floor Over Floor: Rising Platform, Solid, Opaque, - Non-Shadowcasting

      -

      Just like 101, except when a player steps on it, it will rise up to - the control sector's highest adjacent sector. You set the control sectors for this up like - special 59. Linedef length controls speed like 60. - If the NOCLIMB flag is set, it will require the player to spindash - to raise the platform.

      -

      192 - Floor Over Floor: Rising Platform, Solid, Translucent

      -

      Just like 102, except when a player steps on it, it will rise up to - the control sector's highest adjacent sector. You set the control sectors for this up like - special 59. Linedef length controls speed like 60. - If the NOCLIMB flag is set, it will require the player to spindash - to raise the platform.

      -

      193 - Floor Over Floor: Rising Platform, Solid, Invisible

      -

      Just like 105, except when a player steps on it, it will rise up to - the control sector's highest adjacent sector. You set the control sectors for this up like - special 59. Linedef length controls speed like 60. - If the NOCLIMB flag is set, it will require the player to spindash - to raise the platform.

      -

      194 - Floor Over Floor: Rising Platform, Intangible from Bottom, - Opaque

      -

      Just like 140, except when a player steps on it, it will rise up to - the control sector's highest adjacent sector. You set the control sectors for this up like - special 59. Linedef length controls speed like 60. - If the NOCLIMB flag is set, it will require the player to spindash - to raise the platform.

      -

      195 - Floor Over Floor: Rising Platform, Intangible from Bottom, - Translucent

      -

      Just like 141, except when a player steps on it, it will rise up to - the control sector's highest adjacent sector. You set the control sectors for this up like - special 59. Linedef length controls speed like 60. - If the NOCLIMB flag is set, it will require the player to spindash - to raise the platform.

      -
      -

      200 - Floor Over Floor: Light Block

      -

      Like a half light block, but it's really an actual block. That is, the light only comes - down to the control sector's floor, not to the bottom of the level (as with linetype 201.

      - -

      201 - Floor Over Floor: Half Light Block

      -

      Light blocks can be used to set color maps and light values. The light value of the - control sector will be used and any colormap attached to it will be used also. Note that - only the ceiling of the control sector is used; the light goes all the way down to the - bottom of the level. If this isn't what you want, consider using linedef type 200 instead.

      - -

      202 - Floor Over Floor: Fog Block

      -

      Creates a block of colored fog. Attach a colormap (linetype 606) to - the control sector for the fog block; otherwise you won't see anything out of the - ordinary.

      - -
      -

      220 - Floor Over Floor: Intangible, Opaque

      -

      Like opaque water, but not swimmable. Good for a snow effect on - FOFs. Can also be used to make hidden rooms, like you would normally do by setting a Main - texture.

      - -

      221 - Floor Over Floor: Intangible, Translucent

      -

      See linedef type 102 for how to adjust the translucency, making the - 3D floor more transparent or more opaque.

      -

      This type of 3D floor will have shadows if and only if you set the control linedef's NOCLIMB flag.

      - -

      222 - Floor Over Floor: Intangible, Sides Only

      -

      An intangible FOF that renders sides only, not planes (floor and ceiling). It renders - both inside sides and outside sides. You can use it to place sector borders (GFZGRASS, - etc.) on FOFs.

      - -

      223 - Floor Over Floor: Intangible, Invisible

      -

      Useful for setting effects, such as wind and gravity.

      - -
      -

      250 - Floor Over Floor: Mario Block

      -

      Like a normal FOF, except that the control linedef's Above texture is used after the - block has been hit (the Main texture is used before this). Any things in the control - sector will pop out the top of the block in the order in which they were placed. Rings - will be obtained and the effects of monitors will begin as soon as the block has been hit.

      - -

      251 - Floor Over Floor: Thwomp Block

      -

      The thwomps are the crazy platforms with faces in Mario Koopa Blast 3. They can crush - you, but you can also ride on them.

      -

      Control sector is set up like a normal FOF. When a player steps - underneath the thwomp, it will crush down to the floor. You don't need to tell it where - the floor is. It knows.

      - -

      252 - Floor Over Floor: Shatter Block

      -

      Like the bustable block, linetype 254, except that it shatters on - any sort of contact, whether it's a spindash or not (and whether you're Knuckles or not).

      -

      If the NOCLIMB flag is set, the block is only shatterable from - the bottom, like some things you spring up and break in Launch Base Zone from Sonic 3.

      - -

      253 - Floor Over Floor: Shatter Block, Translucent

      -

      Translucent version of 252 supporting alpha values.

      - -

      254 - Floor Over Floor: Bustable Block

      -

      Bustable blocks can be destroyed by spindashing. Additionally, Knuckles can destroy - them by walking or jumping into them, since he is very strong. If the NOCLIMB - flag is set, only Knuckles can break the block.

      - -

      255 - Floor Over Floor: Spin Bust Block

      -

      Like the bustable block, linetype 254, set off in a different way. - To break, jump onto it or fall down onto it while spinning. Similar to blocks found in - Marble Zone, as well as the ice cubes that would encase buttons and monitors in parts of - Ice Cap Zone.

      - -

      256 - Floor Over Floor: Spin Bust Block, Translucent

      -

      Translucent version of 255 supporting alpha values.

      -

      257 - Floor Over Floor: Quicksand Block

      -

      It's set up like any block. You can, of course, sink and die in it. X length of the - linedef determines sink speed, Y length determines how "sludgy" movement in the - quicksand is.

      - -

      258 - Floor Over Floor: Laser Block

      -

      Creates a blinking FOF that zaps you if you touch it. You can set the flats and texture - to whatever you want. For a red laser like in THZ2, use REDFLR for the flats and REDWALL - for the texture.

      -

      You can also make other colors using BLUEFLR/BLUWALL (blue laser), GREENFLR/GRNWALL - (green laser), and YELFLR/YELWALL (yellow laser). Of course, those colors of lasers are - very expensive, so Eggman doesn't have nearly as many of them. He usually goes with the - cheap red lasers.

      - -

      259 - Floor Over Floor: Custom

      -

      Place the appropriate flag values in hex (do not include the 0x in front of it) in the - line's UPPER TEXTURE field on the 2nd side of the linedef.

      -
    -
  • -
  • Linedef Executor Triggers
      -

      300 - Trigger Linedef Executor (Continuous)

      -

      Triggers linedef executor in the control sector when a player touches the tagged - sector's floor or steps in the sector (depending on the sector special used). The linedef - executor will keep being triggered over and over again as long as a player is there, hence - the word "continuous" in this linetype's name. Tagged sector must have one of - the Trigger Linedef Executor types for this to work.

      -

      301 - Trigger Linedef Executor (Each Time)

      -

      Like 300, except that it only gets triggered once for each time you - fall or jump onto the floor. Tagged sector must have one of the Trigger - Linedef Executor types for this to work.

      -

      302 - Trigger Linedef Executor (Once)

      -

      Like 300, except that after that linedef executor executes its - linedefs, it's done. It's over. The linedefs will never be executed again.

      -

      303 - Trigger Linedef Executor (Ring Count - Continuous)

      -

      Triggers linedef executor in the control sector when a player touches the tagged - sector's floor or steps in the sector (depending on the sector special used). The linedef - executor will keep being triggered over and over again as long as a player is there, hence - the word "continuous" in this linetype's name. Tagged sector must have one of - the Trigger Linedef Executor types for this to work. Executor will be - triggered depending on how many rings the player has:

      -

      No flags -> Runs if (rings = line length)

      -

      NOCLIMB -> Runs if (rings <= line length)

      -

      BLOCKMONSTERS -> Runs if (rings >= line length)

      -

      EFFECT4 -> Takes the rings of ALL players into account.

      -

      304 - Trigger Linedef Executor (Ring Count - Once)

      -

      Like 303, except that after that linedef executor executes its - linedefs, it's done. It's over. The linedefs will never be executed again.

      -

      305 - Trigger Linedef Executor (Character Ability - Once)

      -

      Like linetype 302, but is only activated when the character's - ability number matches the linedef length by multiples of 10. For example:

      -

      0-9 = Charability 0

      -

      10-19 = Charability 1

      -

      20-29 = Charability 2

      -

      etc...

      -

      306 - Trigger Linedef Executor (Character Ability - Continuous)

      -

      Like 300, but only triggers when the character's ability number - matches the linedef length by multiples of 10. See linetype 305 for a - futher description.

      -

      307 - Trigger Linedef Executor (Character Ability - Each Time)

      -

      Like 301, but only triggers when the character's ability number - matches the linedef length by multiples of 10. See linetype 305 for a - futher description.

      -

      308 - Trigger Linedef Executor (Race Only, Once)

      -

      Like linetype 302, but is only activated when the gametype is Race. - Useful for doing things like opening doors, pre-solving puzzles, etc. to make race - smoother.

      -

      309 - Trigger Linedef Executor (CTF Red Team - Continuous)

      -

      Like 300, but only triggers if you are in CTF and on the red team.

      -

      310 - Trigger Linedef Executor (CTF Red Team - Each Time)

      -

      Like 301, but only triggers if you are in CTF and on the red team.

      -

      311 - Trigger Linedef Executor (CTF Blue Team - Continuous)

      -

      Like 300, but only triggers if you are in CTF and on the blue team.

      -

      312 - Trigger Linedef Executor (CTF Blue Team - Each Time)

      -

      Like 301, but only triggers if you are in CTF and on the blue team.

      -

      313 - Trigger Linedef Executor (No More Enemies - Once)

      -

      Like linetype 302, but is only activated when no more objects of - type MF_ENEMY exist in its tagged area. Think "destroy all enemies in this room for - the door to open to go to the next room". Tag this to a control sector. It will go - through the lines of the control sector, checking for any lines of type 223 - and checking inside the area occupied by the invisible intangible FOF to see if any - enemies exist. If no alive enemies are in all of the type 223 FOFs, - the linedef executor is run once. The line length is the tag number of the linedef - executor trigger to run.

      -

      314 - Trigger Linedef Executor (# of Pushables - Continuous)

      -

      Like 300, but only triggers if the number of pushable objects in - the sector compared to the line length is:

      -

      No flags -> Runs if (# pushables = line length)

      -

      NOCLIMB -> Runs if (# pushables >= line length)

      -

      EFFECT4 -> Runs if (# pushables < line length)

      -

      315 - Trigger Linedef Executor (# of Pushables - Once)

      -

      Like 314, but only triggers once.

      -

      316 - Trigger Linedef Executor (PolyObject - Land On)

      -

      This will trigger every time you land on the polyobject. Line's tag # is 32000 + the - PolyObject ID #. You must also flag the PolyObject Start (#20) line with NOCLIMB to tell the game it has a linedef executor associated with it.

      -

      So if you had a PolyObject with an ID of 1, this line would have a tag of 32001.

      -

       

      -
    -
  • -
  • Linedef Executor Options
      -

      400 - Linedef Executor: Set Tagged Sector's Floor Height/Pic

      -

      When executed, instantly changes the tagged sector's floor height and flat to the floor - height and flat of the linedef's front sector.

      -

      401 - Linedef Executor: Set Tagged Sector's Ceiling Height/Pic

      -

      When executed, instantly changes the tagged sector's ceiling height and flat to the - ceiling height and flat of the linedef's front sector.

      -

      402 - Linedef Executor: Set Tagged Sector's Light Level

      -

      When executed, instantly changes the tagged sector's light level to that of the - linedef's front sector. Floor and ceiling light settings done with linetypes 601 and 600 are transferred as well; colormaps are - not.

      -

      If there is a lighting effect active in the target sector or sectors at the time (glow, - fade, strobe, flicker), it will be stopped.

      -

      403 - Linedef Executor: Move Tagged Sector's Floor

      -

      When executed, starts moving the tagged sector's floor until it is at the same height - as the linedef's front sector's floor. Speed is indicated in the same units used by - linetype 60.

      -

      If the line used has NOCLIMB flag, the floor flat will change - after the move, to that on the front sector's floor. This is like what linetype 400 does.

      -

      If the line used has BLOCKMONSTERS flag, another linedef - executor will be run when the floor movement is finished. (If multiple sectors finish at - different times, it goes by the lowest numbered sector, but you should probably try to - avoid this scenario.) The tag of the new linedef executor to run is specified by the X - alignment on the front side of the line. The tag number you use must be positive, and this - functionality cannot be combined with changing the floor flat using the NOCLIMB - flag. Running a linedef executor will take precedence over changing the floor flat.

      -

      404 - Linedef Executor: Move Tagged Sector's Ceiling

      -

      When executed, starts moving the tagged sector's ceiling until it is at the same height - as the linedef's front sector's ceiling. Speed is indicated in the same units used by - linetype 60.

      -

      If the line used has NOCLIMB flag, the ceiling flat will change - after the move, to that on the front sector's ceiling. This is like what linetype 401 does.

      -

      If the line used has BLOCKMONSTERS flag, another linedef - executor will be run when the ceiling movement is finished. (If multiple sectors finish at - different times, it goes by the lowest numbered sector, but you should probably try to - avoid this scenario.) The tag of the new linedef executor to run is specified by the X - alignment on the front side of the line. The tag number you use must be positive, and this - functionality cannot be combined with changing the ceiling flat using the NOCLIMB flag. Running a linedef executor will take precedence over - changing the ceiling flat.

      -

      405 - Linedef Executor: Lower Floor by Line

      -

      Speed is indicated by x distance; amount to lower is indicated by y distance.

      -

      406 - Linedef Executor: Raise Floor by Line

      -

      Speed is indicated by x distance; amount to raise is indicated by y distance.

      -

      407 - Linedef Executor: Lower Ceiling by Line

      -

      Speed is indicated by x distance; amount to lower is indicated by y distance.

      -

      408 - Linedef Executor: Raise Ceiling by Line

      -

      Speed is indicated by x distance; amount to raise is indicated by y distance.

      -

      409 - Linedef Executor: Change Calling Sector's Tag

      -

      Changes the tag of the calling sector; that is, the sector on the map that activated - this linedef executor. The new tag is the linedef's length.

      -

      410 - Linedef Executor: Change Front Sector's Tag

      -

      Changes the tag of the linedef's front sector. The new tag is the linedef's length.

      -

      411 - Linedef Executor: Stop Plane Movement

      -

      Stops any and all floor, ceiling, or elevator movement in the tagged sector or sectors.

      -

      412 - Linedef Executor: Teleport Player to Tagged Sector

      -

      The player who triggered the linedef executor will be teleported to the tagged sector. - The player's exact X, Y, Z, and angle are determined by a teleport destination thing, type - 751, somewhere in the tagged sector.

      -

      If the BLOCKMONSTERS flag is used, it won't flash and make - the teleport sound effects. If the NOCLIMB flag is used, it won't - reset the angle to the angle of the teleport destination thing, and if the EFFECT4 flag is used, it will not kill your acceleration/speed upon - teleport.

      -

      413 - Linedef Executor: Change Music

      -

      Linedef length indicates the music slot to use. If the linedef's NOCLIMB - flag is set, play the music once, otherwise loop it.

      -

      If the player dies and goes back to a starpost, the beginning of the level, or the - appropriate multiplayer start, the map music from before will be restored. The linedef - flag BLOCKMONSTERS can be set to change this behavior, and - retain the new music even after dying.

      -

      If the linedef length isn't a valid music slot, the music is stopped.

      -

      414 - Linedef Executor: Play SFX

      -

      Plays a sound effect. The line length is the sound number to use. The list of sound - effects can be found in sounds.h. The origin of the sound depends on which linedef flags - are set:

        -
      • NOCLIMB : The sound is played from nowhere, but only for the - player who triggered it.
      • -
      • EFFECT4: The sound is played from nowhere for everyone.
      • -
      • BLOCKMONSTERS: The sound is played from the center of the - sector that triggered the linedef executor.
      • -
      -

      Otherwise, the sound is played from the location of the player or thing who triggered - it.

      -

      415 - Linedef Executor: Run Script

      -

      Runs a script, the same kind of script you can run on level load with the level header - scriptname attribute. The script that will be run should have a lumpname of the form SCRxxyyy, - where xx is the two-digit map number and yyy is the linedef's sector's floor - height in decimal, with leading zeroes as necessary (or 000 if the floor height exceeds - 999 fracunits). For instance, if the linedef is in MAP31 and the floor of its sector is - 337 fracunits, the script named SCR31337 will be run.

      -

      416 - Linedef Executor: Start Adjustable Fire Flicker

      -

      Essentially a copy of linetype 603 that waits to activate until the - linedef executor is triggered. It does have an extra feature, though. If you use a - two-sided linedef with the NOCLIMB flag, the linedef's back sector - will be used as the maximum light level, allowing you to set the target sector (or - sectors) at a different starting light level entirely.

      -

      417 - Linedef Executor: Start Adjustable Glowing Light

      -

      Essentially a copy of linetype 602 that waits to activate until the - linedef executor is triggered. It does have an extra feature, though. If you use a - two-sided linedef with the NOCLIMB flag, the linedef's back sector - will be used as the maximum light level, allowing you to set the target sector (or - sectors) at a different starting light level entirely.

      -

      418 - Linedef Executor: Start Adjustable Blinking Light - (unsynchronized)

      -

      Essentially a copy of linetype 604 that waits to activate until the - linedef executor is triggered. It does have an extra feature, though. If you use a - two-sided linedef with the NOCLIMB flag, the linedef's back sector - will be used as the maximum light level, allowing you to set the target sector (or - sectors) at a different starting light level entirely.

      -

      419 - Linedef Executor: Start Adjustable Blinking Light - (synchronized)

      -

      Essentially a copy of linetype 605 that waits to activate until the - linedef executor is triggered. It does have an extra feature, though. If you use a - two-sided linedef with the NOCLIMB flag, the linedef's back sector - will be used as the maximum light level, allowing you to set the target sector (or - sectors) at a different starting light level entirely.

      -

      420 - Linedef Executor: Fade Light Level

      -

      When executed, gradually fades the tagged sector's light level to that of the linedef's - front sector. Floor and ceiling light settings done with linetypes 601 - and 600 are not affected or used.

      -

      If there is a lighting effect already active in the target sector or sectors at the - time (glow, other fade, strobe, flicker), it will be halted in favor of this one.

      -

      Linedef length in fracunits indicates speed. Fading from 224 to 64 with a linedef - length of 4 will take 40 fracunits (224 - 64 = 160, 160 / 4 = 40). There are 35 fracunits - in a second.

      -

      421 - Linedef Executor: Stop Lighting Effect

      -

      Stops any lighting effects active in the tagged sector or sectors: glow, fade, strobe, - flicker, etc. The light level, whatever it is at the moment this script line is run, will - be preserved until a new lighting effect or light level change is used.

      -

      Note that the lighting effects will all stop other lighting effects when activated. In - other words, you only need to use this when you really want the lighting effect to stop, - not when you want one effect to stop and another to start.

      -

      422 - Linedef Executor: Cut-Away View

      -

      Cuts away to a view from a different place for a moment. Only works for linedef - executors triggered by a player. Tag the line to a sector with an alt view thing (map - thing type 5007) in it at the proper location with the proper Z and angle. The line length - indicates how long to stay in this view, in tics.

      -

      By giving the linedef a NOCLIMB flag, you can adjust the - vertical viewing angle from the cut-away view. Set the x offset on the linedef's front - side to an integer -90 to 90. In software mode the range of viewing angles is actually - about -68 to 68. This is in degrees.

      -

      423 - Linedef Executor: Change Sky

      -

      Changes sky to the # of the control sector's floorheight. This only affects the player - who activates it. If you'd like it to affect all players, make sure you check the NOCLIMB flag.

      -

      424 - Linedef Executor: Change Weather

      -

      Changes weather to the control sector's floorheight in powers of 10.

      -

      Example:

      -
      - - - - - - - - - - - - - - - - - - - - -
      Linedef LengthWeather Type
      10None
      20Snow
      30Rain
      40Storm
      -

      (higher numbers reserved for future use)

      -

      This only affects the player who activates it. If you'd like it to affect all players, - make sure you check the NOCLIMB flag.

      -

      425 - Linedef Executor: Change Object State

      -

      Changes the animation frame of the activating object to the state # indicated by the - length of the control linedef. Be careful how you use this.

      -

      426 - Linedef Executor: Stop Object

      -

      Makes the object that triggered the linedef executor stop moving, after being sent to - the center of the sector it's in (only if NOCLIMB flag is set), on - the floor. Although it comes to a complete stop, the object can begin moving right away - again. If the object is a player, the player will stop jumping, spinning, or anything - else.

      -

      427 - Linedef Executor: Award Score

      -

      Adds to the score of the player who activated it. Control sector's floorheight = points - to award. This even works with negative values.

      -

      428 - Linedef Executor: Start Platform Movement

      -

      Starts a moving platform in the nature of linetype 59 or 60. If the NOCLIMB flag is set, the platform will - begin moving upwards. Otherwise, it will start moving downwards. Speed of movement is set - just like with linetype 60.

      -

      429 - Linedef Executor: Crush Ceiling Once

      -

      Ceiling moves down to the floor, then back up. Speed is determined by line length - - every 16 units equals 1 FRACUNIT/tic.

      -

      430 - Linedef Executor: Crush Floor Once

      -

      Floor moves up to the ceiling, then back down. Speed is determined by line length - - every 16 units equals 1 FRACUNIT/tic.

      -

      431 - Linedef Executor: Crush Floor And Ceiling Once

      -

      Floor and ceiling meet in the middle and then return, sandwiching anything that's - inbetween. Speed is determined by line length - every 16 units equals 1 FRACUNIT/tic.

      -

      432 - Linedef Executor: Enable 2D Mode

      -

      Turns on 2D mode within the level. You'll probably only want to use this with a zoom - tube or teleport to guarantee that the player is in the correct position when it switches.

      -

      433 - Linedef Executor: Disable 2D Mode

      -

      Turns off 2D mode within the level.

      -

      434 - Linedef Executor: Award Custom Power

      -

      Awards (or removes!) a power to the calling player.

      -

      X length: Power Index + 1

      -

      Y length: Power Duration (in 35ths of a second)

      -

      435 - Linedef Executor: Change Scroller Direction

      -

      Changes direction of a scroller (conveyor, texture). Also changes speed if this is not - an accelerative/displacement scroller.

      -

      436 - Linedef Executor: Shatter Block

      -

      Shatters a FOF - of any type. Parameters are as follows:

      -

      Texture X Offset: Tag # of FOF target sector

      -

      Texture Y Offset: Tag # of FOF control sector

      -

      Note that the FOF should only have one target sector.

      -

      437 - Linedef Executor: Disable Player Control

      -

      Disables the controls of the player that triggered the linedef executor. If the - NOCLIMB flag is set, they will be able to jump, however.

      -

      Giving the front texture of the linedef an X offset will make the effect last that amount - of time, in tics. Otherwise, it ends immediately, so you would need to use a continuous - trigger.

      -

      438 - Linedef Executor: Set Object's Scale

      -

      Length of this line determines the scale size of an object, in percentage. Note that there is a max of 400%.

      -

      450 - Linedef Executor: Execute Linedef Executor

      -

      Just what it says. Can be used for recursion. Be careful, because you CAN make a loop - out of this that will freeze the game.

      -

      Tag is the linedef executor trigger tag to run.

      -

      488 - Linedef Executor: PolyObject - Move by Waypoints

      -

      Moves a polyobject along a sequence of Zoom Tube waypoints.

      -

      Texture X offset: Speed (8 = 1 FRACUNIT).

      -

      Texture Y offset: Sequence # of Zoom Tube waypoints.

      -

      The movement also depends on which linedef flags are set:

        -
      • EFFECT1 : Moves from highest waypoint # to lowest waypoint #.
      • -
      • EFFECT2 : Comes back the way it came when the end is reached.
      • -
      • EFFECT3 : Wrap around the waypoints.
      • -
      • EFFECT4:  Continuously move (used with EFFECT2 or EFFECT3).
      • -
      -

       

      -
    -
  • -
  • Scrollers / Pushers
      -

      500 - Scroll Wall First Side Left

      -

      501 - Scroll Wall First Side Opposite Direction

      -

      502 - Scroll Wall According to Linedef

      -

      503 - Acc Scroll Wall According to Linedef

      -

      Accelerative scrolling version of 502.

      -

      504 - Disp Scroll Wall According to Linedef

      -

      Displacement scrolling version of 502.

      -

      505 - Scroll Texture by Offsets

      -
      -

      510 - Scroll Floor Texture

      -

      Linedef length and direction indicate speed and direction.

      -

      511 - Acc Scroll Floor Texture

      -

      Accelerative scrolling version of 510.

      -

      512 - Disp Scroll Floor Texture

      -

      Displacement scrolling version of 510.

      -

      513 - Scroll Ceiling Texture

      -

      Linedef length and direction indicate speed and direction.

      -

      514 - Acc Scroll Ceiling Texture

      -

      Accelerative scrolling version of 513.

      -

      515 - Disp Scroll Ceiling Texture

      -

      Displacement scrolling version of 513.

      -
      -

      520 - Carry Objects on Floor

      -

      Like linedef type 530, without scrolling the floor texture, so the - floor doesn't look like it's moving.

      -

      521 - Acc Carry Objects on Floor

      -

      Accelerative scrolling version of 520.

      -

      522 - Disp Carry Objects on Floor

      -

      Displacement scrolling version of 520.

      -

      523 - Carry Objects on Ceiling

      -

      For FOF conveyor belts. Like 533, except without the scrolling to - accompany it.

      -

      524 - Acc Carry Objects on Ceiling

      -

      Accelerative scrolling version of 523. Untested.

      -

      525 - Disp Carry Objects on Ceiling

      -

      Displacement scrolling version of 523. Untested.

      -
      -

      530 - Scroll Floor Texture and Carry Objects

      -

      Used for conveyor belts, in conjunction with sector type 1024 - (Conveyor Belt). Linedef length and direction indicate conveyor speed and direction, - respectively. This can also be used to convey items on the underneath of a FOF. See Egg - Rock Zone for an example.

      -

      531 - Acc Scroll Floor Texture and Carry Objects

      -

      Accelerative scrolling version of 530.

      -

      532 - Disp Scroll Floor Texture and Carry Objects

      -

      Displacement scrolling version of 530.

      -

      533 - Scroll Ceiling Texture and Carry Objects

      -

      For conveyor belts on the top of FOFs, or for conveying items on a ceiling. Tag this to - the FOF control sector and give the FOF control sector a type of 1024, - Conveyor Belt. For realism you might also want to scroll the control sector's floor - texture in the opposite direction (see linetype 510).

      -

      534 - Acc Scroll Ceiling Texture and Carry Objects

      -

      Accelerative scrolling version of 533. Untested.

      -

      535 - Disp Scroll Ceiling Texture and Carry Objects

      -

      Displacement scrolling version of 533. Untested.

      -
      -

      540 - Friction

      -

      Linedef lengths greater than 100 indicate slippery ice, while linedef lengths less than - 100 can be used for sludge, with extra friction.

      -

      If you want friction on a FOF, tag this line to the control sector of the FOF. - Otherwise, tag it to the sector of desired destination.

      -

      541 - Wind

      -

      Speed and direction are indicated by linedef length and direction. The target sector - should be of type 512, Wind/Current. If being used in a 3D Floor, put - the 512/768 sector type in the control sector, not the target sector. Also tag the line to - the control sector, and not the target sector.

      -

      Special flags:

      -

      NOCLIMB -> Only this pusher will affect the object - the - object can't have multiple 'pushings' due to being on the edge of a sector, etc.

      -

      EFFECT4 -> Player will go into slide with limited control - (similar to the water and oil slides in Labyrinth and Oil Ocean).

      -

      542 - Upwards Wind

      -

      The length of the linedef is the wind speed. The target sector will need type 512 or 768. If being used in a 3D Floor, put the - 512/768 sector type in the control sector, not the target sector. Also tag the line to the - control sector, and not the target sector.

      -

      NOCLIMB/EFFECT4 flags operate the same as for line 541.

      -

      543 - Downwards Wind

      -

      Wind speed is determined by the linedef's length. Type 512 or 768 must be applied to the target sector. If being used in a 3D Floor, - put the 512/768 sector type in the control sector, not the target sector. Also tag the - line to the control sector, and not the target sector.

      -

      NOCLIMB/EFFECT4 flags operate the same as for line 541.

      -

      544 - Current

      -

      Speed and direction are indicated by linedef length and direction. The target sector - should have type 512, Wind/Current. If being used in a 3D Floor, put - the 512/768 sector type in the control sector, not the target sector. Also tag the line to - the control sector, and not the target sector.

      -

      NOCLIMB/EFFECT4 flags operate the same as for line 541.

      -

      545 - Upwards Current

      -

      Linedef length indicates speed. Target sector needs sector type 512 - or 768. If being used in a 3D Floor, put the 512/768 sector type in - the control sector, not the target sector. Also tag the line to the control sector, and - not the target sector.

      -

      NOCLIMB/EFFECT4 flags operate the same as for line 541.

      -

      546 - Downwards Current

      -

      Speed is indicated by linedef length. Assign a type of 512 or 768 to the target sector. If being used in a 3D Floor, put the 512/768 - sector type in the control sector, not the target sector. Also tag the line to the control - sector, and not the target sector.

      -

      NOCLIMB/EFFECT4 flags operate the same as for line 541.

      -

      547 - Boom Push/Pull Thing

      -

      Creates a "point pusher," or a point that pushes you away or pulls you toward - it if you get close enough. Tag the linedef to a sector with type 512, - Wind/Current, and with a thing on it of type 5001 (push) or 5002 (pull). The control - linedef's length indicates pushing/pulling strength; if length is L, the effect fades away - to nothing when you are 2L away from the point.

      -

      If you want to create multiple point pushers/pullers, you'll need to have them in - different target sectors, but they can share the same tag.

      -

      NOCLIMB/EFFECT4 flags operate the same as for line 541.

      -

       

      -
    -
  • -
  • Lighting
      -

      600 - Floor Lighting

      -

      Sets the lighting for the floor only. The control sector's light value will be used for - the target sector's floor. Also see type 601.

      -

      601 - Ceiling Lighting

      -

      Sets the lighting of the ceiling only. The light value of the control sector will be - used for the target sector's ceiling. Also see type 600.

      -

      602 - Adjustable Pulsating Light

      -

      Linedef length indicates glow speed. The normal speed would be a linedef 32 units long.

      -

      The control sector (the linedef's front sector) is used to get what will be the minimum - light level for this effect, while the target sector's light level ends up being the - maximum.

      -

      603 - Adjustable Flickering Light

      -

      Linedef length indicates flicker speed. Normal speed would be a 16 fracunit long - linedef. A longer linedef means more time in between flickers.

      -

      The control sector (the linedef's front sector) is used to get what will be the minimum - light level for this effect, while the target sector's light level ends up being the - maximum.

      -

      604 - Adjustable Blinking Light (unsynchronized)

      -

      Line's X length is time for the light to be off, and Y length is the time for the light - to be on.

      -

      The control sector (the linedef's front sector) is used to get what will be the minimum - light level for this effect, while the target sector's light level ends up being the - maximum.

      -

      605 - Adjustable Blinking Light (synchronized)

      -

      Line's X length is time for the light to be off, and Y length is the time for the light - to be on.

      -

      The control sector (the linedef's front sector) is used to get what will be the minimum - light level for this effect, while the target sector's light level ends up being the - maximum.

      -

      606 - Colormap

      -

      Sets a colormap. Tag the linedef to the sector or sectors affected by the colormap. The - control linedef's front Above texture is used to determine the colormap. The format is - #rrggbba, where rr, gg, and bb are two hexadecimal digits for determining each color: red, - blue, and green. The a stands for alpha, and is a number or letter indicating the - translucency; from A-Z and 0-9, with A being most transparent and 9 being most opaque.

      -

      It does not generally matter what sector the colormap linedef belongs to. However, it - should not belong to the same sector as another colormap, as this can cause problems.

      -
    -
  • -

    Sector Types

    -

    You can apply up to four different types to one sector, provided that you only choose - ONE from EACH category. Add the numbers together to obtain the final value to use in level - editors.

    -
  • Section 1
      -

      1 - Damage (Generic)

      -

      This special hurts, period. It doesn't matter whether you have a liquid shield, fire - shield, attraction shield, or whatever else; step on one of these and suffer.

      -

      2 - Damage (Water)

      -

      Also known as Slime Hurt. Stepping here will be painful, as in shield/ring/life loss - (depending on how you are equipped), unless you happen to have the liquid shield.

      -

      3 - Damage (Fire)

      -

      Stepping here will hurt, unless you happen to have a fire shield.

      -

      4 - Damage (Electrical)

      -

      Hurts players whenever they're in the sector, unless they have the attraction shield.

      -

      Usage tip: Give the sector a floor flat that looks electrical and looks like it could - hurt you.

      -

      5 - Spikes

      -

      Making spikes using sectors is rather tedious and difficult. You can use things instead - (Floor Spike and Ceiling Spike). But the sector - version DOES look cooler. ;)

      -

      6 - Death Pit (Camera Modifications)

      -

      Used for bottomless pits. You'll probably want the sector's floor flat to be either - F_SKY1 (falling from the sky) or PIT (falling into a pit of complete blackness). The - camera modifications keep the camera from following you all the way down, for a Sonic - Adventure-style pit death. If you don't like the camera modifications, use sector type 5.

      -

      7 - Death Pit (No Camera Modifications)

      -

      For bottomless pits. Use if the camera modifications of sector type 6 - are not to your taste.

      -

      8 - Instant Kill

      -

      Die right away if you even step into this sector. No need to touch the floor as with - those sissy death pits.

      -

      9 - Ring Drainer (Floor Touch)

      -

      Lose one ring per 15 tics while touching the floor.

      -

      10 - Ring Drainer (No Floor Touch)

      -

      Like sector type 9, but doesn't require touching floor.

      -

      11 - Special Stage Damage

      -

      If you have rings and no shield, and you step on it, you only lose 10 rings, maximum. - It's just like the special stages!

      -

      12 - Space Countdown

      -

      In space, you have no chance to survive make your time, ha ha ha. Starts an immediate - five-second countdown, like when you drown.

      -

      13 - Ramp Sector

      -

      Doubles the step-up height of the player. Default step-up height is 24 fracunits, but - with this, it becomes 48. Useful for steps and other things if your players seem to be - getting 'stopped' by the stairs while moving quickly.

      -

      14 - Non-Ramp Sector (Don't step down)

      -

      Removes the 'step-down' that a player will normally do when moving to a nearby sector.

      -

      15 - Bouncy Sector (FOF Control Only)

      -

      Use this on a 3D floor's control sector to make it bouncy. Players will bounce off the - top of it. If the 3D floor's control line has the BOUNCY flag set, the linedef length sets - the minimum bounce force. Otherwise, you will slowly come to a stop.

      -

       

      -
    -
  • -
  • Section 2
      -

      16 - Trigger Linedef Executor (Pushable Objects)

      -

      Works like 80 but with a pushable object (gargoyle or snowman) - touching the floor rather than a player.

      -

      32 - Trigger Linedef Executor (Anywhere in Sector) (All Players)

      -

      Sector type 64 with the added requirement that all players who don't - have a game over need to be in the sector, not just one player. Currently does not work in - FOFs.

      -

      48 - Trigger Linedef Executor (Floor Touch) (All Players)

      -

      Sector type 80 with the added requirement that all players who don't - have a game over need to be in the sector, not just one player.

      -

      64 - Trigger Linedef Executor (Anywhere in Sector)

      -

      Like sector type 80, but you don't have to be touching the floor to - do the triggering. You could be flying high in the air. You should also use this one for - linedef executors triggered by FOFs.

      -

      80 - Trigger Linedef Executor (Floor Touch)

      -

      Required for any of the Linedef Executor Triggers to work in - the sector.

      -

      96 - Trigger Linedef Executor (Emerald Check)

      -

      Sector type 64 which will only execute if you have all 7 chaos - emeralds.

      -

      112 - Trigger Linedef Executor (NiGHTS Mare)

      -

      Like sector type 64, but this is only triggered if you are in a - NiGHTS map, and checks what mare you're on using the following format, depending on what - flags you have set for this line:

      -

      No flags -> Runs if (current mare = line length)

      -

      NOCLIMB -> Runs if (current mare <= line length)

      -

      BLOCKMONSTERS -> Runs if (current mare >= line - length)

      -

      128 - Check for linedef executor on 3D Floors (ANY object)

      -

      For any item to detect sector type 16 on a 3D floor, the target - sector on the map must have this type. This allows you to have any kind of object trigger - a linedef executor.

      -

      144 - Egg Trap Capsule

      -

      160 - Special Stage Time/Rings, Par

      -

      For special stages, floor height is time limit in seconds, and ceiling height is rings - required in seconds. If the ceiling height is 0, there is no ring requirement, only a time - limit to find an exit.

      -

      176 - Custom Global Gravity

      -

      Floor height sets global gravity. 500 is normal. 1000 is twice the normal gravity, 250 - is half. You can also set per-sector gravity with linetype 1. This can - also be adjusted in realtime, for some really cool effects.

      -

       

      -
    -
  • -
  • Section 3
      -

      256 - Ice/Sludge

      -

      See linedef type 540.

      -

      512 - Wind/Current

      -

      See linedef types 541 and 544.

      -

      768 - Ice/Sludge and Wind/Current

      -

      Combination of sector specials 256 and 512.

      -

      1024 - Conveyor Belt

      -

      See linedef type 520.

      -

      1280 - Speed Pad (No Spin)

      -

      See linedef type 4.

      -

      1536 - Speed Pad (Spin)

      -

      See linedef type 4. This type of speed pad forces you into a spin.

      -

      1792, 2048, 2304, 2560, 2816, 3072, 3328, 3584, 3840 - Bustable - Block Sprite Parameter

      -

      Used in a control sector of a bustable block. Chooses which debris sprite to spawn.

      -

      1792 = ROIA

      -

      2048 = ROIB

      -

      2304 = ROIC

      -

      2560 = ROID

      -

      2816 = ROIE

      -

      3072 = ROIF

      -

      3328 = ROIG

      -

      3584 = ROIH

      -

      3840 = ROII

      -

       

      -
    -
  • -
  • Section 4
      -

      4096 - Starpost Activator

      -

      Whenever a player steps in the sector, a starpost in that sector will be searched for - and, if found, activated.

      -

      8192 - Special Stage Goal

      -

      This is like the "GOAL" buttons in Sonic 1's special stages. Ends the special - stage when stepped on.

      -

      8192 - Exit Sector

      -

      In single-player, cooperative, or race mode, being in this sector ends the level. You - don't necessarily have to be touching the floor. (If you want the player to have to be - touching the floor, you can use linedef type 223, an invisible, - intangible FOF, to do the trick. Give the FOF control sector a type of 8192.)

      -

      See linedef type 2 for a way to exit to any map, not just the one - whose number is specified in the map header. Linedef 2 also allows you to skip the score - tally screen.

      -

      8192 - No Tag Zone

      -

      In games of tag, this sector is a safe spot. You cannot be tagged while in it.

      -

      8192 - CTF: Flag Return

      -

      In CTF, if the red or blue flag enters this sector, it will automatically return to - base, much like how it behaves when it falls in a pit. This can also be set as a special - on a 3D floor.

      -

      12288 - CTF: Red Team Base

      -

      The red team has to bring the blue flag onto this sector to score. - It's generally a good idea to have the red flag here and the red team player starts somewhere close by.

      -

      16384 - CTF: Blue Team Base

      -

      The blue team has to bring the red flag onto this sector to score. - It's generally a good idea to have the blue flag here and the blue team player starts somewhere close by.

      -

      20480 - Fan Sector

      -

      Acts like a fan, pushing the player up at constant speed and activating the proper - animation. Can be used on intangible FOFs.

      -

      24576 - Super Sonic Transform

      -

      Transforms you into Super Sonic and gives you 50 rings, providing you have all of the - chaos emeralds.

      -

      28672 - Spinner

      -

      Forces the player into a spin.

      -

      32768 - Zoom Tube Start

      -

      When the player touches this sector, a line type 3 with the same tag - as the sector is searched for, and if found, the line's X length determines the speed at - which the tube operates, while its Y length determines which zoom tube sequence to use. - Then the player is immediately put into a spin, loses control, and gravitates toward the - first Zoom Tube Waypoint (thing type 753), which does not have to be - in the same sector. Once they reach the first waypoint, they begin traveling to the 2nd, - 3rd, and so on, until the last waypoint is reached.

      -

      This can be used with Floor-Over-Floors, just use these specials in the control sector - instead.

      -

      36864 - Zoom Tube End

      -

      Just like sector type 32768, but starts from the last waypoint - and goes to the first.

      -

      40960 - Finish Line

      -

      The finish line for a race circuit. This increments a lap when you pass it, after - hitting all the star posts in the stage in sequential order. Once the number of laps - specified by the server is reached, the level is completed.

      -
    -
  • -
- - diff --git a/srb2-vc10.sln b/srb2-vc10.sln deleted file mode 100644 index b4415bfc0..000000000 --- a/srb2-vc10.sln +++ /dev/null @@ -1,125 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.28307.136 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Srb2DD", "src\win32\Srb2win-vc10.vcxproj", "{0F554F1D-ED49-4D65-A9A7-F63C57F277BE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng", "libs\libpng-src\projects\visualc10\libpng.vcxproj", "{72B01ACA-7A1A-4F7B-ACEF-2607299CF052}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "r_opengl", "src\hardware\r_opengl\r_opengl-vc10.vcxproj", "{51137D5C-4E81-4955-AACF-EA3092006051}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "libs\zlib\projects\visualc10\zlib.vcxproj", "{73A5729C-7323-41D4-AB48-8A03C9F81603}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "s_openal", "src\hardware\s_openal\s_openal-vc10.vcxproj", "{E662D0B3-412D-4D55-A5EC-8CBD680DDCBE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Srb2Win", "src\sdl\Srb2SDL-vc10.vcxproj", "{61BA7D3C-F77D-4D31-B718-1177FE482CF2}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|ARM = Debug|ARM - Debug|ARM64 = Debug|ARM64 - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|ARM = Release|ARM - Release|ARM64 = Release|ARM64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Debug|ARM.ActiveCfg = Debug|ARM - {0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Debug|ARM.Build.0 = Debug|ARM - {0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Debug|ARM64.Build.0 = Debug|ARM64 - {0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Debug|Win32.ActiveCfg = Debug|Win32 - {0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Debug|Win32.Build.0 = Debug|Win32 - {0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Debug|x64.ActiveCfg = Debug|x64 - {0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Debug|x64.Build.0 = Debug|x64 - {0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Release|ARM.ActiveCfg = Release|ARM - {0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Release|ARM.Build.0 = Release|ARM - {0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Release|ARM64.ActiveCfg = Release|ARM64 - {0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Release|ARM64.Build.0 = Release|ARM64 - {0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Release|Win32.ActiveCfg = Release|Win32 - {0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Release|Win32.Build.0 = Release|Win32 - {0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Release|x64.ActiveCfg = Release|x64 - {0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Release|x64.Build.0 = Release|x64 - {72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Debug|ARM.ActiveCfg = Debug|ARM - {72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Debug|ARM.Build.0 = Debug|ARM - {72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Debug|ARM64.Build.0 = Debug|ARM64 - {72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Debug|Win32.ActiveCfg = Debug|Win32 - {72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Debug|Win32.Build.0 = Debug|Win32 - {72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Debug|x64.ActiveCfg = Debug|x64 - {72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Debug|x64.Build.0 = Debug|x64 - {72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Release|ARM.ActiveCfg = Release|ARM - {72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Release|ARM.Build.0 = Release|ARM - {72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Release|ARM64.ActiveCfg = Release|ARM64 - {72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Release|ARM64.Build.0 = Release|ARM64 - {72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Release|Win32.ActiveCfg = Release|Win32 - {72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Release|Win32.Build.0 = Release|Win32 - {72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Release|x64.ActiveCfg = Release|x64 - {72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Release|x64.Build.0 = Release|x64 - {51137D5C-4E81-4955-AACF-EA3092006051}.Debug|ARM.ActiveCfg = Debug|ARM - {51137D5C-4E81-4955-AACF-EA3092006051}.Debug|ARM.Build.0 = Debug|ARM - {51137D5C-4E81-4955-AACF-EA3092006051}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {51137D5C-4E81-4955-AACF-EA3092006051}.Debug|ARM64.Build.0 = Debug|ARM64 - {51137D5C-4E81-4955-AACF-EA3092006051}.Debug|Win32.ActiveCfg = Debug|Win32 - {51137D5C-4E81-4955-AACF-EA3092006051}.Debug|Win32.Build.0 = Debug|Win32 - {51137D5C-4E81-4955-AACF-EA3092006051}.Debug|x64.ActiveCfg = Debug|x64 - {51137D5C-4E81-4955-AACF-EA3092006051}.Debug|x64.Build.0 = Debug|x64 - {51137D5C-4E81-4955-AACF-EA3092006051}.Release|ARM.ActiveCfg = Release|ARM - {51137D5C-4E81-4955-AACF-EA3092006051}.Release|ARM.Build.0 = Release|ARM - {51137D5C-4E81-4955-AACF-EA3092006051}.Release|ARM64.ActiveCfg = Release|ARM64 - {51137D5C-4E81-4955-AACF-EA3092006051}.Release|ARM64.Build.0 = Release|ARM64 - {51137D5C-4E81-4955-AACF-EA3092006051}.Release|Win32.ActiveCfg = Release|Win32 - {51137D5C-4E81-4955-AACF-EA3092006051}.Release|Win32.Build.0 = Release|Win32 - {51137D5C-4E81-4955-AACF-EA3092006051}.Release|x64.ActiveCfg = Release|x64 - {51137D5C-4E81-4955-AACF-EA3092006051}.Release|x64.Build.0 = Release|x64 - {73A5729C-7323-41D4-AB48-8A03C9F81603}.Debug|ARM.ActiveCfg = Debug|ARM - {73A5729C-7323-41D4-AB48-8A03C9F81603}.Debug|ARM.Build.0 = Debug|ARM - {73A5729C-7323-41D4-AB48-8A03C9F81603}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {73A5729C-7323-41D4-AB48-8A03C9F81603}.Debug|ARM64.Build.0 = Debug|ARM64 - {73A5729C-7323-41D4-AB48-8A03C9F81603}.Debug|Win32.ActiveCfg = Debug|Win32 - {73A5729C-7323-41D4-AB48-8A03C9F81603}.Debug|Win32.Build.0 = Debug|Win32 - {73A5729C-7323-41D4-AB48-8A03C9F81603}.Debug|x64.ActiveCfg = Debug|x64 - {73A5729C-7323-41D4-AB48-8A03C9F81603}.Debug|x64.Build.0 = Debug|x64 - {73A5729C-7323-41D4-AB48-8A03C9F81603}.Release|ARM.ActiveCfg = Release|ARM - {73A5729C-7323-41D4-AB48-8A03C9F81603}.Release|ARM.Build.0 = Release|ARM - {73A5729C-7323-41D4-AB48-8A03C9F81603}.Release|ARM64.ActiveCfg = Release|ARM64 - {73A5729C-7323-41D4-AB48-8A03C9F81603}.Release|ARM64.Build.0 = Release|ARM64 - {73A5729C-7323-41D4-AB48-8A03C9F81603}.Release|Win32.ActiveCfg = Release|Win32 - {73A5729C-7323-41D4-AB48-8A03C9F81603}.Release|Win32.Build.0 = Release|Win32 - {73A5729C-7323-41D4-AB48-8A03C9F81603}.Release|x64.ActiveCfg = Release|x64 - {73A5729C-7323-41D4-AB48-8A03C9F81603}.Release|x64.Build.0 = Release|x64 - {E662D0B3-412D-4D55-A5EC-8CBD680DDCBE}.Debug|ARM.ActiveCfg = Debug|ARM - {E662D0B3-412D-4D55-A5EC-8CBD680DDCBE}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {E662D0B3-412D-4D55-A5EC-8CBD680DDCBE}.Debug|Win32.ActiveCfg = Debug|Win32 - {E662D0B3-412D-4D55-A5EC-8CBD680DDCBE}.Debug|x64.ActiveCfg = Debug|x64 - {E662D0B3-412D-4D55-A5EC-8CBD680DDCBE}.Release|ARM.ActiveCfg = Release|ARM - {E662D0B3-412D-4D55-A5EC-8CBD680DDCBE}.Release|ARM64.ActiveCfg = Release|ARM64 - {E662D0B3-412D-4D55-A5EC-8CBD680DDCBE}.Release|Win32.ActiveCfg = Release|Win32 - {E662D0B3-412D-4D55-A5EC-8CBD680DDCBE}.Release|x64.ActiveCfg = Release|x64 - {61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Debug|ARM.ActiveCfg = Debug|ARM - {61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Debug|ARM.Build.0 = Debug|ARM - {61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Debug|ARM64.ActiveCfg = Debug|ARM64 - {61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Debug|ARM64.Build.0 = Debug|ARM64 - {61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Debug|Win32.ActiveCfg = Debug|Win32 - {61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Debug|Win32.Build.0 = Debug|Win32 - {61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Debug|x64.ActiveCfg = Debug|x64 - {61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Debug|x64.Build.0 = Debug|x64 - {61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Release|ARM.ActiveCfg = Release|ARM - {61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Release|ARM.Build.0 = Release|ARM - {61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Release|ARM64.ActiveCfg = Release|ARM64 - {61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Release|ARM64.Build.0 = Release|ARM64 - {61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Release|Win32.ActiveCfg = Release|Win32 - {61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Release|Win32.Build.0 = Release|Win32 - {61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Release|x64.ActiveCfg = Release|x64 - {61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {8C0B5F99-D9B8-4CB2-BA67-5D350E71C6FC} - EndGlobalSection -EndGlobal diff --git a/srb2-vc9.sln b/srb2-vc9.sln deleted file mode 100644 index bbfcf0e77..000000000 --- a/srb2-vc9.sln +++ /dev/null @@ -1,89 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual C++ Express 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Srb2win", "src\win32\Srb2win-vc9.vcproj", "{0F554F1D-ED49-4D65-A9A7-F63C57F277BE}" - ProjectSection(ProjectDependencies) = postProject - {73A5729C-7323-41D4-AB48-8A03C9F81603} = {73A5729C-7323-41D4-AB48-8A03C9F81603} - {72B01ACA-7A1A-4F7B-ACEF-2607299CF052} = {72B01ACA-7A1A-4F7B-ACEF-2607299CF052} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng", "libs\libpng-src\projects\visualc9\libpng.vcproj", "{72B01ACA-7A1A-4F7B-ACEF-2607299CF052}" - ProjectSection(ProjectDependencies) = postProject - {73A5729C-7323-41D4-AB48-8A03C9F81603} = {73A5729C-7323-41D4-AB48-8A03C9F81603} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "r_opengl", "src\hardware\r_opengl\r_opengl-vc9.vcproj", "{51137D5C-4E81-4955-AACF-EA3092006051}" - ProjectSection(ProjectDependencies) = postProject - {0F554F1D-ED49-4D65-A9A7-F63C57F277BE} = {0F554F1D-ED49-4D65-A9A7-F63C57F277BE} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "libs\zlib\projects\visualc9\zlib.vcproj", "{73A5729C-7323-41D4-AB48-8A03C9F81603}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "s_openal", "src\hardware\s_openal\s_openal-vc9.vcproj", "{E662D0B3-412D-4D55-A5EC-8CBD680DDCBE}" - ProjectSection(ProjectDependencies) = postProject - {0F554F1D-ED49-4D65-A9A7-F63C57F277BE} = {0F554F1D-ED49-4D65-A9A7-F63C57F277BE} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Srb2SDL", "src\sdl\Srb2SDL-vc9.vcproj", "{61BA7D3C-F77D-4D31-B718-1177FE482CF2}" - ProjectSection(ProjectDependencies) = postProject - {73A5729C-7323-41D4-AB48-8A03C9F81603} = {73A5729C-7323-41D4-AB48-8A03C9F81603} - {72B01ACA-7A1A-4F7B-ACEF-2607299CF052} = {72B01ACA-7A1A-4F7B-ACEF-2607299CF052} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Debug|Win32.ActiveCfg = Debug|Win32 - {0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Debug|Win32.Build.0 = Debug|Win32 - {0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Debug|x64.ActiveCfg = Debug|x64 - {0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Debug|x64.Build.0 = Debug|x64 - {0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Release|Win32.ActiveCfg = Release|Win32 - {0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Release|Win32.Build.0 = Release|Win32 - {0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Release|x64.ActiveCfg = Release|x64 - {0F554F1D-ED49-4D65-A9A7-F63C57F277BE}.Release|x64.Build.0 = Release|x64 - {72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Debug|Win32.ActiveCfg = Debug|Win32 - {72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Debug|Win32.Build.0 = Debug|Win32 - {72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Debug|x64.ActiveCfg = Debug|x64 - {72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Debug|x64.Build.0 = Debug|x64 - {72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Release|Win32.ActiveCfg = Release|Win32 - {72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Release|Win32.Build.0 = Release|Win32 - {72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Release|x64.ActiveCfg = Release|x64 - {72B01ACA-7A1A-4F7B-ACEF-2607299CF052}.Release|x64.Build.0 = Release|x64 - {51137D5C-4E81-4955-AACF-EA3092006051}.Debug|Win32.ActiveCfg = Debug|Win32 - {51137D5C-4E81-4955-AACF-EA3092006051}.Debug|Win32.Build.0 = Debug|Win32 - {51137D5C-4E81-4955-AACF-EA3092006051}.Debug|x64.ActiveCfg = Debug|x64 - {51137D5C-4E81-4955-AACF-EA3092006051}.Debug|x64.Build.0 = Debug|x64 - {51137D5C-4E81-4955-AACF-EA3092006051}.Release|Win32.ActiveCfg = Release|Win32 - {51137D5C-4E81-4955-AACF-EA3092006051}.Release|Win32.Build.0 = Release|Win32 - {51137D5C-4E81-4955-AACF-EA3092006051}.Release|x64.ActiveCfg = Release|x64 - {51137D5C-4E81-4955-AACF-EA3092006051}.Release|x64.Build.0 = Release|x64 - {73A5729C-7323-41D4-AB48-8A03C9F81603}.Debug|Win32.ActiveCfg = Debug|Win32 - {73A5729C-7323-41D4-AB48-8A03C9F81603}.Debug|Win32.Build.0 = Debug|Win32 - {73A5729C-7323-41D4-AB48-8A03C9F81603}.Debug|x64.ActiveCfg = Debug|x64 - {73A5729C-7323-41D4-AB48-8A03C9F81603}.Debug|x64.Build.0 = Debug|x64 - {73A5729C-7323-41D4-AB48-8A03C9F81603}.Release|Win32.ActiveCfg = Release|Win32 - {73A5729C-7323-41D4-AB48-8A03C9F81603}.Release|Win32.Build.0 = Release|Win32 - {73A5729C-7323-41D4-AB48-8A03C9F81603}.Release|x64.ActiveCfg = Release|x64 - {73A5729C-7323-41D4-AB48-8A03C9F81603}.Release|x64.Build.0 = Release|x64 - {E662D0B3-412D-4D55-A5EC-8CBD680DDCBE}.Debug|Win32.ActiveCfg = Debug|Win32 - {E662D0B3-412D-4D55-A5EC-8CBD680DDCBE}.Debug|x64.ActiveCfg = Debug|x64 - {E662D0B3-412D-4D55-A5EC-8CBD680DDCBE}.Release|Win32.ActiveCfg = Release|Win32 - {E662D0B3-412D-4D55-A5EC-8CBD680DDCBE}.Release|x64.ActiveCfg = Release|x64 - {61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Debug|Win32.ActiveCfg = Debug|Win32 - {61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Debug|Win32.Build.0 = Debug|Win32 - {61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Debug|x64.ActiveCfg = Debug|x64 - {61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Debug|x64.Build.0 = Debug|x64 - {61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Release|Win32.ActiveCfg = Release|Win32 - {61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Release|Win32.Build.0 = Release|Win32 - {61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Release|x64.ActiveCfg = Release|x64 - {61BA7D3C-F77D-4D31-B718-1177FE482CF2}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/src/Android.mk b/src/Android.mk index a461da224..035d48887 100644 --- a/src/Android.mk +++ b/src/Android.mk @@ -76,7 +76,7 @@ LOCAL_SRC_FILES := am_map.c \ android/i_system.c \ android/i_video.c -LOCAL_CFLAGS += -DPLATFORM_ANDROID -DNONX86 -DLINUX -DDEBUGMODE -DNOASM -DNOPIX -DUNIXCOMMON -DNOTERMIOS +LOCAL_CFLAGS += -DPLATFORM_ANDROID -DNONX86 -DLINUX -DDEBUGMODE -DNOPIX -DUNIXCOMMON -DNOTERMIOS LOCAL_MODULE := libsrb2 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 74bbf1013..c7af7bf91 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -11,15 +11,7 @@ target_compile_features(SRB2SDL2 PRIVATE c_std_11 cxx_std_17) target_sourcefile(c) target_sources(SRB2SDL2 PRIVATE comptime.c md5.c config.h.in) -set(SRB2_ASM_SOURCES vid_copy.s) - -set(SRB2_NASM_SOURCES tmap_mmx.nas tmap.nas) - ### Configuration -set(SRB2_CONFIG_USEASM OFF CACHE BOOL - "Enable NASM tmap implementation for software mode speedup.") -set(SRB2_CONFIG_YASM OFF CACHE BOOL - "Use YASM in place of NASM.") set(SRB2_CONFIG_DEV_BUILD OFF CACHE BOOL "Compile a development build of SRB2Kart.") @@ -176,33 +168,6 @@ if(${CMAKE_SYSTEM} MATCHES Windows AND ${CMAKE_C_COMPILER_ID} MATCHES "GNU" AND target_include_directories(SRB2SDL2 PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../thirdparty/drmingw/include") endif() -if(${SRB2_CONFIG_USEASM}) - #SRB2_ASM_FLAGS can be used to pass flags to either nasm or yasm. - if("${CMAKE_SYSTEM_NAME}" MATCHES "Linux") - set(SRB2_ASM_FLAGS "-DLINUX ${SRB2_ASM_FLAGS}") - endif() - - if(${SRB2_CONFIG_YASM}) - set(CMAKE_ASM_YASM_SOURCE_FILE_EXTENSIONS ${CMAKE_ASM_YASM_SOURCE_FILE_EXTENSIONS} nas) - set(CMAKE_ASM_YASM_FLAGS "${SRB2_ASM_FLAGS}" CACHE STRING "Flags used by the assembler during all build types.") - enable_language(ASM_YASM) - else() - set(CMAKE_ASM_NASM_SOURCE_FILE_EXTENSIONS ${CMAKE_ASM_NASM_SOURCE_FILE_EXTENSIONS} nas) - set(CMAKE_ASM_NASM_FLAGS "${SRB2_ASM_FLAGS}" CACHE STRING "Flags used by the assembler during all build types.") - enable_language(ASM_NASM) - endif() - - set(SRB2_USEASM ON) - target_compile_definitions(SRB2SDL2 PRIVATE -DUSEASM) - target_compile_options(SRB2SDL2 PRIVATE -msse3 -mfpmath=sse) - - target_sources(SRB2SDL2 PRIVATE ${SRB2_ASM_SOURCES} - ${SRB2_NASM_SOURCES}) -else() - set(SRB2_USEASM OFF) - target_compile_definitions(SRB2SDL2 PRIVATE -DNONX86 -DNORUSEASM) -endif() - # Targets # If using CCACHE, then force it. diff --git a/src/Makefile b/src/Makefile index 51e85504b..dd309ba41 100644 --- a/src/Makefile +++ b/src/Makefile @@ -47,8 +47,6 @@ # HAVE_MINIUPNPC=1 - Enable automated port forwarding. # Already enabled by default for 32-bit # Windows. -# NOASM=1 - Disable hand optimized assembly code for the -# Software renderer. # NOPNG=1 - Disable PNG graphics support. (TODO: double # check netplay compatible.) # NOCURL=1 - Disable libcurl--HTTP capability. @@ -87,7 +85,6 @@ # executable. # WINDOWSHELL=1 - Use Windows commands. # PREFIX= - Prefix to many commands, for cross compiling. -# YASM=1 - Use Yasm instead of NASM assembler. # STABS=1 - ? # ECHO=1 - Print out each command in the build process. # NOECHOFILENAMES=1 - Don't print out each that is being @@ -147,22 +144,6 @@ OBJCOPY?=$(call Prefix,objcopy) OBJDUMP?=$(call Prefix,objdump) WINDRES?=$(call Prefix,windres) -ifdef YASM -NASM?=yasm -else -NASM?=nasm -endif - -ifdef YASM -ifdef STABS -NASMOPTS?=-g stabs -else -NASMOPTS?=-g dwarf2 -endif -else -NASMOPTS?=-g -endif - GZIP?=gzip GZIP_OPTS?=-9 -f -n ifdef WINDOWSHELL @@ -186,8 +167,6 @@ makedir:=../make opts:=-DCOMPVERSION -g libs:= -nasm_format:= - # This is a list of variables names, of which if defined, # also defines the name as a macro to the compiler. passthru_opts:= @@ -337,7 +316,6 @@ endif LD:=$(CC) cc:=$(cc) $(opts) -nasm=$(NASM) $(NASMOPTS) -f $(nasm_format) ifdef UPX upx=$(UPX) $(UPX_OPTS) endif @@ -415,7 +393,6 @@ $(objdir)/%.$(1) : %.$(2) | $$$$(@D)/ endef $(eval $(call _recipe,o,c,$(cc) -c -o $$@ $$<)) -$(eval $(call _recipe,o,nas,$(nasm) -o $$@ $$<)) $(eval $(call _recipe,o,cpp,$(cxx) -c -o $$@ $$<)) $(eval $(call _recipe,o,s,$(cc) $(asflags) -c -o $$@ $$<)) $(eval $(call _recipe,res,rc,$(windres) -i $$< -o $$@)) diff --git a/src/Makefile.d/features.mk b/src/Makefile.d/features.mk index 6492c3f77..6b26ebe53 100644 --- a/src/Makefile.d/features.mk +++ b/src/Makefile.d/features.mk @@ -1,82 +1,75 @@ -# -# Makefile for feature flags. -# - -passthru_opts+=\ - NO_IPV6 NOHW NOMD5 NOPOSTPROCESSING\ - MOBJCONSISTANCY PACKETDROP ZDEBUG\ - HAVE_MINIUPNPC\ - HAVE_DISCORDRPC DEVELOP - -# build with debugging information -ifdef DEBUGMODE -MOBJCONSISTANCY=1 -PACKETDROP=1 -opts+=-DPARANOIA -DRANGECHECK -endif - -ifndef NOHW -opts+=-DHWRENDER -sources+=$(call List,hardware/Sourcefile) -endif - -ifndef NOASM -ifndef NONX86 -sources+=tmap.nas tmap_mmx.nas -opts+=-DUSEASM -endif -endif - -ifndef NOMD5 -sources+=md5.c -endif - -ifndef NOZLIB -ifndef NOPNG -ifdef PNG_PKGCONFIG -$(eval $(call Use_pkg_config,PNG_PKGCONFIG)) -else -PNG_CONFIG?=$(call Prefix,libpng-config) -$(eval $(call Configure,PNG,$(PNG_CONFIG) \ - $(if $(PNG_STATIC),--static),,--ldflags)) -endif -ifdef LINUX -opts+=-D_LARGEFILE64_SOURCE -endif -opts+=-DHAVE_PNG -sources+=apng.c -endif -endif - -ifndef NOCURL -CURLCONFIG?=curl-config -$(eval $(call Configure,CURL,$(CURLCONFIG))) -opts+=-DHAVE_CURL -endif - -ifdef HAVE_MINIUPNPC -libs+=-lminiupnpc -endif - -ifdef HAVE_DISCORDRPC -$(eval $(call Propogate_flags,DISCORDRPC)) -libs+=-ldiscord-rpc -opts+=-DUSE_STUN -sources+=discord.c stun.c -endif - -# (Valgrind is a memory debugger.) -ifdef VALGRIND -VALGRIND_PKGCONFIG?=valgrind -$(eval $(call Use_pkg_config,VALGRIND)) -ZDEBUG=1 -opts+=-DHAVE_VALGRIND -endif - -default_packages:=\ - GME/libgme/LIBGME\ - OPENMPT/libopenmpt/LIBOPENMPT\ - ZLIB/zlib\ - -$(foreach p,$(default_packages),\ - $(eval $(call Check_pkg_config,$(p)))) +# +# Makefile for feature flags. +# + +passthru_opts+=\ + NO_IPV6 NOHW NOMD5 NOPOSTPROCESSING\ + MOBJCONSISTANCY PACKETDROP ZDEBUG\ + HAVE_MINIUPNPC\ + HAVE_DISCORDRPC DEVELOP + +# build with debugging information +ifdef DEBUGMODE +MOBJCONSISTANCY=1 +PACKETDROP=1 +opts+=-DPARANOIA -DRANGECHECK +endif + +ifndef NOHW +opts+=-DHWRENDER +sources+=$(call List,hardware/Sourcefile) +endif + +ifndef NOMD5 +sources+=md5.c +endif + +ifndef NOZLIB +ifndef NOPNG +ifdef PNG_PKGCONFIG +$(eval $(call Use_pkg_config,PNG_PKGCONFIG)) +else +PNG_CONFIG?=$(call Prefix,libpng-config) +$(eval $(call Configure,PNG,$(PNG_CONFIG) \ + $(if $(PNG_STATIC),--static),,--ldflags)) +endif +ifdef LINUX +opts+=-D_LARGEFILE64_SOURCE +endif +opts+=-DHAVE_PNG +sources+=apng.c +endif +endif + +ifndef NOCURL +CURLCONFIG?=curl-config +$(eval $(call Configure,CURL,$(CURLCONFIG))) +opts+=-DHAVE_CURL +endif + +ifdef HAVE_MINIUPNPC +libs+=-lminiupnpc +endif + +ifdef HAVE_DISCORDRPC +$(eval $(call Propogate_flags,DISCORDRPC)) +libs+=-ldiscord-rpc +opts+=-DUSE_STUN +sources+=discord.c stun.c +endif + +# (Valgrind is a memory debugger.) +ifdef VALGRIND +VALGRIND_PKGCONFIG?=valgrind +$(eval $(call Use_pkg_config,VALGRIND)) +ZDEBUG=1 +opts+=-DHAVE_VALGRIND +endif + +default_packages:=\ + GME/libgme/LIBGME\ + OPENMPT/libopenmpt/LIBOPENMPT\ + ZLIB/zlib\ + +$(foreach p,$(default_packages),\ + $(eval $(call Check_pkg_config,$(p)))) diff --git a/src/Makefile.d/nix.mk b/src/Makefile.d/nix.mk index 97bcf018e..5f7d1b6a3 100644 --- a/src/Makefile.d/nix.mk +++ b/src/Makefile.d/nix.mk @@ -5,10 +5,6 @@ opts+=-DUNIXCOMMON -DLUA_USE_POSIX libs+=-lm -ifndef nasm_format -nasm_format:=elf -DLINUX -endif - ifndef NOHW opts+=-I/usr/X11R6/include libs+=-L/usr/X11R6/lib @@ -31,7 +27,6 @@ endif # FIXME: UNTESTED #ifdef SOLARIS #NOIPX=1 -#NOASM=1 #opts+=-I/usr/local/include -I/opt/sfw/include \ # -DSOLARIS -DINADDR_NONE=INADDR_ANY -DBSD_COMP #libs+=-L/opt/sfw/lib -lsocket -lnsl diff --git a/src/Makefile.d/platform.mk b/src/Makefile.d/platform.mk index fad4be191..b4e2b8aa1 100644 --- a/src/Makefile.d/platform.mk +++ b/src/Makefile.d/platform.mk @@ -39,7 +39,6 @@ else ifdef SOLARIS # FIXME: UNTESTED UNIX=1 platform=solaris else ifdef CYGWIN32 # FIXME: UNTESTED -nasm_format=win32 platform=cygwin else ifdef MINGW ifdef MINGW64 diff --git a/src/Makefile.d/sdl.mk b/src/Makefile.d/sdl.mk index 99ca624e6..74a3bd107 100644 --- a/src/Makefile.d/sdl.mk +++ b/src/Makefile.d/sdl.mk @@ -13,16 +13,6 @@ makedir:=$(makedir)/SDL sources+=$(call List,sdl/Sourcefile) opts+=-DDIRECTFULLSCREEN -DHAVE_SDL -# FIXME: UNTESTED -#ifdef PANDORA -#include sdl/SRB2Pandora/Makefile.cfg -#endif #ifdef PANDORA - -# FIXME: UNTESTED -#ifdef CYGWIN32 -#include sdl/MakeCYG.cfg -#endif #ifdef CYGWIN32 - ifndef NOHW sources+=sdl/ogl_sdl.c endif @@ -56,13 +46,6 @@ SDL_LDFLAGS?=$(shell $(SDL_CONFIG) \ $(eval $(call Propogate_flags,SDL)) endif -# use the x86 asm code -ifndef CYGWIN32 -ifndef NOASM -USEASM=1 -endif -endif - ifdef MINGW ifndef NOSDLMAIN SDLMAIN=1 diff --git a/src/Makefile.d/win32.mk b/src/Makefile.d/win32.mk index a6c66c84e..e1609fe20 100644 --- a/src/Makefile.d/win32.mk +++ b/src/Makefile.d/win32.mk @@ -13,9 +13,7 @@ sources+=win32/Srb2win.rc opts+=-DSTDC_HEADERS libs+=-ladvapi32 -lkernel32 -lmsvcrt -luser32 -nasm_format:=win32 - -SDL=1 +SDL?=1 ifndef NOHW opts+=-DUSE_WGL_SWAP diff --git a/src/Sourcefile b/src/Sourcefile index ceb12918b..36b9a0e79 100644 --- a/src/Sourcefile +++ b/src/Sourcefile @@ -15,7 +15,7 @@ f_wipe.c g_demo.c g_game.c g_input.c -g_splitscreen.c +g_party.cpp am_map.c command.c console.c @@ -92,7 +92,6 @@ mserv.c http-mserv.c i_tcp.c lzf.c -vid_copy.s lua_script.c lua_baselib.c lua_mathlib.c diff --git a/src/config.h.in b/src/config.h.in index bd38e2d6c..07d41e4ec 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -9,23 +9,6 @@ * variables, so you can insert them here too. */ -/* Manually defined asset hashes - * Last updated 2019 / 01 / 18 - Kart v1.0.2 - Main assets - * Last updated 2020 / 08 / 30 - Kart v1.3 - patch.kart - * updated 2025 - BlanKart Indev - - */ - -#define ASSET_HASH_MAIN_PK3 "daf9a1a67b5e465c13789e96a09f7171" -#define ASSET_HASH_SRB2_SRB "c1b9577687f8a795104aef4600720ea7" -#define ASSET_HASH_GFX_KART "06f86ee16136eb8a7043b15001797034" -#define ASSET_HASH_TEXTURES_KART "abb53d56aba47c3a8cb0f764da1c8b80" -#define ASSET_HASH_CHARS_KART "e2c428347dde52858a3dacd29fc5b964" -#define ASSET_HASH_MAPS_KART "d051e55141ba736582228c456953cd98" -#define ASSET_HASH_FOLLOWERS_PK3 "00000000000000000000000000000000" -#ifdef USE_PATCH_FILE -#define ASSET_HASH_PATCH_PK3 "00000000000000000000000000000000" -#endif - #ifdef CMAKECONFIG #define SRB2_COMP_REVISION "${SRB2_COMP_REVISION}" diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 966d1d364..d626df79e 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -58,6 +58,8 @@ #include "doomstat.h" #include "s_sound.h" // sfx_syfail #include "r_fps.h" +#include "m_cond.h" // netUnlocked +#include "g_party.h" // cl loading screen #include "v_video.h" @@ -2525,6 +2527,7 @@ void CL_ClearPlayer(INT32 playernum) splitscreen_invitations[playernum] = -1; playerconsole[playernum] = playernum; + G_DestroyParty(playernum); // Wipe the struct. memset(&players[playernum], 0, sizeof (player_t)); @@ -2575,7 +2578,7 @@ void CL_RemovePlayer(INT32 playernum, kickreason_t reason) displayplayers[0] = consoleplayer; } - G_RemovePartyMember(playernum); + G_LeaveParty(playernum); // Reset player data CL_ClearPlayer(playernum); @@ -3436,9 +3439,9 @@ void SV_ResetServer(void) Schedule_Clear(); Automate_Clear(); K_ClearClientPowerLevels(); + G_ObliterateParties(); memset(splitscreen_invitations, -1, sizeof splitscreen_invitations); - memset(splitscreen_partied, 0, sizeof splitscreen_partied); memset(player_name_changes, 0, sizeof player_name_changes); mynode = 0; @@ -3525,6 +3528,7 @@ void D_QuitNetGame(void) Schedule_Clear(); Automate_Clear(); K_ClearClientPowerLevels(); + G_ObliterateParties(); DEBFILE("===========================================================================\n" " Log finish\n" @@ -3603,7 +3607,6 @@ static void Got_AddPlayer(UINT8 **p, INT32 playernum) displayplayers[i] = newplayernum; g_localplayers[i] = newplayernum; } - splitscreen_partied[newplayernum] = true; DEBFILE("spawning me\n"); } @@ -3616,12 +3619,6 @@ static void Got_AddPlayer(UINT8 **p, INT32 playernum) players[newplayernum].splitscreenindex = splitscreenplayer; players[newplayernum].bot = false; - playerconsole[newplayernum] = console; - splitscreen_original_party_size[console] = - ++splitscreen_party_size[console]; - splitscreen_original_party[console][splitscreenplayer] = - splitscreen_party[console][splitscreenplayer] = newplayernum; - if (netgame) { char joinmsg[256]; @@ -5601,14 +5598,6 @@ boolean TryRunTics(tic_t realtics) if (ticking) { - if (advancedemo) - { - if (timedemo_quit) - COM_ImmedExecute("quit"); - else - D_StartTitle(); - } - else { boolean tickInterp = true; diff --git a/src/d_main.cpp b/src/d_main.cpp index 02f2e9506..4793c8b27 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -80,6 +80,17 @@ #include +// Put hashes here to get them out of header hell. +#define ASSET_HASH_MAIN_PK3 "b635b78a127d116d22772c10ffd323f2" +#define ASSET_HASH_SRB2_SRB "c1b9577687f8a795104aef4600720ea7" +#define ASSET_HASH_GFX_KART "06f86ee16136eb8a7043b15001797034" +#define ASSET_HASH_TEXTURES_KART "abb53d56aba47c3a8cb0f764da1c8b80" +#define ASSET_HASH_CHARS_KART "e2c428347dde52858a3dacd29fc5b964" +#define ASSET_HASH_MAPS_KART "d051e55141ba736582228c456953cd98" +#ifdef USE_PATCH_FILE +#define ASSET_HASH_PATCH_PK3 "00000000000000000000000000000000" +#endif + #ifdef CMAKECONFIG #include "config.h" #else @@ -130,7 +141,6 @@ INT32 postimgparam[MAXSPLITSCREENPLAYERS]; boolean sound_disabled = false; boolean digital_disabled = false; -boolean advancedemo; #ifdef DEBUGFILE INT32 debugload = 0; #endif @@ -972,15 +982,6 @@ void D_SRB2Loop(void) } } -// -// D_AdvanceDemo -// Called after each demo or intro demosequence finishes -// -void D_AdvanceDemo(void) -{ - advancedemo = true; -} - // ========================================================================= // D_SRB2Main // ========================================================================= @@ -1053,7 +1054,6 @@ void D_StartTitle(void) //demosequence = -1; G_SetGametype(GT_RACE); // SRB2kart paused = false; - advancedemo = false; F_InitMenuPresValues(); // clear cmd building stuff @@ -1141,7 +1141,7 @@ static void ChangeDirForUrlHandler(void) static boolean AddIWAD(void) { - char * path = va(pandf,srb2path,"srb2.srb"); + char * path = va(pandf,srb2path, SRB2NAME); if (FIL_ReadFileOK(path)) { @@ -1179,7 +1179,7 @@ static void IdentifyVersion(void) // Load the IWAD if (! AddIWAD()) { - I_Error("srb2.srb not found! Expected in %s\n", srb2waddir); + I_Error("%s not found! Expected in %s\n", SRB2NAME, srb2waddir); } // will be overwritten in case of -cdrom or unix/win home @@ -1189,33 +1189,15 @@ static void IdentifyVersion(void) // if you change the ordering of this or add/remove a file, be sure to update the md5 // checking in D_SRB2Main -#define MAINNAME "main.pk3" -#define TEXTURESNAME "textures.kart" -#define MAPSNAME "maps.kart" -#define PATCHNAME "patch.pk3" -#define MUSICNAME "music.kart" -#define FOLLOWERSNAME "followers.pk3" -#define CHARSNAME "chars.kart" -#define GRAPHICSNAME "gfx.kart" -#define SOUNDSNAME "sounds.kart" - D_AddFile(startupiwads, va(pandf,srb2waddir,GRAPHICSNAME)); D_AddFile(startupiwads, va(pandf,srb2waddir,TEXTURESNAME)); D_AddFile(startupiwads, va(pandf,srb2waddir,CHARSNAME)); D_AddFile(startupiwads, va(pandf,srb2waddir,MAPSNAME)); D_AddFile(startupiwads, va(pandf,srb2waddir,MAINNAME)); - //D_AddFile(startupiwads, va(pandf,srb2waddir,FOLLOWERSNAME)); #ifdef USE_PATCH_FILE D_AddFile(startupiwads, va(pandf,srb2waddir,PATCHNAME)); #endif //// -#undef MAINNAME -#undef TEXTURESNAME -#undef MAPSNAME -#undef PATCHNAME -#undef FOLLOWERSNAME -#undef CHARSNAME -#undef GRAPHICSNAME #if !defined (HAVE_SDL) || defined (HAVE_MIXER) @@ -1232,10 +1214,7 @@ static void IdentifyVersion(void) MUSICTEST(SOUNDSNAME) MUSICTEST(MUSICNAME) -#undef MUSICNAME #undef MUSICTEST -#undef SOUNDSNAME - #endif } @@ -1512,7 +1491,6 @@ void D_SRB2Main(void) mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_MAPS_KART); // maps.kart wadfiles[mainwads]->compatmode = true; mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_MAIN_PK3); // main.pk3 - //mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_FOLLOWERS_PK3); // followers.pk3 #ifdef USE_PATCH_FILE mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_PATCH_PK3); // patch.pk3 #endif @@ -1526,7 +1504,6 @@ void D_SRB2Main(void) mainwads++; // maps.kart wadfiles[mainwads]->compatmode = true; mainwads++; // main.pk3 - //mainwads++; // followers.pk3 #ifdef USE_PATCH_FILE mainwads++; // patch.pk3 #endif diff --git a/src/d_main.h b/src/d_main.h index 9e24c4cad..df163deea 100644 --- a/src/d_main.h +++ b/src/d_main.h @@ -20,9 +20,17 @@ #ifdef __cplusplus extern "C" { #endif - -extern boolean advancedemo; +// Store file nameres here for future reference else where. +#define MAINNAME "main.pk3" +#define SRB2NAME "srb2.srb" +#define TEXTURESNAME "textures.kart" +#define MAPSNAME "maps.kart" +#define PATCHNAME "patch.pk3" +#define MUSICNAME "music.kart" +#define CHARSNAME "chars.kart" +#define GRAPHICSNAME "gfx.kart" +#define SOUNDSNAME "sounds.kart" // make sure not to write back the config until it's been correctly loaded extern tic_t rendergametic; @@ -39,7 +47,6 @@ void D_SRB2Loop(void) FUNCNORETURN; // D_SRB2Main() // Not a globally visible function, just included for source reference, // calls all startup code, parses command line options. -// If not overrided by user input, calls D_AdvanceDemo. // void D_SRB2Main(void); @@ -56,7 +63,6 @@ const char *D_Home(void); // // BASE LEVEL // -void D_AdvanceDemo(void); void D_StartTitle(void); #ifdef __cplusplus diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 01fda96e3..c01df78d7 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -64,6 +64,7 @@ #include "doomstat.h" #include "deh_tables.h" #include "m_perfstats.h" +#include "g_party.h" #define CV_RESTRICT CV_NETVAR @@ -150,6 +151,7 @@ static void KartEncore_OnChange(void); static void KartComeback_OnChange(void); static void KartEliminateLast_OnChange(void); static void KartRings_OnChange(void); +static void KartItemBreaker_OnChange(void); static void Schedule_OnChange(void); @@ -177,7 +179,11 @@ static void Command_ListWADS_f(void); static void Command_ListDoomednums_f(void); static void Command_RunSOC(void); static void Command_Pause(void); + static void Command_Respawn(void); +static void Command_Respawn2(void); +static void Command_Respawn3(void); +static void Command_Respawn4(void); static void Command_Version_f(void); #ifdef UPDATE_ALERT @@ -435,6 +441,8 @@ consvar_t cv_karteliminatelast = CVAR_INIT ("karteliminatelast", "Yes", CV_NETVA // Toggles for new features consvar_t cv_kartrings = CVAR_INIT ("kartrings", "No", CV_NETVAR|CV_CHEAT|CV_CALL|CV_NOINIT, CV_YesNo, KartRings_OnChange); +consvar_t cv_kartitembreaker = CVAR_INIT ("kartitembreaker", "No", CV_NETVAR|CV_CHEAT|CV_CALL|CV_NOINIT, CV_YesNo, KartItemBreaker_OnChange); + consvar_t cv_kartwalltransfer = CVAR_INIT ("BG_forcewalltransfer", "Off", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL); consvar_t cv_kartusepwrlv = CVAR_INIT ("kartusepwrlv", "Yes", CV_NETVAR|CV_CHEAT, CV_YesNo, NULL); @@ -736,7 +744,11 @@ void D_RegisterServerCommands(void) COM_AddCommand("runsoc", Command_RunSOC); COM_AddCommand("pause", Command_Pause); + COM_AddCommand("respawn", Command_Respawn); + COM_AddCommand("respawn2", Command_Respawn2); + COM_AddCommand("respawn3", Command_Respawn3); + COM_AddCommand("respawn4", Command_Respawn4); COM_AddCommand("gametype", Command_ShowGametype_f); COM_AddCommand("version", Command_Version_f); @@ -1489,14 +1501,12 @@ static void ForceAllSkins(INT32 forcedskin) } static const char * -VaguePartyDescription (int playernum, int *party_sizes, int default_color) +VaguePartyDescription (int playernum, int size, int default_color) { static char party_description [1 + MAXPLAYERNAME + 1 + sizeof " and x others"]; const char *name; - int size; name = player_names[playernum]; - size = party_sizes[playernum]; /* less than check for the dumb compiler because I KNOW it'll complain about "writing x bytes into an area of y bytes"!!! @@ -1911,7 +1921,7 @@ static void Got_PartyInvite(UINT8 **cp,INT32 playernum) HU_AddChatText(va( "\x82*You have been invited to join %s.", VaguePartyDescription( - playernum, splitscreen_party_size, '\x82') + playernum, G_PartySize(playernum), '\x82') ), true); } } @@ -1920,8 +1930,6 @@ static void Got_PartyInvite(UINT8 **cp,INT32 playernum) static void Got_AcceptPartyInvite(UINT8 **cp,INT32 playernum) { int invitation; - int old_party_size; - int views; (void)cp; @@ -1937,12 +1945,12 @@ static void Got_AcceptPartyInvite(UINT8 **cp,INT32 playernum) if (invitation >= 0) { - if (splitscreen_partied[invitation]) + if (G_IsPartyLocal(invitation)) { HU_AddChatText(va( "\x82*%s joined your party!", VaguePartyDescription( - playernum, splitscreen_original_party_size, '\x82') + playernum, G_LocalSplitscreenPartySize(playernum), '\x82') ), true); } else if (playernum == consoleplayer) @@ -1950,18 +1958,11 @@ static void Got_AcceptPartyInvite(UINT8 **cp,INT32 playernum) HU_AddChatText(va( "\x82*You joined %s's party!", VaguePartyDescription( - invitation, splitscreen_party_size, '\x82') + invitation, G_PartySize(invitation), '\x82') ), true); } - old_party_size = splitscreen_party_size[invitation]; - views = splitscreen_original_party_size[playernum]; - - if (( old_party_size + views ) <= MAXSPLITSCREENPLAYERS) - { - G_RemovePartyMember(playernum); - G_AddPartyMember(invitation, playernum); - } + G_JoinParty(invitation, playernum); splitscreen_invitations[playernum] = -1; } @@ -2019,21 +2020,16 @@ static void Got_LeaveParty(UINT8 **cp,INT32 playernum) splitscreen_invitations[playernum] = -1; - if (splitscreen_party_size[playernum] > - splitscreen_original_party_size[playernum]) + if (G_IsPartyLocal(playernum) && playernum != consoleplayer) { - if (splitscreen_partied[playernum] && playernum != consoleplayer) - { - HU_AddChatText(va( - "\x85*%s left your party.", - VaguePartyDescription( - playernum, splitscreen_original_party_size, '\x85') - ), true); - } - - G_RemovePartyMember(playernum); - G_ResetSplitscreen(playernum); + HU_AddChatText(va( + "\x85*%s left your party.", + VaguePartyDescription( + playernum, G_LocalSplitscreenPartySize(playernum), '\x85') + ), true); } + + G_LeaveParty(playernum); } void D_SendPlayerConfig(UINT8 n) @@ -2281,13 +2277,6 @@ static void Command_SetViews_f(void) UINT8 splits; UINT8 newsplits; - if (!( demo.playback && multiplayer )) - { - CONS_Alert(CONS_NOTICE, - "You must be viewing a multiplayer replay to use this.\n"); - return; - } - if (COM_Argc() != 2) { CONS_Printf("setviews : set the number of split screens\n"); @@ -2298,12 +2287,33 @@ static void Command_SetViews_f(void) newsplits = atoi(COM_Argv(1)); newsplits = min(max(newsplits, 1), 4); - if (newsplits > splits) + + if (newsplits > splits && demo.playback && multiplayer) + { G_AdjustView(newsplits, 0, true); + } else { - r_splitscreen = newsplits-1; - R_ExecuteSetViewSize(); + // Even if the splits go beyond the real number of + // splitscreen players, displayplayers was filled + // with duplicates of P1 (see Got_AddPlayer). + if (demo.playback) + { + G_SyncDemoParty(consoleplayer, newsplits-1); + } + else + { + r_splitscreen = newsplits-1; + R_ExecuteSetViewSize(); + } + + // If promoting (outside of replays), make sure the + // camera is in the correct position. + UINT8 i; + for (i = splits + 1; i <= newsplits; ++i) + { + G_FixCamera(i); + } } } @@ -2320,7 +2330,7 @@ Command_Invite_f (void) return; } - if (r_splitscreen >= MAXSPLITSCREENPLAYERS) + if (G_PartySize(consoleplayer) >= MAXSPLITSCREENPLAYERS) { CONS_Alert(CONS_WARNING, "Your party is full!\n"); return; @@ -2339,9 +2349,9 @@ Command_Invite_f (void) return; } - if (invitee == consoleplayer) + if (G_IsPartyLocal(invitee)) { - CONS_Alert(CONS_WARNING, "You cannot invite yourself! Bruh!\n"); + CONS_Alert(CONS_WARNING, "That player is already a member of your party.\n"); return; } @@ -2349,20 +2359,21 @@ Command_Invite_f (void) { CONS_Alert(CONS_WARNING, "That player has already been invited to join another party.\n"); + return; } - if (( splitscreen_party_size[consoleplayer] + - splitscreen_original_party_size[invitee] ) > MAXSPLITSCREENPLAYERS) + if ((G_PartySize(consoleplayer) + G_LocalSplitscreenPartySize(invitee)) > MAXSPLITSCREENPLAYERS) { CONS_Alert(CONS_WARNING, "That player joined with too many " "splitscreen players for your party.\n"); + return; } CONS_Printf( "Inviting %s...\n", VaguePartyDescription( - invitee, splitscreen_original_party_size, '\x80') + invitee, G_LocalSplitscreenPartySize(invitee), '\x80') ); buffer[0] = invitee; @@ -2400,12 +2411,13 @@ Command_CancelInvite_f (void) { CONS_Alert(CONS_WARNING, "You have not invited this player!\n"); + return; } CONS_Printf( "Rescinding invite to %s...\n", VaguePartyDescription( - invitee, splitscreen_original_party_size, '\x80') + invitee, G_LocalSplitscreenPartySize(invitee), '\x80') ); buffer[0] = invitee; @@ -2445,7 +2457,7 @@ Command_RejectInvite_f (void) static void Command_LeaveParty_f (void) { - if (r_splitscreen > splitscreen) + if (G_PartySize(consoleplayer) > G_LocalSplitscreenPartySize(consoleplayer)) { CONS_Printf("\x85Leaving party...\n"); @@ -3313,34 +3325,58 @@ static void Got_Pause(UINT8 **cp, INT32 playernum) } // Command for stuck characters in netgames, griefing, etc. -static void Command_Respawn(void) +static void HandleRespawnCommand(UINT8 localplayer) { UINT8 buf[4]; UINT8 *cp = buf; - - if (!(gamestate == GS_LEVEL || gamestate == GS_INTERMISSION || gamestate == GS_VOTING)) { CONS_Printf(M_GetText("You must be in a level to use this.\n")); return; } - if (players[consoleplayer].mo && !P_IsObjectOnGround(players[consoleplayer].mo)) // KART: Nice try, but no, you won't be cheesing spb anymore. + if (players[g_localplayers[localplayer]].mo && !P_IsObjectOnGround(players[g_localplayers[localplayer]].mo)) // KART: Nice try, but no, you won't be cheesing spb anymore. { CONS_Printf(M_GetText("You must be on the floor to use this.\n")); return; } - // todo: this probably isnt necessary anymore with v2 - if (players[consoleplayer].mo && (P_PlayerInPain(&players[consoleplayer]) || spbplace == players[consoleplayer].position)) // KART: Nice try, but no, you won't be cheesing spb anymore (x2) + if (players[g_localplayers[localplayer]].mo && (P_PlayerInPain(&players[g_localplayers[localplayer]]) || spbplace == players[g_localplayers[localplayer]].position)) // KART: Nice try, but no, you won't be cheesing spb anymore (x2) { CONS_Printf(M_GetText("Nice try.\n")); return; } - WRITEINT32(cp, consoleplayer); - SendNetXCmd(XD_RESPAWN, &buf, 4); + if (localplayer != 0 && !g_localplayers[localplayer]) + { + CONS_Printf(M_GetText("There is no player to respawn.\n")); + return; + } + + WRITEINT32(cp, g_localplayers[localplayer]); + SendNetXCmdForPlayer(localplayer, XD_RESPAWN, &buf, sizeof(buf)); +} + +// Command for stuck characters in netgames, griefing, etc. +static void Command_Respawn(void) +{ + HandleRespawnCommand(0); +} + +static void Command_Respawn2(void) +{ + HandleRespawnCommand(1); +} + +static void Command_Respawn3(void) +{ + HandleRespawnCommand(2); +} + +static void Command_Respawn4(void) +{ + HandleRespawnCommand(3); } static void Got_Respawn(UINT8 **cp, INT32 playernum) @@ -3362,7 +3398,7 @@ static void Got_Respawn(UINT8 **cp, INT32 playernum) if (!P_IsObjectOnGround(players[respawnplayer].mo)) return; - P_DamageMobj(players[respawnplayer].mo, NULL, NULL, 1,DMG_INSTAKILL); + P_DamageMobj(players[respawnplayer].mo, NULL, NULL, 1, DMG_INSTAKILL); demo_extradata[playernum] |= DXD_RESPAWN; } } @@ -3660,24 +3696,6 @@ void P_SetPlayerSpectator(INT32 playernum) players[playernum].pflags &= ~PF_WANTSTOJOIN; players[playernum].playerstate = PST_REBORN; - - /*if (cv_spectatormusic.value && (players[displayplayers[0]].spectator == true) && !r_splitscreen) - { - if (P_UseContinuousLevelMusic()) - { - if (!stricmp(Music_Song("level_nosync"), cv_spectatormusiclump.string)) - { - // Do not reset music if it is the same - Music_BatchExempt("level_nosync"); - } - Music_Remap("level_nosync", cv_spectatormusiclump.string); - } - else - { - Music_Remap("level", cv_spectatormusiclump.string); - } - }*/ - } //todo: This and the other teamchange functions are getting too long and messy. Needs cleaning. @@ -3755,24 +3773,19 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum) //Safety first! // (not respawning spectators here...) - if (!players[playernum].spectator) + wasspectator = (players[playernum].spectator == true); + + if (!wasspectator) { - if (players[playernum].mo) + if (gamestate == GS_LEVEL && players[playernum].mo) { - P_DamageMobj(players[playernum].mo, NULL, NULL, 1, - (NetPacket.packet.newteam ? DMG_INSTAKILL : DMG_SPECTATOR)); - } - //else - if (!NetPacket.packet.newteam) - { - players[playernum].playerstate = PST_REBORN; + // The following will call P_SetPlayerSpectator if successful + P_DamageMobj(players[playernum].mo, NULL, NULL, 1, DMG_SPECTATOR); } + //...but because the above could return early under some contexts, we try again here + P_SetPlayerSpectator(playernum); } - else - wasspectator = true; - - players[playernum].pflags &= ~PF_WANTSTOJOIN; //Now that we've done our error checking and killed the player //if necessary, put the player on the correct team/status. @@ -3822,22 +3835,6 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum) else if (NetPacket.packet.newteam == 0 && !wasspectator) HU_AddChatText(va("\x82*%s became a spectator.", player_names[playernum]), false); // "entered the game" text was moved to P_SpectatorJoinGame - // Reset away view (some code referenced from P_SpectatorJoinGame) - { - UINT8 i = 0; - INT32 *localplayertable = (splitscreen_partied[consoleplayer] ? splitscreen_party[consoleplayer] : g_localplayers); - - for (i = 0; i < r_splitscreen; i++) - { - if (localplayertable[i] == playernum) - { - LUA_HookViewpointSwitch(players+playernum, players+playernum, true); - displayplayers[i] = playernum; - break; - } - } - } - /*if (G_GametypeHasTeams()) { if (NetPacket.packet.newteam) @@ -4907,11 +4904,6 @@ static void Command_Version_f(void) else // 16-bit? 128-bit? CONS_Printf("Bits Unknown "); - // No ASM? -#ifdef NOASM - CONS_Printf("\x85" "NOASM " "\x80"); -#endif - // Debug build #ifdef _DEBUG CONS_Printf("\x85" "DEBUG " "\x80"); @@ -5759,35 +5751,85 @@ static void Got_Cheat(UINT8 **cp, INT32 playernum) } } +static const char *displayplayer_compose_col(int playernum) +{ + return va("\x84(%d) \x83%s\x80", playernum, player_names[playernum]); +} + +static int displayplayer_col_len(const char *text) +{ + int n = strlen(text); + int k = n; + int i; + for (i = 0; i < n; ++i) + { + if (!isprint(text[i])) + k--; + } + return k; +} + +static void displayplayer_calc_col(int *col, const char *text) +{ + if (text && text[0] != ' ') + { + int n = displayplayer_col_len(text); + if (*col < n) + *col = n; + } +} + +static void displayplayer_print_col(int *col, const char *text) +{ + if (text) + { + if (*col) + { + int n = *col - displayplayer_col_len(text); + CONS_Printf("%s%*s ", text, n, ""); + } + } + else + CONS_Printf("\n"); +} + +static void displayplayer_iter_table(int table[5], void(*col_cb)(int*,const char*)) +{ + int i; + + col_cb(&table[0], ""); + for (i = 0; i < 4; ++i) + col_cb(&table[1 + i], va(" %d", i)); + col_cb(NULL, NULL); + + col_cb(&table[0], "g_local"); + for (i = 0; i <= splitscreen; ++i) + col_cb(&table[1 + i], displayplayer_compose_col(g_localplayers[i])); + col_cb(NULL, NULL); + + col_cb(&table[0], "display"); + for (i = 0; i <= r_splitscreen; ++i) + col_cb(&table[1 + i], displayplayer_compose_col(displayplayers[i])); + col_cb(NULL, NULL); + + col_cb(&table[0], "local party"); + for (i = 0; i < G_LocalSplitscreenPartySize(consoleplayer); ++i) + col_cb(&table[1 + i], displayplayer_compose_col(G_LocalSplitscreenPartyMember(consoleplayer, i))); + col_cb(NULL, NULL); + + col_cb(&table[0], "final party"); + for (i = 0; i < G_PartySize(consoleplayer); ++i) + col_cb(&table[1 + i], displayplayer_compose_col(G_PartyMember(consoleplayer, i))); + col_cb(NULL, NULL); +} + /** Prints the number of displayplayers[0]. - * - * \todo Possibly remove this; it was useful for debugging at one point. */ static void Command_Displayplayer_f(void) { - int playernum; - int i; - for (i = 0; i <= splitscreen; ++i) - { - playernum = g_localplayers[i]; - CONS_Printf( - "local player %d: \x84(%d) \x83%s\x80\n", - i, - playernum, - player_names[playernum] - ); - } - CONS_Printf("\x83----------------------------------------\x80\n"); - for (i = 0; i <= r_splitscreen; ++i) - { - playernum = displayplayers[i]; - CONS_Printf( - "display player %d: \x84(%d) \x83%s\x80\n", - i, - playernum, - player_names[playernum] - ); - } + int table[5] = {0}; + displayplayer_iter_table(table, displayplayer_calc_col); + displayplayer_iter_table(table, displayplayer_print_col); } /** Quits a game and returns to the title screen. @@ -5797,6 +5839,12 @@ void Command_ExitGame_f(void) { INT32 i; + if (dedicated) + { + CONS_Printf("This command cannot be used on dedicated server\n"); + return; + } + LUA_HookBool(false, HOOK(GameQuit)); D_QuitNetGame(); @@ -6903,6 +6951,23 @@ static void KartRings_OnChange(void) } } +static void KartItemBreaker_OnChange(void) +{ + if (K_CanChangeRules() == false) + { + return; + } + + if (cv_kartitembreaker.value) + { + CONS_Printf(M_GetText("Singleplayer Item Breaker will be turned \"On\" Next Round.\n")); + } + else + { + CONS_Printf(M_GetText("Singleplayer Item Breaker will be turned \"Off\" Next Round.\n")); + } +} + static void Schedule_OnChange(void) { size_t i; diff --git a/src/d_netcmd.h b/src/d_netcmd.h index 285d4b19c..b9ca59fd7 100644 --- a/src/d_netcmd.h +++ b/src/d_netcmd.h @@ -96,6 +96,7 @@ extern consvar_t cv_kartbot; extern consvar_t cv_karteliminatelast; extern consvar_t cv_kartusepwrlv; extern consvar_t cv_kartrings; +extern consvar_t cv_kartitembreaker; extern consvar_t cv_kartwalltransfer; extern consvar_t cv_kartpurpledrift; extern consvar_t cv_kartbumpspark; diff --git a/src/d_netfil.c b/src/d_netfil.c index 64488661e..7bd213e6b 100644 --- a/src/d_netfil.c +++ b/src/d_netfil.c @@ -1410,15 +1410,15 @@ void PT_FileFragment(void) filename = va("%s", file->filename); nameonly(filename); - if (!strcmp(filename, "main.pk3") - || !strcmp(filename, "srb2.srb") - || !strcmp(filename, "gfx.kart") - || !strcmp(filename, "textures.kart") - || !strcmp(filename, "chars.kart") - || !strcmp(filename, "maps.kart") - || !strcmp(filename, "patch.pk3") - || !strcmp(filename, "sounds.kart") - || !strcmp(filename, "music.kart") + if (!strcmp(filename, MAINNAME) + || !strcmp(filename, SRB2NAME) + || !strcmp(filename, GRAPHICSNAME) + || !strcmp(filename, TEXTURESNAME) + || !strcmp(filename, CHARSNAME) + || !strcmp(filename, MAPSNAME) + || !strcmp(filename, PATCHNAME) + || !strcmp(filename, SOUNDSNAME) + || !strcmp(filename, MUSICNAME) ) { I_Error("Tried to download \"%s\"", filename); diff --git a/src/d_player.h b/src/d_player.h index d57f9e1f2..9b7f6b4d1 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -228,9 +228,6 @@ typedef enum typedef enum { // Unsynced, HUD or clientsided effects - // Item box - khud_itemblink, // Item flashing after roulette, serves as a mashing indicator - khud_itemblinkmode, // Type of flashing: 0 = white (normal), 1 = red (mashing), 2 = rainbow (enhanced items) // Rings khud_ringlock, // Ring lock @@ -428,6 +425,7 @@ struct botvars_t tic_t itemconfirm; // When high enough, they will use their item SINT8 turnconfirm; // Confirm turn direction + UINT32 respawnconfirm; // Confirm when respawn is needed. }; @@ -590,6 +588,8 @@ struct player_t UINT8 tripwireReboundDelay; // When failing Tripwire, brieftly lock out speed-based tripwire pass (anti-cheese) UINT16 itemroulette; // Used for the roulette when deciding what item to give you (was "pw_kartitem") + UINT16 itemblink; // Item flashing after roulette, serves as a mashing indicator. Also prevents item from being stolen. + UINT16 itemblinkmode; // Type of flashing: 0 = white (normal), 1 = red (mashing), 2 = rainbow (enhanced items) UINT8 roulettetype; // Used for the roulette, for deciding type (0 = normal, 1 = better, 2 = eggman mark) // Item held stuff diff --git a/src/d_ticcmd.h b/src/d_ticcmd.h index a4d0263ae..48fd66b9d 100644 --- a/src/d_ticcmd.h +++ b/src/d_ticcmd.h @@ -78,6 +78,7 @@ struct ticcmd_t { SINT8 turnconfirm; SINT8 itemconfirm; + SINT8 respawnconfirm; } bot; } ATTRPACK; diff --git a/src/deh_tables.c b/src/deh_tables.c index 230ff3b6d..270fd2cd5 100644 --- a/src/deh_tables.c +++ b/src/deh_tables.c @@ -167,7 +167,7 @@ const char *const MOBJFLAG_LIST[] = { // \tMF2_(\S+).*// (.+) --> \t"\1", // \2 const char *const MOBJFLAG2_LIST[] = { "AXIS", // It's a NiGHTS axis! (For faster checking) - "\x01", // free: 1<<1 (name un-matchable) + "SHADOW", // alias for RF_GHOSTLY "DONTRESPAWN", // Don't respawn this object! "DONTDRAW", // alias for RF_DONTDRAW "AUTOMATIC", // Thrown ring has automatic properties @@ -556,8 +556,6 @@ const char *const KARTSTUFF_LIST[] = { }; const char *const KARTHUD_LIST[] = { - "ITEMBLINK", - "ITEMBLINKMODE", "RINGFRAME", "RINGTICS", diff --git a/src/doomdef.h b/src/doomdef.h index 34d131872..9888fe66e 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -101,7 +101,7 @@ extern "C" { #endif -#define NOMD5 +//#define NOMD5 // Uncheck this to compile debugging code //#define RANGECHECK diff --git a/src/doomstat.h b/src/doomstat.h index 55d5837e2..381a1971e 100644 --- a/src/doomstat.h +++ b/src/doomstat.h @@ -194,18 +194,6 @@ extern INT32 displayplayers[MAXSPLITSCREENPLAYERS]; /* g_localplayers[0] = consoleplayer */ extern INT32 g_localplayers[MAXSPLITSCREENPLAYERS]; -/* spitscreen players sync */ -extern INT32 splitscreen_original_party_size[MAXPLAYERS]; -extern INT32 splitscreen_original_party[MAXPLAYERS][MAXSPLITSCREENPLAYERS]; - -/* parties */ -extern INT32 splitscreen_invitations[MAXPLAYERS]; -extern INT32 splitscreen_party_size[MAXPLAYERS]; -extern INT32 splitscreen_party[MAXPLAYERS][MAXSPLITSCREENPLAYERS]; - -/* the only local one */ -extern boolean splitscreen_partied[MAXPLAYERS]; - extern char * titlemap; extern boolean hidetitlepics; extern char * bootmap; //bootmap for loading a map on startup diff --git a/src/f_finale.c b/src/f_finale.c index f968c183f..fb747ecd0 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -912,6 +912,7 @@ static const char *blancredits[] = { "\1Support Programming", "\"hayaunderscore\" aka \"DeltaKaynx\"", "\"WumboSpasm\"", + "\"Anonimous\"", "", "\1External Programming", "\"Hanicef\"", @@ -920,8 +921,9 @@ static const char *blancredits[] = { "\"SuperJustinBros\"", "", "\1Ring Racers Programming", - "\"JugadorXEI\"", "Kart Krew Dev", + "\"JugadorXEI\"", + "\"Kimberly\"", "", "\1New Graphics Creation", "\"Spee\"", @@ -932,6 +934,7 @@ static const char *blancredits[] = { "\"Sunflower\" aka \"AnimeSonic\"", "Sunflower's Garden", "The Moe Mansion and Birdhouse Team", + "SRB2Kart Saturn Contributors", "", "", "\1Thank you", diff --git a/src/filesrch.c b/src/filesrch.c index 4d15454e7..0ad68689d 100644 --- a/src/filesrch.c +++ b/src/filesrch.c @@ -21,11 +21,7 @@ #define RPC_NO_WINDOWS_H #include #endif -#ifdef _WIN32_WCE -#include "sdl12/SRB2CE/cehelp.h" -#else #include -#endif #include #include "filesrch.h" @@ -34,7 +30,7 @@ #include "z_zone.h" #include "m_menu.h" // Addons_option_Onchange -#if (defined (_WIN32) && !defined (_WIN32_WCE)) && defined (_MSC_VER) && !defined (_XBOX) +#if defined (_WIN32) && defined (_MSC_VER) && !defined (_XBOX) #include #include @@ -371,76 +367,6 @@ boolean preparefilemenu(boolean samedepth, boolean replayhut) return false; } -#elif defined (_WIN32_WCE) -filestatus_t filesearch(char *filename, const char *startpath, const UINT8 *wantedmd5sum, - boolean completepath, int maxsearchdepth) -{ -#ifdef __GNUC__ -//NONE? - startpath = filename = NULL; - wantedmd5sum = NULL; - maxsearchdepth = 0; - completepath = false; -#else - WIN32_FIND_DATA dta; - HANDLE searchhandle = INVALID_HANDLE_VALUE; - const wchar_t wm[4] = L"*.*"; - - //if (startpath) SetCurrentDirectory(startpath); - if (FIL_ReadFileOK(filename)) - { - // checkfilemd5 returns an FS_* value, either FS_FOUND or FS_MD5SUMBAD - return checkfilemd5(filename, wantedmd5sum); - } - ZeroMemory(&dta,sizeof (dta)); - if (maxsearchdepth) - searchhandle = FindFirstFile(wm,&dta); - if (searchhandle != INVALID_HANDLE_VALUE) - { - do - { - if ((dta.cFileName[0]!='.') && (dta.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) - { - //if (SetCurrentDirectory(dta.cFileName)) - { // can fail if we haven't the right - filestatus_t found; - found = filesearch(filename,NULL,wantedmd5sum,completepath,maxsearchdepth-1); - //SetCurrentDirectory(".."); - if (found == FS_FOUND || found == FS_MD5SUMBAD) - { - if (completepath) - strcatbf(filename,(char *)dta.cFileName,"\\"); - FindClose(searchhandle); - return found; - } - } - } - } while (FindNextFile(searchhandle,&dta)==0); - FindClose(searchhandle); - } -#endif - return FS_NOTFOUND; -} - -void closefilemenu(boolean validsize) -{ - (void)validsize; - return; -} - -void searchfilemenu(char *tempname) -{ - (void)tempname; - return; -} - -boolean preparefilemenu(boolean samedepth, boolean replayhut) -{ - (void)samedepth; - (void)replayhut; - return false; -} - #else filestatus_t filesearch(char *filename, const char *startpath, const UINT8 *wantedmd5sum, boolean completepath, int maxsearchdepth) diff --git a/src/g_demo.c b/src/g_demo.c index 00489ec34..52cfdf978 100644 --- a/src/g_demo.c +++ b/src/g_demo.c @@ -40,6 +40,7 @@ #include "lua_hook.h" #include "md5.h" // demo checksums #include "p_saveg.h" // savebuffer_t +#include "g_party.h" // SRB2Kart #include "d_netfil.h" // nameonly @@ -53,6 +54,7 @@ #include "k_color.h" #include "k_follower.h" #include "k_grandprix.h" +#include "g_party.h" static CV_PossibleValue_t recordmultiplayerdemos_cons_t[] = {{0, "Disabled"}, {1, "Manual Save"}, {2, "Auto Save"}, {0, NULL}}; consvar_t cv_recordmultiplayerdemos = CVAR_INIT ("netdemo_record", "Manual Save", CV_SAVE, recordmultiplayerdemos_cons_t, NULL); @@ -147,6 +149,7 @@ demoghost *ghosts = NULL; #define ZT_BOT_TURN 0x0001 #define ZT_BOT_ITEM 0x0002 +#define ZT_BOT_RESPAWN 0x0004 #define DEMOMARKER 0x80 // demobuf.end @@ -579,6 +582,8 @@ void G_ReadDemoTiccmd(ticcmd_t *cmd, INT32 playernum) oldcmd[playernum].bot.turnconfirm = READSINT8(demobuf.p); if (botziptic & ZT_BOT_ITEM) oldcmd[playernum].bot.itemconfirm = READSINT8(demobuf.p); + if (botziptic & ZT_BOT_RESPAWN) + oldcmd[playernum].bot.respawnconfirm = READSINT8(demobuf.p); } G_CopyTiccmd(cmd, &oldcmd[playernum], 1); @@ -695,6 +700,13 @@ void G_WriteDemoTiccmd(ticcmd_t *cmd, INT32 playernum) botziptic |= ZT_BOT_ITEM; } + if (cmd->bot.respawnconfirm != oldcmd[playernum].bot.respawnconfirm) + { + WRITESINT8(demobuf.p, cmd->bot.respawnconfirm); + oldcmd[playernum].bot.respawnconfirm = cmd->bot.respawnconfirm; + botziptic |= ZT_BOT_RESPAWN; + } + WRITEUINT16(botziptic_p, botziptic); } @@ -2144,7 +2156,7 @@ void G_BeginRecording(void) if (wadfiles[i]->important) { nameonly(( filename = va("%s", wadfiles[i]->filename) )); - WRITESTRINGN(demobuf.p, filename, MAX_WADPATH); + WRITESTRINGL(demobuf.p, filename, MAX_WADPATH); WRITEMEM(demobuf.p, wadfiles[i]->md5sum, 16); WRITEUINT8(demobuf.p, wadfiles[i]->compatmode); @@ -3960,7 +3972,10 @@ static void G_StopTimingDemo(void) if (restorecv_vidwait != cv_vidwait.value) CV_SetValue(&cv_vidwait, restorecv_vidwait); - D_AdvanceDemo(); + if (timedemo_quit) + COM_ImmedExecute("quit"); + else + D_StartTitle(); } // reset engine variable set for the demos @@ -4018,10 +4033,12 @@ boolean G_CheckDemoStatus(void) { G_StopDemo(); - if (modeattacking) + if (timedemo_quit) + COM_ImmedExecute("quit"); + else if (modeattacking) M_ModeAttackEndGame(0); else - D_AdvanceDemo(); + D_StartTitle(); } return true; @@ -4168,3 +4185,33 @@ boolean G_DemoTitleResponder(event_t *ev) return true; } + +void G_SyncDemoParty(INT32 rem, INT32 newsplitscreen) +{ + int r_splitscreen_copy = r_splitscreen; + INT32 displayplayers_copy[MAXSPLITSCREENPLAYERS]; + memcpy(displayplayers_copy, displayplayers, sizeof displayplayers); + + // If we switch away from someone's view, that player + // should be removed from the party. + // However, it is valid to have the player on multiple + // viewports. + + // Remove this player + G_LeaveParty(rem); + + // And reset the rest of the party + for (int i = 0; i <= r_splitscreen_copy; ++i) + G_LeaveParty(displayplayers_copy[i]); + + // Restore the party, without the removed player, and + // with the order matching displayplayers + for (int i = 0; i <= newsplitscreen; ++i) + G_JoinParty(consoleplayer, displayplayers_copy[i]); + + // memcpy displayplayers back to preserve duplicates + // (G_JoinParty will not create duplicates itself) + r_splitscreen = newsplitscreen; + memcpy(displayplayers, displayplayers_copy, sizeof displayplayers); + R_ExecuteSetViewSize(); +} diff --git a/src/g_demo.h b/src/g_demo.h index 8a73145ad..78dd0d217 100644 --- a/src/g_demo.h +++ b/src/g_demo.h @@ -123,6 +123,9 @@ extern UINT8 demo_writerng; #define DXD_COLOR 0x10 // color changed #define DXD_FOLLOWER 0x20 // follower was changed #define DXD_RESPAWN 0x40 // "respawn" command in console + +#define DXD_ADDPLAYER (DXD_JOINDATA|DXD_PLAYSTATE|DXD_COLOR|DXD_NAME|DXD_SKIN|DXD_FOLLOWER) + #define DXD_WEAPONPREF 0x80 // netsynced playsim settings were changed #define DXD_PST_PLAYING 0x01 @@ -197,6 +200,8 @@ void G_SaveDemo(void); boolean G_DemoTitleResponder(event_t *ev); +void G_SyncDemoParty(INT32 rem, INT32 newsplitscreen); + #ifdef __cplusplus } // extern "C" #endif diff --git a/src/g_game.c b/src/g_game.c index f88cedf51..8ee1992bf 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -63,11 +63,16 @@ #include "doomstat.h" #include "acs/interface.h" #include "k_director.h" +#include "g_party.h" #ifdef HAVE_DISCORDRPC #include "discord.h" #endif +#ifdef HWRENDER +#include "hardware/hw_main.h" // for cv_glshearing +#endif + gameaction_t gameaction; gamestate_t gamestate = GS_NULL; UINT8 ultimatemode = false; @@ -763,6 +768,31 @@ INT16 G_SoftwareClipAimingPitch(INT32 *aiming) return (INT16)((*aiming)>>16); } +void G_FinalClipAimingPitch(INT32 *aiming, player_t *player, boolean skybox) +{ +#ifndef HWRENDER + (void)player; + (void)skybox; +#endif + + // clip it in the case we are looking a hardware 90 degrees full aiming + // (lmps, network and use F12...) + if (rendermode == render_soft +#ifdef HWRENDER + || (rendermode == render_opengl + && (cv_glshearing.value == 1 + || (cv_glshearing.value == 2 && R_IsViewpointThirdPerson(player, skybox)))) +#endif + ) + { + G_SoftwareClipAimingPitch(aiming); + } + else + { + G_ClipAimingPitch(aiming); + } +} + // returns true if event's axis is within the deadzone for the given player boolean G_AxisInDeadzone(UINT8 p, event_t *ev) { @@ -920,15 +950,17 @@ angle_t localangle[MAXSPLITSCREENPLAYERS]; // This brings back the camera prediction that was lost. static void G_DoAnglePrediction(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer, player_t *player) { + UINT8 viewnum = G_PartyPosition(g_localplayers[ssplayer-1]); + if (player->mo) cmd->angle = K_GetKartTurnValue(player, cmd->turning); cmd->angle *= realtics; if (P_CanPlayerTurn(player, cmd)) - localangle[ssplayer-1] += (cmd->angle<angle<angle = (INT16)(localangle[ssplayer-1] >> TICCMD_REDUCE); + cmd->angle = (INT16)(localangle[viewnum] >> TICCMD_REDUCE); } void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer) @@ -1233,6 +1265,8 @@ ticcmd_t *G_MoveTiccmd(ticcmd_t* dest, const ticcmd_t* src, const size_t n) if (dest[i].flags & TICCMD_BOT) { dest[i].bot.itemconfirm = src[i].bot.itemconfirm; + dest[i].bot.turnconfirm = src[i].bot.turnconfirm; + dest[i].bot.respawnconfirm = src[i].bot.respawnconfirm; } } return dest; @@ -1416,6 +1450,8 @@ boolean G_IsTitleCardAvailable(void) INT32 pausedelay = 0; boolean pausebreakkey = false; static INT32 camtoggledelay[MAXSPLITSCREENPLAYERS]; +static INT32 spectatedelay[MAXSPLITSCREENPLAYERS]; +static INT32 respawndelay[MAXSPLITSCREENPLAYERS]; // // G_Responder @@ -1644,6 +1680,40 @@ boolean G_Responder(event_t *ev) CV_SetValue(&cv_chasecam[i], cv_chasecam[i].value ? 0 : 1); } } + + if (G_ControlBoundToKey(i, gc_spectate, ev->data1, false)) + { + if (!spectatedelay[i]) + { + char *commandname = va("changeteam"); + + if (i > 0) + { + // Add one for command names. + commandname = va("changeteam%d", i+1); + } + + spectatedelay[i] = NEWTICRATE / 7; + COM_ImmedExecute(va("%s spectator", commandname)); + } + } + + if (G_ControlBoundToKey(i, gc_respawn, ev->data1, false)) + { + if (!respawndelay[i]) + { + char *commandname = va("respawn"); + + if (i > 0) + { + // Add one for command names. + commandname = va("respawn%d", i+1); + } + + respawndelay[i] = NEWTICRATE / 4; + COM_ImmedExecute(commandname); + } + } } return true; @@ -1785,7 +1855,6 @@ void G_ResetView(UINT8 viewnum, INT32 playernum, boolean onlyactive) UINT8 viewd; INT32 *displayplayerp; - camera_t *camerap; INT32 olddisplayplayer; INT32 playersviewable; @@ -1811,33 +1880,70 @@ void G_ResetView(UINT8 viewnum, INT32 playernum, boolean onlyactive) /* Check if anyone is available to view. */ if (( playernum = G_FindView(playernum, viewnum, onlyactive, playernum < olddisplayplayer) ) == -1) - return; + { + if (G_PartySize(consoleplayer) < viewnum) + { + return; + } + + /* Fall back on true self */ + playernum = G_PartyMember(consoleplayer, viewnum - 1); + } + + // Call ViewpointSwitch hooks here. + // The viewpoint was forcibly changed. + LUA_HookViewpointSwitch(&players[g_localplayers[viewnum - 1]], &players[playernum], true); /* Focus our target view first so that we don't take its player. */ (*displayplayerp) = playernum; - if ((*displayplayerp) != olddisplayplayer) - { - camerap = &camera[viewnum-1]; - P_ResetCamera(&players[(*displayplayerp)], camerap); - - R_ResetViewInterpolation(viewnum); - } + /* If a viewpoint changes, reset the camera to clear uninitialized memory. */ if (viewnum > splits) { - for (viewd = splits+1; viewd < viewnum; ++viewd) + for (viewd = splits+1; viewd <= viewnum; ++viewd) { - displayplayerp = (&displayplayers[viewd-1]); - camerap = &camera[viewd]; - - (*displayplayerp) = G_FindView(0, viewd, onlyactive, false); - - P_ResetCamera(&players[(*displayplayerp)], camerap); + G_FixCamera(viewd); + } + } + else + { + if ((*displayplayerp) != olddisplayplayer) + { + G_FixCamera(viewnum); } } - if (viewnum == 1 && demo.playback) - consoleplayer = displayplayers[0]; + if (demo.playback) + { + if (viewnum == 1) + consoleplayer = displayplayers[0]; + + G_SyncDemoParty(olddisplayplayer, r_splitscreen); + } + + // change statusbar also if playing back demo + if (demo.quitafterplaying) + ST_changeDemoView(); +} + +// +// G_FixCamera +// Reset camera position, angle and interpolation on a view +// after changing state. +// +void G_FixCamera(UINT8 view) +{ + player_t *player = &players[displayplayers[view - 1]]; + + // The order of displayplayers can change, which would + // invalidate localangle. + localangle[view - 1] = player->angleturn; + + P_ResetCamera(player, &camera[view - 1]); + + // Make sure the viewport doesn't interpolate at all into + // its new position -- just snap instantly into place. + R_ResetViewInterpolation(view); } // @@ -2087,6 +2193,10 @@ void G_Ticker(boolean run) { if (camtoggledelay[i]) camtoggledelay[i]--; + if (spectatedelay[i]) + spectatedelay[i]--; + if (respawndelay[i]) + respawndelay[i]--; } if (gametic % NAMECHANGERATE == 0) @@ -2905,19 +3015,19 @@ void G_DoReborn(INT32 playernum) void G_AddPlayer(INT32 playernum, INT32 console) { CL_ClearPlayer(playernum); - //G_DestroyParty(playernum); + G_DestroyParty(playernum); playeringame[playernum] = true; playerconsole[playernum] = console; - //G_BuildLocalSplitscreenParty(playernum); + G_BuildLocalSplitscreenParty(playernum); player_t *newplayer = &players[playernum]; newplayer->playerstate = PST_REBORN; newplayer->jointime = 0; - demo_extradata[playernum] |= DXD_PLAYSTATE|DXD_COLOR|DXD_NAME|DXD_SKIN|DXD_FOLLOWER; // Set everything + demo_extradata[playernum] |= DXD_ADDPLAYER; // Set everything } void G_BeginLevelExit(void) diff --git a/src/g_game.h b/src/g_game.h index 951a9741f..65abb025d 100644 --- a/src/g_game.h +++ b/src/g_game.h @@ -113,6 +113,7 @@ ticcmd_t *G_MoveTiccmd(ticcmd_t* dest, const ticcmd_t* src, const size_t n); // clip the console player aiming to the view INT32 G_ClipAimingPitch(INT32 *aiming); INT16 G_SoftwareClipAimingPitch(INT32 *aiming); +void G_FinalClipAimingPitch(INT32 *aiming, player_t *player, boolean skybox); extern angle_t localangle[MAXSPLITSCREENPLAYERS]; extern INT32 localaiming[MAXSPLITSCREENPLAYERS]; // should be an angle_t but signed @@ -219,14 +220,11 @@ boolean G_CanView(INT32 playernum, UINT8 viewnum, boolean onlyactive); INT32 G_FindView(INT32 startview, UINT8 viewnum, boolean onlyactive, boolean reverse); INT32 G_CountPlayersPotentiallyViewable(boolean active); +void G_FixCamera(UINT8 view); void G_ResetViews(void); void G_ResetView(UINT8 viewnum, INT32 playernum, boolean onlyactive); void G_AdjustView(UINT8 viewnum, INT32 offset, boolean onlyactive); -void G_AddPartyMember (INT32 party_member, INT32 new_party_member); -void G_RemovePartyMember (INT32 party_member); -void G_ResetSplitscreen (INT32 playernum); - void G_AddPlayer(INT32 playernum, INT32 console); void G_SetExitGameFlag(void); diff --git a/src/g_input.c b/src/g_input.c index fcbddaa49..64e3ed987 100644 --- a/src/g_input.c +++ b/src/g_input.c @@ -406,6 +406,7 @@ static const char *gamecontrolname[num_gamecontrols] = "custom1", "custom2", "custom3", + "respawn", }; #define NUMKEYNAMES (sizeof (keynames)/sizeof (keyname_t)) @@ -682,7 +683,7 @@ static void setcontrol(UINT8 player) namectrl = COM_Argv(1); for (numctrl = 0; - numctrl < num_gamecontrols && stricmp(namectrl, gamecontrolname[numctrl]); + numctrl < num_gamecontrols && gamecontrolname[numctrl] && stricmp(namectrl, gamecontrolname[numctrl]); numctrl++) { ; } diff --git a/src/g_input.h b/src/g_input.h index a5601486b..a06221e46 100644 --- a/src/g_input.h +++ b/src/g_input.h @@ -85,6 +85,7 @@ typedef enum gc_custom1, // Lua scriptable gc_custom2, // Lua scriptable gc_custom3, // Lua scriptable + gc_respawn, num_gamecontrols } gamecontrols_e; diff --git a/src/g_party.cpp b/src/g_party.cpp index 1c82a2d1d..a5dd79270 100644 --- a/src/g_party.cpp +++ b/src/g_party.cpp @@ -1,6 +1,7 @@ // DR. ROBOTNIK'S RING RACERS //----------------------------------------------------------------------------- -// Copyright (C) 2023 by James Robert Roman +// Copyright (C) 2025 by James Robert Roman +// Copyright (C) 2025 by Kart Krew // // This program is free software distributed under the // terms of the GNU General Public License, version 2. @@ -19,7 +20,7 @@ #include "d_clisrv.h" // playerconsole #include "doomdef.h" // MAXPLAYERS #include "doomstat.h" // consoleplayer -#include "g_game.h" // localangle +#include "g_game.h" // G_FixCamera #include "g_party.h" #include "g_state.h" #include "p_local.h" @@ -101,7 +102,7 @@ public: bool local() const { // consoleplayer is not valid yet. - if (!addedtogame) + if (!addedtogame && !demo.playback) { return false; } @@ -128,28 +129,15 @@ public: return; } - // Rendering stuff is not valid outside of levels. - if (!G_GamestateUsesLevel()) - { - return; - } - for (std::size_t i = 0; i < size(); ++i) { - const playernum_t player = at(i); + displayplayers[i] = at(i); - displayplayers[i] = player; - - // The order of displayplayers can change, which - // would make localangle invalid now. - localangle[i] = players[player].angleturn; - - P_ResetCamera(&players[player], &camera[i]); - - // Make sure the viewport doesn't interpolate at - // all into its new position -- just snap - // instantly into place. - R_ResetViewInterpolation(1 + i); + // Camera is not valid outside of levels. + if (G_GamestateUsesLevel()) + { + G_FixCamera(1 + i); + } } r_splitscreen = size() - 1; @@ -186,6 +174,11 @@ public: // consoleplayer. Party& operator [](Party::Console console) { return pool_[console]; } + // Clears a single player's local party. This method + // accesses the playernum directly, instead of the + // consoleplayer. + void reset(playernum_t player) { pool_[player] = {}; } + protected: std::array pool_; } @@ -271,7 +264,7 @@ void G_ObliterateParties(void) void G_DestroyParty(UINT8 player) { - local_party[player] = {}; + local_party.reset(player); final_party[player] = {}; } @@ -324,3 +317,17 @@ UINT8 G_PartyPosition(UINT8 player) return party.find(player) - party.begin(); } + +UINT8 G_LocalSplitscreenPartyPosition(UINT8 player) +{ + const Party& party = local_party[player]; + + return party.find(player) - party.begin(); +} + +UINT8 G_LocalSplitscreenPartyMember(UINT8 player, UINT8 index) +{ + SRB2_ASSERT(index < local_party[player].size()); + + return local_party[player][index]; +} diff --git a/src/g_party.h b/src/g_party.h new file mode 100644 index 000000000..b5fd5c2b0 --- /dev/null +++ b/src/g_party.h @@ -0,0 +1,84 @@ +// DR. ROBOTNIK'S RING RACERS +//----------------------------------------------------------------------------- +// Copyright (C) 2025 by James Robert Roman +// Copyright (C) 2025 by Kart Krew +// +// This program is free software distributed under the +// terms of the GNU General Public License, version 2. +// See the 'LICENSE' file for more details. +//----------------------------------------------------------------------------- + +#ifndef __G_PARTY_H__ +#define __G_PARTY_H__ + +#include "doomdef.h" // MAXPLAYERS + +#ifdef __cplusplus +extern "C" { +#endif + +// +// Functions +// + +// Frees all party resources. +void G_ObliterateParties(void); + +// Wipes all party data for this player slot. +void G_DestroyParty(UINT8 player); + +// Adds player to their local party. +void G_BuildLocalSplitscreenParty(UINT8 player); + +// Join guest's entire local party to the host. All checks are +// performed, so this is a no-op if the parties are already +// joined, or if either party is too big for the other, etc. +// +// Resets viewports for all players involved. +void G_JoinParty(UINT8 host, UINT8 guest); + +// Removes guest from an online party and restores their +// initial local party. +void G_LeaveParty(UINT8 guest); + +// Size of the player's initial local party. +UINT8 G_LocalSplitscreenPartySize(UINT8 player); + +// Ultimate size of this player's party. Includes any joined +// parties, else the same as G_LocalSplitscreenPartySize. +UINT8 G_PartySize(UINT8 player); + +// True if this player is a member of the consoleplayer's +// party. +boolean G_IsPartyLocal(UINT8 player); + +// Returns the player slot present at a certain position +// within this player's party. Do not call this function with +// an index beyond G_PartySize() - 1. +UINT8 G_PartyMember(UINT8 player, UINT8 index); + +// C array access to the same data as G_PartyMember. +const UINT8 *G_PartyArray(UINT8 player); + +// Suitable index to G_PartyMember and G_PartyArray. +UINT8 G_PartyPosition(UINT8 player); + +// +UINT8 G_LocalSplitscreenPartyPosition(UINT8 player); + +// +UINT8 G_LocalSplitscreenPartyMember(UINT8 player, UINT8 index); + +// +// Globals +// + +// Whether this player has been invited to join anyone's party +// and who invited them. -1 if no invitation. +extern INT32 splitscreen_invitations[MAXPLAYERS]; + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // __G_PARTY_H__ diff --git a/src/g_splitscreen.c b/src/g_splitscreen.c deleted file mode 100644 index e510a474c..000000000 --- a/src/g_splitscreen.c +++ /dev/null @@ -1,210 +0,0 @@ -// SONIC ROBO BLAST 2 KART -//----------------------------------------------------------------------------- -// Copyright (C) 2020 by James R. -// -// This program is free software distributed under the -// terms of the GNU General Public License, version 2. -// See the 'LICENSE' file for more details. -//----------------------------------------------------------------------------- -/// \file g_splitscreen.c -/// \brief some splitscreen stuff - -#include "doomdef.h" -#include "g_game.h" -#include "p_local.h" -#include "r_local.h" -#include "doomstat.h" - -INT32 splitscreen_original_party_size[MAXPLAYERS]; -INT32 splitscreen_original_party[MAXPLAYERS][MAXSPLITSCREENPLAYERS]; - -INT32 splitscreen_invitations[MAXPLAYERS]; -INT32 splitscreen_party_size[MAXPLAYERS]; -INT32 splitscreen_party[MAXPLAYERS][MAXSPLITSCREENPLAYERS]; - -boolean splitscreen_partied[MAXPLAYERS]; - -void -G_ResetSplitscreen (INT32 playernum) -{ - INT32 old_displayplayers[MAXSPLITSCREENPLAYERS]; - - INT32 i; - - splitscreen_party_size[playernum] = - splitscreen_original_party_size[playernum]; - - memcpy(splitscreen_party[playernum], splitscreen_original_party[playernum], - sizeof splitscreen_party[playernum]); - - if (playernum == consoleplayer) - { - memset(splitscreen_partied, 0, sizeof splitscreen_partied); - splitscreen_partied[consoleplayer] = true; - - memcpy(old_displayplayers, displayplayers, sizeof old_displayplayers); - - /* easier to just rebuild displayplayers with local players */ - for (i = 0; i <= splitscreen; ++i) - { - displayplayers[i] = g_localplayers[i]; - P_ResetCamera(&players[displayplayers[i]], &camera[i]); - } - - while (i < MAXSPLITSCREENPLAYERS) - { - displayplayers[i] = consoleplayer; - i++; - } - - r_splitscreen = splitscreen; - - R_ExecuteSetViewSize(); - } -} - -void -G_RemovePartyMember (INT32 playernum) -{ - INT32 old_party[MAXSPLITSCREENPLAYERS]; - INT32 new_party[MAXSPLITSCREENPLAYERS]; - - INT32 old_party_size; - INT32 before; - INT32 after; - INT32 views; - - INT32 i; - INT32 n; - - old_party_size = splitscreen_party_size[playernum]; - - for (i = 0; i < old_party_size; ++i) - { - /* exploit that splitscreen players keep order */ - if (splitscreen_party[playernum][i] == playernum) - { - before = i; - - views = splitscreen_original_party_size[playernum]; - after = ( before + views ); - - memcpy(old_party, splitscreen_party[playernum], sizeof old_party); - memcpy(new_party, old_party, before * sizeof *old_party); - - memcpy(&new_party[before], &old_party[after], - ( old_party_size - after ) * sizeof *new_party); - - views = ( old_party_size - views ); - - for (i = 0; i < old_party_size; ++i) - { - n = old_party[i]; - if (n != playernum && playerconsole[n] == n) - { - splitscreen_party_size[n] = views; - memcpy(splitscreen_party[n], new_party, - sizeof splitscreen_party[n]); - } - } - - /* don't want to remove yourself from your own screen! */ - if (playernum != consoleplayer && splitscreen_partied[playernum]) - { - splitscreen_partied[playernum] = false; - - for (i = 0; i < views; ++i) - { - displayplayers[i] = new_party[i]; - P_ResetCamera(&players[displayplayers[i]], &camera[i]); - } - while (i < MAXSPLITSCREENPLAYERS) - { - displayplayers[i] = displayplayers[0]; - - i++; - } - - r_splitscreen = ( views - 1 ); - - R_ExecuteSetViewSize(); - } - - break; - } - } -} - -void -G_AddPartyMember (INT32 invitation, INT32 playernum) -{ - INT32 * party; - INT32 *add_party; - - INT32 old_party_size; - INT32 new_party_size; - - INT32 views; - - INT32 i; - INT32 n; - - views = splitscreen_original_party_size[playernum]; - - old_party_size = splitscreen_party_size[invitation]; - new_party_size = ( old_party_size + views ); - - party = splitscreen_party[invitation]; - add_party = splitscreen_original_party[playernum]; - - for (i = 0; i < old_party_size; ++i) - { - n = party[i]; - if (playerconsole[n] == n) - { - splitscreen_party_size[n] = new_party_size; - memcpy(&splitscreen_party[n][old_party_size], add_party, - views * sizeof *splitscreen_party[n]); - } - } - - splitscreen_party_size[playernum] = new_party_size; - memcpy(splitscreen_party[playernum], party, - sizeof splitscreen_party[playernum]); - - /* in my party or adding me? */ - if (splitscreen_partied[invitation]) - { - splitscreen_partied[playernum] = true; - - for (i = old_party_size; i < new_party_size; ++i) - { - displayplayers[i] = party[i]; - P_ResetCamera(&players[displayplayers[i]], &camera[i]); - } - - r_splitscreen += views; - - R_ExecuteSetViewSize(); - } - else if (playernum == consoleplayer) - { - for (i = 0; i < new_party_size; ++i) - { - splitscreen_partied[playerconsole[party[i]]] = true; - - displayplayers[i] = party[i]; - P_ResetCamera(&players[displayplayers[i]], &camera[i]); - } - while (i < MAXSPLITSCREENPLAYERS) - { - displayplayers[i] = displayplayers[0]; - - i++; - } - - r_splitscreen = ( new_party_size - 1 ); - - R_ExecuteSetViewSize(); - } -} diff --git a/src/i_tcp.c b/src/i_tcp.c index d7b5b0993..5a348dcb6 100644 --- a/src/i_tcp.c +++ b/src/i_tcp.c @@ -165,7 +165,9 @@ typedef union #define ERRSOCKET (-1) #endif -// define socklen_t in Windows if it is not already defined +#define IPV6_MULTICAST_ADDRESS "ff15::57e1:1a12" + +// define socklen_t in DOS/Windows if it is not already defined #ifdef USE_WINSOCK1 typedef int socklen_t; #endif @@ -717,6 +719,7 @@ static inline ssize_t SOCK_SendToAddr(SOCKET_TYPE socket, mysockaddr_t *sockaddr socklen_t d6 = (socklen_t)sizeof(struct sockaddr_in6); #endif socklen_t d, da = (socklen_t)sizeof(mysockaddr_t); + ssize_t status; switch (sockaddr->any.sa_family) { @@ -727,7 +730,12 @@ static inline ssize_t SOCK_SendToAddr(SOCKET_TYPE socket, mysockaddr_t *sockaddr default: d = da; break; } - return sendto(socket, (char *)&doomcom->data, doomcom->datalength, 0, &sockaddr->any, d); + status = sendto(socket, (char *)&doomcom->data, doomcom->datalength, 0, &sockaddr->any, d); + if (status == -1) + { + CONS_Alert(CONS_WARNING, "Unable to send packet to %s: %s\n", SOCK_AddrToStr(sockaddr), strerror(errno)); + } + return status; } #define ALLOWEDERROR(x) ((x) == ECONNREFUSED || (x) == EWOULDBLOCK || (x) == EHOSTUNREACH || (x) == ENETUNREACH) @@ -880,6 +888,24 @@ static SOCKET_TYPE UDP_Bind(int family, struct sockaddr *addr, socklen_t addrlen return (SOCKET_TYPE)ERRSOCKET; } +#ifdef HAVE_IPV6 + if (family == AF_INET6) + { + // we need to set all of this *after* binding to an address! + if (memcmp(&straddr.ip6.sin6_addr, &in6addr_any, sizeof(in6addr_any)) == 0) //IN6_ARE_ADDR_EQUAL + { + struct ipv6_mreq maddr; + + inet_pton(AF_INET6, IPV6_MULTICAST_ADDRESS, &maddr.ipv6mr_multiaddr); + maddr.ipv6mr_interface = 0; + if (setsockopt(s, IPPROTO_IPV6, IPV6_JOIN_GROUP, (const char *)&maddr, sizeof(maddr)) != 0) + { + CONS_Alert(CONS_WARNING, M_GetText("Could not register multicast address\n")); + } + } + } +#endif + #ifdef FIONBIO // make it non blocking opt = true; @@ -1053,65 +1079,28 @@ static boolean UDP_Socket(void) // ip + udp packetheaderlength = 20 + 8; // for stats - hints.ai_family = AF_INET; - gaie = I_getaddrinfo("127.0.0.1", "0", &hints, &ai); - if (gaie == 0) - { - runp = ai; - while (runp != NULL && s < MAXNETNODES+1) - { - memcpy(&clientaddress[s], runp->ai_addr, runp->ai_addrlen); - s++; - runp = runp->ai_next; - } - I_freeaddrinfo(ai); - } - else - { - clientaddress[s].any.sa_family = AF_INET; - clientaddress[s].ip4.sin_port = htons(0); - clientaddress[s].ip4.sin_addr.s_addr = htonl(INADDR_LOOPBACK); //GetLocalAddress(); // my own ip - s++; - } + clientaddress[s].any.sa_family = AF_INET; + clientaddress[s].ip4.sin_port = htons(0); + clientaddress[s].ip4.sin_addr.s_addr = htonl(INADDR_LOOPBACK); //GetLocalAddress(); // my own ip + s++; s = 0; // setup broadcast adress to BROADCASTADDR entry - gaie = I_getaddrinfo("255.255.255.255", "0", &hints, &ai); - if (gaie == 0) - { - runp = ai; - while (runp != NULL && s < MAXNETNODES+1) - { - memcpy(&broadcastaddress[s], runp->ai_addr, runp->ai_addrlen); - s++; - runp = runp->ai_next; - } - I_freeaddrinfo(ai); - } - else - { - broadcastaddress[s].any.sa_family = AF_INET; - broadcastaddress[s].ip4.sin_port = htons(0); - broadcastaddress[s].ip4.sin_addr.s_addr = htonl(INADDR_BROADCAST); - s++; - } + broadcastaddress[s].any.sa_family = AF_INET; + broadcastaddress[s].ip4.sin_port = htons(atoi(DEFAULTPORT)); + broadcastaddress[s].ip4.sin_addr.s_addr = htonl(INADDR_BROADCAST); + s++; + #ifdef HAVE_IPV6 if (b_ipv6) { - hints.ai_family = AF_INET6; - gaie = I_getaddrinfo("ff02::1", "0", &hints, &ai); - if (gaie == 0) - { - runp = ai; - while (runp != NULL && s < MAXNETNODES+1) - { - memcpy(&broadcastaddress[s], runp->ai_addr, runp->ai_addrlen); - s++; - runp = runp->ai_next; - } - I_freeaddrinfo(ai); - } + broadcastaddress[s].any.sa_family = AF_INET6; + broadcastaddress[s].ip6.sin6_port = htons(atoi(DEFAULTPORT)); + broadcastaddress[s].ip6.sin6_flowinfo = 0; + inet_pton(AF_INET6, IPV6_MULTICAST_ADDRESS, &broadcastaddress[s].ip6.sin6_addr); + broadcastaddress[s].ip6.sin6_scope_id = 0; + s++; } #endif diff --git a/src/k_battle.c b/src/k_battle.c index 482bf3b74..e164b08ba 100644 --- a/src/k_battle.c +++ b/src/k_battle.c @@ -491,6 +491,9 @@ void K_BattleInit(void) { UINT8 n = 0; + if (!cv_kartitembreaker.value) + goto afteritembreaker; + for (i = 0; i < MAXPLAYERS; i++) { if (!playeringame[i] || players[i].spectator) diff --git a/src/k_bot.cpp b/src/k_bot.cpp index 804b17e8c..c7f9d2105 100644 --- a/src/k_bot.cpp +++ b/src/k_bot.cpp @@ -42,7 +42,8 @@ #endif #include "i_net.h" // doomcom -//extern "C" consvar_t cv_forcebots; +consvar_t cv_forcebots = CVAR_INIT ("kartforcebots", "Off", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL); +consvar_t cv_botcontrol = CVAR_INIT ("kartbotcontrol", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL); /*-------------------------------------------------- void K_SetNameForBot(UINT8 playerNum, UINT8 skinnum) @@ -206,7 +207,7 @@ void K_UpdateMatchRaceBots(void) { difficulty = 0; } - else if ((gametyperules & GTR_BOTS) == 0 /*&& !cv_forcebots.value*/) + else if ((gametyperules & GTR_BOTS) == 0 && !cv_forcebots.value) { difficulty = 0; } @@ -1313,10 +1314,8 @@ static void K_BuildBotTiccmdNormal(player_t *player, ticcmd_t *cmd) } // Defanging bots for testing. - #ifdef DEVELOP - if (!cv_botcontrol.value) - return; - #endif + if (!cv_botcontrol.value) + return; // Actual gameplay behaviors below this block! const botcontroller_t *botController = K_GetBotController(player->mo); @@ -1327,6 +1326,25 @@ static void K_BuildBotTiccmdNormal(player_t *player, ticcmd_t *cmd) return; } + if (player->botvars.respawnconfirm >= BOTRESPAWNCONFIRM) + { + // We want to respawn. Simply hold brake and stop here! + cmd->buttons &= ~BT_ACCELERATE|BT_DRIFT|BT_ATTACK; + if (player->speed > 0) + { + cmd->buttons |= (BT_BRAKE); + } + + if ((player->speed < 10*FRACUNIT)) + { + cmd->bot.respawnconfirm = 1; + } + return; + } + else + { + cmd->bot.respawnconfirm = 0; + } destangle = player->mo->angle; boolean forcedDir = false; @@ -1488,6 +1506,38 @@ void K_BuildBotTiccmd( } } +static void K_IncrementBotRespawn(player_t *player, UINT32 *respawn, const UINT32 respawnmax) +{ + const fixed_t requireDist = (12*player->mo->scale) / FRACUNIT; + INT32 progress = player->distancetofinishprev - player->distancetofinish; + boolean exceptions = ( + (leveltime < starttime) + || player->flashing != 0 + || player->spinouttimer != 0 + || player->airtime > 3*TICRATE/2 + || (player->justbumped > 0 && player->justbumped < bumptime-1) + ); + + if (!exceptions && (progress < requireDist)) + { + if (*respawn < respawnmax) + { + // Making no progress, start counting against you. + *respawn = *respawn + 1; + if (progress < -requireDist && *respawn < respawnmax) + { + // Making NEGATIVE progress? Start counting even harder. + *respawn = *respawn + 1; + } + } + } + else if (*respawn > 0) + { + // Playing normally. + *respawn = *respawn - 1; + } +} + /*-------------------------------------------------- void K_UpdateBotGameplayVars(player_t *player); @@ -1505,5 +1555,19 @@ void K_UpdateBotGameplayVars(player_t *player) player->botvars.turnconfirm += player->cmd.bot.turnconfirm; + // Is a bot not making any progress? Kill it and respawn at next waypoint. + K_IncrementBotRespawn(player, &player->botvars.respawnconfirm, BOTRESPAWNCONFIRM); + + if ((player->cmd.bot.respawnconfirm > 0) && (player->botvars.respawnconfirm >= BOTRESPAWNCONFIRM)) + { + // Now a clean function! Neat, eh? + K_SetRespawnAtNextWaypoint(player); + + // WHAT ARE YOU DOING??? RACE ALREADY! + P_DamageMobj(player->mo, NULL, NULL, 1, DMG_INSTAKILL); + + player->botvars.respawnconfirm = 0; + } + K_UpdateBotGameplayVarsItemUsage(player); } diff --git a/src/k_bot.h b/src/k_bot.h index 267b13450..6f68403e4 100644 --- a/src/k_bot.h +++ b/src/k_bot.h @@ -22,9 +22,8 @@ extern "C" { #endif -#ifdef DEVELOP - extern consvar_t cv_botcontrol; -#endif +extern consvar_t cv_forcebots; +extern consvar_t cv_botcontrol; // Maximum value of botvars.difficulty #define MAXBOTDIFFICULTY (13) @@ -40,7 +39,7 @@ extern "C" { #define BOTSPINDASHCONFIRM (4*TICRATE) // How many tics without being able to make progress before we'll let you respawn. -#define BOTRESPAWNCONFIRM (5*TICRATE) +#define BOTRESPAWNCONFIRM (4*TICRATE) // How long it takes for a Lv.1 bot to decide to pick an item. #define BOT_ITEM_DECISION_TIME (2*TICRATE) diff --git a/src/k_collide.c b/src/k_collide.c index 591a22615..5709f587b 100644 --- a/src/k_collide.c +++ b/src/k_collide.c @@ -791,6 +791,10 @@ boolean K_BubbleShieldCollide(mobj_t *t1, mobj_t *t2) if (t2->type == MT_PLAYER) { + if (P_PlayerInPain(t2->player) + || t2->player->flashing || t2->player->hyudorotimer + || t2->player->justbumped || t2->scale > t1->scale + (mapobjectscale/8)) + return true; // Player Damage if (K_KartBouncing(t2, t1->target, false, true)) { diff --git a/src/k_director.c b/src/k_director.c index 6ba86b0d9..8d05fcaf6 100644 --- a/src/k_director.c +++ b/src/k_director.c @@ -270,8 +270,20 @@ void K_UpdateDirector(void) target = directorinfo.sortedplayers[targetposition]; + // stop here since we're already viewing this player + if (*displayplayerp == target) + { + break; + } + + // if this is a splitscreen player, try next pair + if (P_IsDisplayPlayer(&players[target])) + { + continue; + } + // if we're certain the back half of the pair is actually in this position, try to switch - if (*displayplayerp != target && !players[target].positiondelay) + if (!players[target].positiondelay) { K_DirectorSwitch(target, false); } diff --git a/src/k_hud.c b/src/k_hud.c index 027ada4e4..649bd4a1c 100644 --- a/src/k_hud.c +++ b/src/k_hud.c @@ -38,6 +38,7 @@ #include "r_things.h" #include "r_fps.h" #include "m_random.h" +#include "g_party.h" #define NUMPOSNUMS 10 #define NUMPOSFRAMES 7 // White, three blues, three reds @@ -1017,11 +1018,11 @@ static void K_drawKartItem(void) localpatch = kp_nodraw; } - if (stplyr->karthud[khud_itemblink] && (leveltime & 1)) + if (stplyr->itemblink && (leveltime & 1)) { colormode = TC_BLINK; - switch (stplyr->karthud[khud_itemblinkmode]) + switch (stplyr->itemblinkmode) { case 2: localcolor = K_RainbowColor(leveltime); @@ -2093,17 +2094,18 @@ static void K_drawRingMeter(void) UINT8 *ringmap = NULL; boolean colorring = false; INT32 splitflags = V_SNAPTOBOTTOM|V_SNAPTOLEFT|V_HUDTRANS|V_SPLITSCREEN; + SINT8 ringcount = stplyr->rings; - rn[0] = ((abs(stplyr->rings) / 10) % 10); - rn[1] = (abs(stplyr->rings) % 10); + rn[0] = ((abs(ringcount) / 10) % 10); + rn[1] = (abs(ringcount) % 10); - if (stplyr->rings <= 0 && (leveltime/5 & 1)) // In debt + if (ringcount <= 0 && (leveltime/5 & 1)) // In debt { ringmap = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_CRIMSON, GTC_CACHE); colorring = true; } - else if (stplyr->rings >= 20) // Maxed out + else if (ringcount >= 20) // Maxed out ringmap = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_YELLOW, GTC_CACHE); if (r_splitscreen > 1) @@ -2136,7 +2138,7 @@ static void K_drawRingMeter(void) V_DrawMappedPatch(fr, fy-10, V_HUDTRANS|splitflags, kp_ringsplitscreen, (colorring ? ringmap : NULL)); - if (stplyr->rings < 0) // Draw the minus for ring debt + if (ringcount < 0) // Draw the minus for ring debt V_DrawMappedPatch(fr+7, fy-8, V_HUDTRANS|splitflags, kp_ringdebtminussmall, ringmap); V_DrawMappedPatch(fr+11, fy-10, V_HUDTRANS|splitflags, fontv[PINGNUM_FONT].font[rn[0]], ringmap); @@ -2160,32 +2162,46 @@ static void K_drawRingMeter(void) V_DrawMappedPatch(LAPS_X-5, LAPS_Y-11 + ringoffsety, V_HUDTRANS|splitflags, kp_ringdebtminus, ringmap); } - V_DrawMappedPatch(LAPS_X+2, LAPS_Y-11 + ringoffsety, V_HUDTRANS|splitflags, kp_facenum[rn[0]], ringmap); - V_DrawMappedPatch(LAPS_X+8, LAPS_Y-11 + ringoffsety, V_HUDTRANS|splitflags, kp_facenum[rn[1]], ringmap); + if (stplyr->rings < 0) + { + // Invert the ring count + ringcount = -ringcount; + } + + if (rn[1] == 1 && ringcount == 11) + V_DrawMappedPatch(LAPS_X+2, LAPS_Y-11 + ringoffsety, V_HUDTRANS|splitflags, kp_facenum[rn[0]], ringmap); + else + V_DrawMappedPatch(LAPS_X+2, LAPS_Y-11 + ringoffsety, V_HUDTRANS|splitflags, kp_facenum[rn[0]], ringmap); + + if (rn[1] == 1 && ringcount == 11) + V_DrawMappedPatch(LAPS_X+7, LAPS_Y-11 + ringoffsety, V_HUDTRANS|splitflags, kp_facenum[rn[1]], ringmap); + else + V_DrawMappedPatch(LAPS_X+8, LAPS_Y-11 + ringoffsety, V_HUDTRANS|splitflags, kp_facenum[rn[1]], ringmap); // Draw the fillbars if (stplyr->rings) { - SINT8 ringcount = stplyr->rings; - SINT8 barcolors[4] = {66,83,65}; + UINT8 barcolors[5] = {66,72,2,68}; boolean indebt = false; if (stplyr->rings < 0) { - barcolors[0] = 35; - barcolors[1] = 33; - barcolors[2] = 37; - ringcount = -ringcount; + barcolors[0] = 38; + barcolors[1] = 36; + barcolors[2] = 32; + barcolors[3] = 40; indebt = true; } + if (!indebt || (indebt && (leveltime/5 & 1))) { for (i = 0; i != ringcount; i++) { - V_DrawFill(LAPS_X+17+(2*i), LAPS_Y-10 + ringoffsety, 1, 3, barcolors[0]|splitflags); - V_DrawFill(LAPS_X+17+(2*i), LAPS_Y-9 + ringoffsety, 1, 2, barcolors[1]|splitflags); - V_DrawFill(LAPS_X+17+(2*i), LAPS_Y-6 + ringoffsety, 1, 1, barcolors[2]|splitflags); + V_DrawFill(LAPS_X+17+(2*i), LAPS_Y-10 + ringoffsety, 1, 1, barcolors[0]|splitflags); + V_DrawFill(LAPS_X+17+(2*i), LAPS_Y-9 + ringoffsety, 1, 4, barcolors[1]|splitflags); + V_DrawFill(LAPS_X+17+(2*i), LAPS_Y-8 + ringoffsety, 1, 1, barcolors[2]|splitflags); + V_DrawFill(LAPS_X+17+(2*i), LAPS_Y-7 + ringoffsety, 1, 1, barcolors[3]|splitflags); } } } @@ -2697,6 +2713,31 @@ static void K_drawKartNameTags(void) return; } + // Crop within splitscreen bounds + switch (r_splitscreen) + { + case 1: + V_SetClipRect( + 0, + cnum == 1 ? (BASEVIDHEIGHT / 2) * FRACUNIT : 0, + BASEVIDWIDTH * FRACUNIT, + (BASEVIDHEIGHT / 2) * FRACUNIT, + 0 + ); + break; + + case 2: + case 3: + V_SetClipRect( + cnum & 1 ? (BASEVIDWIDTH / 2) * FRACUNIT : 0, + cnum > 1 ? (BASEVIDHEIGHT / 2) * FRACUNIT : 0, + (BASEVIDWIDTH / 2) * FRACUNIT, + (BASEVIDHEIGHT / 2) * FRACUNIT, + 0 + ); + break; + } + c.x = viewx; c.y = viewy; c.z = viewz; @@ -2926,6 +2967,8 @@ static void K_drawKartNameTags(void) } } } + + V_ClearClipRect(); } static void K_drawKartMinimapIcon(fixed_t objx, fixed_t objy, INT32 hudx, INT32 hudy, INT32 flags, patch_t *icon, UINT8 *colormap) @@ -3000,7 +3043,7 @@ static void K_drawKartMinimapNametag(fixed_t objx, fixed_t objy, INT32 hudx, INT if (encoremode) amnumxpos = -amnumxpos; - skin = ((skin_t*)players->mo->skin)-skins; + skin = ((skin_t*)player->mo->skin)-skins; amxpos = amnumxpos + ((hudx + (SHORT(minimapinfo.minimap_pic->width)-SHORT(faceprefix[skin][FACE_MINIMAP]->width))/2)<height)-SHORT(faceprefix[skin][FACE_MINIMAP]->height))/2)< 0) && (leveltime & 1)) + if ((players[localplayers[i]].hyudorotimer > 0) && (leveltime & 1)) continue; mobj = players[localplayers[i]].mo; diff --git a/src/k_kart.c b/src/k_kart.c index 6cc84af15..ff8fbaece 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -228,6 +228,8 @@ void K_RegisterKartStuff(void) CV_RegisterVar(&cv_kartspeedometer); CV_RegisterVar(&cv_kartvoices); CV_RegisterVar(&cv_kartbot); + CV_RegisterVar(&cv_forcebots); + CV_RegisterVar(&cv_botcontrol); CV_RegisterVar(&cv_karteliminatelast); CV_RegisterVar(&cv_kartusepwrlv); CV_RegisterVar(&cv_votetime); @@ -251,6 +253,7 @@ void K_RegisterKartStuff(void) CV_RegisterVar(&cv_lessflicker); CV_RegisterVar(&cv_kartrings); + CV_RegisterVar(&cv_kartitembreaker); CV_RegisterVar(&cv_newspeedometer); CV_RegisterVar(&cv_showinput); @@ -1478,8 +1481,8 @@ static void K_KartItemRoulette(player_t *player, ticcmd_t *cmd) if (player->roulettetype == 2) { player->eggmanexplode = 4*TICRATE; - //player->karthud[khud_itemblink] = TICRATE; - //player->karthud[khud_itemblinkmode] = 1; + //player->itemblink = TICRATE; + //player->itemblinkmode = 1; player->itemroulette = 0; player->roulettetype = 0; if (P_IsDisplayPlayer(player) && !demo.freecam) @@ -1493,8 +1496,8 @@ static void K_KartItemRoulette(player_t *player, ticcmd_t *cmd) { K_KartGetItemResult(player, cv_kartdebugitem.value); player->itemamount = cv_kartdebugamount.value; - player->karthud[khud_itemblink] = TICRATE; - player->karthud[khud_itemblinkmode] = 2; + player->itemblink = TICRATE; + player->itemblinkmode = 2; player->itemroulette = 0; player->roulettetype = 0; if (P_IsDisplayPlayer(player) && !demo.freecam) @@ -1509,8 +1512,8 @@ static void K_KartItemRoulette(player_t *player, ticcmd_t *cmd) SINT8 itemroll = P_RandomRange(KITEM_SNEAKER, NUMKARTITEMS - 1); K_KartGetItemResult(player, itemroll); - player->karthud[khud_itemblink] = TICRATE; - player->karthud[khud_itemblinkmode] = 0; + player->itemblink = TICRATE; + player->itemblinkmode = 0; player->itemroulette = 0; player->roulettetype = 0; if (P_IsDisplayPlayer(player)) @@ -1527,7 +1530,7 @@ static void K_KartItemRoulette(player_t *player, ticcmd_t *cmd) if (mashed && ((K_RingsActive() == true) && (modeattacking || cv_superring.value))) // ANY mashed value? You get rings. { K_KartGetItemResult(player, KITEM_SUPERRING); - player->karthud[khud_itemblinkmode] = 1; + player->itemblinkmode = 1; if (P_IsDisplayPlayer(player)) S_StartSound(NULL, sfx_itrolm); } @@ -1537,7 +1540,7 @@ static void K_KartItemRoulette(player_t *player, ticcmd_t *cmd) K_KartGetItemResult(player, KITEM_SNEAKER); else // Default to sad if nothing's enabled... K_KartGetItemResult(player, KITEM_SAD); - player->karthud[khud_itemblinkmode] = 0; + player->itemblinkmode = 0; if (P_IsDisplayPlayer(player)) S_StartSound(NULL, sfx_itrolf); } @@ -1547,20 +1550,20 @@ static void K_KartItemRoulette(player_t *player, ticcmd_t *cmd) if (mashed && (bossinfo.boss || cv_banana.value) && !itembreaker) // ANY mashed value? You get a banana. { K_KartGetItemResult(player, KITEM_BANANA); - player->karthud[khud_itemblinkmode] = 1; + player->itemblinkmode = 1; if (P_IsDisplayPlayer(player)) S_StartSound(NULL, sfx_itrolm); } else if (bossinfo.boss) { K_KartGetItemResult(player, KITEM_ORBINAUT); - player->karthud[khud_itemblinkmode] = 0; + player->itemblinkmode = 0; if (P_IsDisplayPlayer(player)) S_StartSound(NULL, sfx_itrolf); } } - player->karthud[khud_itemblink] = TICRATE; + player->itemblink = TICRATE; player->itemroulette = 0; player->roulettetype = 0; return; @@ -1574,8 +1577,8 @@ static void K_KartItemRoulette(player_t *player, ticcmd_t *cmd) if (P_RandomChance((debtamount*FRACUNIT)/20)) { K_KartGetItemResult(player, KITEM_SUPERRING); - player->karthud[khud_itemblink] = TICRATE; - player->karthud[khud_itemblinkmode] = 1; + player->itemblink = TICRATE; + player->itemblinkmode = 1; player->itemroulette = 0; player->roulettetype = 0; if (P_IsDisplayPlayer(player)) @@ -1593,8 +1596,8 @@ static void K_KartItemRoulette(player_t *player, ticcmd_t *cmd) && cv_selfpropelledbomb.value) { K_KartGetItemResult(player, KITEM_SPB); - player->karthud[khud_itemblink] = TICRATE; - player->karthud[khud_itemblinkmode] = 2; + player->itemblink = TICRATE; + player->itemblinkmode = 2; player->itemroulette = 0; player->roulettetype = 0; if (P_IsDisplayPlayer(player)) @@ -1618,8 +1621,8 @@ static void K_KartItemRoulette(player_t *player, ticcmd_t *cmd) if (useodds == 69) { K_KartGetItemResult(player, KITEM_SPB); - player->karthud[khud_itemblink] = TICRATE; - player->karthud[khud_itemblinkmode] = 2; + player->itemblink = TICRATE; + player->itemblinkmode = 2; player->itemroulette = 0; player->roulettetype = 0; if (P_IsDisplayPlayer(player)) @@ -1662,8 +1665,8 @@ static void K_KartItemRoulette(player_t *player, ticcmd_t *cmd) if (P_IsDisplayPlayer(player) && !demo.freecam) S_StartSound(NULL, ((player->roulettetype == 1) ? sfx_itrolk : (mashed ? sfx_itrolm : sfx_itrolf))); - player->karthud[khud_itemblink] = TICRATE; - player->karthud[khud_itemblinkmode] = ((player->roulettetype == 1) ? 2 : (mashed ? 1 : 0)); + player->itemblink = TICRATE; + player->itemblinkmode = ((player->roulettetype == 1) ? 2 : (mashed ? 1 : 0)); player->itemroulette = 0; // Since we're done, clear the roulette number player->roulettetype = 0; // This too @@ -3597,9 +3600,6 @@ fixed_t K_GetNewSpeed(player_t *player) const fixed_t p_speed = K_GetKartSpeed(player, true, true); fixed_t p_accel = K_GetKartAccel(player); fixed_t newspeed, oldspeed, finalspeed; - boolean onground = (P_IsObjectOnGround(player->mo) || (player->pogospring)); - - if (!onground) return 0; // If the player isn't on the ground, there is no change in speed if (K_PlayerUsesBotMovement(player) == true && player->botvars.rubberband > 0) { @@ -3634,12 +3634,13 @@ fixed_t K_GetNewSpeed(player_t *player) return finalspeed; } -fixed_t K_3dKartMovement(player_t *player) +fixed_t K_3dKartMovement(player_t *player, boolean onground) { fixed_t finalspeed = K_GetNewSpeed(player); - SINT8 forwardmove = K_GetForwardMove(player); + if (!onground) return 0; // If the player isn't on the ground, there is no change in speed + // forwardmove is: // 50 while accelerating, // 25 while clutching, @@ -5072,7 +5073,8 @@ static void K_DoHyudoroSteal(player_t *player) // Has an item && (players[i].itemtype && players[i].itemamount - && !(players[i].itemflags & IF_ITEMOUT))) + && !(players[i].itemflags & IF_ITEMOUT) + && !players[i].itemblink)) { playerswappable[numplayers] = i; numplayers++; @@ -6619,12 +6621,6 @@ void K_KartPlayerHUDUpdate(player_t *player) if (player->karthud[khud_tauntvoices]) player->karthud[khud_tauntvoices]--; - if (player->karthud[khud_itemblink] && player->karthud[khud_itemblink]-- <= 0) - { - player->karthud[khud_itemblinkmode] = 0; - player->karthud[khud_itemblink] = 0; - } - if (gametype == GT_RACE) { @@ -7246,6 +7242,12 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd) if (player->tiregrease > 0) player->tiregrease--;; + if (player->itemblink && player->itemblink-- <= 0) + { + player->itemblinkmode = 0; + player->itemblink = 0; + } + K_UpdateTripwire(player); K_KartPlayerHUDUpdate(player); @@ -8302,6 +8304,60 @@ static void K_FudgeRespawn(player_t *player, const waypoint_t *const waypoint) player->starposty += FixedMul(16, FINESINE(from)); } +void K_SetRespawnAtNextWaypoint(player_t * player) +{ + mobj_t *currentwaypoint = player->currentwaypoint->mobj; + mobj_t *safewaypoint = player->nextwaypoint->mobj; + angle_t respawnangle = R_PointToAngle2(currentwaypoint->x, currentwaypoint->y, safewaypoint->x, safewaypoint->y); + + // Safety :P + if (!safewaypoint || !currentwaypoint) + { + // Better safe then sorry. + return; + } + + player->pflags |= PF_TRUSTWAYPOINTS; + player->starposttime = player->realtime; + player->starpostz = (safewaypoint->spawnpoint->z + 15) >> FRACBITS; + player->starpostflip = (safewaypoint->flags2 & MF2_OBJECTFLIP); + player->starpostangle = respawnangle; + + // Then do x and y + player->starpostx = safewaypoint->x >> FRACBITS; + player->starposty = safewaypoint->y >> FRACBITS; +} + +static boolean K_MobjIsOnLine(mobj_t *const mobj) +{ + const fixed_t x = mobj->x; + const fixed_t y = mobj->y; + + line_t *line = P_FindNearestLine(x, y, + mobj->subsector->sector, -1); + + vertex_t point; + + if (line != NULL) + { + P_ClosestPointOnLine(x, y, line, &point); + + if (x == point.x && y == point.y) + return true; + } + + return false; +} + +static void K_MobjFudgeRespawn(player_t *player, const mobj_t *const mobj) +{ + const angle_t from = R_PointToAngle2(mobj->x, mobj->y, + player->mo->x, player->mo->y) >> ANGLETOFINESHIFT; + + player->starpostx += FixedMul(25, FINECOSINE(from)); + player->starposty += FixedMul(25, FINESINE(from)); +} + /*-------------------------------------------------- static void K_UpdatePlayerWaypoints(player_t *const player) @@ -8399,22 +8455,16 @@ static void K_UpdatePlayerWaypoints(player_t *const player) // Then do x and y player->starpostx = player->mo->x >> FRACBITS; player->starposty = player->mo->y >> FRACBITS; + + if (K_MobjIsOnLine(player->mo)) + { + K_MobjFudgeRespawn(player, player->mo); + } } else { - mobj_t *currentwaypoint = player->currentwaypoint->mobj; - mobj_t *safewaypoint = player->nextwaypoint->mobj; - angle_t respawnangle = R_PointToAngle2(currentwaypoint->x, currentwaypoint->y, safewaypoint->x, safewaypoint->y); - - player->starposttime = player->realtime; - player->starpostz = safewaypoint->spawnpoint->z >> FRACBITS; - player->starpostflip = (safewaypoint->flags2 & MF2_OBJECTFLIP); - player->starpostangle = respawnangle; - - // Then do x and y - player->starpostx = safewaypoint->x >> FRACBITS; - player->starposty = safewaypoint->y >> FRACBITS; - + // Now a clean function! Neat, eh? + K_SetRespawnAtNextWaypoint(player); } if (player->nextwaypoint->onaline) diff --git a/src/k_kart.h b/src/k_kart.h index 134ca1bda..c4d9bae67 100644 --- a/src/k_kart.h +++ b/src/k_kart.h @@ -131,6 +131,7 @@ player_t *K_FindJawzTarget(mobj_t *actor, player_t *source); INT32 K_GetKartRingPower(player_t *player, boolean boosted); size_t K_NextRespawnWaypointIndex(waypoint_t *waypoint); boolean K_CheckPlayersRespawnColliding(INT32 playernum, fixed_t x, fixed_t y); +void K_SetRespawnAtNextWaypoint(player_t * player); INT16 K_GetKartTurnValue(player_t *player, INT16 turnvalue); INT32 K_GetKartDriftSparkValue(player_t *player); INT32 K_GetKartDriftSparkValueForStage(player_t *player, UINT8 stage); @@ -168,7 +169,7 @@ boolean K_KartKickstart(player_t *player); UINT16 K_GetKartButtons(player_t *player); SINT8 K_GetForwardMove(player_t *player); fixed_t K_GetNewSpeed(player_t *player); -fixed_t K_3dKartMovement(player_t *player); +fixed_t K_3dKartMovement(player_t *player, boolean onground); SINT8 K_Sliptiding(player_t *player); void K_MoveKartPlayer(player_t *player, boolean onground); void K_CheckSpectateStatus(boolean considermapreset); diff --git a/src/lua_mobjlib.c b/src/lua_mobjlib.c index 6d826e3bb..2b0a0fc46 100644 --- a/src/lua_mobjlib.c +++ b/src/lua_mobjlib.c @@ -379,6 +379,8 @@ static int mobj_get(lua_State *L) UINT32 flags2 = mo->flags2; if (lua_compatmode && (mo->renderflags & RF_DONTDRAW) == RF_DONTDRAW) flags2 |= MF2_DONTDRAW; + if (lua_compatmode && (mo->renderflags & RF_GHOSTLY) == RF_GHOSTLY) + flags2 |= MF2_SHADOW; lua_pushinteger(L, flags2); break; } @@ -818,6 +820,11 @@ static int mobj_set(lua_State *L) mo->renderflags |= RF_DONTDRAW; else mo->renderflags &= ~RF_DONTDRAW; + + if (flags2 & MF2_SHADOW) + mo->renderflags |= RF_GHOSTLY; + else + mo->renderflags &= ~RF_GHOSTLYMASK; } mo->flags2 = flags2; break; diff --git a/src/lua_playerlib.c b/src/lua_playerlib.c index f1ee10811..32a302a82 100644 --- a/src/lua_playerlib.c +++ b/src/lua_playerlib.c @@ -173,236 +173,690 @@ static int lib_lenDisplayplayers(lua_State *L) return 1; } +enum player_e +{ + player_valid, + player_name, + player_realmo, + player_mo, + player_cmd, + player_oldcmd, + player_playerstate, + player_health, + player_viewz, + player_viewheight, + player_viewrollangle, + player_aiming, + player_drawangle, + player_frameangle, + player_powers, + player_kartstuff, + player_karthud, + player_nocontrol, + player_carry, + player_dye, + player_position, + player_oldposition, + player_positiondelay, + player_prevcheck, + player_nextcheck, + player_distancetofinish, + player_distancetofinishprev, + player_airtime, + player_flashing, + player_spinouttimer, + player_spinouttype, + player_instashield, + player_wipeoutslow, + player_justbumped, + player_itemflags, + player_drift, + player_driftcharge, + player_driftboost, + player_boostcharge, + player_startboost, + player_dropdash, + player_respawn, + player_aizdriftstrat, + player_aizdrifttilt, + player_aizdriftturn, + player_offroad, + player_pogospring, + player_brakestop, + player_waterskip, + player_dashpadcooldown, + player_boostpower, + player_speedboost, + player_accelboost, + player_boostangle, + player_tripwireState, + player_tripwirePass, + player_tripwireLeniency, + player_tripwireReboundDelay, + player_itemroulette, + player_itemblink, + player_itemblinkmode, + player_roulettetype, + player_itemtype, + player_itemamount, + player_throwdir, + player_sadtimer, + player_rings, + player_pickuprings, + player_ringdelay, + player_ringboost, + player_superring, + player_nextringaward, + player_ringvolume, + player_ringtransparency, + player_curshield, + player_bubblecool, + player_bubbleblowup, + player_bubblepop, + player_flamedash, + player_flametimer, + player_flamestore, + player_hyudorotimer, + player_stealingtimer, + player_stolentimer, + player_sneakertimer, + player_floorboost, + player_growshrinktimer, + player_growcancel, + player_squishedtimer, + player_rocketsneakertimer, + player_invincibilitytimer, + player_eggmanexplode, + player_eggmanblame, + player_bananadrag, + player_lastjawztarget, + player_jawztargetdelay, + player_confirmVictim, + player_confirmVictimDelay, + player_glanceDir, + player_breathTimer, + player_lastsafelap, + player_lastsafestarpost, + player_roundscore, + player_marescore, + player_emeralds, + player_bumpers, + player_karmadelay, + player_pflags, + player_panim, + player_flashcount, + player_flashpal, + player_skincolor, + player_skin, + player_availabilities, + player_score, + player_kartspeed, + player_kartweight, + player_followerskin, + player_followerready, + player_followercolor, + player_follower, + player_charflags, + player_followitem, + player_followmobj, + player_lives, + player_xtralife, + player_speed, + player_lastspeed, + player_deadtimer, + player_exiting, + player_cmomx, + player_cmomy, + player_rmomx, + player_rmomy, + player_totalring, + player_realtime, + player_laps, + player_latestlap, + player_ctfteam, + player_checkskip, + player_starpostx, + player_starposty, + player_starpostz, + player_starpostangle, + player_starpostflip, + player_starpostnum, + player_starposttime, + player_lastsidehit, + player_lastlinehit, + player_onconveyor, + player_awayviewmobj, + player_awayviewtics, + player_awayviewaiming, + player_spectator, + player_spectatewait, + player_bot, + player_jointime, + player_spectatorreentry, + player_grieftime, + player_griefstrikes, + player_splitscreenindex, + player_bumpertime, + player_ping, +#ifdef HWRENDER + player_fovadd, +#endif +}; + +static const char *const player_opt[] = { + "valid", + "name", + "realmo", + "mo", + "cmd", + "oldcmd", + "playerstate", + "health", + "viewz", + "viewheight", + "viewrollangle", + "aiming", + "drawangle", + "frameangle", + "powers", + "kartstuff", + "karthud", + "nocontrol", + "carry", + "dye", + "position", + "oldposition", + "positiondelay", + "prevcheck", + "nextcheck", + "distancetofinish", + "distancetofinishprev", + "airtime", + "flashing", + "spinouttimer", + "spinouttype", + "instashield", + "wipeoutslow", + "justbumped", + "itemflags", + "drift", + "driftcharge", + "driftboost", + "boostcharge", + "startboost", + "dropdash", + "respawn", + "aizdriftstrat", + "aizdrifttilt", + "aizdriftturn", + "offroad", + "pogospring", + "brakestop", + "waterskip", + "dashpadcooldown", + "boostpower", + "speedboost", + "accelboost", + "boostangle", + "tripwireState", + "tripwirePass", + "tripwireLeniency", + "tripwireReboundDelay", + "itemroulette", + "itemblink", + "itemblinkmode", + "roulettetype", + "itemtype", + "itemamount", + "throwdir", + "sadtimer", + "rings", + "pickuprings", + "ringdelay", + "ringboost", + "superring", + "nextringaward", + "ringvolume", + "ringtransparency", + "curshield", + "bubblecool", + "bubbleblowup", + "bubblepop", + "flamedash", + "flametimer", + "flamestore", + "hyudorotimer", + "stealingtimer", + "stolentimer", + "sneakertimer", + "floorboost", + "growshrinktimer", + "growcancel", + "squishedtimer", + "rocketsneakertimer", + "invincibilitytimer", + "eggmanexplode", + "eggmanblame", + "bananadrag", + "lastjawztarget", + "jawztargetdelay", + "confirmVictim", + "confirmVictimDelay", + "glanceDir", + "breathTimer", + "lastsafelap", + "lastsafestarpost", + "roundscore", + "marescore", + "emeralds", + "bumpers", + "karmadelay", + "pflags", + "panim", + "flashcount", + "flashpal", + "skincolor", + "skin", + "availabilities", + "score", + "kartspeed", + "kartweight", + "followerskin", + "followerready", + "followercolor", + "follower", + "charflags", + "followitem", + "followmobj", + "lives", + "xtralife", + "speed", + "lastspeed", + "deadtimer", + "exiting", + "cmomx", + "cmomy", + "rmomx", + "rmomy", + "totalring", + "realtime", + "laps", + "latestlap", + "ctfteam", + "checkskip", + "starpostx", + "starposty", + "starpostz", + "starpostangle", + "starpostflip", + "starpostnum", + "starposttime", + "lastsidehit", + "lastlinehit", + "onconveyor", + "awayviewmobj", + "awayviewtics", + "awayviewaiming", + "spectator", + "spectatewait", + "bot", + "jointime", + "spectatorreentry", + "grieftime", + "griefstrikes", + "splitscreenindex", + "bumpertime", + "ping", +#ifdef HWRENDER + "fovadd", +#endif + NULL, +}; + static int player_get(lua_State *L) { player_t *plr = *((player_t **)luaL_checkudata(L, 1, META_PLAYER)); - const char *field = luaL_checkstring(L, 2); + enum player_e field = Lua_optoption(L, 2, NULL, player_opt); + lua_settop(L, 2); - if (!plr) { - if (fastcmp(field,"valid")) { + if (!plr) + { + if (field == player_valid) + { lua_pushboolean(L, false); return 1; } return LUA_ErrInvalid(L, "player_t"); } - if (fastcmp(field,"valid")) - lua_pushboolean(L, true); - else if (fastcmp(field,"name")) - lua_pushstring(L, player_names[plr-players]); - else if (fastcmp(field,"mo")) + switch (field) { - if (lua_compatmode && plr->spectator) + case player_valid: + lua_pushboolean(L, true); + break; + case player_name: + lua_pushstring(L, player_names[plr-players]); + break; + case player_realmo: + LUA_PushUserdata(L, plr->mo, META_MOBJ); + break; + case player_mo: + if (plr->spectator) lua_pushnil(L); // sigh else LUA_PushUserdata(L, plr->mo, META_MOBJ); - } - else if (fastcmp(field,"cmd")) + break; + case player_cmd: LUA_PushUserdata(L, &plr->cmd, META_TICCMD); - else if (fastcmp(field,"oldcmd")) + break; + case player_oldcmd: LUA_PushUserdata(L, &plr->oldcmd, META_TICCMD); - else if (fastcmp(field,"playerstate")) + break; + case player_playerstate: lua_pushinteger(L, plr->playerstate); - else if (fastcmp(field,"health")) + break; + case player_health: { if (plr->mo) lua_pushinteger(L, plr->mo->health); else lua_pushinteger(L, 0); + break; } - else if (fastcmp(field,"viewz")) + case player_viewz: lua_pushfixed(L, plr->viewz); - else if (fastcmp(field,"viewheight")) + break; + case player_viewheight: lua_pushfixed(L, plr->viewheight); - else if (fastcmp(field,"viewrollangle")) + break; + case player_viewrollangle: lua_pushangle(L, plr->viewrollangle); - else if (fastcmp(field,"aiming")) + break; + case player_aiming: lua_pushangle(L, plr->aiming); - else if (fastcmp(field,"drawangle") || (lua_compatmode && fastcmp(field,"frameangle"))) + break; + case player_drawangle: + case player_frameangle: lua_pushangle(L, plr->drawangle); - else if (fastcmp(field,"powers")) + break; + case player_powers: LUA_PushUserdata(L, plr->powers, META_POWERS); - else if (fastcmp(field,"kartstuff")) + break; + case player_kartstuff: LUA_PushUserdata(L, plr->kartstuff, META_KARTSTUFF); - else if (fastcmp(field,"karthud")) + break; + case player_karthud: LUA_PushUserdata(L, plr->karthud, META_KARTHUD); - else if (fastcmp(field,"nocontrol")) + break; + case player_nocontrol: lua_pushinteger(L, plr->nocontrol); - else if (fastcmp(field,"carry")) + break; + case player_carry: lua_pushinteger(L, plr->carry); - else if (fastcmp(field,"dye")) + break; + case player_dye: lua_pushinteger(L, plr->dye); - else if (fastcmp(field,"position")) + break; + case player_position: lua_pushinteger(L, plr->position); - else if (fastcmp(field,"oldposition")) + break; + case player_oldposition: lua_pushinteger(L, plr->oldposition); - else if (fastcmp(field,"positiondelay")) + break; + case player_positiondelay: lua_pushinteger(L, plr->positiondelay); - else if (fastcmp(field,"prevcheck")) + break; + case player_prevcheck: lua_pushinteger(L, plr->prevcheck); - else if (fastcmp(field,"nextcheck")) + break; + case player_nextcheck: lua_pushinteger(L, plr->nextcheck); - else if (fastcmp(field,"distancetofinish")) + break; + case player_distancetofinish: lua_pushinteger(L, plr->distancetofinish); - else if (fastcmp(field,"distancetofinishprev")) + break; + case player_distancetofinishprev: lua_pushinteger(L, plr->distancetofinishprev); - else if (fastcmp(field,"airtime")) + break; + case player_airtime: lua_pushinteger(L, plr->airtime); - else if (fastcmp(field,"flashing")) + break; + case player_flashing: lua_pushinteger(L, plr->flashing); - else if (fastcmp(field,"spinouttimer")) + break; + case player_spinouttimer: lua_pushinteger(L, plr->spinouttimer); - else if (fastcmp(field,"spinouttype")) + break; + case player_spinouttype: lua_pushinteger(L, plr->spinouttype); - else if (fastcmp(field,"instashield")) + break; + case player_instashield: lua_pushinteger(L, plr->instashield); - else if (fastcmp(field,"wipeoutslow")) + break; + case player_wipeoutslow: lua_pushinteger(L, plr->wipeoutslow); - else if (fastcmp(field,"justbumped")) + break; + case player_justbumped: lua_pushinteger(L, plr->justbumped); - else if (fastcmp(field,"itemflags")) + break; + case player_itemflags: lua_pushinteger(L, plr->itemflags); - else if (fastcmp(field,"drift")) + break; + case player_drift: lua_pushinteger(L, plr->drift); - else if (fastcmp(field,"driftcharge")) + break; + case player_driftcharge: lua_pushinteger(L, plr->driftcharge); - else if (fastcmp(field,"driftboost")) + break; + case player_driftboost: lua_pushinteger(L, plr->driftboost); - else if (fastcmp(field,"boostcharge")) + break; + case player_boostcharge: lua_pushinteger(L, plr->boostcharge); - else if (fastcmp(field,"startboost")) + break; + case player_startboost: lua_pushinteger(L, plr->startboost); - else if (fastcmp(field,"dropdash")) + break; + case player_dropdash: lua_pushinteger(L, plr->dropdash); - else if (fastcmp(field,"respawn")) + break; + case player_respawn: lua_pushinteger(L, plr->respawn); - else if (fastcmp(field,"aizdriftstrat")) + break; + case player_aizdriftstrat: lua_pushinteger(L, plr->aizdriftstrat); - else if (fastcmp(field,"aizdrifttilt")) + break; + case player_aizdrifttilt: lua_pushinteger(L, plr->aizdrifttilt); - else if (fastcmp(field,"aizdriftturn")) + break; + case player_aizdriftturn: lua_pushinteger(L, plr->aizdriftturn); - else if (fastcmp(field,"offroad")) + break; + case player_offroad: lua_pushinteger(L, plr->offroad); - else if (fastcmp(field,"pogospring")) + break; + case player_pogospring: lua_pushinteger(L, plr->pogospring); - else if (fastcmp(field,"brakestop")) + break; + case player_brakestop: lua_pushinteger(L, plr->brakestop); - else if (fastcmp(field,"waterskip")) + break; + case player_waterskip: lua_pushinteger(L, plr->waterskip); - else if (fastcmp(field,"dashpadcooldown")) + break; + case player_dashpadcooldown: lua_pushinteger(L, plr->dashpadcooldown); - else if (fastcmp(field,"boostpower")) + break; + case player_boostpower: lua_pushinteger(L, plr->boostpower); - else if (fastcmp(field,"speedboost")) + break; + case player_speedboost: lua_pushinteger(L, plr->speedboost); - else if (fastcmp(field,"accelboost")) + break; + case player_accelboost: lua_pushinteger(L, plr->accelboost); - else if (fastcmp(field,"boostangle")) + break; + case player_boostangle: lua_pushangle(L, plr->boostangle); - else if (fastcmp(field,"tripwireState")) + break; + case player_tripwireState: lua_pushinteger(L, plr->tripwireState); - else if (fastcmp(field,"tripwirePass")) + break; + case player_tripwirePass: lua_pushinteger(L, plr->tripwirePass); - else if (fastcmp(field,"tripwireLeniency")) + break; + case player_tripwireLeniency: lua_pushinteger(L, plr->tripwireLeniency); - else if (fastcmp(field,"tripwireReboundDelay")) + break; + case player_tripwireReboundDelay: lua_pushinteger(L, plr->tripwireReboundDelay); - else if (fastcmp(field,"itemroulette")) + break; + case player_itemroulette: lua_pushinteger(L, plr->itemroulette); - else if (fastcmp(field,"roulettetype")) + break; + case player_itemblink: + lua_pushinteger(L, plr->itemblink); + break; + case player_itemblinkmode: + lua_pushinteger(L, plr->itemblinkmode); + break; + case player_roulettetype: lua_pushinteger(L, plr->roulettetype); - else if (fastcmp(field,"itemtype")) + break; + case player_itemtype: lua_pushinteger(L, plr->itemtype); - else if (fastcmp(field,"itemamount")) + break; + case player_itemamount: lua_pushinteger(L, plr->itemamount); - else if (fastcmp(field,"throwdir")) + break; + case player_throwdir: lua_pushinteger(L, plr->throwdir); - else if (fastcmp(field,"sadtimer")) + break; + case player_sadtimer: lua_pushinteger(L, plr->sadtimer); - else if (fastcmp(field,"rings")) + break; + case player_rings: lua_pushinteger(L, plr->rings); - else if (fastcmp(field,"pickuprings")) + break; + case player_pickuprings: lua_pushinteger(L, plr->pickuprings); - else if (fastcmp(field,"ringdelay")) + break; + case player_ringdelay: lua_pushinteger(L, plr->ringdelay); - else if (fastcmp(field,"ringboost")) + break; + case player_ringboost: lua_pushinteger(L, plr->ringboost); - else if (fastcmp(field,"superring")) + break; + case player_superring: lua_pushinteger(L, plr->superring); - else if (fastcmp(field,"nextringaward")) + break; + case player_nextringaward: lua_pushinteger(L, plr->nextringaward); - else if (fastcmp(field,"ringvolume")) + break; + case player_ringvolume: lua_pushinteger(L, plr->ringvolume); - else if (fastcmp(field,"ringtransparency")) + break; + case player_ringtransparency: lua_pushinteger(L, plr->ringtransparency); - else if (fastcmp(field,"curshield")) + break; + case player_curshield: lua_pushinteger(L, plr->curshield); - else if (fastcmp(field,"bubblecool")) + break; + case player_bubblecool: lua_pushinteger(L, plr->bubblecool); - else if (fastcmp(field,"bubbleblowup")) + break; + case player_bubbleblowup: lua_pushinteger(L, plr->bubbleblowup); - else if (fastcmp(field,"bubblepop")) + break; + case player_bubblepop: lua_pushinteger(L, plr->bubblepop); - else if (fastcmp(field,"flamedash")) + break; + case player_flamedash: lua_pushinteger(L, plr->flamedash); - else if (fastcmp(field,"flametimer")) + break; + case player_flametimer: lua_pushinteger(L, plr->flametimer); - else if (fastcmp(field,"flamestore")) + break; + case player_flamestore: lua_pushinteger(L, plr->flamestore); - else if (fastcmp(field,"hyudorotimer")) + break; + case player_hyudorotimer: lua_pushinteger(L, plr->hyudorotimer); - else if (fastcmp(field,"stealingtimer")) + break; + case player_stealingtimer: lua_pushinteger(L, plr->stealingtimer); - else if (fastcmp(field,"stolentimer")) + break; + case player_stolentimer: lua_pushinteger(L, plr->stolentimer); - else if (fastcmp(field,"sneakertimer")) + break; + case player_sneakertimer: lua_pushinteger(L, plr->sneakertimer); - else if (fastcmp(field,"floorboost")) + break; + case player_floorboost: lua_pushinteger(L, plr->floorboost); - else if (fastcmp(field,"growshrinktimer")) + break; + case player_growshrinktimer: lua_pushinteger(L, plr->growshrinktimer); - else if (fastcmp(field,"growcancel")) + break; + case player_growcancel: lua_pushinteger(L, plr->growcancel); - else if (fastcmp(field,"squishedtimer")) + break; + case player_squishedtimer: lua_pushinteger(L, plr->squishedtimer); - else if (fastcmp(field,"rocketsneakertimer")) + break; + case player_rocketsneakertimer: lua_pushinteger(L, plr->rocketsneakertimer); - else if (fastcmp(field,"invincibilitytimer")) + break; + case player_invincibilitytimer: lua_pushinteger(L, plr->invincibilitytimer); - else if (fastcmp(field,"eggmanexplode")) + break; + case player_eggmanexplode: lua_pushinteger(L, plr->eggmanexplode); - else if (fastcmp(field,"eggmanblame")) + break; + case player_eggmanblame: lua_pushinteger(L, plr->eggmanblame); - else if (fastcmp(field,"bananadrag")) + break; + case player_bananadrag: lua_pushinteger(L, plr->bananadrag); - else if (fastcmp(field,"lastjawztarget")) + break; + case player_lastjawztarget: lua_pushinteger(L, plr->lastjawztarget); - else if (fastcmp(field,"jawztargetdelay")) + break; + case player_jawztargetdelay: lua_pushinteger(L, plr->jawztargetdelay); - else if (fastcmp(field,"confirmVictim")) + break; + case player_confirmVictim: lua_pushinteger(L, plr->confirmVictim); - else if (fastcmp(field,"confirmVictimDelay")) + break; + case player_confirmVictimDelay: lua_pushinteger(L, plr->confirmVictimDelay); - else if (fastcmp(field,"glanceDir")) + break; + case player_glanceDir: lua_pushinteger(L, plr->glanceDir); - else if (fastcmp(field,"breathTimer")) + break; + case player_breathTimer: lua_pushinteger(L, plr->breathTimer); - else if (fastcmp(field,"lastsafelap")) + break; + case player_lastsafelap: lua_pushinteger(L, plr->lastsafelap); - else if (fastcmp(field,"laststarpost")) + break; + case player_lastsafestarpost: lua_pushinteger(L, plr->lastsafestarpost); - else if (fastcmp(field,"roundscore")) - plr->roundscore = luaL_checkinteger(L, 3); - else if (fastcmp(field,"marescore")) - plr->roundscore = luaL_checkinteger(L, 3); - else if (fastcmp(field,"emeralds")) + break; + case player_roundscore: + case player_marescore: + lua_pushinteger(L, plr->roundscore); + break; + case player_emeralds: lua_pushinteger(L, plr->emeralds); - else if (fastcmp(field,"bumpers")) + break; + case player_bumpers: lua_pushinteger(L, plr->bumper); - else if (fastcmp(field,"karmadelay")) + break; + case player_karmadelay: lua_pushinteger(L, plr->karmadelay); - else if (fastcmp(field,"pflags")) + break; + case player_pflags: { UINT32 pflags = plr->pflags; @@ -410,146 +864,204 @@ static int player_get(lua_State *L) pflags |= PF_SLIDING; lua_pushinteger(L, pflags); + break; } - else if (fastcmp(field,"panim")) + case player_panim: lua_pushinteger(L, plr->panim); - else if (fastcmp(field,"flashcount")) + break; + case player_flashcount: lua_pushinteger(L, plr->flashcount); - else if (fastcmp(field,"flashpal")) + break; + case player_flashpal: lua_pushinteger(L, plr->flashpal); - else if (fastcmp(field,"skincolor")) + break; + case player_skincolor: lua_pushinteger(L, plr->skincolor); - else if (fastcmp(field,"skin")) + break; + case player_skin: lua_pushinteger(L, plr->skin); - else if (fastcmp(field,"availabilities")) + break; + case player_availabilities: lua_pushinteger(L, plr->availabilities); - else if (fastcmp(field,"score")) + break; + case player_score: lua_pushinteger(L, plr->score); + break; // SRB2kart - else if (fastcmp(field,"kartspeed")) + case player_kartspeed: lua_pushinteger(L, plr->kartspeed); - else if (fastcmp(field,"kartweight")) + break; + case player_kartweight: lua_pushinteger(L, plr->kartweight); - else if (fastcmp(field,"followerskin")) + break; + case player_followerskin: lua_pushinteger(L, plr->followerskin); - else if (fastcmp(field,"followerready")) + break; + case player_followerready: lua_pushboolean(L, plr->followerready); - else if (fastcmp(field,"followercolor")) + break; + case player_followercolor: lua_pushinteger(L, plr->followercolor); - else if (fastcmp(field,"follower")) + break; + case player_follower: LUA_PushUserdata(L, plr->follower, META_MOBJ); + break; // - else if (fastcmp(field,"charflags")) + case player_charflags: lua_pushinteger(L, plr->charflags); - else if (fastcmp(field,"followitem")) + break; + case player_followitem: lua_pushinteger(L, plr->followitem); - else if (fastcmp(field,"followmobj")) + break; + case player_followmobj: LUA_PushUserdata(L, plr->followmobj, META_MOBJ); - else if (fastcmp(field,"lives")) + break; + case player_lives: lua_pushinteger(L, plr->lives); - else if (fastcmp(field,"xtralife")) + break; + case player_xtralife: lua_pushinteger(L, plr->xtralife); - else if (fastcmp(field,"speed")) + break; + case player_speed: lua_pushfixed(L, plr->speed); - else if (fastcmp(field,"lastspeed")) + break; + case player_lastspeed: lua_pushfixed(L, plr->lastspeed); - else if (fastcmp(field,"deadtimer")) + break; + case player_deadtimer: lua_pushinteger(L, plr->deadtimer); - else if (fastcmp(field,"exiting")) + break; + case player_exiting: lua_pushinteger(L, plr->exiting); - else if (fastcmp(field,"cmomx")) + break; + case player_cmomx: lua_pushfixed(L, plr->cmomx); - else if (fastcmp(field,"cmomy")) + break; + case player_cmomy: lua_pushfixed(L, plr->cmomy); - else if (fastcmp(field,"rmomx")) + break; + case player_rmomx: lua_pushfixed(L, plr->rmomx); - else if (fastcmp(field,"rmomy")) + break; + case player_rmomy: lua_pushfixed(L, plr->rmomy); - else if (fastcmp(field,"totalring")) + break; + case player_totalring: lua_pushinteger(L, plr->totalring); - else if (fastcmp(field,"realtime")) + break; + case player_realtime: lua_pushinteger(L, plr->realtime); - else if (fastcmp(field,"laps")) + break; + case player_laps: { if (lua_compatmode) lua_pushinteger(L, max(plr->laps - 1, 0)); else lua_pushinteger(L, plr->laps); + break; } - else if (fastcmp(field,"latestlap")) + case player_latestlap: { if (lua_compatmode) lua_pushinteger(L, max(plr->latestlap - 1, 0)); else lua_pushinteger(L, plr->latestlap); + break; } - else if (fastcmp(field,"ctfteam")) + case player_ctfteam: lua_pushinteger(L, plr->ctfteam); - else if (fastcmp(field,"checkskip")) + break; + case player_checkskip: lua_pushinteger(L, plr->checkskip); - else if (fastcmp(field,"starpostx")) + break; + case player_starpostx: lua_pushfixed(L, plr->starpostx); - else if (fastcmp(field,"starposty")) + break; + case player_starposty: lua_pushfixed(L, plr->starposty); - else if (fastcmp(field,"starpostz")) + break; + case player_starpostz: lua_pushfixed(L, plr->starpostz); - else if (fastcmp(field,"starpostangle")) + break; + case player_starpostangle: lua_pushangle(L, plr->starpostangle); - else if (fastcmp(field,"starpostflip")) + break; + case player_starpostflip: lua_pushboolean(L, plr->starpostflip); - else if (fastcmp(field,"starpostnum")) + break; + case player_starpostnum: lua_pushinteger(L, plr->starpostnum); - else if (fastcmp(field,"starposttime")) + break; + case player_starposttime: lua_pushinteger(L, plr->starposttime); - else if (fastcmp(field,"lastsidehit")) + break; + case player_lastsidehit: lua_pushinteger(L, plr->lastsidehit); - else if (fastcmp(field,"lastlinehit")) + break; + case player_lastlinehit: lua_pushinteger(L, plr->lastlinehit); - else if (fastcmp(field,"onconveyor")) + break; + case player_onconveyor: lua_pushinteger(L, plr->onconveyor); - else if (fastcmp(field,"awayviewmobj")) + break; + case player_awayviewmobj: LUA_PushUserdata(L, plr->awayviewmobj, META_MOBJ); - else if (fastcmp(field,"awayviewtics")) + break; + case player_awayviewtics: lua_pushinteger(L, plr->awayviewtics); - else if (fastcmp(field,"awayviewaiming")) + break; + case player_awayviewaiming: lua_pushangle(L, plr->awayviewaiming); - - else if (fastcmp(field,"spectator")) + break; + case player_spectator: lua_pushboolean(L, plr->spectator); - else if (fastcmp(field,"spectatewait")) + break; + case player_spectatewait: lua_pushinteger(L, plr->spectatewait); - else if (fastcmp(field,"bot")) + break; + case player_bot: lua_pushboolean(L, plr->bot); - else if (fastcmp(field,"jointime")) + break; + case player_jointime: lua_pushinteger(L, plr->jointime); - else if (fastcmp(field,"spectatorreentry")) + break; + case player_spectatorreentry: lua_pushinteger(L, plr->spectatorreentry); - else if (fastcmp(field,"grieftime")) + break; + case player_grieftime: lua_pushinteger(L, plr->grieftime); - else if (fastcmp(field,"griefstrikes")) + break; + case player_griefstrikes: lua_pushinteger(L, plr->griefstrikes); - else if (fastcmp(field,"splitscreenindex")) + break; + case player_splitscreenindex: lua_pushinteger(L, plr->splitscreenindex); - else if (fastcmp(field,"bumpertime")) + break; + case player_bumpertime: lua_pushinteger(L, plr->bumpertime); -#ifdef HWRENDER - else if (fastcmp(field,"fovadd")) - lua_pushfixed(L, plr->fovadd); -#endif - else if (fastcmp(field,"ping")) + break; + case player_ping: lua_pushinteger(L, playerpingtable[( plr - players )]); - else { + break; +#ifdef HWRENDER + case player_fovadd: + lua_pushfixed(L, plr->fovadd); + break; +#endif + default: lua_getfield(L, LUA_REGISTRYINDEX, LREG_EXTVARS); I_Assert(lua_istable(L, -1)); lua_pushlightuserdata(L, plr); lua_rawget(L, -2); if (!lua_istable(L, -1)) { // no extra values table - CONS_Debug(DBG_LUA, M_GetText("'%s' has no extvars table or field named '%s'; returning nil.\n"), "player_t", field); + CONS_Debug(DBG_LUA, M_GetText("'%s' has no extvars table or field named '%s'; returning nil.\n"), "player_t", lua_tostring(L, 2)); return 0; } - lua_getfield(L, -1, field); + lua_pushvalue(L, 2); // field name + lua_gettable(L, -2); if (lua_isnil(L, -1)) // no value for this field - CONS_Debug(DBG_LUA, M_GetText("'%s' has no field named '%s'; returning nil.\n"), "player_t", field); + CONS_Debug(DBG_LUA, M_GetText("'%s' has no field named '%s'; returning nil.\n"), "player_t", lua_tostring(L, 2)); + break; } return 1; @@ -559,7 +1071,7 @@ static int player_get(lua_State *L) static int player_set(lua_State *L) { player_t *plr = *((player_t **)luaL_checkudata(L, 1, META_PLAYER)); - const char *field = luaL_checkstring(L, 2); + enum player_e field = Lua_optoption(L, 2, player_opt[player_cmd], player_opt); if (!plr) return LUA_ErrInvalid(L, "player_t"); @@ -568,24 +1080,34 @@ static int player_set(lua_State *L) if (hook_cmd_running) return luaL_error(L, "Do not alter player_t in CMD building code!"); - if (fastcmp(field,"mo")) { + switch (field) + { + case player_mo: + case player_realmo: + { mobj_t *newmo = *((mobj_t **)luaL_checkudata(L, 3, META_MOBJ)); plr->mo->player = NULL; // remove player pointer from old mobj (newmo->player = plr)->mo = newmo; // set player pointer for new mobj, and set new mobj as the player's mobj + break; } - else if (fastcmp(field,"cmd")) + case player_cmd: return NOSET; - else if (fastcmp(field,"oldcmd")) + case player_oldcmd: return NOSET; - else if (fastcmp(field,"playerstate")) + case player_playerstate: plr->playerstate = luaL_checkinteger(L, 3); - else if (fastcmp(field,"viewz")) + break; + case player_viewz: plr->viewz = luaL_checkfixed(L, 3); - else if (fastcmp(field,"viewheight")) + break; + case player_viewheight: plr->viewheight = luaL_checkfixed(L, 3); - else if (fastcmp(field,"viewrollangle")) + break; + case player_viewrollangle: plr->viewrollangle = luaL_checkangle(L, 3); - else if (fastcmp(field,"aiming")) { + break; + case player_aiming: + { UINT8 i; plr->aiming = luaL_checkangle(L, 3); for (i = 0; i <= r_splitscreen; i++) @@ -596,16 +1118,19 @@ static int player_set(lua_State *L) break; } } + break; } - else if (fastcmp(field,"drawangle") || (lua_compatmode && fastcmp(field,"frameangle"))) + case player_drawangle: + case player_frameangle: { angle_t angle = luaL_checkangle(L, 3); if (lua_compatmode && plr->mo && angle == plr->mo->angle) // attempt to fix e.g. acrobasics not accounting for drift when resetting frameangle angle += K_GetDriftAngleOffset(plr); plr->drawangle = angle; + break; } - else if (fastcmp(field,"pflags")) + case player_pflags: { UINT32 pflags = luaL_checkinteger(L, 3); @@ -618,262 +1143,379 @@ static int player_set(lua_State *L) } plr->pflags = pflags; + break; } - else if (fastcmp(field,"panim")) + case player_panim: plr->panim = luaL_checkinteger(L, 3); - else if (fastcmp(field,"flashcount")) + break; + case player_flashcount: plr->flashcount = luaL_checkinteger(L, 3); - else if (fastcmp(field,"flashpal")) + break; + case player_flashpal: plr->flashpal = luaL_checkinteger(L, 3); - else if (fastcmp(field,"skincolor")) + break; + case player_skincolor: { UINT16 newcolor = luaL_checkinteger(L,3); if (newcolor >= numskincolors) return luaL_error(L, "player.skincolor %d out of range (0 - %d).", newcolor, numskincolors-1); plr->skincolor = newcolor; + break; } - else if (fastcmp(field,"skin")) + case player_skin: return NOSET; - else if (fastcmp(field,"availabilities")) + case player_availabilities: return NOSET; - else if (fastcmp(field,"score")) + case player_score: plr->score = luaL_checkinteger(L, 3); + break; // SRB2kart - else if (fastcmp(field,"kartstuff")) + case player_kartstuff: return NOSET; - else if (fastcmp(field,"nocontrol")) + case player_nocontrol: plr->nocontrol = luaL_checkinteger(L, 3); - else if (fastcmp(field,"carry")) + break; + case player_carry: plr->carry = luaL_checkinteger(L, 3); - else if (fastcmp(field,"dye")) + break; + case player_dye: plr->dye = luaL_checkinteger(L, 3); - else if (fastcmp(field,"position")) + break; + case player_position: plr->position = luaL_checkinteger(L, 3); - else if (fastcmp(field,"oldposition")) + break; + case player_oldposition: plr->oldposition = luaL_checkinteger(L, 3); - else if (fastcmp(field,"positiondelay")) + break; + case player_positiondelay: plr->positiondelay = luaL_checkinteger(L, 3); - else if (fastcmp(field,"prevcheck")) + break; + case player_prevcheck: plr->prevcheck = luaL_checkinteger(L, 3); - else if (fastcmp(field,"nextcheck")) + break; + case player_nextcheck: plr->nextcheck = luaL_checkinteger(L, 3); - else if (fastcmp(field,"distancetofinish")) + break; + case player_distancetofinish: return NOSET; - else if (fastcmp(field,"distancetofinishprev")) + case player_distancetofinishprev: return NOSET; - else if (fastcmp(field,"airtime")) + case player_airtime: plr->airtime = luaL_checkinteger(L, 3); - else if (fastcmp(field,"flashing")) + break; + case player_flashing: plr->flashing = luaL_checkinteger(L, 3); - else if (fastcmp(field,"spinouttimer")) + break; + case player_spinouttimer: plr->spinouttimer = luaL_checkinteger(L, 3); - else if (fastcmp(field,"spinouttype")) + break; + case player_spinouttype: plr->spinouttype = luaL_checkinteger(L, 3); - else if (fastcmp(field,"instashield")) + break; + case player_instashield: plr->instashield = luaL_checkinteger(L, 3); - else if (fastcmp(field,"wipeoutslow")) + break; + case player_wipeoutslow: plr->wipeoutslow = luaL_checkinteger(L, 3); - else if (fastcmp(field,"justbumped")) + break; + case player_justbumped: plr->justbumped = luaL_checkinteger(L, 3); - else if (fastcmp(field,"itemflags")) + break; + case player_itemflags: plr->itemflags = luaL_checkinteger(L, 3); - else if (fastcmp(field,"drift")) + break; + case player_drift: plr->drift = luaL_checkinteger(L, 3); - else if (fastcmp(field,"driftcharge")) + break; + case player_driftcharge: plr->driftcharge = luaL_checkinteger(L, 3); - else if (fastcmp(field,"driftboost")) + break; + case player_driftboost: plr->driftboost = luaL_checkinteger(L, 3); - else if (fastcmp(field,"boostcharge")) + break; + case player_boostcharge: plr->boostcharge = luaL_checkinteger(L, 3); - else if (fastcmp(field,"startboost")) + break; + case player_startboost: plr->startboost = luaL_checkinteger(L, 3); - else if (fastcmp(field,"dropdash")) + break; + case player_dropdash: plr->dropdash = luaL_checkinteger(L, 3); - else if (fastcmp(field,"respawn")) + break; + case player_respawn: plr->respawn = luaL_checkinteger(L, 3); - else if (fastcmp(field,"aizdriftstrat")) + break; + case player_aizdriftstrat: plr->aizdriftstrat = luaL_checkinteger(L, 3); - else if (fastcmp(field,"aizdrifttilt")) + break; + case player_aizdrifttilt: plr->aizdrifttilt = luaL_checkinteger(L, 3); - else if (fastcmp(field,"aizdriftturn")) + break; + case player_aizdriftturn: plr->aizdriftturn = luaL_checkinteger(L, 3); - else if (fastcmp(field,"offroad")) + break; + case player_offroad: plr->offroad = luaL_checkinteger(L, 3); - else if (fastcmp(field,"pogospring")) + break; + case player_pogospring: plr->pogospring = luaL_checkinteger(L, 3); - else if (fastcmp(field,"brakestop")) + break; + case player_brakestop: plr->brakestop = luaL_checkinteger(L, 3); - else if (fastcmp(field,"waterskip")) + break; + case player_waterskip: plr->waterskip = luaL_checkinteger(L, 3); - else if (fastcmp(field,"dashpadcooldown")) + break; + case player_dashpadcooldown: plr->dashpadcooldown = luaL_checkinteger(L, 3); - else if (fastcmp(field,"boostpower")) + break; + case player_boostpower: plr->boostpower = luaL_checkinteger(L, 3); - else if (fastcmp(field,"speedboost")) + break; + case player_speedboost: plr->speedboost = luaL_checkinteger(L, 3); - else if (fastcmp(field,"accelboost")) + break; + case player_accelboost: plr->accelboost = luaL_checkinteger(L, 3); - else if (fastcmp(field,"boostangle")) + break; + case player_boostangle: plr->boostangle = luaL_checkangle(L, 3); - else if (fastcmp(field,"tripwireState")) + break; + case player_tripwireState: plr->tripwireState = luaL_checkinteger(L, 3); - else if (fastcmp(field,"tripwirePass")) + break; + case player_tripwirePass: plr->tripwirePass = luaL_checkinteger(L, 3); - else if (fastcmp(field,"tripwireLeniency")) + break; + case player_tripwireLeniency: plr->tripwireLeniency = luaL_checkinteger(L, 3); - else if (fastcmp(field,"tripwireReboundDelay")) + break; + case player_tripwireReboundDelay: plr->tripwireReboundDelay = luaL_checkinteger(L, 3); - else if (fastcmp(field,"itemroulette")) + break; + case player_itemroulette: plr->itemroulette = luaL_checkinteger(L, 3); - else if (fastcmp(field,"roulettetype")) + break; + case player_itemblink: + plr->itemblink = luaL_checkinteger(L, 3); + break; + case player_itemblinkmode: + plr->itemblinkmode = luaL_checkinteger(L, 3); + break; + case player_roulettetype: plr->roulettetype = luaL_checkinteger(L, 3); - else if (fastcmp(field,"itemtype")) + break; + case player_itemtype: plr->itemtype = luaL_checkinteger(L, 3); - else if (fastcmp(field,"itemamount")) + break; + case player_itemamount: plr->itemamount = luaL_checkinteger(L, 3); - else if (fastcmp(field,"throwdir")) + break; + case player_throwdir: plr->throwdir = luaL_checkinteger(L, 3); - else if (fastcmp(field,"sadtimer")) + break; + case player_sadtimer: plr->sadtimer = luaL_checkinteger(L, 3); - else if (fastcmp(field,"rings")) + break; + case player_rings: plr->rings = luaL_checkinteger(L, 3); - else if (fastcmp(field,"pickuprings")) + break; + case player_pickuprings: plr->pickuprings = luaL_checkinteger(L, 3); - else if (fastcmp(field,"ringdelay")) + break; + case player_ringdelay: plr->ringdelay = luaL_checkinteger(L, 3); - else if (fastcmp(field,"ringboost")) + break; + case player_ringboost: plr->ringboost = luaL_checkinteger(L, 3); - else if (fastcmp(field,"superring")) + break; + case player_superring: plr->superring = luaL_checkinteger(L, 3); - else if (fastcmp(field,"nextringaward")) + break; + case player_nextringaward: plr->nextringaward = luaL_checkinteger(L, 3); - else if (fastcmp(field,"ringvolume")) + break; + case player_ringvolume: plr->ringvolume = luaL_checkinteger(L, 3); - else if (fastcmp(field,"ringtransparency")) + break; + case player_ringtransparency: plr->ringtransparency = luaL_checkinteger(L, 3); - else if (fastcmp(field,"curshield")) + break; + case player_curshield: plr->curshield = luaL_checkinteger(L, 3); - else if (fastcmp(field,"bubblecool")) + break; + case player_bubblecool: plr->bubblecool = luaL_checkinteger(L, 3); - else if (fastcmp(field,"bubbleblowup")) + break; + case player_bubbleblowup: plr->bubbleblowup = luaL_checkinteger(L, 3); - else if (fastcmp(field,"bubblepop")) + break; + case player_bubblepop: plr->bubblepop = luaL_checkinteger(L, 3); - else if (fastcmp(field,"flamedash")) + break; + case player_flamedash: plr->flamedash = luaL_checkinteger(L, 3); - else if (fastcmp(field,"flametimer")) + break; + case player_flametimer: plr->flametimer = luaL_checkinteger(L, 3); - else if (fastcmp(field,"flamestore")) + break; + case player_flamestore: plr->flamestore = luaL_checkinteger(L, 3); - else if (fastcmp(field,"hyudorotimer")) + break; + case player_hyudorotimer: plr->hyudorotimer = luaL_checkinteger(L, 3); - else if (fastcmp(field,"stealingtimer")) + break; + case player_stealingtimer: plr->stealingtimer = luaL_checkinteger(L, 3); - else if (fastcmp(field,"stolentimer")) + break; + case player_stolentimer: plr->stealingtimer = luaL_checkinteger(L, 3); - else if (fastcmp(field,"sneakertimer")) + break; + case player_sneakertimer: plr->sneakertimer = luaL_checkinteger(L, 3); - else if (fastcmp(field,"floorboost")) + break; + case player_floorboost: plr->floorboost = luaL_checkinteger(L, 3); - else if (fastcmp(field,"growshrinktimer")) + break; + case player_growshrinktimer: plr->growshrinktimer = luaL_checkinteger(L, 3); - else if (fastcmp(field,"growcancel")) + break; + case player_growcancel: plr->growcancel = luaL_checkinteger(L, 3); - else if (fastcmp(field,"squishedtimer")) + break; + case player_squishedtimer: plr->squishedtimer = luaL_checkinteger(L, 3); - else if (fastcmp(field,"rocketsneakertimer")) + break; + case player_rocketsneakertimer: plr->rocketsneakertimer = luaL_checkinteger(L, 3); - else if (fastcmp(field,"invincibilitytimer")) + break; + case player_invincibilitytimer: plr->invincibilitytimer = luaL_checkinteger(L, 3); - else if (fastcmp(field,"eggmanexplode")) + break; + case player_eggmanexplode: plr->eggmanexplode = luaL_checkinteger(L, 3); - else if (fastcmp(field,"eggmanblame")) + break; + case player_eggmanblame: plr->eggmanblame = luaL_checkinteger(L, 3); - else if (fastcmp(field,"bananadrag")) + break; + case player_bananadrag: plr->bananadrag = luaL_checkinteger(L, 3); - else if (fastcmp(field,"lastjawztarget")) + break; + case player_lastjawztarget: plr->lastjawztarget = luaL_checkinteger(L, 3); - else if (fastcmp(field,"jawztargetdelay")) + break; + case player_jawztargetdelay: plr->jawztargetdelay = luaL_checkinteger(L, 3); - else if (fastcmp(field,"confirmVictim")) + break; + case player_confirmVictim: plr->confirmVictim = luaL_checkinteger(L, 3); - else if (fastcmp(field,"confirmVictimDelay")) + break; + case player_confirmVictimDelay: plr->confirmVictimDelay = luaL_checkinteger(L, 3); - else if (fastcmp(field,"glanceDir")) + break; + case player_glanceDir: plr->glanceDir = luaL_checkinteger(L, 3); - else if (fastcmp(field,"breathTimer")) + break; + case player_breathTimer: plr->breathTimer = luaL_checkinteger(L, 3); - else if (fastcmp(field,"lastsafelap")) + break; + case player_lastsafelap: plr->lastsafelap = luaL_checkinteger(L, 3); - else if (fastcmp(field,"lastsafestarpost")) + break; + case player_lastsafestarpost: plr->lastsafestarpost = luaL_checkinteger(L, 3); - else if (fastcmp(field,"roundscore")) - lua_pushinteger(L, plr->roundscore); - else if (fastcmp(field,"marescore")) - lua_pushinteger(L, plr->roundscore); - else if (fastcmp(field,"emeralds")) + break; + case player_roundscore: + case player_marescore: + plr->roundscore = luaL_checkinteger(L, 3); + break; + case player_emeralds: plr->emeralds = luaL_checkinteger(L, 3); - else if (fastcmp(field,"bumpers")) + break; + case player_bumpers: plr->bumper = luaL_checkinteger(L, 3); - else if (fastcmp(field,"karmadelay")) + break; + case player_karmadelay: plr->karmadelay = luaL_checkinteger(L, 3); - else if (fastcmp(field,"kartspeed")) + break; + case player_kartspeed: plr->kartspeed = luaL_checkinteger(L, 3); - else if (fastcmp(field,"kartweight")) + break; + case player_kartweight: plr->kartweight = luaL_checkinteger(L, 3); - else if (fastcmp(field,"followerskin")) + break; + case player_followerskin: plr->followerskin = luaL_checkinteger(L, 3); - else if (fastcmp(field,"followercolor")) + break; + case player_followercolor: plr->followercolor = luaL_checkinteger(L, 3); - else if (fastcmp(field,"followerready")) + break; + case player_followerready: plr->followerready = luaL_checkboolean(L, 3); - else if (fastcmp(field,"follower")) // it's probably best we don't allow the follower mobj to change. + break; + case player_follower: // it's probably best we don't allow the follower mobj to change. return NOSET; // - else if (fastcmp(field,"charflags")) + case player_charflags: plr->charflags = (UINT32)luaL_checkinteger(L, 3); - else if (fastcmp(field,"followitem")) + break; + case player_followitem: plr->followitem = luaL_checkinteger(L, 3); - else if (fastcmp(field,"followmobj")) + break; + case player_followmobj: { mobj_t *mo = NULL; if (!lua_isnil(L, 3)) mo = *((mobj_t **)luaL_checkudata(L, 3, META_MOBJ)); P_SetTarget(&plr->followmobj, mo); + break; } - else if (fastcmp(field,"lives")) + case player_lives: plr->lives = (SINT8)luaL_checkinteger(L, 3); - else if (fastcmp(field,"xtralife")) + break; + case player_xtralife: plr->xtralife = (SINT8)luaL_checkinteger(L, 3); - else if (fastcmp(field,"speed")) + break; + case player_speed: plr->speed = luaL_checkfixed(L, 3); - else if (fastcmp(field,"lastspeed")) + break; + case player_lastspeed: plr->lastspeed = luaL_checkfixed(L, 3); - else if (fastcmp(field,"deadtimer")) + break; + case player_deadtimer: plr->deadtimer = (INT32)luaL_checkinteger(L, 3); - else if (fastcmp(field,"exiting")) + break; + case player_exiting: plr->exiting = (tic_t)luaL_checkinteger(L, 3); - else if (fastcmp(field,"cmomx")) + break; + case player_cmomx: plr->cmomx = luaL_checkfixed(L, 3); - else if (fastcmp(field,"cmomy")) + break; + case player_cmomy: plr->cmomy = luaL_checkfixed(L, 3); - else if (fastcmp(field,"rmomx")) + break; + case player_rmomx: plr->rmomx = luaL_checkfixed(L, 3); - else if (fastcmp(field,"rmomy")) + break; + case player_rmomy: plr->rmomy = luaL_checkfixed(L, 3); - else if (fastcmp(field,"totalring")) + break; + case player_totalring: plr->totalring = (INT16)luaL_checkinteger(L, 3); - else if (fastcmp(field,"realtime")) + break; + case player_realtime: plr->realtime = (tic_t)luaL_checkinteger(L, 3); - else if (fastcmp(field,"laps")) + break; + case player_laps: { UINT8 laps = (UINT8)luaL_checkinteger(L, 3); if (lua_compatmode) plr->laps = max(laps +1, 0); else plr->laps = laps; + break; } - else if (fastcmp(field,"latestlap")) + case player_latestlap: { UINT8 laps = (UINT8)luaL_checkinteger(L, 3); @@ -881,69 +1523,93 @@ static int player_set(lua_State *L) plr->latestlap = max(laps + 1, 0); else plr->latestlap = laps; + break; } - else if (fastcmp(field,"ctfteam")) + case player_ctfteam: plr->ctfteam = (INT32)luaL_checkinteger(L, 3); - else if (fastcmp(field,"checkskip")) + break; + case player_checkskip: plr->checkskip = (INT32)luaL_checkinteger(L, 3); - else if (fastcmp(field,"starpostx")) + break; + case player_starpostx: plr->starpostx = luaL_checkfixed(L, 3); - else if (fastcmp(field,"starposty")) + break; + case player_starposty: plr->starposty = luaL_checkfixed(L, 3); - else if (fastcmp(field,"starpostz")) + break; + case player_starpostz: plr->starpostz = luaL_checkfixed(L, 3); - else if (fastcmp(field,"starpostangle")) + break; + case player_starpostangle: plr->starpostangle = luaL_checkangle(L, 3); - else if (fastcmp(field,"starpostflip")) + break; + case player_starpostflip: plr->starpostflip = luaL_checkboolean(L, 3); - else if (fastcmp(field,"starpostnum")) + break; + case player_starpostnum: plr->starpostnum = (INT32)luaL_checkinteger(L, 3); - else if (fastcmp(field,"starposttime")) + break; + case player_starposttime: plr->starposttime = (tic_t)luaL_checkinteger(L, 3); - else if (fastcmp(field,"lastsidehit")) + break; + case player_lastsidehit: plr->lastsidehit = (INT16)luaL_checkinteger(L, 3); - else if (fastcmp(field,"lastlinehit")) + break; + case player_lastlinehit: plr->lastlinehit = (INT16)luaL_checkinteger(L, 3); - else if (fastcmp(field,"onconveyor")) + break; + case player_onconveyor: plr->onconveyor = (INT32)luaL_checkinteger(L, 3); - else if (fastcmp(field,"awayviewmobj")) + break; + case player_awayviewmobj: { mobj_t *mo = NULL; if (!lua_isnil(L, 3)) mo = *((mobj_t **)luaL_checkudata(L, 3, META_MOBJ)); P_SetTarget(&plr->awayviewmobj, mo); + break; } - else if (fastcmp(field,"awayviewtics")) + case player_awayviewtics: { plr->awayviewtics = (INT32)luaL_checkinteger(L, 3); if (plr->awayviewtics && !plr->awayviewmobj) // awayviewtics must ALWAYS have an awayviewmobj set!! P_SetTarget(&plr->awayviewmobj, plr->mo); // but since the script might set awayviewmobj immediately AFTER setting awayviewtics, use player mobj as filler for now. + break; } - else if (fastcmp(field,"awayviewaiming")) + case player_awayviewaiming: plr->awayviewaiming = luaL_checkangle(L, 3); - else if (fastcmp(field,"spectator")) + break; + case player_spectator: plr->spectator = lua_toboolean(L, 3); - else if (fastcmp(field,"spectatewait")) + break; + case player_spectatewait: plr->spectatewait = luaL_checkinteger(L, 3); - else if (fastcmp(field,"bot")) + break; + case player_bot: return NOSET; - else if (fastcmp(field,"jointime")) + case player_jointime: plr->jointime = (tic_t)luaL_checkinteger(L, 3); - else if (fastcmp(field,"spectatorreentry")) + break; + case player_spectatorreentry: plr->spectatorreentry = (tic_t)luaL_checkinteger(L, 3); - else if (fastcmp(field,"grieftime")) + break; + case player_grieftime: plr->grieftime = (tic_t)luaL_checkinteger(L, 3); - else if (fastcmp(field,"griefstrikes")) + break; + case player_griefstrikes: plr->griefstrikes = (UINT8)luaL_checkinteger(L, 3); - else if (fastcmp(field,"splitscreenindex")) + break; + case player_splitscreenindex: return NOSET; - else if (fastcmp(field,"bumpertime")) + case player_bumpertime: plr->bumpertime = (tic_t)luaL_checkinteger(L, 3); + break; #ifdef HWRENDER - else if (fastcmp(field,"fovadd")) + case player_fovadd: plr->fovadd = luaL_checkfixed(L, 3); + break; #endif - else { + default: lua_getfield(L, LUA_REGISTRYINDEX, LREG_EXTVARS); I_Assert(lua_istable(L, -1)); lua_pushlightuserdata(L, plr); @@ -951,15 +1617,17 @@ static int player_set(lua_State *L) if (lua_isnil(L, -1)) { // This index doesn't have a table for extra values yet, let's make one. lua_pop(L, 1); - CONS_Debug(DBG_LUA, M_GetText("'%s' has no field named '%s'; adding it as Lua data.\n"), "player_t", field); + CONS_Debug(DBG_LUA, M_GetText("'%s' has no field named '%s'; adding it as Lua data.\n"), "player_t", lua_tostring(L, 2)); lua_newtable(L); lua_pushlightuserdata(L, plr); lua_pushvalue(L, -2); // ext value table lua_rawset(L, -4); // LREG_EXTVARS table } + lua_pushvalue(L, 2); // key lua_pushvalue(L, 3); // value to store - lua_setfield(L, -2, field); + lua_settable(L, -3); lua_pop(L, 2); + break; } return 0; @@ -992,12 +1660,6 @@ static int power_get(lua_State *L) case pw_nocontrol: lua_pushinteger(L, plr->nocontrol); return 1; - case pw_ingoop: - if (plr->mo) - lua_pushinteger(L, P_IsObjectInGoop(plr->mo)); - else - lua_pushinteger(L, 0); - return 1; default: lua_pushinteger(L, powers[p]); return 1; @@ -1027,8 +1689,6 @@ static int power_set(lua_State *L) case pw_nocontrol: plr->nocontrol = i; break; - case pw_ingoop: - return NOSET; default: powers[p] = i; break; @@ -1112,7 +1772,6 @@ static int kartstuff_get(lua_State *L) case k_enginesnd: lua_pushinteger(L, plr->karthud[khud_enginesnd]); return 1; - case k_floorboost: lua_pushinteger(L, plr->floorboost); return 1; @@ -1274,10 +1933,10 @@ static int kartstuff_get(lua_State *L) // v1.0.2+ vars case k_itemblink: - lua_pushinteger(L, plr->karthud[khud_itemblink]); + lua_pushinteger(L, plr->itemblink); return 1; case k_itemblinkmode: - lua_pushinteger(L, plr->karthud[khud_itemblinkmode]); + lua_pushinteger(L, plr->itemblinkmode); return 1; case k_getsparks: lua_pushinteger(L, (plr->pflags & PF_GETSPARKS)); @@ -1291,9 +1950,9 @@ static int kartstuff_get(lua_State *L) case k_growcancel: lua_pushinteger(L, plr->growcancel); return 1; - default: - return luaL_error(L, LUA_QL("kartstufftype_t") " cannot be %u", ks); + lua_pushinteger(L, kartstuff[ks]); + return 1; } return 1; @@ -1537,10 +2196,10 @@ static int kartstuff_set(lua_State *L) // v1.0.2+ vars case k_itemblink: - plr->karthud[khud_itemblink] = i; + plr->itemblink = i; break; case k_itemblinkmode: - plr->karthud[khud_itemblinkmode] = i; + plr->itemblinkmode = i; break; case k_getsparks: if (i > 0) @@ -1555,9 +2214,9 @@ static int kartstuff_set(lua_State *L) case k_growcancel: plr->growcancel = i; break; - default: - return luaL_error(L, LUA_QL("kartstufftype_t") " cannot be %u", ks); + kartstuff[ks] = i; + break; } return 0; @@ -1608,37 +2267,80 @@ static int karthud_len(lua_State *L) #define NOFIELD luaL_error(L, LUA_QL("ticcmd_t") " has no field named " LUA_QS, field) #define NOSET luaL_error(L, LUA_QL("ticcmd_t") " field " LUA_QS " cannot be set.", field) +enum ticcmd_e +{ + ticcmd_forwardmove, + ticcmd_sidemove, + ticcmd_turning, + ticcmd_driftturn, + ticcmd_angle, + ticcmd_angleturn, + ticcmd_throwdir, + ticcmd_aiming, + ticcmd_buttons, + ticcmd_latency, + ticcmd_flags, +}; + +static const char *const ticcmd_opt[] = { + "forwardmove", + "sidemove", + "turning", + "driftturn", + "angle", + "angleturn", + "throwdir", + "aiming", + "buttons", + "latency", + "flags", + NULL, +}; + static int ticcmd_get(lua_State *L) { ticcmd_t *cmd = *((ticcmd_t **)luaL_checkudata(L, 1, META_TICCMD)); - const char *field = luaL_checkstring(L, 2); + enum ticcmd_e field = Lua_optoption(L, 2, NULL, ticcmd_opt); if (!cmd) return LUA_ErrInvalid(L, "player_t"); - if (fastcmp(field,"forwardmove")) + if (field == (enum ticcmd_e)-1) + return LUA_ErrInvalid(L, "fields"); + + switch (field) + { + case ticcmd_forwardmove: lua_pushinteger(L, cmd->forwardmove); - else if (fastcmp(field,"sidemove")) + break; + case ticcmd_sidemove: lua_pushinteger(L, cmd->sidemove); - else if (fastcmp(field,"turning")) + break; + case ticcmd_turning: + case ticcmd_driftturn: lua_pushinteger(L, cmd->turning); - else if (fastcmp(field,"driftturn")) - lua_pushinteger(L, cmd->turning); - else if (fastcmp(field,"angle")) + break; + case ticcmd_angle: + case ticcmd_angleturn: lua_pushinteger(L, cmd->angle); - else if (fastcmp(field,"angleturn")) - lua_pushinteger(L, cmd->angle); - else if (fastcmp(field,"throwdir")) + break; + case ticcmd_throwdir: lua_pushinteger(L, cmd->throwdir); - else if (fastcmp(field,"aiming")) + break; + case ticcmd_aiming: lua_pushinteger(L, cmd->aiming); - else if (fastcmp(field,"buttons")) + break; + case ticcmd_buttons: lua_pushinteger(L, cmd->buttons); - else if (fastcmp(field,"latency")) + break; + case ticcmd_latency: lua_pushinteger(L, cmd->latency); - else if (fastcmp(field,"flags")) + break; + case ticcmd_flags: lua_pushinteger(L, cmd->flags); - else + break; + default: return NOFIELD; + } return 1; } @@ -1646,37 +2348,45 @@ static int ticcmd_get(lua_State *L) static int ticcmd_set(lua_State *L) { ticcmd_t *cmd = *((ticcmd_t **)luaL_checkudata(L, 1, META_TICCMD)); - const char *field = luaL_checkstring(L, 2); + enum ticcmd_e field = Lua_optoption(L, 2, ticcmd_opt[0], ticcmd_opt); if (!cmd) return LUA_ErrInvalid(L, "ticcmd_t"); if (hud_running) return luaL_error(L, "Do not alter player_t in HUD rendering code!"); - if (fastcmp(field,"forwardmove")) + switch (field) + { + case ticcmd_forwardmove: cmd->forwardmove = (SINT8)luaL_checkinteger(L, 3); - else if (fastcmp(field,"sidemove")) + break; + case ticcmd_sidemove: cmd->sidemove = (SINT8)luaL_checkinteger(L, 3); - else if (fastcmp(field,"turning")) + break; + case ticcmd_turning: + case ticcmd_driftturn: cmd->turning = (INT16)luaL_checkinteger(L, 3); - else if (fastcmp(field,"driftturn")) - cmd->turning = (INT16)luaL_checkinteger(L, 3); - else if (fastcmp(field,"angle")) + break; + case ticcmd_angle: + case ticcmd_angleturn: cmd->angle = (INT16)luaL_checkinteger(L, 3); - else if (fastcmp(field,"angleturn")) - cmd->angle = (INT16)luaL_checkinteger(L, 3); - else if (fastcmp(field,"throwdir")) + break; + case ticcmd_throwdir: cmd->throwdir = (INT16)luaL_checkinteger(L, 3); - else if (fastcmp(field,"aiming")) + break; + case ticcmd_aiming: cmd->aiming = (INT16)luaL_checkinteger(L, 3); - else if (fastcmp(field,"buttons")) + break; + case ticcmd_buttons: cmd->buttons = (UINT16)luaL_checkinteger(L, 3); - else if (fastcmp(field,"latency")) + break; + case ticcmd_latency: return NOSET; - else if (fastcmp(field,"flags")) + case ticcmd_flags: return NOSET; - else + default: return NOFIELD; + } return 0; } diff --git a/src/m_fixed.c b/src/m_fixed.c index 09d6936f2..c95978070 100644 --- a/src/m_fixed.c +++ b/src/m_fixed.c @@ -23,50 +23,6 @@ #include "m_fixed.h" #include "tables.h" // ANGLETOFINESHIFT -#ifdef __USE_C_FIXEDMUL__ - -/** \brief The FixedMul function - - \param a fixed_t number - \param b fixed_t number - - \return a*b>>FRACBITS - -*/ -fixed_t FixedMul(fixed_t a, fixed_t b) -{ - // Need to cast to unsigned before shifting to avoid undefined behaviour - // for negative integers - return (fixed_t)(((UINT64)((INT64)a * b)) >> FRACBITS); -} - -#endif //__USE_C_FIXEDMUL__ - -#ifdef __USE_C_FIXEDDIV__ -/** \brief The FixedDiv2 function - - \param a fixed_t number - \param b fixed_t number - - \return a/b * FRACUNIT - -*/ -fixed_t FixedDiv2(fixed_t a, fixed_t b) -{ - INT64 ret; - - if (b == 0) - I_Error("FixedDiv: divide by zero"); - - ret = (((INT64)a * FRACUNIT)) / b; - - if ((ret > INT32_MAX) || (ret < INT32_MIN)) - I_Error("FixedDiv: divide by zero"); - return (fixed_t)ret; -} - -#endif // __USE_C_FIXEDDIV__ - fixed_t FixedSqrt(fixed_t x) { #ifdef HAVE_SQRT diff --git a/src/m_fixed.h b/src/m_fixed.h index 57dde19bd..c8fb01b88 100644 --- a/src/m_fixed.h +++ b/src/m_fixed.h @@ -63,127 +63,35 @@ FUNCMATH FUNCINLINE static ATTRINLINE fixed_t FloatToFixed(float f) #define FIXED_TO_FLOAT(x) FixedToFloat(x) // (((float)(x)) / ((float)FRACUNIT)) #define FLOAT_TO_FIXED(f) FloatToFixed(f) // (fixed_t)((f) * ((float)FRACUNIT)) +/** \brief The FixedMul function -#if defined (__WATCOMC__) && FRACBITS == 16 - #pragma aux FixedMul = \ - "imul ebx", \ - "shrd eax,edx,16" \ - parm [eax] [ebx] \ - value [eax] \ - modify exact [eax edx] + \param a fixed_t number + \param b fixed_t number - #pragma aux FixedDiv2 = \ - "cdq", \ - "shld edx,eax,16", \ - "sal eax,16", \ - "idiv ebx" \ - parm [eax] [ebx] \ - value [eax] \ - modify exact [eax edx] -#elif defined (__GNUC__) && defined (__i386__) && !defined (NOASM) - // i386 linux, cygwin or mingw - FUNCMATH FUNCINLINE static inline fixed_t FixedMul(fixed_t a, fixed_t b) // asm - { - fixed_t ret; - asm - ( - "imull %2;" // a*b - "shrdl %3,%%edx,%0;" // shift logical right FRACBITS bits - :"=a" (ret) // eax is always the result and the first operand (%0,%1) - :"0" (a), "r" (b) // and %2 is what we use imull on with what in %1 - , "I" (FRACBITS) // %3 holds FRACBITS (normally 16) - :"cc", "%edx" // edx and condition codes clobbered - ); - return ret; - } + \return a*b>>FRACBITS - FUNCMATH FUNCINLINE static inline fixed_t FixedDiv2(fixed_t a, fixed_t b) - { - fixed_t ret; - asm - ( - "movl %1,%%edx;" // these two instructions allow the next two to pair, on the Pentium processor. - "sarl $31,%%edx;" // shift arithmetic right 31 on EDX - "shldl %3,%1,%%edx;" // DP shift logical left FRACBITS on EDX - "sall %3,%0;" // shift arithmetic left FRACBITS on EAX - "idivl %2;" // EDX/b = EAX - : "=a" (ret) - : "0" (a), "r" (b) - , "I" (FRACBITS) - : "%edx" - ); - return ret; - } -#elif defined (__GNUC__) && defined (__arm__) && !defined(__thumb__) && !defined(NOASM) //ARMv4 ASM - FUNCMATH FUNCINLINE static inline fixed_t FixedMul(fixed_t a, fixed_t b) // let abuse smull - { - fixed_t ret; - asm - ( - "smull %[lo], r1, %[a], %[b];" - "mov %[lo], %[lo], lsr %3;" - "orr %[lo], %[lo], r1, lsl %3;" - : [lo] "=&r" (ret) // rhi, rlo and rm must be distinct registers - : [a] "r" (a), [b] "r" (b) - , "i" (FRACBITS) - : "r1" - ); - return ret; - } +*/ +FUNCMATH FUNCINLINE static ATTRINLINE fixed_t FixedMul(fixed_t a, fixed_t b) +{ + // Need to cast to unsigned before shifting to avoid undefined behaviour + // for negative integers + return (fixed_t)(((UINT64)((INT64)a * b)) >> FRACBITS); +} - #define __USE_C_FIXEDDIV__ // no double or asm div in ARM land -#elif defined (__GNUC__) && defined (__ppc__) && !defined(NOASM) && 0 // WII: PPC CPU - FUNCMATH FUNCINLINE static inline fixed_t FixedMul(fixed_t a, fixed_t b) // asm - { - fixed_t ret, hi, lo; - asm - ( - "mullw %0, %2, %3;" - "mulhw %1, %2, %3" - : "=r" (hi), "=r" (lo) - : "r" (a), "r" (b) - , "I" (FRACBITS) - ); - ret = (INT64)((hi>>FRACBITS)+lo)<>FRACBITS)+b)< 0) { @@ -4185,8 +4183,14 @@ void M_PlaybackSetViews(INT32 choice) } else if (r_splitscreen) { - r_splitscreen--; - R_ExecuteSetViewSize(); + if (choice == 0) + { + G_SyncDemoParty(displayplayers[r_splitscreen], r_splitscreen - 1); + } + else + { + G_SyncDemoParty(consoleplayer, 0); + } } } diff --git a/src/nds/i_video.c b/src/nds/i_video.c deleted file mode 100644 index 06969dfd5..000000000 --- a/src/nds/i_video.c +++ /dev/null @@ -1,148 +0,0 @@ -// Emacs style mode select -*- C++ -*- -//----------------------------------------------------------------------------- -// -// Copyright (C) 1993-1996 by id Software, Inc. -// Portions Copyright (C) 1998-2000 by DooM Legacy Team. -// -// 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. -//----------------------------------------------------------------------------- -/// \file -/// \brief SRB2 graphics stuff for NDS - - -#include "../doomdef.h" -#include "../command.h" -#include "../i_video.h" - -#include "../hardware/hw_drv.h" -#include "../hardware/hw_main.h" -#include "r_nds3d.h" - -rendermode_t rendermode = render_opengl; - -boolean highcolor = false; - -boolean allow_fullscreen = false; - -consvar_t cv_vidwait = {"vid_wait", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; - -void I_StartupGraphics(void) -{ - vid.width = 256; - vid.height = 192; - vid.bpp = 1; - vid.rowbytes = vid.width * vid.bpp; - vid.recalc = true; - - HWD.pfnInit = NDS3D_Init; - HWD.pfnShutdown = NDS3D_Shutdown; - HWD.pfnFinishUpdate = NDS3D_FinishUpdate; - HWD.pfnDraw2DLine = NDS3D_Draw2DLine; - HWD.pfnDrawPolygon = NDS3D_DrawPolygon; - HWD.pfnSetBlend = NDS3D_SetBlend; - HWD.pfnClearBuffer = NDS3D_ClearBuffer; - HWD.pfnSetTexture = NDS3D_SetTexture; - HWD.pfnReadRect = NDS3D_ReadRect; - HWD.pfnGClipRect = NDS3D_GClipRect; - HWD.pfnClearMipMapCache = NDS3D_ClearMipMapCache; - HWD.pfnSetSpecialState = NDS3D_SetSpecialState; - HWD.pfnSetPalette = NDS3D_SetPalette; - HWD.pfnGetTextureUsed = NDS3D_GetTextureUsed; - HWD.pfnDrawMD2 = NDS3D_DrawMD2; - HWD.pfnDrawMD2i = NDS3D_DrawMD2i; - HWD.pfnSetTransform = NDS3D_SetTransform; - HWD.pfnGetRenderVersion = NDS3D_GetRenderVersion; - - videoSetMode(MODE_0_3D); - vramSetBankA(VRAM_A_TEXTURE); - vramSetBankB(VRAM_B_TEXTURE); - vramSetBankC(VRAM_C_TEXTURE); - vramSetBankD(VRAM_D_TEXTURE); - vramSetBankE(VRAM_E_TEX_PALETTE); - - glInit(); - - glEnable(GL_TEXTURE_2D); - - glClearColor(16,16,16,31); - glClearPolyID(63); - glClearDepth(0x7FFF); - - glViewport(0, 0, vid.width - 1, vid.height - 1); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - - gluPerspective(fov, ASPECT_RATIO, NEAR_CLIPPING_PLANE, FAR_CLIPPING_PLANE); - - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glScalef(1.0f, 1.0f, -1.0f); - - HWD.pfnInit(I_Error); - HWR_Startup(); -} - -void I_ShutdownGraphics(void){} - -void I_SetPalette(RGBA_t *palette) -{ - (void)palette; -} - -INT32 VID_NumModes(void) -{ - return 0; -} - -INT32 VID_GetModeForSize(INT32 w, INT32 h) -{ - (void)w; - (void)h; - return 0; -} - -void VID_PrepareModeList(void){} - -INT32 VID_SetMode(INT32 modenum) -{ - (void)modenum; - return 0; -} - -const char *VID_GetModeName(INT32 modenum) -{ - (void)modenum; - return NULL; -} - -void I_UpdateNoBlit(void){} - -void I_FinishUpdate(void) -{ - HWD.pfnFinishUpdate(true); -} - -void I_UpdateNoVsync(void) {} - -void I_WaitVBL(INT32 count) -{ - (void)count; -} - -void I_ReadScreen(UINT8 *scr) -{ - (void)scr; -} - -void I_BeginRead(void){} - -void I_EndRead(void){} diff --git a/src/nds/r_nds3d.c b/src/nds/r_nds3d.c deleted file mode 100644 index 6734e8c15..000000000 --- a/src/nds/r_nds3d.c +++ /dev/null @@ -1,389 +0,0 @@ -// Emacs style mode select -*- C++ -*- -//----------------------------------------------------------------------------- -// -// Copyright (C) 1993-1996 by id Software, Inc. -// Portions Copyright (C) 1998-2000 by DooM Legacy Team. -// -// 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. -//----------------------------------------------------------------------------- -/// \file -/// \brief NDS 3D API for SRB2. -// -// In an ideal world, we would share as much code as possible with r_opengl.c, -// but this will do for now. - -#include "../doomtype.h" -#include "../hardware/hw_defs.h" -#include "../hardware/hw_dll.h" -#include "../hardware/hw_md2.h" -#include "r_nds3d.h" - -static I_Error_t I_Error_GL = NULL; - -#define NOTEXTURE_NUM 0 // small white texture -#define FIRST_TEX_AVAIL (NOTEXTURE_NUM + 1) -#define MAX_SRB2_TEXTURES 256 - -FCOORD NEAR_CLIPPING_PLANE = 0.9f; -float fov = 90.0f; - -static FBITFIELD CurrentPolyFlags = 0xFFFFFFFF; -static UINT32 CurrentGLPolyFmt = POLY_CULL_NONE; -static UINT8 CurrentPolyAlpha = 31; -static UINT16 myPaletteData[256]; -static FTextureInfo* gr_cachetail = NULL; -static FTextureInfo* gr_cachehead = NULL; -static INT32 NextTexAvail = FIRST_TEX_AVAIL; -static UINT32 tex_downloaded = 0; -static INT32 texids[MAX_SRB2_TEXTURES]; -static boolean scalehack = false; - - -static void GenerateTextureNames(void) -{ - glGenTextures(MAX_SRB2_TEXTURES - 1, texids + 1); - texids[NOTEXTURE_NUM] = 0; -} - -static void Flush(void) -{ - // Delete all textures at once, since libnds's glDeleteTextures seems to be buggy. - glResetTextures(); - GenerateTextureNames(); - while (gr_cachehead) - { - gr_cachehead->downloaded = 0; - gr_cachehead = gr_cachehead->nextmipmap; - } - gr_cachetail = gr_cachehead = NULL; - NextTexAvail = FIRST_TEX_AVAIL; - tex_downloaded = 0; -} - -static void SetNoTexture(void) -{ - // Set small white texture. - if (tex_downloaded != NOTEXTURE_NUM) - { - glBindTexture(GL_TEXTURE_2D, texids[NOTEXTURE_NUM]); - tex_downloaded = NOTEXTURE_NUM; - } -} - - -static void SetAlpha(UINT8 alpha) -{ - CurrentPolyAlpha = alpha >> 3; - glPolyFmt(CurrentGLPolyFmt | POLY_ALPHA(CurrentPolyAlpha)); -} - - - -boolean NDS3D_Init(I_Error_t ErrorFunction) -{ - I_Error_GL = ErrorFunction; - glPolyFmt(CurrentGLPolyFmt | POLY_ALPHA(CurrentPolyAlpha)); - GenerateTextureNames(); - return true; -} - -void NDS3D_Shutdown(void) {} - -void NDS3D_SetPalette(RGBA_t *ppal, RGBA_t *pgamma) -{ - INT32 i; - - for (i = 0; i < 256; i++) - { - UINT8 red = (UINT8)min((ppal[i].s.red*pgamma->s.red)/127, 255) >> 3; - UINT8 green = (UINT8)min((ppal[i].s.green*pgamma->s.green)/127, 255) >> 3; - UINT8 blue = (UINT8)min((ppal[i].s.blue*pgamma->s.blue)/127, 255) >> 3; - - myPaletteData[i] = ARGB16(ppal[i].s.alpha ? 1 : 0, red, green, blue); - } - - Flush(); -} - -void NDS3D_FinishUpdate(INT32 waitvbl) -{ - (void)waitvbl; - - glFlush(0); -} - -void NDS3D_Draw2DLine(F2DCoord *v1, F2DCoord *v2, RGBA_t Color) -{ - (void)v1; - (void)v2; - (void)Color; -} - -void NDS3D_DrawPolygon(FSurfaceInfo *pSurf, FOutVector *pOutVerts, FUINT iNumPts, FBITFIELD PolyFlags) -{ - FUINT i; - - NDS3D_SetBlend(PolyFlags); - - // If Modulated, mix the surface colour to the texture - if ((CurrentPolyFlags & PF_Modulated) && pSurf) - { - glColor3b(pSurf->FlatColor.s.red, pSurf->FlatColor.s.green, pSurf->FlatColor.s.blue); - SetAlpha(pSurf->FlatColor.s.alpha); - } - - // libnds doesn't have GL_TRIANGLE_FAN, so use GL_TRIANGLE_STRIP instead - glBegin(GL_TRIANGLE_STRIP); - for (i = 0; i < iNumPts; i++) - { - FUINT index = (i & 1) ? (i >> 1) : (iNumPts - 1 - (i >> 1)); - FLOAT x, y, z; - - if (scalehack) - { - x = pOutVerts[index].x/4096.0f; - y = pOutVerts[index].y/4096.0f; - z = pOutVerts[index].z/4096.0f; - } - else - { - x = pOutVerts[index].x; - y = pOutVerts[index].y; - z = pOutVerts[index].z; - } - - glTexCoord2f(pOutVerts[index].s, pOutVerts[index].tow); - glVertex3f(x,y,z); - } - glEnd(); -} - -void NDS3D_SetBlend(FBITFIELD PolyFlags) -{ - FBITFIELD Xor = PolyFlags ^ CurrentPolyFlags; - - if (Xor & (PF_NoTexture|PF_Modulated)) - { - if (Xor&PF_Modulated) - { - if(!(PolyFlags & PF_Modulated)) - { - glColor3b(255, 255, 255); - CurrentPolyAlpha = 31; - } - } - - if (PolyFlags & PF_NoTexture) - { - SetNoTexture(); - } - } - - CurrentPolyFlags = PolyFlags; - glPolyFmt(CurrentGLPolyFmt | POLY_ALPHA(CurrentPolyAlpha)); -} - -void NDS3D_ClearBuffer(FBOOLEAN ColorMask, FBOOLEAN DepthMask, FRGBAFloat *ClearColor) -{ - (void)ClearColor; - - if (ColorMask && ClearColor) - { - // TODO: Fixed-ify - glClearColor((uint8)(ClearColor->red*31), - (uint8)(ClearColor->green*31), - (uint8)(ClearColor->blue*31), - (uint8)(ClearColor->alpha*31)); - } - - if (DepthMask) - glClearDepth(GL_MAX_DEPTH); - - NDS3D_SetBlend(DepthMask ? PF_Occlude | CurrentPolyFlags : CurrentPolyFlags&~PF_Occlude); -} - -void NDS3D_SetTexture(FTextureInfo *TexInfo) -{ - if (!TexInfo) - { - SetNoTexture(); - return; - } - else if (TexInfo->downloaded) - { - if (TexInfo->downloaded != tex_downloaded) - { - glBindTexture(GL_TEXTURE_2D, texids[TexInfo->downloaded]); - tex_downloaded = TexInfo->downloaded; - } - } - else if (TexInfo->grInfo.data) - { - UINT8 wtype, htype; - INT32 texparam = GL_TEXTURE_COLOR0_TRANSPARENT; - - // We rely on the numerical values of GL_TEXTURE_SIZE_ENUM here. - wtype = TEXTURE_SIZE_8; - while(TexInfo->width > 1 << (wtype + 3)) wtype++; - - htype = TEXTURE_SIZE_8; - while(TexInfo->height > 1 << (htype + 3)) htype++; - - TexInfo->downloaded = NextTexAvail++; - tex_downloaded = TexInfo->downloaded; - glBindTexture(GL_TEXTURE_2D, texids[TexInfo->downloaded]); - - if(!glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB256, wtype, htype, 0, TEXGEN_TEXCOORD, TexInfo->grInfo.data)) - { - // HACK: If we're out of memory, flush and try again. - // This will result in artefacts for one frame. - Flush(); - TexInfo->downloaded = 0; - NDS3D_SetTexture(TexInfo); - return; - } - - if (TexInfo->downloaded > FIRST_TEX_AVAIL) - { - // We already have a texture using the palette, so it's already in VRAM - glAssignColorTable(GL_TEXTURE_2D, texids[FIRST_TEX_AVAIL]); - } - else - { - // Generate the palette in hardware - glColorTableEXT(0, 0, 256, 0, 0, myPaletteData); - } - - if (TexInfo->flags & TF_WRAPX) - texparam |= GL_TEXTURE_WRAP_S; - - if (TexInfo->flags & TF_WRAPY) - texparam |= GL_TEXTURE_WRAP_T; - - glTexParameter(0, texparam); - - TexInfo->nextmipmap = NULL; - if (gr_cachetail) - { - gr_cachetail->nextmipmap = TexInfo; - gr_cachetail = TexInfo; - } - else - gr_cachetail = gr_cachehead = TexInfo; - } -} - -void NDS3D_ReadRect(INT32 x, INT32 y, INT32 width, INT32 height, INT32 dst_stride, UINT16 *dst_data) -{ - (void)x; - (void)y; - (void)width; - (void)height; - (void)dst_stride; - (void)dst_data; -} - -void NDS3D_GClipRect(INT32 minx, INT32 miny, INT32 maxx, INT32 maxy, float nearclip) -{ - (void)minx; - (void)miny; - (void)maxx; - (void)maxy; - //glViewport(minx, vid.height-maxy, maxx-minx, maxy-miny); - NEAR_CLIPPING_PLANE = nearclip; - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective(fov, ASPECT_RATIO, NEAR_CLIPPING_PLANE, FAR_CLIPPING_PLANE); - glMatrixMode(GL_MODELVIEW); -} - -void NDS3D_ClearMipMapCache(void) {} - -void NDS3D_SetSpecialState(hwdspecialstate_t IdState, INT32 Value) -{ - (void)IdState; - (void)Value; -} - -void NDS3D_DrawMD2(INT32 *gl_cmd_buffer, md2_frame_t *frame, FTransform *pos, float scale) -{ - (void)gl_cmd_buffer; - (void)frame; - (void)pos; - (void)scale; -} - -void NDS3D_DrawMD2i(INT32 *gl_cmd_buffer, md2_frame_t *frame, UINT32 duration, UINT32 tics, md2_frame_t *nextframe, FTransform *pos, float scale, UINT8 flipped, UINT8 *color) -{ - (void)gl_cmd_buffer; - (void)frame; - (void)duration; - (void)tics; - (void)nextframe; - (void)pos; - (void)scale; - (void)flipped; - (void)color; -} - -void NDS3D_SetTransform(FTransform *ptransform) -{ - static INT32 special_splitscreen; - glLoadIdentity(); - if (ptransform) - { - scalehack = true; - - glScalef(ptransform->scalex*4096.0f, ptransform->scaley*4096.0f, -ptransform->scalez*4096.0f); - glRotatef(ptransform->anglex , 1.0f, 0.0f, 0.0f); - glRotatef(ptransform->angley+270.0f, 0.0f, 1.0f, 0.0f); - glTranslatef(-ptransform->x/4096.0f, -ptransform->z/4096.0f, -ptransform->y/4096.0f); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - special_splitscreen = (ptransform->splitscreen && ptransform->fovxangle == 90.0f); - if (special_splitscreen) - gluPerspective(53.13l, 2*ASPECT_RATIO, // 53.13 = 2*atan(0.5) - NEAR_CLIPPING_PLANE, FAR_CLIPPING_PLANE); - else - gluPerspective(ptransform->fovxangle, ASPECT_RATIO, NEAR_CLIPPING_PLANE, FAR_CLIPPING_PLANE); - - glMatrixMode(GL_MODELVIEW); - } - else - { - scalehack = false; - - glScalef(1.0f, 1.0f, -1.0f); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - if (special_splitscreen) - gluPerspective(53.13l, 2*ASPECT_RATIO, // 53.13 = 2*atan(0.5) - NEAR_CLIPPING_PLANE, FAR_CLIPPING_PLANE); - else - //Hurdler: is "fov" correct? - gluPerspective(fov, ASPECT_RATIO, NEAR_CLIPPING_PLANE, FAR_CLIPPING_PLANE); - - glMatrixMode(GL_MODELVIEW); - } -} - -INT32 NDS3D_GetTextureUsed(void) -{ - return 0; -} - -INT32 NDS3D_GetRenderVersion(void) -{ - return 0; -} diff --git a/src/p5prof.h b/src/p5prof.h deleted file mode 100644 index a9ed3965e..000000000 --- a/src/p5prof.h +++ /dev/null @@ -1,278 +0,0 @@ -/********************************************************* - * - * File: p5prof.h - * By: Kevin Baca - * - * MODIFIED BY Fab SO THAT RDMSR(...) WRITES EDX : EAX TO A LONG LONG - * (WHICH MEANS WRITE THE LOW DWORD FIRST) - * - * Now in yer code do: - * INT64 count,total; - * - * ... - * RDMSR(0x10,&count); //inner loop count - * total += count; - * ... - * - * printf("0x%x %x", (INT32)total, *((INT32 *)&total+1)); - * // HIGH LOW - * - *********************************************************/ -/**\file - \brief This file provides macros to profile your code. - - Here's how they work... - - As you may or may not know, the Pentium class of - processors provides extremely fine grained profiling - capabilities through the use of what are called - Machine Specific Registers (MSRs). These registers - can provide information about almost any aspect of - CPU performance down to a single cycle. - - The MSRs of interest for profiling are specified by - indices 0x10, 0x11, 0x12, and 0x13. Here is a brief - description of each of these registers: - - MSR 0x10 - This register is simple a cycle counter. - - MSR 0x11 - This register controls what type of profiling data - will be gathered. - - MSRs 0x12 and 0x13 - These registers gather the profiling data specified in - MSR 0x11. - - Each MSR is 64 bits wide. For the Pentium processor, - only the lower 32 bits of MSR 0x11 are valid. Bits 0-15 - specify what data will be gathered in MSR 0x12. Bits 16-31 - specify what data will be gathered in MSR 0x13. Both sets - of bits have the same format: - - Bits 0-5 specify which hardware event will be tracked. - Bit 6, if set, indicates events will be tracked in - rings 0-2. - Bit 7, if set, indicates events will be tracked in - ring 3. - Bit 8, if set, indicates cycles should be counted for - the specified event. If clear, it indicates the - number of events should be counted. - - Two instructions are provided for manupulating the MSRs. - RDMSR (Read Machine Specific Register) and WRMSR - (Write Machine Specific Register). These opcodes were - originally undocumented and therefore most assemblers don't - recognize them. Their byte codes are provided in the - macros below. - - RDMSR takes the MSR index in ecx and the profiling criteria - in edx : eax. - - WRMSR takes the MSR index in ecx and returns the profile data - in edx : eax. - - Two profiling registers limits profiling capability to - gathering only two types of information. The register - usage can, however, be combined in interesting ways. - For example, you can set one register to gather the - number of a specific type of event while the other gathers - the number of cycles for the same event. Or you can - gather the number of two separate events while using - MSR 0x10 to gather the number of cycles. - - The enumerated list provides somewhat readable labels for - the types of events that can be tracked. - - For more information, get ahold of appendix H from the - Intel Pentium programmer's manual (I don't remember the - order number) or go to - http://green.kaist.ac.kr/jwhahn/art3.htm. - That's an article by Terje Mathisen where I got most of - my information. - - You may use this code however you wish. I hope it's - useful and I hope I got everything right. - - -Kevin - - kbaca@skygames.com - -*/ - -#ifdef __GNUC__ - -#define RDTSC(_dst) \ -__asm__(" - .byte 0x0F,0x31 - movl %%edx,(%%edi) - movl %%eax,4(%%edi)"\ -: : "D" (_dst) : "eax", "edx", "edi") - -// the old code... swapped it -// movl %%edx,(%%edi) -// movl %%eax,4(%%edi)" -#define RDMSR(_msri, _msrd) \ -__asm__(" - .byte 0x0F,0x32 - movl %%eax,(%%edi) - movl %%edx,4(%%edi)"\ -: : "c" (_msri), "D" (_msrd) : "eax", "ecx", "edx", "edi") - -#define WRMSR(_msri, _msrd) \ -__asm__(" - xorl %%edx,%%edx - .byte 0x0F,0x30"\ -: : "c" (_msri), "a" (_msrd) : "eax", "ecx", "edx") - -#define RDMSR_0x12_0x13(_msr12, _msr13) \ -__asm__(" - movl $0x12,%%ecx - .byte 0x0F,0x32 - movl %%edx,(%%edi) - movl %%eax,4(%%edi) - movl $0x13,%%ecx - .byte 0x0F,0x32 - movl %%edx,(%%esi) - movl %%eax,4(%%esi)"\ -: : "D" (_msr12), "S" (_msr13) : "eax", "ecx", "edx", "edi") - -#define ZERO_MSR_0x12_0x13() \ -__asm__(" - xorl %%edx,%%edx - xorl %%eax,%%eax - movl $0x12,%%ecx - .byte 0x0F,0x30 - movl $0x13,%%ecx - .byte 0x0F,0x30"\ -: : : "eax", "ecx", "edx") - -#elif defined (__WATCOMC__) - -extern void RDTSC(UINT32 *dst); -#pragma aux RDTSC =\ - "db 0x0F,0x31"\ - "mov [edi],edx"\ - "mov [4+edi],eax"\ - parm [edi]\ - modify [eax edx edi]; - -extern void RDMSR(UINT32 msri, UINT32 *msrd); -#pragma aux RDMSR =\ - "db 0x0F,0x32"\ - "mov [edi],edx"\ - "mov [4+edi],eax"\ - parm [ecx] [edi]\ - modify [eax ecx edx edi]; - -extern void WRMSR(UINT32 msri, UINT32 msrd); -#pragma aux WRMSR =\ - "xor edx,edx"\ - "db 0x0F,0x30"\ - parm [ecx] [eax]\ - modify [eax ecx edx]; - -extern void RDMSR_0x12_0x13(UINT32 *msr12, UINT32 *msr13); -#pragma aux RDMSR_0x12_0x13 =\ - "mov ecx,0x12"\ - "db 0x0F,0x32"\ - "mov [edi],edx"\ - "mov [4+edi],eax"\ - "mov ecx,0x13"\ - "db 0x0F,0x32"\ - "mov [esi],edx"\ - "mov [4+esi],eax"\ - parm [edi] [esi]\ - modify [eax ecx edx edi esi]; - -extern void ZERO_MSR_0x12_0x13(void); -#pragma aux ZERO_MSR_0x12_0x13 =\ - "xor edx,edx"\ - "xor eax,eax"\ - "mov ecx,0x12"\ - "db 0x0F,0x30"\ - "mov ecx,0x13"\ - "db 0x0F,0x30"\ - modify [eax ecx edx]; - -#endif - -typedef enum -{ - DataRead, - DataWrite, - DataTLBMiss, - DataReadMiss, - DataWriteMiss, - WriteHitEM, - DataCacheLinesWritten, - DataCacheSnoops, - DataCacheSnoopHit, - MemAccessBothPipes, - BankConflict, - MisalignedDataRef, - CodeRead, - CodeTLBMiss, - CodeCacheMiss, - SegRegLoad, - RESERVED0, - RESERVED1, - Branch, - BTBHit, - TakenBranchOrBTBHit, - PipelineFlush, - InstructionsExeced, - InstructionsExecedVPipe, - BusUtilizationClocks, - PipelineStalledWriteBackup, - PipelineStalledDateMemRead, - PipeLineStalledWriteEM, - LockedBusCycle, - IOReadOrWriteCycle, - NonCacheableMemRef, - AGI, - RESERVED2, - RESERVED3, - FPOperation, - Breakpoint0Match, - Breakpoint1Match, - Breakpoint2Match, - Breakpoint3Match, - HWInterrupt, - DataReadOrWrite, - DataReadOrWriteMiss -}; - -#define PROF_CYCLES (0x100) -#define PROF_EVENTS (0x000) -#define RING_012 (0x40) -#define RING_3 (0x80) -#define RING_0123 (RING_012 | RING_3) - -/*void ProfSetProfiles(UINT32 msr12, UINT32 msr13);*/ -#define ProfSetProfiles(_msr12, _msr13)\ -{\ - UINT32 prof;\ -\ - prof = (_msr12) | ((_msr13) << 16);\ - WRMSR(0x11, prof);\ -} - -/*void ProfBeginProfiles(void);*/ -#define ProfBeginProfiles()\ - ZERO_MSR_0x12_0x13(); - -/*void ProfGetProfiles(UINT32 msr12[2], UINT32 msr13[2]);*/ -#define ProfGetProfiles(_msr12, _msr13)\ - RDMSR_0x12_0x13(_msr12, _msr13); - -/*void ProfZeroTimer(void);*/ -#define ProfZeroTimer()\ - WRMSR(0x10, 0); - -/*void ProfReadTimer(UINT32 timer[2]);*/ -#define ProfReadTimer(timer)\ - RDMSR(0x10, timer); - -/*EOF*/ diff --git a/src/p_inter.c b/src/p_inter.c index 97a852b42..48bc0812d 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -1708,8 +1708,8 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget else player->itemamount = max(1, target->movecount); } - player->karthud[khud_itemblink] = TICRATE; - player->karthud[khud_itemblinkmode] = 0; + player->itemblink = TICRATE; + player->itemblinkmode = 0; player->itemroulette = 0; player->roulettetype = 0; if (P_IsDisplayPlayer(player)) @@ -1981,6 +1981,11 @@ static boolean P_KillPlayer(player_t *player, mobj_t *inflictor, mobj_t *source, (void)source; (void)inflictor; + if (type == DMG_SPECTATOR && (G_GametypeHasTeams() || G_GametypeHasSpectators())) + { + P_SetPlayerSpectator(player-players); + } + if (player->exiting) { player->mo->destscale = 1; diff --git a/src/p_maputl.c b/src/p_maputl.c index 867e2b1a4..f6568e23b 100644 --- a/src/p_maputl.c +++ b/src/p_maputl.c @@ -439,6 +439,12 @@ P_GetMidtextureTopBottom // Get the midtexture's height texheight = textures[texnum]->height << FRACBITS; + if (g_tm.sweep) + { + // Sweep Midtexture lines to prevent issues with some midtextures. + P_TestLine(linedef); + } + // Set texbottom and textop to the Z coordinates of the texture's boundaries #if 0 // don't remove this code unless solid midtextures diff --git a/src/p_mobj.c b/src/p_mobj.c index 32406521c..799bcf73c 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -12317,7 +12317,9 @@ static void P_SpawnItemRow(mapthing_t *mthing, mobjtype_t *itemtypes, UINT8 numi loopanchor->spawnpoint = NULL; - Obj_LinkLoopAnchor(loopanchor, loopcenter, mthing->args[0]); + if (!P_MobjWasRemoved(loopanchor)) + Obj_LinkLoopAnchor(loopanchor, loopcenter, mthing->args[0]); + } for (r = 0; r < numitems; r++) diff --git a/src/p_mobj.h b/src/p_mobj.h index 7244ce061..109ea99bc 100644 --- a/src/p_mobj.h +++ b/src/p_mobj.h @@ -173,7 +173,7 @@ typedef enum typedef enum { MF2_AXIS = 1, // It's a NiGHTS axis! (For faster checking) - // free: 1<<1 + MF2_SHADOW = 1<<3, // DO NOT USE: for lua compatibility only MF2_DONTRESPAWN = 1<<2, // Don't respawn this object! MF2_DONTDRAW = 1<<3, // DO NOT USE: for lua compatibility only MF2_AUTOMATIC = 1<<4, // Thrown ring has automatic properties diff --git a/src/p_saveg.c b/src/p_saveg.c index 86f2b8125..9dbcb6e0a 100644 --- a/src/p_saveg.c +++ b/src/p_saveg.c @@ -42,6 +42,7 @@ #include "k_pwrlv.h" #include "k_terrain.h" #include "acs/interface.h" +#include "g_party.h" #include @@ -51,6 +52,7 @@ savedata_t savedata; // being sent and received #define ARCHIVEBLOCK_MISC 0x7FEEDEED #define ARCHIVEBLOCK_PLAYERS 0x7F448008 +#define ARCHIVEBLOCK_PARTIES 0x7F87AF0C #define ARCHIVEBLOCK_WORLD 0x7F8C08C0 #define ARCHIVEBLOCK_POBJS 0x7F928546 #define ARCHIVEBLOCK_THINKERS 0x7F37037C @@ -121,14 +123,6 @@ static void P_NetArchivePlayers(savebuffer_t *save) WRITEUINT8(save->p, playerconsole[i]); WRITEINT32(save->p, splitscreen_invitations[i]); - WRITEINT32(save->p, splitscreen_party_size[i]); - WRITEINT32(save->p, splitscreen_original_party_size[i]); - - for (j = 0; j < MAXSPLITSCREENPLAYERS; ++j) - { - WRITEINT32(save->p, splitscreen_party[i][j]); - WRITEINT32(save->p, splitscreen_original_party[i][j]); - } WRITEANGLE(save->p, players[i].angleturn); WRITEANGLE(save->p, players[i].aiming); @@ -285,6 +279,8 @@ static void P_NetArchivePlayers(savebuffer_t *save) WRITEUINT8(save->p, players[i].tripwireReboundDelay); WRITEUINT16(save->p, players[i].itemroulette); + WRITEUINT16(save->p, players[i].itemblink); + WRITEUINT16(save->p, players[i].itemblinkmode); WRITEUINT8(save->p, players[i].roulettetype); WRITESINT8(save->p, players[i].itemtype); @@ -365,6 +361,7 @@ static void P_NetArchivePlayers(savebuffer_t *save) WRITEUINT32(save->p, players[i].botvars.itemdelay); WRITEUINT32(save->p, players[i].botvars.itemconfirm); WRITESINT8(save->p, players[i].botvars.turnconfirm); + WRITEUINT32(save->p, players[i].botvars.respawnconfirm); WRITEFIXED(save->p, players[i].outrun); WRITEUINT8(save->p, players[i].outruntime); @@ -437,14 +434,6 @@ static void P_NetUnArchivePlayers(savebuffer_t *save) playerconsole[i] = READUINT8(save->p); splitscreen_invitations[i] = READINT32(save->p); - splitscreen_party_size[i] = READINT32(save->p); - splitscreen_original_party_size[i] = READINT32(save->p); - - for (j = 0; j < MAXSPLITSCREENPLAYERS; ++j) - { - splitscreen_party[i][j] = READINT32(save->p); - splitscreen_original_party[i][j] = READINT32(save->p); - } players[i].angleturn = READANGLE(save->p); players[i].aiming = READANGLE(save->p); @@ -594,6 +583,8 @@ static void P_NetUnArchivePlayers(savebuffer_t *save) players[i].tripwireReboundDelay = READUINT8(save->p); players[i].itemroulette = READUINT16(save->p); + players[i].itemblink = READUINT16(save->p); + players[i].itemblinkmode = READUINT16(save->p); players[i].roulettetype = READUINT8(save->p); players[i].itemtype = READSINT8(save->p); @@ -674,6 +665,7 @@ static void P_NetUnArchivePlayers(savebuffer_t *save) players[i].botvars.itemdelay = READUINT32(save->p); players[i].botvars.itemconfirm = READUINT32(save->p); players[i].botvars.turnconfirm = READSINT8(save->p); + players[i].botvars.respawnconfirm = READUINT32(save->p); players[i].outrun = READFIXED(save->p); players[i].outruntime = READUINT8(save->p); @@ -716,6 +708,59 @@ static void P_NetUnArchivePlayers(savebuffer_t *save) TracyCZoneEnd(__zone); } +static void P_NetArchiveParties(savebuffer_t *save) +{ + INT32 i, k; + UINT8 partySize; + + WRITEUINT32(save->p, ARCHIVEBLOCK_PARTIES); + + for (i = 0; i < MAXPLAYERS; i++) + { + if (!playeringame[i]) + continue; + + partySize = G_PartySize(i); + + WRITEUINT8(save->p, partySize); + + for (k = 0; k < partySize; ++k) + { + WRITEUINT8(save->p, G_PartyMember(i, k)); + } + } +} + +static void P_NetUnArchiveParties(savebuffer_t *save) +{ + INT32 i, k; + UINT8 partySize; + + if (READUINT32(save->p) != ARCHIVEBLOCK_PARTIES) + I_Error("Bad $$$.sav at archive block Parties"); + + for (i = 0; i < MAXPLAYERS; i++) + { + if (!playeringame[i]) + continue; + + G_BuildLocalSplitscreenParty(i); + } + + for (i = 0; i < MAXPLAYERS; i++) + { + if (!playeringame[i]) + continue; + + partySize = READUINT8(save->p); + + for (k = 0; k < partySize; ++k) + { + G_JoinParty(i, READUINT8(save->p)); + } + } +} + /// /// Colormaps /// @@ -5398,6 +5443,8 @@ void P_SaveNetGame(savebuffer_t *save, boolean resending) } P_NetArchivePlayers(save); + P_NetArchiveParties(save); + if (gamestate == GS_LEVEL) { P_NetArchiveWorld(save); @@ -5446,6 +5493,8 @@ boolean P_LoadNetGame(savebuffer_t *save, boolean reloading) if (!P_NetUnArchiveMisc(save,reloading)) return false; P_NetUnArchivePlayers(save); + P_NetUnArchiveParties(save); + if (gamestate == GS_LEVEL) { P_NetUnArchiveWorld(save); diff --git a/src/p_spec.c b/src/p_spec.c index 5d2c1a782..f4bce7b19 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -4061,6 +4061,7 @@ boolean P_ProcessSpecial(activator_t *activator, INT16 special, INT32 *args, cha case 460: // Award rings { + INT16 rings = args[0]; INT32 delay = args[1]; if ( @@ -4069,13 +4070,9 @@ boolean P_ProcessSpecial(activator_t *activator, INT16 special, INT32 *args, cha && (delay <= 0 || !(leveltime % delay)) // Timing ) { - // Don't award rings your rings are locked - if (mo->player->pflags & PF_RINGLOCK) - return false; - - if (delay <= 0 || !(leveltime % delay)) + if (rings > 0) { - // Don't award rings while your rings are locked + // Don't award rings while your rings are locked. if (mo->player->pflags & PF_RINGLOCK) return false; @@ -4084,11 +4081,19 @@ boolean P_ProcessSpecial(activator_t *activator, INT16 special, INT32 *args, cha } else { + // args[2]: cap rings to -20 instead of 0 + SINT8 baseline = (args[2] ? -20 : 0); + // Don't push you below baseline - if (mo->player->rings < 0) + if (mo->player->rings <= baseline) return false; - mo->player->rings--; + rings = -(rings); + + if (rings > (mo->player->rings - baseline)) + rings = (mo->player->rings - baseline); + + mo->player->rings -= rings; S_StartSound(mo, sfx_antiri); } } diff --git a/src/p_tick.c b/src/p_tick.c index 6da044264..9ea3ea380 100644 --- a/src/p_tick.c +++ b/src/p_tick.c @@ -905,15 +905,17 @@ void P_Ticker(boolean run) } } - K_UpdateDirector(); - - // Always move the camera. - P_RunChaseCameras(); - - LUA_HOOK(PostThinkFrame); + if (gamestate == GS_LEVEL) + { + // Move the camera during levels. + K_UpdateDirector(); + P_RunChaseCameras(); + } if (run) { + LUA_HOOK(PostThinkFrame); + R_UpdateLevelInterpolators(); // Hack: ensure newview is assigned every tic. diff --git a/src/p_user.c b/src/p_user.c index b99515828..cf88f1f37 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -61,6 +61,7 @@ #include "k_terrain.h" // K_SpawnSplashForMobj #include "k_color.h" #include "k_follower.h" +#include "g_party.h" #include "acs/interface.h" @@ -718,7 +719,7 @@ boolean P_EndingMusic(player_t *player) if (r_splitscreen) { - INT32 *localplayertable = (splitscreen_partied[consoleplayer] ? splitscreen_party[consoleplayer] : g_localplayers); + const UINT8 *localplayertable = G_PartyArray(consoleplayer); if (!((players[localplayertable[0]].exiting || (players[localplayertable[0]].pflags & PF_NOCONTEST)) || (players[localplayertable[1]].exiting || (players[localplayertable[1]].pflags & PF_NOCONTEST)) @@ -817,7 +818,7 @@ void P_RestoreMusic(player_t *player) if (r_splitscreen) { INT32 bestlocaltimer = 1; - INT32 *localplayertable = (splitscreen_partied[consoleplayer] ? splitscreen_party[consoleplayer] : g_localplayers); + const UINT8 *localplayertable = G_PartyArray(consoleplayer); #define setbests(p) \ if (players[p].playerstate == PST_LIVE) \ @@ -1108,8 +1109,6 @@ boolean P_IsMachineLocalPlayer(player_t *player) // boolean P_IsLocalPlayer(player_t *player) { - UINT8 i; - if (player == NULL) { return false; @@ -1119,18 +1118,8 @@ boolean P_IsLocalPlayer(player_t *player) if (demo.playback) return false; - // parties - treat everyone as if it's couch co-op - if (splitscreen_partied[consoleplayer]) - { - for (i = 0; i < splitscreen_party_size[consoleplayer]; i++) - { - if (splitscreen_party[consoleplayer][i] == (player-players)) - return true; - } - return false; - } - - return P_IsMachineLocalPlayer(player); + // handles both online parties and local players (no need to call P_IsMachineLocalPlayer here) + return G_IsPartyLocal(player-players); } // @@ -1841,7 +1830,7 @@ static void P_3dMovement(player_t *player) // Forward movement if (!((player->exiting || mapreset) || (P_PlayerInPain(player) && !onground))) { - movepushforward = K_3dKartMovement(player); + movepushforward = K_3dKartMovement(player, onground); // allow very small movement while in air for gameplay if (!onground) @@ -2540,18 +2529,8 @@ static void P_DeathThink(player_t *player) // If they die while still in respawn state for extra safety. if (player->nextwaypoint && player->respawn > 0) { - mobj_t *currentwaypoint = player->currentwaypoint->mobj; - mobj_t *safewaypoint = player->nextwaypoint->mobj; - angle_t respawnangle = R_PointToAngle2(currentwaypoint->x, currentwaypoint->y, safewaypoint->x, safewaypoint->y); - - player->starposttime = player->realtime; - player->starpostz = safewaypoint->spawnpoint->z >> FRACBITS; - player->starpostflip = (safewaypoint->flags2 & MF2_OBJECTFLIP); - player->starpostangle = respawnangle; - - // Then do x and y - player->starpostx = safewaypoint->x >> FRACBITS; - player->starposty = safewaypoint->y >> FRACBITS; + // Now a clean function! Neat, eh? + K_SetRespawnAtNextWaypoint(player); } K_KartPlayerHUDUpdate(player); @@ -2935,7 +2914,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall focusangle = player->cmd.angle << TICCMD_REDUCE; focusaiming = 0; } - else if (P_IsLocalPlayer(player)) + else if (P_IsMachineLocalPlayer(player)) { focusangle = localangle[num]; focusaiming = localaiming[num]; @@ -3559,7 +3538,7 @@ boolean P_SpectatorJoinGame(player_t *player) // Reset away view (some code referenced from Got_Teamchange) { UINT8 i = 0; - INT32 *localplayertable = (splitscreen_partied[consoleplayer] ? splitscreen_party[consoleplayer] : g_localplayers); + const UINT8 *localplayertable = G_PartyArray(consoleplayer); for (i = 0; i < r_splitscreen; i++) { diff --git a/src/r_fps.c b/src/r_fps.c index a41fe2909..11f1b8378 100644 --- a/src/r_fps.c +++ b/src/r_fps.c @@ -23,9 +23,6 @@ #include "r_state.h" #include "z_zone.h" #include "console.h" // con_startup_loadprogress -#ifdef HWRENDER -#include "hardware/hw_main.h" // for cv_glshearing -#endif static CV_PossibleValue_t fpscap_cons_t[] = { #ifdef DEVELOP @@ -118,23 +115,7 @@ static vector3_t *R_LerpVector3(const vector3_t *from, const vector3_t *to, fixe // 18/08/18: (No it's actually 16*viewheight, thanks Jimita for finding this out) static void R_SetupFreelook(player_t *player, boolean skybox) { -#ifndef HWRENDER - (void)player; - (void)skybox; -#endif - - // clip it in the case we are looking a hardware 90 degrees full aiming - // (lmps, network and use F12...) - if (rendermode == render_soft -#ifdef HWRENDER - || (rendermode == render_opengl - && (cv_glshearing.value == 1 - || (cv_glshearing.value == 2 && R_IsViewpointThirdPerson(player, skybox)))) -#endif - ) - { - G_SoftwareClipAimingPitch((INT32 *)&aimingangle); - } + G_FinalClipAimingPitch((INT32 *)&aimingangle, player, skybox); centeryfrac = (viewheight/2)<awayviewtics || skybox) diff --git a/src/r_things.cpp b/src/r_things.cpp index a4eb35b19..cb6ac9e53 100644 --- a/src/r_things.cpp +++ b/src/r_things.cpp @@ -2310,6 +2310,14 @@ static void R_ProjectSprite(mobj_t *thing) ? interp.angle + (ang >= ANGLE_180 ? -ANGLE_90 : ANGLE_90) : R_PointToAngle(interp.x, interp.y)); + // Krangle contrast in 3P/4P because scalelight + // scales differently depending on the screen + // width (which is halved in 3P/4P). + if (r_splitscreen > 1) + { + extralight *= 2; + } + // Less change in contrast in dark sectors extralight = FixedMul(extralight, std::min(std::max(0, lightnum), LIGHTLEVELS - 1) * FRACUNIT / (LIGHTLEVELS - 1)); diff --git a/src/screen.c b/src/screen.c index 2d5670b23..7d4d3cc60 100644 --- a/src/screen.c +++ b/src/screen.c @@ -45,10 +45,6 @@ // SRB2Kart #include "r_fps.h" // R_GetFramerateCap -#if defined (USEASM) && !defined (NORUSEASM)//&& (!defined (_MSC_VER) || (_MSC_VER <= 1200)) -#define RUSEASM //MSC.NET can't patch itself -#endif - // ------------------ // global video state // ------------------ diff --git a/src/sdl/CMakeLists.txt b/src/sdl/CMakeLists.txt index 03b18d219..e84dfafcc 100644 --- a/src/sdl/CMakeLists.txt +++ b/src/sdl/CMakeLists.txt @@ -13,11 +13,6 @@ target_sources(SRB2SDL2 PRIVATE hwsym_sdl.c ) -if(${SRB2_USEASM}) - set_source_files_properties(${SRB2_ASM_SOURCES} PROPERTIES LANGUAGE C) - set_source_files_properties(${SRB2_ASM_SOURCES} PROPERTIES COMPILE_FLAGS "-x assembler-with-cpp") -endif() - if("${CMAKE_SYSTEM_NAME}" MATCHES Windows) target_sources(SRB2SDL2 PRIVATE ../win32/win_dbg.c @@ -66,18 +61,6 @@ if("${CMAKE_SYSTEM_NAME}" MATCHES Linux) target_link_libraries(SRB2SDL2 PRIVATE m rt) endif() -if(${SRB2_USEASM}) - if(${SRB2_CONFIG_YASM}) - set(ASM_ASSEMBLER_TEMP ${CMAKE_ASM_YASM_COMPILER}) - set(ASM_ASSEMBLER_OBJFORMAT ${CMAKE_ASM_YASM_OBJECT_FORMAT}) - set_source_files_properties(${SRB2_NASM_SOURCES} LANGUAGE ASM_YASM) - else() - set(ASM_ASSEMBLER_TEMP ${CMAKE_ASM_NASM_COMPILER}) - set(ASM_ASSEMBLER_OBJFORMAT ${CMAKE_ASM_NASM_OBJECT_FORMAT}) - set_source_files_properties(${SRB2_NASM_SOURCES} LANGUAGE ASM_NASM) - endif() -endif() - if("${CMAKE_SYSTEM_NAME}" MATCHES Windows) target_link_libraries(SRB2SDL2 PRIVATE ws2_32 diff --git a/src/sdl/MakeCYG.cfg b/src/sdl/MakeCYG.cfg deleted file mode 100644 index 5907579c1..000000000 --- a/src/sdl/MakeCYG.cfg +++ /dev/null @@ -1,17 +0,0 @@ -# -# sdl/makeCYG.cfg for SRB2/Cygwin -# - -# -#Cygwin, for debugging - - NOHW=1 - NOHS=1 - NOASM=1 - - OPTS+=-DLINUX - - i_system_o+=$(OBJDIR)/SRB2.res - - # name of the exefile - EXENAME?=lsdlsrb2.exe diff --git a/src/sdl/SRB2Pandora/Makefile.cfg b/src/sdl/SRB2Pandora/Makefile.cfg deleted file mode 100644 index c7f0f8449..000000000 --- a/src/sdl/SRB2Pandora/Makefile.cfg +++ /dev/null @@ -1,39 +0,0 @@ -# Quick Pandora target to make a compliant SRB2 PND file. - -PNDNAME=SRB2.pnd -PNDDIR=$(BIN)/pnd -ICON=sdl/SRB2Pandora/icon.png -PXML=sdl/SRB2Pandora/PXML.xml - -SED=sed -CAT=cat -CP=cp -XARGS=xargs -FOR=for -WGET=wget -P $(PNDDIR) -c -nc - -SHXARGS:=$(XARGS) -SHSED:=$(SED) - -ifndef ECHO - CP:=@$(CP) - CAT:=@$(CAT) - SED:=@$(SED) - XARGS:=@$(XARGS) - FOR:=@(FOR) -endif - -$(BIN)/$(PNDNAME): $(BIN)/$(EXENAME) - @echo Linking $(PNDNAME)... - $(MKDIR) $(PNDDIR) - $(CP) $(BIN)/$(EXENAME) $(PNDDIR) - $(CP) $(ICON) $(PNDDIR) - $(CP) $(PXML) $(PNDDIR) -ifdef WITHDATA - $(FOR) datafile in $(shell echo $(D_FILES) | $(SHSED) 's/\.srb/\.wad/' | $(SHXARGS) -n 1 basename); do \ - $(WGET) http://alam.srb2.org/SRB2/2.0.6-Final/Resources/$$datafile; \ - done -endif - $(MKISOFS) -l -r -o $@ $(PNDDIR) - $(CAT) $(PXML) >> $@ - $(REMOVE) -r $(PNDDIR) diff --git a/src/sdl/SRB2Pandora/PXML.xml b/src/sdl/SRB2Pandora/PXML.xml deleted file mode 100644 index 33a9587db..000000000 --- a/src/sdl/SRB2Pandora/PXML.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - Sonic Robo Blast 2 - ソニック・ロボ・ブラスト・2 - A 3D Sonic fangame with a huge fanbase developing custom content, including characters, levels, and even large-scale modifications - - - - - - - - - - - diff --git a/src/sdl/SRB2Pandora/icon.png b/src/sdl/SRB2Pandora/icon.png deleted file mode 100644 index 63af73ac3..000000000 Binary files a/src/sdl/SRB2Pandora/icon.png and /dev/null differ diff --git a/src/sdl/Srb2SDL-vc10.vcxproj b/src/sdl/Srb2SDL-vc10.vcxproj deleted file mode 100644 index 80628713c..000000000 --- a/src/sdl/Srb2SDL-vc10.vcxproj +++ /dev/null @@ -1,526 +0,0 @@ - - - - - Debug - ARM - - - Debug - ARM64 - - - Debug - Win32 - - - Release - ARM - - - Release - ARM64 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - srb2kart - {61BA7D3C-F77D-4D31-B718-1177FE482CF2} - Win32Proj - Srb2SDL - 10.0.16299.0 - srb2kart - - - - v140 - true - - - v141 - true - true - - - v140 - false - true - - - v141 - false - true - true - - - v140 - true - - - v141 - true - true - - - v140 - false - true - - - v141 - false - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - false - - - - ProgramDatabase - false - - - setupapi.lib;winmm.lib;imm32.lib;version.lib;ole32.lib;advapi32.lib;shell32.lib;gdi32.lib;oleaut32.lib;uuid.lib;%(AdditionalDependencies) - - - - - ProgramDatabase - false - - - - - setupapi.lib;winmm.lib;imm32.lib;version.lib;ole32.lib;advapi32.lib;shell32.lib;gdi32.lib;oleaut32.lib;uuid.lib;%(AdditionalDependencies) - - - - - {72b01aca-7a1a-4f7b-acef-2607299cf052} - false - - - {73a5729c-7323-41d4-ab48-8a03c9f81603} - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Document - - - - - Document - - - - - Document - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - - - true - - - true - - - - - - - - - - - - - - - - - - - - - true - - - true - - - true - - - true - - - - - - - - - - - true - - - - - - - - - - - - - - - - - - - diff --git a/src/sdl/Srb2SDL-vc10.vcxproj.filters b/src/sdl/Srb2SDL-vc10.vcxproj.filters deleted file mode 100644 index 73fa77039..000000000 --- a/src/sdl/Srb2SDL-vc10.vcxproj.filters +++ /dev/null @@ -1,1011 +0,0 @@ - - - - - {646b0817-0dc5-4793-92da-24f7c073eda9} - - - {623dc46a-ca67-4857-a2f0-d4357ff43cd7} - - - {067072e3-d4f9-4198-8f0f-cfcbc2f6c02e} - - - {b92269bc-8016-4be6-8af4-47ad1fee89f6} - - - {87800b1f-d777-4c10-876c-2d92cb872dce} - - - {62561ca5-fce2-4d08-a949-a0a3d17bf339} - - - {2b867933-3f95-4c63-b3a9-a00f84446cbb} - - - {32aefb9c-2644-4093-9ef5-e91d44aa1037} - - - {b7a026c5-1987-42c4-bc59-4eeb4f54b7c9} - - - {bdfebd6c-f16e-47f5-9d8c-24baf1bad420} - - - {803cf010-5486-46c8-ade2-b01a0869210a} - - - {83376506-8a10-4a40-a039-42b2ec7bf0f4} - - - {11b4cbfe-c155-4a85-9cc6-f6c88b6972e0} - - - {11c84652-594a-44bf-a878-74623ec884ca} - - - {7609c825-447e-4462-be3c-75a4994227f0} - - - {b312a1da-edaa-49d2-b206-c269173a4394} - - - {06686222-4320-4c3d-8685-2b8545d587d5} - - - {3ae8d323-3eeb-47ab-8c28-b891616db1b4} - - - - - A_Asm - - - B_Bots - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - D_Doom - - - D_Doom - - - D_Doom - - - D_Doom - - - D_Doom - - - D_Doom - - - D_Doom - - - D_Doom - - - D_Doom - - - D_Doom - - - D_Doom - - - D_Doom - - - D_Doom - - - D_Doom - - - D_Doom - - - F_Frame - - - G_Game - - - G_Game - - - G_Game - - - G_Game - - - H_Hud - - - H_Hud - - - H_Hud - - - H_Hud - - - H_Hud - - - H_Hud - - - Hw_Hardware - - - Hw_Hardware - - - Hw_Hardware - - - Hw_Hardware - - - Hw_Hardware - - - Hw_Hardware - - - Hw_Hardware - - - Hw_Hardware - - - Hw_Hardware - - - Hw_Hardware - - - Hw_Hardware - - - Hw_Hardware - - - Hw_Hardware - - - Hw_Hardware - - - Hw_Hardware - - - Hw_Hardware - - - Hw_Hardware - - - I_Interface - - - I_Interface - - - I_Interface - - - I_Interface - - - I_Interface - - - I_Interface - - - I_Interface - - - I_Interface - - - I_Interface - - - I_Interface - - - I_Interface - - - I_Interface - - - I_Interface - - - LUA - - - LUA - - - LUA - - - LUA - - - M_Misc - - - M_Misc - - - M_Misc - - - M_Misc - - - M_Misc - - - M_Misc - - - M_Misc - - - M_Misc - - - M_Misc - - - M_Misc - - - M_Misc - - - M_Misc - - - M_Misc - - - M_Misc - - - M_Misc - - - M_Misc - - - O_Other - - - O_Other - - - P_Play - - - P_Play - - - P_Play - - - P_Play - - - P_Play - - - P_Play - - - P_Play - - - P_Play - - - P_Play - - - P_Play - - - P_Play - - - P_Play - - - R_Rend - - - R_Rend - - - R_Rend - - - R_Rend - - - R_Rend - - - R_Rend - - - R_Rend - - - R_Rend - - - R_Rend - - - R_Rend - - - R_Rend - - - R_Rend - - - R_Rend - - - R_Rend - - - R_Rend - - - R_Rend - - - S_Sounds - - - S_Sounds - - - W_Wad - - - W_Wad - - - SDLApp - - - SDLApp - - - SDLApp - - - SDLApp - - - SDLApp - -<<<<<<< HEAD - - D_Doom -======= - - Hw_Hardware - - - R_Rend - - - R_Rend - - - R_Rend - - - R_Rend - - - R_Rend ->>>>>>> srb2/next - - - - - A_Asm - - - A_Asm - - - A_Asm - - - - - A_Asm - - - O_Other - - - SDLApp - - - - - B_Bots - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - BLUA - - - D_Doom - - - D_Doom - - - D_Doom - - - D_Doom - - - D_Doom - - - D_Doom - - - D_Doom - - - F_Frame - - - F_Frame - - - G_Game - - - G_Game - - - G_Game - - - H_Hud - - - H_Hud - - - H_Hud - - - H_Hud - - - H_Hud - - - H_Hud - - - Hw_Hardware - - - Hw_Hardware - - - Hw_Hardware - - - Hw_Hardware - - - Hw_Hardware - - - Hw_Hardware - - - Hw_Hardware - - - Hw_Hardware - - - Hw_Hardware - -<<<<<<< HEAD - -======= - ->>>>>>> srb2/next - Hw_Hardware - - - Hw_Hardware - - - Hw_Hardware - - - Hw_Hardware - - - I_Interface - - - I_Interface - - - I_Interface - - - I_Interface - - - I_Interface - - - LUA - - - LUA - - - LUA - - - LUA - - - LUA - - - LUA - - - LUA - - - LUA - - - LUA - - - LUA - - - LUA - - - LUA - - - LUA - - - LUA - - - M_Misc - - - M_Misc - - - M_Misc - - - M_Misc - - - M_Misc - - - M_Misc - - - M_Misc - - - M_Misc - - - M_Misc - - - M_Misc - - - M_Misc - - - M_Misc - - - M_Misc - - - M_Misc - - - O_Other - - - P_Play - - - P_Play - - - P_Play - - - P_Play - - - P_Play - - - P_Play - - - P_Play - - - P_Play - - - P_Play - - - P_Play - - - P_Play - - - P_Play - - - P_Play - - - P_Play - - - P_Play - - - P_Play - - - P_Play - - - P_Play - - - P_Play - - - P_Play - - - P_Play - - - P_Play - - - P_Play - - - R_Rend - - - R_Rend - - - R_Rend - - - R_Rend - - - R_Rend - - - R_Rend - - - R_Rend - - - R_Rend - - - R_Rend - - - R_Rend - - - R_Rend - - - R_Rend - - - R_Rend - - - R_Rend - - - R_Rend - - - S_Sounds - - - S_Sounds - - - W_Wad - - - W_Wad - - - SDLApp - - - SDLApp - - - SDLApp - - - SDLApp - - - SDLApp - - - SDLApp - - - SDLApp - - - SDLApp - - - SDLApp - - - SDLApp - - - SDLApp - - - SDLApp - - - SDLApp - - - SDLApp - - - SDLApp - - - SDLApp - -<<<<<<< HEAD - - D_Doom -======= - - Hw_Hardware - - - - R_Rend - - - R_Rend - - - R_Rend - - - R_Rend - - - R_Rend ->>>>>>> srb2/next - - - - - SDLApp - - - diff --git a/src/sdl/Srb2SDL-vc9.vcproj b/src/sdl/Srb2SDL-vc9.vcproj deleted file mode 100644 index f1574feba..000000000 --- a/src/sdl/Srb2SDL-vc9.vcproj +++ /dev/null @@ -1,6065 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/sdl/Srb2SDL.dsp b/src/sdl/Srb2SDL.dsp deleted file mode 100644 index 9f6dd7b33..000000000 --- a/src/sdl/Srb2SDL.dsp +++ /dev/null @@ -1,1049 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Srb2SDL" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=Srb2SDL - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "Srb2SDL.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "Srb2SDL.mak" CFG="Srb2SDL - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "Srb2SDL - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "Srb2SDL - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "Srb2SDL - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\bin\VC\Release\SDL" -# PROP Intermediate_Dir "..\..\objs\VC\Release\SDL" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -MTL=midl.exe -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /G5 /W3 /GX /Zi /Ot /Og /Oi /Op /Oy /Ob1 /I "..\..\libs\libpng-src" /I "..\..\libs\zlib" /D "NDEBUG" /D "SDLMAIN" /D "NO_STDIO_REDIRECT" /D "USE_WGL_SWAP" /D "DIRECTFULLSCREEN" /D "HAVE_SDL" /D "HWRENDER" /D "HW3SOUND" /D "HAVE_FILTER" /D "HAVE_MIXER" /D "USEASM" /D "HAVE_PNG" /FR /FD /GF /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -# SUBTRACT RSC /x -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo /o"..\..\objs\SDL\Release\SRB2.bsc" -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 -# ADD LINK32 SDL.lib SDL_mixer.lib user32.lib advapi32.lib ws2_32.lib /nologo /subsystem:windows /pdb:"C:\srb2demo2\srb2sdl.pdb" /debug /machine:I386 /out:"C:\srb2demo2\srb2sdl.exe" -# SUBTRACT LINK32 /profile /pdb:none /incremental:yes - -!ELSEIF "$(CFG)" == "Srb2SDL - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\bin\VC\Debug\SDL" -# PROP Intermediate_Dir "..\..\objs\VC\Debug\SDL" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /G6 /W4 /WX /Gm /GX /ZI /Od /Op /I "..\..\libs\libpng-src" /I "..\..\libs\zlib" /D "_DEBUG" /D "USE_WGL_SWAP" /D "DIRECTFULLSCREEN" /D "HAVE_SDL" /D "HWRENDER" /D "HW3SOUND" /D "HAVE_FILTER" /D "HAVE_MIXER" /D "USEASM" /D "HAVE_PNG" /FR /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -# SUBTRACT RSC /x -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo /o"..\..\objs\SDL\Debug\SRB2.bsc" -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 SDL.lib SDL_mixer.lib user32.lib advapi32.lib ws2_32.lib /nologo /subsystem:console /pdb:"C:\srb2demo2\srb2sdldebug.pdb" /debug /machine:I386 /out:"C:\srb2demo2\srb2sdldebug.exe" /pdbtype:sept -# SUBTRACT LINK32 /pdb:none - -!ENDIF - -# Begin Target - -# Name "Srb2SDL - Win32 Release" -# Name "Srb2SDL - Win32 Debug" -# Begin Group "SDLapp" - -# PROP Default_Filter "" -# Begin Group "filter" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\filter\filters.c -# End Source File -# Begin Source File - -SOURCE=.\filter\filters.h -# End Source File -# Begin Source File - -SOURCE=.\filter\hq2x.c -# End Source File -# Begin Source File - -SOURCE=.\filter\hq2x.h -# End Source File -# Begin Source File - -SOURCE=.\filter\interp.h -# End Source File -# Begin Source File - -SOURCE=.\filter\lq2x.c -# End Source File -# Begin Source File - -SOURCE=.\filter\lq2x.h -# End Source File -# End Group -# Begin Source File - -SOURCE=.\dosstr.c -# End Source File -# Begin Source File - -SOURCE=.\endtxt.c -# End Source File -# Begin Source File - -SOURCE=.\endtxt.h -# End Source File -# Begin Source File - -SOURCE=..\filesrch.c -# End Source File -# Begin Source File - -SOURCE=..\filesrch.h -# End Source File -# Begin Source File - -SOURCE=.\hwsym_sdl.c -# End Source File -# Begin Source File - -SOURCE=.\hwsym_sdl.h -# End Source File -# Begin Source File - -SOURCE=.\i_cdmus.c -# End Source File -# Begin Source File - -SOURCE=.\i_main.c -# End Source File -# Begin Source File - -SOURCE=.\i_net.c -# End Source File -# Begin Source File - -SOURCE=.\i_sound.c -# End Source File -# Begin Source File - -SOURCE=.\i_system.c -# End Source File -# Begin Source File - -SOURCE=.\i_video.c -# End Source File -# Begin Source File - -SOURCE=.\IMG_xpm.c -# PROP Exclude_From_Build 1 -# End Source File -# Begin Source File - -SOURCE=.\ogl_sdl.c -# End Source File -# Begin Source File - -SOURCE=.\ogl_sdl.h -# End Source File -# Begin Source File - -SOURCE=..\hardware\r_opengl\r_opengl.c -# End Source File -# Begin Source File - -SOURCE=..\hardware\r_opengl\r_opengl.h -# End Source File -# Begin Source File - -SOURCE=.\SDL_icon.xpm -# End Source File -# Begin Source File - -SOURCE=.\SDL_main\SDL_win32_main.c - -!IF "$(CFG)" == "Srb2SDL - Win32 Release" - -!ELSEIF "$(CFG)" == "Srb2SDL - Win32 Debug" - -# PROP Exclude_From_Build 1 - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\sdlmain.h -# End Source File -# Begin Source File - -SOURCE=..\win32\Srb2win.rc -# End Source File -# Begin Source File - -SOURCE=..\win32\win_dbg.c -# End Source File -# Begin Source File - -SOURCE=..\win32\win_dbg.h -# End Source File -# Begin Source File - -SOURCE=..\win32\win_main.h -# End Source File -# End Group -# Begin Group "A_Asm" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\p5prof.h -# End Source File -# Begin Source File - -SOURCE=..\tmap.nas - -!IF "$(CFG)" == "Srb2SDL - Win32 Release" - -# PROP Ignore_Default_Tool 1 -# Begin Custom Build - Compiling $(InputName).nas with NASM... -IntDir=.\..\..\objs\VC\Release\SDL -InputPath=..\tmap.nas -InputName=tmap - -"$(IntDir)/$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - nasm -g -o $(IntDir)/$(InputName).obj -f win32 $(InputPath) - -# End Custom Build - -!ELSEIF "$(CFG)" == "Srb2SDL - Win32 Debug" - -# PROP Ignore_Default_Tool 1 -# Begin Custom Build - Compiling $(InputName).nas with NASM... -IntDir=.\..\..\objs\VC\Debug\SDL -InputPath=..\tmap.nas -InputName=tmap - -"$(IntDir)/$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - nasm -g -o $(IntDir)/$(InputName).obj -f win32 $(InputPath) - -# End Custom Build - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=..\tmap_mmx.nas - -!IF "$(CFG)" == "Srb2SDL - Win32 Release" - -# PROP Ignore_Default_Tool 1 -# Begin Custom Build - Compiling $(InputName).nas with NASM... -IntDir=.\..\..\objs\VC\Release\SDL -InputPath=..\tmap_mmx.nas -InputName=tmap_mmx - -"$(IntDir)/$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - nasm -g -o $(IntDir)/$(InputName).obj -f win32 $(InputPath) - -# End Custom Build - -!ELSEIF "$(CFG)" == "Srb2SDL - Win32 Debug" - -# PROP Ignore_Default_Tool 1 -# Begin Custom Build - Compiling $(InputName).nas with NASM... - -IntDir=.\..\..\objs\VC\Debug\SDL -InputPath=..\tmap_mmx.nas -InputName=tmap_mmx - -"$(IntDir)/$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - nasm -g -o $(IntDir)/$(InputName).obj -f win32 $(InputPath) - -# End Custom Build - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=..\tmap_vc.nas - -!IF "$(CFG)" == "Srb2SDL - Win32 Release" - -# Begin Custom Build - Compiling $(InputName).nas with NASM... -IntDir=.\..\..\objs\VC\Release\SDL -InputPath=..\tmap_vc.nas -InputName=tmap_vc - -"$(IntDir)/$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - nasm -g -o $(IntDir)/$(InputName).obj -f win32 $(InputPath) - -# End Custom Build - -!ELSEIF "$(CFG)" == "Srb2SDL - Win32 Debug" - -# Begin Custom Build - Compiling $(InputName).nas with NASM... -IntDir=.\..\..\objs\VC\Debug\SDL -InputPath=..\tmap_vc.nas -InputName=tmap_vc - -"$(IntDir)/$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - nasm -g -o $(IntDir)/$(InputName).obj -f win32 $(InputPath) - -# End Custom Build - -!ENDIF - -# End Source File -# End Group -# Begin Group "D_Doom" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\comptime.c -# End Source File -# Begin Source File - -SOURCE=..\d_clisrv.c -# End Source File -# Begin Source File - -SOURCE=..\d_clisrv.h -# End Source File -# Begin Source File - -SOURCE=..\d_event.h -# End Source File -# Begin Source File - -SOURCE=..\d_main.c -# End Source File -# Begin Source File - -SOURCE=..\d_main.h -# End Source File -# Begin Source File - -SOURCE=..\d_net.c -# End Source File -# Begin Source File - -SOURCE=..\d_net.h -# End Source File -# Begin Source File - -SOURCE=..\d_netcmd.c -# End Source File -# Begin Source File - -SOURCE=..\d_netcmd.h -# End Source File -# Begin Source File - -SOURCE=..\d_netfil.c -# End Source File -# Begin Source File - -SOURCE=..\d_netfil.h -# End Source File -# Begin Source File - -SOURCE=..\d_player.h -# End Source File -# Begin Source File - -SOURCE=..\d_think.h -# End Source File -# Begin Source File - -SOURCE=..\d_ticcmd.h -# End Source File -# Begin Source File - -SOURCE=..\dehacked.c -# End Source File -# Begin Source File - -SOURCE=..\dehacked.h -# End Source File -# Begin Source File - -SOURCE=..\doomdata.h -# End Source File -# Begin Source File - -SOURCE=..\doomdef.h -# End Source File -# Begin Source File - -SOURCE=..\doomstat.h -# End Source File -# Begin Source File - -SOURCE=..\doomtype.h -# End Source File -# Begin Source File - -SOURCE=..\z_zone.c -# End Source File -# Begin Source File - -SOURCE=..\z_zone.h -# End Source File -# End Group -# Begin Group "F_Frame" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\f_finale.c -# End Source File -# Begin Source File - -SOURCE=..\f_finale.h -# End Source File -# Begin Source File - -SOURCE=..\f_wipe.c -# End Source File -# End Group -# Begin Group "G_Game" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\g_game.c -# End Source File -# Begin Source File - -SOURCE=..\g_game.h -# End Source File -# Begin Source File - -SOURCE=..\g_input.c -# End Source File -# Begin Source File - -SOURCE=..\g_input.h -# End Source File -# Begin Source File - -SOURCE=..\g_state.h -# End Source File -# End Group -# Begin Group "H_Hud" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\am_map.c -# End Source File -# Begin Source File - -SOURCE=..\am_map.h -# End Source File -# Begin Source File - -SOURCE=..\command.c -# End Source File -# Begin Source File - -SOURCE=..\command.h -# End Source File -# Begin Source File - -SOURCE=..\console.c -# End Source File -# Begin Source File - -SOURCE=..\console.h -# End Source File -# Begin Source File - -SOURCE=..\hu_stuff.c -# End Source File -# Begin Source File - -SOURCE=..\hu_stuff.h -# End Source File -# Begin Source File - -SOURCE=..\st_stuff.c -# End Source File -# Begin Source File - -SOURCE=..\st_stuff.h -# End Source File -# Begin Source File - -SOURCE=..\y_inter.c -# End Source File -# Begin Source File - -SOURCE=..\y_inter.h -# End Source File -# End Group -# Begin Group "Hw_Hardware" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\hardware\hw3dsdrv.h -# End Source File -# Begin Source File - -SOURCE=..\hardware\hw3sound.c -# End Source File -# Begin Source File - -SOURCE=..\hardware\hw3sound.h -# End Source File -# Begin Source File - -SOURCE=..\hardware\hw_bsp.c -# End Source File -# Begin Source File - -SOURCE=..\hardware\hw_cache.c -# End Source File -# Begin Source File - -SOURCE=..\hardware\hw_data.h -# End Source File -# Begin Source File - -SOURCE=..\hardware\hw_defs.h -# End Source File -# Begin Source File - -SOURCE=..\hardware\hw_dll.h -# End Source File -# Begin Source File - -SOURCE=..\hardware\hw_draw.c -# End Source File -# Begin Source File - -SOURCE=..\hardware\hw_drv.h -# End Source File -# Begin Source File - -SOURCE=..\hardware\hw_glob.h -# End Source File -# Begin Source File - -SOURCE=..\hardware\hw_light.c -# End Source File -# Begin Source File - -SOURCE=..\hardware\hw_light.h -# End Source File -# Begin Source File - -SOURCE=..\hardware\hw_main.c -# End Source File -# Begin Source File - -SOURCE=..\hardware\hw_main.h -# End Source File -# Begin Source File - -SOURCE=..\hardware\hw_md2.c -# End Source File -# Begin Source File - -SOURCE=..\hardware\hw_md2.h -# End Source File -# Begin Source File - -SOURCE=..\hardware\hws_data.h -# End Source File -# End Group -# Begin Group "I_Interface" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\byteptr.h -# End Source File -# Begin Source File - -SOURCE=..\i_joy.h -# End Source File -# Begin Source File - -SOURCE=..\i_net.h -# End Source File -# Begin Source File - -SOURCE=..\i_sound.h -# End Source File -# Begin Source File - -SOURCE=..\i_system.h -# End Source File -# Begin Source File - -SOURCE=..\i_tcp.c -# End Source File -# Begin Source File - -SOURCE=..\i_tcp.h -# End Source File -# Begin Source File - -SOURCE=..\i_video.h -# End Source File -# Begin Source File - -SOURCE=..\keys.h -# End Source File -# Begin Source File - -SOURCE=..\mserv.c -# End Source File -# Begin Source File - -SOURCE=..\mserv.h -# End Source File -# End Group -# Begin Group "M_Misc" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\m_argv.c -# End Source File -# Begin Source File - -SOURCE=..\m_argv.h -# End Source File -# Begin Source File - -SOURCE=..\m_bbox.c -# End Source File -# Begin Source File - -SOURCE=..\m_bbox.h -# End Source File -# Begin Source File - -SOURCE=..\m_cheat.c -# End Source File -# Begin Source File - -SOURCE=..\m_cheat.h -# End Source File -# Begin Source File - -SOURCE=..\m_dllist.h -# End Source File -# Begin Source File - -SOURCE=..\m_fixed.c -# End Source File -# Begin Source File - -SOURCE=..\m_fixed.h -# End Source File -# Begin Source File - -SOURCE=..\m_menu.c -# End Source File -# Begin Source File - -SOURCE=..\m_menu.h -# End Source File -# Begin Source File - -SOURCE=..\m_misc.c -# End Source File -# Begin Source File - -SOURCE=..\m_misc.h -# End Source File -# Begin Source File - -SOURCE=..\m_queue.c -# End Source File -# Begin Source File - -SOURCE=..\m_queue.h -# End Source File -# Begin Source File - -SOURCE=..\m_random.c -# End Source File -# Begin Source File - -SOURCE=..\m_random.h -# End Source File -# Begin Source File - -SOURCE=..\m_swap.h -# End Source File -# Begin Source File - -SOURCE=..\string.c -# End Source File -# End Group -# Begin Group "P_Play" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\info.c -# End Source File -# Begin Source File - -SOURCE=..\info.h -# End Source File -# Begin Source File - -SOURCE=..\p_ceilng.c -# End Source File -# Begin Source File - -SOURCE=..\p_enemy.c -# End Source File -# Begin Source File - -SOURCE=..\p_fab.c -# End Source File -# Begin Source File - -SOURCE=..\p_floor.c -# End Source File -# Begin Source File - -SOURCE=..\p_inter.c -# End Source File -# Begin Source File - -SOURCE=..\p_lights.c -# End Source File -# Begin Source File - -SOURCE=..\p_local.h -# End Source File -# Begin Source File - -SOURCE=..\p_map.c -# End Source File -# Begin Source File - -SOURCE=..\p_maputl.c -# End Source File -# Begin Source File - -SOURCE=..\p_maputl.h -# End Source File -# Begin Source File - -SOURCE=..\p_mobj.c -# End Source File -# Begin Source File - -SOURCE=..\p_mobj.h -# End Source File -# Begin Source File - -SOURCE=..\p_polyobj.c -# End Source File -# Begin Source File - -SOURCE=..\p_polyobj.h -# End Source File -# Begin Source File - -SOURCE=..\p_pspr.h -# End Source File -# Begin Source File - -SOURCE=..\p_saveg.c -# End Source File -# Begin Source File - -SOURCE=..\p_saveg.h -# End Source File -# Begin Source File - -SOURCE=..\p_setup.c -# End Source File -# Begin Source File - -SOURCE=..\p_setup.h -# End Source File -# Begin Source File - -SOURCE=..\p_sight.c -# End Source File -# Begin Source File - -SOURCE=..\p_spec.c -# End Source File -# Begin Source File - -SOURCE=..\p_spec.h -# End Source File -# Begin Source File - -SOURCE=..\p_telept.c -# End Source File -# Begin Source File - -SOURCE=..\p_tick.c -# End Source File -# Begin Source File - -SOURCE=..\p_tick.h -# End Source File -# Begin Source File - -SOURCE=..\p_user.c -# End Source File -# Begin Source File - -SOURCE=..\tables.c -# End Source File -# Begin Source File - -SOURCE=..\tables.h -# End Source File -# End Group -# Begin Group "R_Rend" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\r_bsp.c -# End Source File -# Begin Source File - -SOURCE=..\r_bsp.h -# End Source File -# Begin Source File - -SOURCE=..\r_data.c -# End Source File -# Begin Source File - -SOURCE=..\r_data.h -# End Source File -# Begin Source File - -SOURCE=..\r_defs.h -# End Source File -# Begin Source File - -SOURCE=..\r_draw.c -# End Source File -# Begin Source File - -SOURCE=..\r_draw.h -# End Source File -# Begin Source File - -SOURCE=..\r_draw16.c -# PROP Exclude_From_Build 1 -# End Source File -# Begin Source File - -SOURCE=..\r_draw8.c -# PROP Exclude_From_Build 1 -# End Source File -# Begin Source File - -SOURCE=..\r_local.h -# End Source File -# Begin Source File - -SOURCE=..\r_main.c -# End Source File -# Begin Source File - -SOURCE=..\r_main.h -# End Source File -# Begin Source File - -SOURCE=..\r_plane.c -# End Source File -# Begin Source File - -SOURCE=..\r_plane.h -# End Source File -# Begin Source File - -SOURCE=..\r_segs.c -# End Source File -# Begin Source File - -SOURCE=..\r_segs.h -# End Source File -# Begin Source File - -SOURCE=..\r_sky.c -# End Source File -# Begin Source File - -SOURCE=..\r_sky.h -# End Source File -# Begin Source File - -SOURCE=..\r_splats.c -# End Source File -# Begin Source File - -SOURCE=..\r_splats.h -# End Source File -# Begin Source File - -SOURCE=..\r_state.h -# End Source File -# Begin Source File - -SOURCE=..\r_things.c -# End Source File -# Begin Source File - -SOURCE=..\r_things.h -# End Source File -# Begin Source File - -SOURCE=..\screen.c -# End Source File -# Begin Source File - -SOURCE=..\screen.h -# End Source File -# Begin Source File - -SOURCE=..\v_video.c -# End Source File -# Begin Source File - -SOURCE=..\v_video.h -# End Source File -# End Group -# Begin Group "S_Sounds" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\s_sound.c -# End Source File -# Begin Source File - -SOURCE=..\s_sound.h -# End Source File -# Begin Source File - -SOURCE=..\sounds.c -# End Source File -# Begin Source File - -SOURCE=..\sounds.h -# End Source File -# End Group -# Begin Group "W_Wad" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\lzf.c -# End Source File -# Begin Source File - -SOURCE=..\lzf.h -# End Source File -# Begin Source File - -SOURCE=..\md5.c -# End Source File -# Begin Source File - -SOURCE=..\md5.h -# End Source File -# Begin Source File - -SOURCE=..\w_wad.c -# End Source File -# Begin Source File - -SOURCE=..\w_wad.h -# End Source File -# End Group -# Begin Group "Docs" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\doc\copying -# End Source File -# Begin Source File - -SOURCE=..\..\doc\faq.txt -# End Source File -# Begin Source File - -SOURCE=..\..\readme.txt -# End Source File -# Begin Source File - -SOURCE=..\..\doc\source.txt -# End Source File -# End Group -# Begin Source File - -SOURCE=..\win32\Srb2win.ico -# End Source File -# End Target -# End Project diff --git a/src/sdl/Srb2SDL.dsw b/src/sdl/Srb2SDL.dsw deleted file mode 100644 index 4f8f7bdce..000000000 --- a/src/sdl/Srb2SDL.dsw +++ /dev/null @@ -1,74 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "Srb2SDL"=.\Srb2SDL.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name libpng - End Project Dependency - Begin Project Dependency - Project_Dep_Name zlib - End Project Dependency -}}} - -############################################################################### - -Project: "libpng"="..\..\libs\libpng-src\projects\visualc6\libpng.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name zlib - End Project Dependency -}}} - -############################################################################### - -Project: "s_openal"=..\hardware\s_openal\s_openal.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "zlib"=..\..\libs\zlib\projects\visualc6\zlib.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/src/sdl/Srb2SDL.props b/src/sdl/Srb2SDL.props deleted file mode 100644 index 17b41bddc..000000000 --- a/src/sdl/Srb2SDL.props +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - HAVE_ZLIB;HAVE_LIBGME;USE_WGL_SWAP;DIRECTFULLSCREEN;HAVE_SDL;HWRENDER;HW3SOUND;HAVE_FILTER;HAVE_MIXER;HAVE_OPENMPT;SDLMAIN;%(PreprocessorDefinitions) - - USE_WGL_SWAP;DIRECTFULLSCREEN;HAVE_SDL;HWRENDER;HW3SOUND;HAVE_FILTER;HAVE_MIXER;SDLMAIN;%(PreprocessorDefinitions) - - - - \ No newline at end of file diff --git a/src/sdl/i_main.c b/src/sdl/i_main.c index 157a1f0be..77387aa8e 100644 --- a/src/sdl/i_main.c +++ b/src/sdl/i_main.c @@ -77,39 +77,6 @@ char logfilename[1024]; typedef BOOL (WINAPI *p_IsDebuggerPresent)(VOID); #endif -#if defined (_WIN32) -static inline VOID MakeCodeWritable(VOID) -{ -#ifdef USEASM // Disable write-protection of code segment - DWORD OldRights; - const DWORD NewRights = PAGE_EXECUTE_READWRITE; - PBYTE pBaseOfImage = (PBYTE)GetModuleHandle(NULL); - PIMAGE_DOS_HEADER dosH =(PIMAGE_DOS_HEADER)pBaseOfImage; - PIMAGE_NT_HEADERS ntH = (PIMAGE_NT_HEADERS)(pBaseOfImage + dosH->e_lfanew); - PIMAGE_OPTIONAL_HEADER oH = (PIMAGE_OPTIONAL_HEADER) - ((PBYTE)ntH + sizeof (IMAGE_NT_SIGNATURE) + sizeof (IMAGE_FILE_HEADER)); - LPVOID pA = pBaseOfImage+oH->BaseOfCode; - SIZE_T pS = oH->SizeOfCode; -#if 1 // try to find the text section - PIMAGE_SECTION_HEADER ntS = IMAGE_FIRST_SECTION (ntH); - WORD s; - for (s = 0; s < ntH->FileHeader.NumberOfSections; s++) - { - if (memcmp (ntS[s].Name, ".text\0\0", 8) == 0) - { - pA = pBaseOfImage+ntS[s].VirtualAddress; - pS = ntS[s].Misc.VirtualSize; - break; - } - } -#endif - - if (!VirtualProtect(pA,pS,NewRights,&OldRights)) - I_Error("Could not make code writable\n"); -#endif -} -#endif - #ifdef LOGMESSAGES static void InitLogging(void) { @@ -270,7 +237,6 @@ int main(int argc, char **argv) #ifndef __MINGW32__ prevExceptionFilter = SetUnhandledExceptionFilter(RecordExceptionInfo); #endif - MakeCodeWritable(); #endif // startup SRB2 diff --git a/src/sdl12/Srb2SDL-vc10.vcxproj b/src/sdl12/Srb2SDL-vc10.vcxproj deleted file mode 100644 index 1edb3d2db..000000000 --- a/src/sdl12/Srb2SDL-vc10.vcxproj +++ /dev/null @@ -1,1529 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - Srb2SDL - {61BA7D3C-F77D-4D31-B718-1177FE482CF2} - Srb2SDL - - - - Application - false - - - Application - false - - - Application - false - - - Application - false - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - .\..\..\bin\VC10\$(Platform)\$(Configuration)\ - .\..\..\objs\VC10\$(Platform)\$(Configuration)\SDL\ - true - .\..\..\bin\VC10\$(Platform)\$(Configuration)\ - .\..\..\objs\VC10\$(Platform)\$(Configuration)\SDL\ - true - .\..\..\bin\VC10\$(Platform)\$(Configuration)\ - .\..\..\objs\VC10\$(Platform)\$(Configuration)\SDL\ - false - .\..\..\bin\VC10\$(Platform)\$(Configuration)\ - .\..\..\objs\VC10\$(Platform)\$(Configuration)\SDL\ - false - $(SDL12_PREFIX)\include;$(SDL12_MIXER_PREFIX)\include;$(FMOD3_PREFIX)api\inc;$(IncludePath) - $(SDL12_PREFIX)\include;$(SDL12_MIXER_PREFIX)\include;$(FMOD3_PREFIX)api\inc;$(IncludePath) - $(SDL12_PREFIX)\include;$(SDL12_MIXER_PREFIX)\include;$(FMOD3_PREFIX)api\inc;$(IncludePath) - $(SDL12_PREFIX)\include;$(SDL12_MIXER_PREFIX)\include;$(FMOD3_PREFIX)api\inc;$(IncludePath) - $(SDL12_PREFIX)\lib;$(SDL12_MIXER_PREFIX)\lib;$(LibraryPath) - $(SDL12_PREFIX)\lib;$(SDL12_MIXER_PREFIX)\lib;$(LibraryPath) - $(SDL12_PREFIX)\lib\x64;$(SDL12_MIXER_PREFIX)\lib\x64;$(LibraryPath) - $(SDL12_PREFIX)\lib\x64;$(SDL12_MIXER_PREFIX)\lib\x64;$(LibraryPath) - - - - Getting revision number from the SCM system - "$(ProjectDir)..\..\comptime.bat" "$(ProjectDir).." - - - .\..\..\bin\VC10\$(Platform)\$(Configuration)\SDL\Srb2SDL-vc9.tlb - - - - - Disabled - $(ProjectDir)..\..\libs\libpng-src;$(ProjectDir)..\..\libs\zlib;%(AdditionalIncludeDirectories) - _DEBUG;USE_WGL_SWAP;DIRECTFULLSCREEN;HAVE_SDL;HWRENDER;HW3SOUND;HAVE_FILTER;HAVE_MIXER;USEASM;HAVE_PNG;COMPVERSION;HAVE_BLUA;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - $(IntDir) - $(IntDir)Srb2SDL.pdb - true - Level4 - true - true - EditAndContinue - CompileAsC - 4121;%(DisableSpecificWarnings) - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - SDL.lib;SDL_mixer.lib;ws2_32.lib;%(AdditionalDependencies) - $(OutDir)srb2sdl.exe - true - true - $(OutDir)srb2sdl.pdb - Console - false - - - MachineX86 - - - true - $(OutDir)Srb2sdl.bsc - - - - - Getting revision number from the SCM system - "$(ProjectDir)..\..\comptime.bat" "$(ProjectDir).." - - - X64 - .\..\..\bin\VC10\$(Platform)\$(Configuration)\SDL\Srb2SDL-vc9.tlb - - - - - Disabled - $(ProjectDir)..\..\libs\libpng-src;$(ProjectDir)..\..\libs\zlib;%(AdditionalIncludeDirectories) - _DEBUG;USE_WGL_SWAP;DIRECTFULLSCREEN;HAVE_SDL;HWRENDER;HW3SOUND;HAVE_FILTER;HAVE_MIXER;HAVE_PNG;COMPVERSION;HAVE_BLUA;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebug - $(IntDir) - $(IntDir)Srb2SDL.pdb - true - Level4 - true - true - ProgramDatabase - CompileAsC - 4121;%(DisableSpecificWarnings) - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - - - SDL.lib;SDL_mixer.lib;ws2_32.lib;%(AdditionalDependencies) - $(OutDir)srb2sdl.exe - true - true - $(OutDir)srb2sdl.pdb - Console - false - - - MachineX64 - - - true - $(OutDir)Srb2sdl.bsc - - - - - Getting revision number from the SCM system - "$(ProjectDir)..\..\comptime.bat" "$(ProjectDir).." - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - .\..\..\bin\VC10\$(Platform)\$(Configuration)\SDL\Srb2SDL-vc9.tlb - - - - - /MP %(AdditionalOptions) - Disabled - OnlyExplicitInline - true - Speed - true - $(ProjectDir)..\..\libs\libpng-src;$(ProjectDir)..\..\libs\zlib;%(AdditionalIncludeDirectories) - NDEBUG;SDLMAIN;NO_STDIO_REDIRECT;USE_WGL_SWAP;DIRECTFULLSCREEN;HAVE_SDL;HWRENDER;HW3SOUND;HAVE_FILTER;HAVE_MIXER;USEASM;HAVE_PNG;COMPVERSION;HAVE_BLUA;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) - true - MultiThreaded - .\..\..\objs\VC10\$(Platform)\$(Configuration)\SDL\Srb2SDL-vc9.pch - $(IntDir) - $(IntDir)Srb2SDL.pdb - true - Level3 - true - ProgramDatabase - CompileAsC - 4121;%(DisableSpecificWarnings) - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - SDL.lib;SDL_mixer.lib;ws2_32.lib;%(AdditionalDependencies) - $(OutDir)srb2sdl.exe - true - true - $(OutDir)srb2sdl.pdb - Windows - false - - - MachineX86 - - - true - $(OutDir)Srb2sdl.bsc - - - - - Getting revision number from the SCM system - "$(ProjectDir)..\..\comptime.bat" "$(ProjectDir).." - - - NDEBUG;%(PreprocessorDefinitions) - true - true - X64 - .\..\..\bin\VC10\$(Platform)\$(Configuration)\SDL\Srb2SDL-vc9.tlb - - - - - /MP %(AdditionalOptions) - Disabled - OnlyExplicitInline - true - Speed - true - $(ProjectDir)..\..\libs\libpng-src;$(ProjectDir)..\..\libs\zlib;%(AdditionalIncludeDirectories) - NDEBUG;SDLMAIN;NO_STDIO_REDIRECT;USE_WGL_SWAP;DIRECTFULLSCREEN;HAVE_SDL;HWRENDER;HW3SOUND;HAVE_FILTER;HAVE_MIXER;HAVE_PNG;COMPVERSION;HAVE_BLUA;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) - true - MultiThreaded - .\..\..\objs\VC10\$(Platform)\$(Configuration)\SDL\Srb2SDL-vc9.pch - $(IntDir) - $(IntDir)Srb2SDL.pdb - true - Level3 - true - ProgramDatabase - CompileAsC - 4121;%(DisableSpecificWarnings) - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - SDL.lib;SDL_mixer.lib;ws2_32.lib;%(AdditionalDependencies) - $(OutDir)srb2sdl.exe - true - true - $(OutDir)srb2sdl.pdb - Windows - false - - - MachineX64 - - - true - $(OutDir)Srb2sdl.bsc - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - true - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - true - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - true - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - true - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - true - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - true - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - true - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - true - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - true - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - true - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - true - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - true - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - true - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - true - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Compiling %(Filename).nas with NASM... - nasm -g -o $(IntDir)%(Filename).obj -f win32 "%(FullPath)" - $(IntDir)%(Filename).obj;%(Outputs) - true - Compiling %(Filename).nas with NASM... - nasm -g -o $(IntDir)%(Filename).obj -f win32 "%(FullPath)" - $(IntDir)%(Filename).obj;%(Outputs) - Compiling %(Filename).nas with NASM... - nasm -g -o $(IntDir)%(Filename).obj -f win32 "%(FullPath)" - $(IntDir)%(Filename).obj;%(Outputs) - true - Compiling %(Filename).nas with NASM... - nasm -g -o $(IntDir)%(Filename).obj -f win32 "%(FullPath)" - $(IntDir)%(Filename).obj;%(Outputs) - - - Compiling %(Filename).nas with NASM... - nasm -g -o $(IntDir)%(Filename).obj -f win32 "%(FullPath)" - $(IntDir)%(Filename).obj;%(Outputs) - true - Compiling %(Filename).nas with NASM... - nasm -g -o $(IntDir)%(Filename).obj -f win32 "%(FullPath)" - $(IntDir)%(Filename).obj;%(Outputs) - Compiling %(Filename).nas with NASM... - nasm -g -o $(IntDir)%(Filename).obj -f win32 "%(FullPath)" - $(IntDir)%(Filename).obj;%(Outputs) - true - Compiling %(Filename).nas with NASM... - nasm -g -o $(IntDir)%(Filename).obj -f win32 "%(FullPath)" - $(IntDir)%(Filename).obj;%(Outputs) - - - Compiling %(Filename).nas with NASM... - nasm -g -o $(IntDir)%(Filename).obj -f win32 "%(FullPath)" - $(IntDir)%(Filename).obj;%(Outputs) - true - Compiling %(Filename).nas with NASM... - nasm -g -o $(IntDir)%(Filename).obj -f win32 "%(FullPath)" - $(IntDir)%(Filename).obj;%(Outputs) - Compiling %(Filename).nas with NASM... - nasm -g -o $(IntDir)%(Filename).obj -f win32 "%(FullPath)" - $(IntDir)%(Filename).obj;%(Outputs) - true - Compiling %(Filename).nas with NASM... - nasm -g -o $(IntDir)%(Filename).obj -f win32 "%(FullPath)" - $(IntDir)%(Filename).obj;%(Outputs) - - - - - - - - - - %(PreprocessorDefinitions) - \Users\alam\svn\srb2mods\SRB2\branches\ALAM\src\win32;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - \Users\alam\svn\srb2mods\SRB2\branches\ALAM\src\win32;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - \Users\alam\svn\srb2mods\SRB2\branches\ALAM\src\win32;%(AdditionalIncludeDirectories) - %(PreprocessorDefinitions) - \Users\alam\svn\srb2mods\SRB2\branches\ALAM\src\win32;%(AdditionalIncludeDirectories) - - - - - {72b01aca-7a1a-4f7b-acef-2607299cf052} - false - - - {73a5729c-7323-41d4-ab48-8a03c9f81603} - false - - - - - - diff --git a/src/sdl12/Srb2SDL-vc9.vcproj b/src/sdl12/Srb2SDL-vc9.vcproj deleted file mode 100644 index 16c00454d..000000000 --- a/src/sdl12/Srb2SDL-vc9.vcproj +++ /dev/null @@ -1,5929 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/sdl12/Srb2SDL.dsp b/src/sdl12/Srb2SDL.dsp deleted file mode 100644 index ce35e2e23..000000000 --- a/src/sdl12/Srb2SDL.dsp +++ /dev/null @@ -1,1053 +0,0 @@ -# Microsoft Developer Studio Project File - Name="Srb2SDL" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=Srb2SDL - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "Srb2SDL.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "Srb2SDL.mak" CFG="Srb2SDL - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "Srb2SDL - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "Srb2SDL - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "Srb2SDL - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "..\..\bin\VC\Release\SDL" -# PROP Intermediate_Dir "..\..\objs\VC\Release\SDL" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -MTL=midl.exe -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /G5 /W3 /GX /Zi /Ot /Og /Oi /Op /Oy /Ob1 /I "..\..\libs\libpng-src" /I "..\..\libs\zlib" /D "NDEBUG" /D "SDLMAIN" /D "NO_STDIO_REDIRECT" /D "USE_WGL_SWAP" /D "DIRECTFULLSCREEN" /D "HAVE_SDL" /D "HWRENDER" /D "HW3SOUND" /D "HAVE_FILTER" /D "HAVE_MIXER" /D "USEASM" /D "HAVE_PNG" /FR /FD /GF /c -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -# SUBTRACT RSC /x -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo /o"..\..\objs\SDL\Release\SRB2.bsc" -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 -# ADD LINK32 SDL.lib SDL_mixer.lib user32.lib advapi32.lib ws2_32.lib /nologo /subsystem:windows /pdb:"C:\srb2demo2\srb2sdl.pdb" /debug /machine:I386 /out:"C:\srb2demo2\srb2sdl.exe" -# SUBTRACT LINK32 /profile /pdb:none /incremental:yes - -!ELSEIF "$(CFG)" == "Srb2SDL - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "..\..\bin\VC\Debug\SDL" -# PROP Intermediate_Dir "..\..\objs\VC\Debug\SDL" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -MTL=midl.exe -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /G6 /W4 /WX /Gm /GX /ZI /Od /Op /I "..\..\libs\libpng-src" /I "..\..\libs\zlib" /D "_DEBUG" /D "USE_WGL_SWAP" /D "DIRECTFULLSCREEN" /D "HAVE_SDL" /D "HWRENDER" /D "HW3SOUND" /D "HAVE_FILTER" /D "HAVE_MIXER" /D "USEASM" /D "HAVE_PNG" /FR /FD /GZ /c -# SUBTRACT CPP /YX -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -# SUBTRACT RSC /x -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo /o"..\..\objs\SDL\Debug\SRB2.bsc" -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 SDL.lib SDL_mixer.lib user32.lib advapi32.lib ws2_32.lib /nologo /subsystem:console /pdb:"C:\srb2demo2\srb2sdldebug.pdb" /debug /machine:I386 /out:"C:\srb2demo2\srb2sdldebug.exe" /pdbtype:sept -# SUBTRACT LINK32 /pdb:none - -!ENDIF - -# Begin Target - -# Name "Srb2SDL - Win32 Release" -# Name "Srb2SDL - Win32 Debug" -# Begin Group "SDLapp" - -# PROP Default_Filter "" -# Begin Group "filter" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=.\filter\filters.c -# End Source File -# Begin Source File - -SOURCE=.\filter\filters.h -# End Source File -# Begin Source File - -SOURCE=.\filter\hq2x.c -# End Source File -# Begin Source File - -SOURCE=.\filter\hq2x.h -# End Source File -# Begin Source File - -SOURCE=.\filter\interp.h -# End Source File -# Begin Source File - -SOURCE=.\filter\lq2x.c -# End Source File -# Begin Source File - -SOURCE=.\filter\lq2x.h -# End Source File -# End Group -# Begin Source File - -SOURCE=.\dosstr.c -# End Source File -# Begin Source File - -SOURCE=.\endtxt.c -# End Source File -# Begin Source File - -SOURCE=.\endtxt.h -# End Source File -# Begin Source File - -SOURCE=..\filesrch.c -# End Source File -# Begin Source File - -SOURCE=..\filesrch.h -# End Source File -# Begin Source File - -SOURCE=.\hwsym_sdl.c -# End Source File -# Begin Source File - -SOURCE=.\hwsym_sdl.h -# End Source File -# Begin Source File - -SOURCE=.\i_cdmus.c -# End Source File -# Begin Source File - -SOURCE=.\i_main.c -# End Source File -# Begin Source File - -SOURCE=.\i_net.c -# End Source File -# Begin Source File - -SOURCE=.\i_sound.c -# End Source File -# Begin Source File - -SOURCE=.\i_system.c -# End Source File -# Begin Source File - -SOURCE=.\i_video.c -# End Source File -# Begin Source File - -SOURCE=.\IMG_xpm.c -# PROP Exclude_From_Build 1 -# End Source File -# Begin Source File - -SOURCE=.\ogl_sdl.c -# End Source File -# Begin Source File - -SOURCE=.\ogl_sdl.h -# End Source File -# Begin Source File - -SOURCE=..\hardware\r_opengl\r_opengl.c -# End Source File -# Begin Source File - -SOURCE=..\hardware\r_opengl\r_opengl.h -# End Source File -# Begin Source File - -SOURCE=.\SDL_icon.xpm -# End Source File -# Begin Source File - -SOURCE=.\SDL_main\SDL_win32_main.c - -!IF "$(CFG)" == "Srb2SDL - Win32 Release" - -!ELSEIF "$(CFG)" == "Srb2SDL - Win32 Debug" - -# PROP Exclude_From_Build 1 - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=.\sdlmain.h -# End Source File -# Begin Source File - -SOURCE=..\win32\Srb2win.rc -# End Source File -# Begin Source File - -SOURCE=..\win32\win_dbg.c -# End Source File -# Begin Source File - -SOURCE=..\win32\win_dbg.h -# End Source File -# Begin Source File - -SOURCE=..\win32\win_main.h -# End Source File -# End Group -# Begin Group "A_Asm" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\p5prof.h -# End Source File -# Begin Source File - -SOURCE=..\tmap.nas - -!IF "$(CFG)" == "Srb2SDL - Win32 Release" - -# PROP Ignore_Default_Tool 1 -# Begin Custom Build - Compiling $(InputName).nas with NASM... -IntDir=.\..\..\objs\VC\Release\SDL -InputPath=..\tmap.nas -InputName=tmap - -"$(IntDir)/$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - nasm -g -o $(IntDir)/$(InputName).obj -f win32 $(InputPath) - -# End Custom Build - -!ELSEIF "$(CFG)" == "Srb2SDL - Win32 Debug" - -# PROP Ignore_Default_Tool 1 -# Begin Custom Build - Compiling $(InputName).nas with NASM... -IntDir=.\..\..\objs\VC\Debug\SDL -InputPath=..\tmap.nas -InputName=tmap - -"$(IntDir)/$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - nasm -g -o $(IntDir)/$(InputName).obj -f win32 $(InputPath) - -# End Custom Build - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=..\tmap_mmx.nas - -!IF "$(CFG)" == "Srb2SDL - Win32 Release" - -# PROP Ignore_Default_Tool 1 -# Begin Custom Build - Compiling $(InputName).nas with NASM... -IntDir=.\..\..\objs\VC\Release\SDL -InputPath=..\tmap_mmx.nas -InputName=tmap_mmx - -"$(IntDir)/$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - nasm -g -o $(IntDir)/$(InputName).obj -f win32 $(InputPath) - -# End Custom Build - -!ELSEIF "$(CFG)" == "Srb2SDL - Win32 Debug" - -# PROP Ignore_Default_Tool 1 -# Begin Custom Build - Compiling $(InputName).nas with NASM... - -IntDir=.\..\..\objs\VC\Debug\SDL -InputPath=..\tmap_mmx.nas -InputName=tmap_mmx - -"$(IntDir)/$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - nasm -g -o $(IntDir)/$(InputName).obj -f win32 $(InputPath) - -# End Custom Build - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=..\tmap_vc.nas - -!IF "$(CFG)" == "Srb2SDL - Win32 Release" - -# Begin Custom Build - Compiling $(InputName).nas with NASM... -IntDir=.\..\..\objs\VC\Release\SDL -InputPath=..\tmap_vc.nas -InputName=tmap_vc - -"$(IntDir)/$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - nasm -g -o $(IntDir)/$(InputName).obj -f win32 $(InputPath) - -# End Custom Build - -!ELSEIF "$(CFG)" == "Srb2SDL - Win32 Debug" - -# Begin Custom Build - Compiling $(InputName).nas with NASM... -IntDir=.\..\..\objs\VC\Debug\SDL -InputPath=..\tmap_vc.nas -InputName=tmap_vc - -"$(IntDir)/$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" - nasm -g -o $(IntDir)/$(InputName).obj -f win32 $(InputPath) - -# End Custom Build - -!ENDIF - -# End Source File -# End Group -# Begin Group "D_Doom" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\comptime.c -# End Source File -# Begin Source File - -SOURCE=..\d_clisrv.c -# End Source File -# Begin Source File - -SOURCE=..\d_clisrv.h -# End Source File -# Begin Source File - -SOURCE=..\d_event.h -# End Source File -# Begin Source File - -SOURCE=..\d_main.c -# End Source File -# Begin Source File - -SOURCE=..\d_main.h -# End Source File -# Begin Source File - -SOURCE=..\d_net.c -# End Source File -# Begin Source File - -SOURCE=..\d_net.h -# End Source File -# Begin Source File - -SOURCE=..\d_netcmd.c -# End Source File -# Begin Source File - -SOURCE=..\d_netcmd.h -# End Source File -# Begin Source File - -SOURCE=..\d_netfil.c -# End Source File -# Begin Source File - -SOURCE=..\d_netfil.h -# End Source File -# Begin Source File - -SOURCE=..\d_player.h -# End Source File -# Begin Source File - -SOURCE=..\d_think.h -# End Source File -# Begin Source File - -SOURCE=..\d_ticcmd.h -# End Source File -# Begin Source File - -SOURCE=..\dehacked.c -# End Source File -# Begin Source File - -SOURCE=..\dehacked.h -# End Source File -# Begin Source File - -SOURCE=..\doomdata.h -# End Source File -# Begin Source File - -SOURCE=..\doomdef.h -# End Source File -# Begin Source File - -SOURCE=..\doomstat.h -# End Source File -# Begin Source File - -SOURCE=..\doomtype.h -# End Source File -# Begin Source File - -SOURCE=..\z_zone.c -# End Source File -# Begin Source File - -SOURCE=..\z_zone.h -# End Source File -# End Group -# Begin Group "F_Frame" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\f_finale.c -# End Source File -# Begin Source File - -SOURCE=..\f_finale.h -# End Source File -# Begin Source File - -SOURCE=..\f_wipe.c -# End Source File -# End Group -# Begin Group "G_Game" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\g_game.c -# End Source File -# Begin Source File - -SOURCE=..\g_game.h -# End Source File -# Begin Source File - -SOURCE=..\g_input.c -# End Source File -# Begin Source File - -SOURCE=..\g_input.h -# End Source File -# Begin Source File - -SOURCE=..\g_state.h -# End Source File -# End Group -# Begin Group "H_Hud" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\am_map.c -# End Source File -# Begin Source File - -SOURCE=..\am_map.h -# End Source File -# Begin Source File - -SOURCE=..\command.c -# End Source File -# Begin Source File - -SOURCE=..\command.h -# End Source File -# Begin Source File - -SOURCE=..\console.c -# End Source File -# Begin Source File - -SOURCE=..\console.h -# End Source File -# Begin Source File - -SOURCE=..\hu_stuff.c -# End Source File -# Begin Source File - -SOURCE=..\hu_stuff.h -# End Source File -# Begin Source File - -SOURCE=..\st_stuff.c -# End Source File -# Begin Source File - -SOURCE=..\st_stuff.h -# End Source File -# Begin Source File - -SOURCE=..\y_inter.c -# End Source File -# Begin Source File - -SOURCE=..\y_inter.h -# End Source File -# End Group -# Begin Group "Hw_Hardware" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\hardware\hw3dsdrv.h -# End Source File -# Begin Source File - -SOURCE=..\hardware\hw3sound.c -# End Source File -# Begin Source File - -SOURCE=..\hardware\hw3sound.h -# End Source File -# Begin Source File - -SOURCE=..\hardware\hw_bsp.c -# End Source File -# Begin Source File - -SOURCE=..\hardware\hw_cache.c -# End Source File -# Begin Source File - -SOURCE=..\hardware\hw_data.h -# End Source File -# Begin Source File - -SOURCE=..\hardware\hw_defs.h -# End Source File -# Begin Source File - -SOURCE=..\hardware\hw_dll.h -# End Source File -# Begin Source File - -SOURCE=..\hardware\hw_draw.c -# End Source File -# Begin Source File - -SOURCE=..\hardware\hw_drv.h -# End Source File -# Begin Source File - -SOURCE=..\hardware\hw_glob.h -# End Source File -# Begin Source File - -SOURCE=..\hardware\hw_light.c -# End Source File -# Begin Source File - -SOURCE=..\hardware\hw_light.h -# End Source File -# Begin Source File - -SOURCE=..\hardware\hw_main.c -# End Source File -# Begin Source File - -SOURCE=..\hardware\hw_main.h -# End Source File -# Begin Source File - -SOURCE=..\hardware\hw_md2.c -# End Source File -# Begin Source File - -SOURCE=..\hardware\hw_md2.h -# End Source File -# Begin Source File - -SOURCE=..\hardware\hw_trick.c -# End Source File -# Begin Source File - -SOURCE=..\hardware\hws_data.h -# End Source File -# End Group -# Begin Group "I_Interface" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\byteptr.h -# End Source File -# Begin Source File - -SOURCE=..\i_joy.h -# End Source File -# Begin Source File - -SOURCE=..\i_net.h -# End Source File -# Begin Source File - -SOURCE=..\i_sound.h -# End Source File -# Begin Source File - -SOURCE=..\i_system.h -# End Source File -# Begin Source File - -SOURCE=..\i_tcp.c -# End Source File -# Begin Source File - -SOURCE=..\i_tcp.h -# End Source File -# Begin Source File - -SOURCE=..\i_video.h -# End Source File -# Begin Source File - -SOURCE=..\keys.h -# End Source File -# Begin Source File - -SOURCE=..\mserv.c -# End Source File -# Begin Source File - -SOURCE=..\mserv.h -# End Source File -# End Group -# Begin Group "M_Misc" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\m_argv.c -# End Source File -# Begin Source File - -SOURCE=..\m_argv.h -# End Source File -# Begin Source File - -SOURCE=..\m_bbox.c -# End Source File -# Begin Source File - -SOURCE=..\m_bbox.h -# End Source File -# Begin Source File - -SOURCE=..\m_cheat.c -# End Source File -# Begin Source File - -SOURCE=..\m_cheat.h -# End Source File -# Begin Source File - -SOURCE=..\m_dllist.h -# End Source File -# Begin Source File - -SOURCE=..\m_fixed.c -# End Source File -# Begin Source File - -SOURCE=..\m_fixed.h -# End Source File -# Begin Source File - -SOURCE=..\m_menu.c -# End Source File -# Begin Source File - -SOURCE=..\m_menu.h -# End Source File -# Begin Source File - -SOURCE=..\m_misc.c -# End Source File -# Begin Source File - -SOURCE=..\m_misc.h -# End Source File -# Begin Source File - -SOURCE=..\m_queue.c -# End Source File -# Begin Source File - -SOURCE=..\m_queue.h -# End Source File -# Begin Source File - -SOURCE=..\m_random.c -# End Source File -# Begin Source File - -SOURCE=..\m_random.h -# End Source File -# Begin Source File - -SOURCE=..\m_swap.h -# End Source File -# Begin Source File - -SOURCE=..\string.c -# End Source File -# End Group -# Begin Group "P_Play" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\info.c -# End Source File -# Begin Source File - -SOURCE=..\info.h -# End Source File -# Begin Source File - -SOURCE=..\p_ceilng.c -# End Source File -# Begin Source File - -SOURCE=..\p_enemy.c -# End Source File -# Begin Source File - -SOURCE=..\p_fab.c -# End Source File -# Begin Source File - -SOURCE=..\p_floor.c -# End Source File -# Begin Source File - -SOURCE=..\p_inter.c -# End Source File -# Begin Source File - -SOURCE=..\p_lights.c -# End Source File -# Begin Source File - -SOURCE=..\p_local.h -# End Source File -# Begin Source File - -SOURCE=..\p_map.c -# End Source File -# Begin Source File - -SOURCE=..\p_maputl.c -# End Source File -# Begin Source File - -SOURCE=..\p_maputl.h -# End Source File -# Begin Source File - -SOURCE=..\p_mobj.c -# End Source File -# Begin Source File - -SOURCE=..\p_mobj.h -# End Source File -# Begin Source File - -SOURCE=..\p_polyobj.c -# End Source File -# Begin Source File - -SOURCE=..\p_polyobj.h -# End Source File -# Begin Source File - -SOURCE=..\p_pspr.h -# End Source File -# Begin Source File - -SOURCE=..\p_saveg.c -# End Source File -# Begin Source File - -SOURCE=..\p_saveg.h -# End Source File -# Begin Source File - -SOURCE=..\p_setup.c -# End Source File -# Begin Source File - -SOURCE=..\p_setup.h -# End Source File -# Begin Source File - -SOURCE=..\p_sight.c -# End Source File -# Begin Source File - -SOURCE=..\p_spec.c -# End Source File -# Begin Source File - -SOURCE=..\p_spec.h -# End Source File -# Begin Source File - -SOURCE=..\p_telept.c -# End Source File -# Begin Source File - -SOURCE=..\p_tick.c -# End Source File -# Begin Source File - -SOURCE=..\p_tick.h -# End Source File -# Begin Source File - -SOURCE=..\p_user.c -# End Source File -# Begin Source File - -SOURCE=..\tables.c -# End Source File -# Begin Source File - -SOURCE=..\tables.h -# End Source File -# End Group -# Begin Group "R_Rend" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\r_bsp.c -# End Source File -# Begin Source File - -SOURCE=..\r_bsp.h -# End Source File -# Begin Source File - -SOURCE=..\r_data.c -# End Source File -# Begin Source File - -SOURCE=..\r_data.h -# End Source File -# Begin Source File - -SOURCE=..\r_defs.h -# End Source File -# Begin Source File - -SOURCE=..\r_draw.c -# End Source File -# Begin Source File - -SOURCE=..\r_draw.h -# End Source File -# Begin Source File - -SOURCE=..\r_draw16.c -# PROP Exclude_From_Build 1 -# End Source File -# Begin Source File - -SOURCE=..\r_draw8.c -# PROP Exclude_From_Build 1 -# End Source File -# Begin Source File - -SOURCE=..\r_local.h -# End Source File -# Begin Source File - -SOURCE=..\r_main.c -# End Source File -# Begin Source File - -SOURCE=..\r_main.h -# End Source File -# Begin Source File - -SOURCE=..\r_plane.c -# End Source File -# Begin Source File - -SOURCE=..\r_plane.h -# End Source File -# Begin Source File - -SOURCE=..\r_segs.c -# End Source File -# Begin Source File - -SOURCE=..\r_segs.h -# End Source File -# Begin Source File - -SOURCE=..\r_sky.c -# End Source File -# Begin Source File - -SOURCE=..\r_sky.h -# End Source File -# Begin Source File - -SOURCE=..\r_splats.c -# End Source File -# Begin Source File - -SOURCE=..\r_splats.h -# End Source File -# Begin Source File - -SOURCE=..\r_state.h -# End Source File -# Begin Source File - -SOURCE=..\r_things.c -# End Source File -# Begin Source File - -SOURCE=..\r_things.h -# End Source File -# Begin Source File - -SOURCE=..\screen.c -# End Source File -# Begin Source File - -SOURCE=..\screen.h -# End Source File -# Begin Source File - -SOURCE=..\v_video.c -# End Source File -# Begin Source File - -SOURCE=..\v_video.h -# End Source File -# End Group -# Begin Group "S_Sounds" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\s_sound.c -# End Source File -# Begin Source File - -SOURCE=..\s_sound.h -# End Source File -# Begin Source File - -SOURCE=..\sounds.c -# End Source File -# Begin Source File - -SOURCE=..\sounds.h -# End Source File -# End Group -# Begin Group "W_Wad" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\lzf.c -# End Source File -# Begin Source File - -SOURCE=..\lzf.h -# End Source File -# Begin Source File - -SOURCE=..\md5.c -# End Source File -# Begin Source File - -SOURCE=..\md5.h -# End Source File -# Begin Source File - -SOURCE=..\w_wad.c -# End Source File -# Begin Source File - -SOURCE=..\w_wad.h -# End Source File -# End Group -# Begin Group "Docs" - -# PROP Default_Filter "" -# Begin Source File - -SOURCE=..\..\doc\copying -# End Source File -# Begin Source File - -SOURCE=..\..\doc\faq.txt -# End Source File -# Begin Source File - -SOURCE=..\..\readme.txt -# End Source File -# Begin Source File - -SOURCE=..\..\doc\source.txt -# End Source File -# End Group -# Begin Source File - -SOURCE=..\win32\Srb2win.ico -# End Source File -# End Target -# End Project diff --git a/src/sdl12/Srb2SDL.ico b/src/sdl12/Srb2SDL.ico deleted file mode 100644 index f9caf642c..000000000 Binary files a/src/sdl12/Srb2SDL.ico and /dev/null differ diff --git a/src/sdl12/hwsym_sdl.c b/src/sdl12/hwsym_sdl.c deleted file mode 100644 index 450d849ab..000000000 --- a/src/sdl12/hwsym_sdl.c +++ /dev/null @@ -1,147 +0,0 @@ -// Emacs style mode select -*- C++ -*- -//----------------------------------------------------------------------------- -// -// Copyright (C) 1998-2000 by DooM Legacy Team. -// -// 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. - -/// \file -/// \brief Tool for dynamic referencing of hardware rendering functions -/// -/// Declaration and definition of the HW rendering -/// functions do have the same name. Originally, the -/// implementation was stored in a separate library. -/// For SDL, we need some function to return the addresses, -/// otherwise we have a conflict with the compiler. - -#include "hwsym_sdl.h" -#include "../doomdef.h" - -#ifdef _MSC_VER -#pragma warning(disable : 4214 4244) -#endif - -#ifdef HAVE_SDL - -#include - -#ifdef _MSC_VER -#pragma warning(default : 4214 4244) -#endif - -#if defined (_XBOX) || defined (_arch_dreamcast) || defined(GP2X) -#define NOLOADSO -#endif - -#if SDL_VERSION_ATLEAST(1,2,6) && !defined (NOLOADSO) -#include "SDL_loadso.h" // 1.2.6+ -#elif !defined (NOLOADSO) -#define NOLOADSO -#endif - -#define _CREATE_DLL_ // necessary for Unix AND Windows - -#ifdef HW3SOUND -#include "../hardware/hw3dsdrv.h" -#endif - -#define GETFUNC(func) \ - else if (0 == strcmp(#func, funcName)) \ - funcPointer = &func \ -// -// -/** \brief The *hwSym function - - Stupid function to return function addresses - - \param funcName the name of the function - \param handle an object to look in(NULL for self) - - \return void -*/ -// -void *hwSym(const char *funcName,void *handle) -{ - void *funcPointer = NULL; - if (0 == strcmp("FinishUpdate", funcName)) - return funcPointer; //&FinishUpdate; -#ifdef STATIC3DS - GETFUNC(Startup); - GETFUNC(AddSfx); - GETFUNC(AddSource); - GETFUNC(StartSource); - GETFUNC(StopSource); - GETFUNC(GetHW3DSVersion); - GETFUNC(BeginFrameUpdate); - GETFUNC(EndFrameUpdate); - GETFUNC(IsPlaying); - GETFUNC(UpdateListener); - GETFUNC(UpdateSourceParms); - GETFUNC(SetGlobalSfxVolume); - GETFUNC(SetCone); - GETFUNC(Update3DSource); - GETFUNC(ReloadSource); - GETFUNC(KillSource); - GETFUNC(Shutdown); - GETFUNC(GetHW3DSTitle); -#endif -#ifdef NOLOADSO - else - funcPointer = handle; -#else - else if (handle) - funcPointer = SDL_LoadFunction(handle,funcName); -#endif - if (!funcPointer) - I_OutputMsg("hwSym for %s: %s\n", funcName, SDL_GetError()); - return funcPointer; -} - -/** \brief The *hwOpen function - - \param hwfile Open a handle to the SO - - \return Handle to SO - - -*/ - -void *hwOpen(const char *hwfile) -{ -#ifdef NOLOADSO - (void)hwfile; - return NULL; -#else - void *tempso = NULL; - tempso = SDL_LoadObject(hwfile); - if (!tempso) I_OutputMsg("hwOpen of %s: %s\n", hwfile, SDL_GetError()); - return tempso; -#endif -} - -/** \brief The hwClose function - - \param handle Close the handle of the SO - - \return void - - -*/ - -void hwClose(void *handle) -{ -#ifdef NOLOADSO - (void)handle; -#else - SDL_UnloadObject(handle); -#endif -} -#endif diff --git a/src/sdl12/i_main.c b/src/sdl12/i_main.c deleted file mode 100644 index 7817196bd..000000000 --- a/src/sdl12/i_main.c +++ /dev/null @@ -1,247 +0,0 @@ -// Emacs style mode select -*- C++ -*- -//----------------------------------------------------------------------------- -// -// Copyright (C) 1993-1996 by id Software, Inc. -// Copyright (C) 1998-2000 by DooM Legacy Team. -// -// 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. -//----------------------------------------------------------------------------- -/// \file -/// \brief Main program, simply calls D_SRB2Main and D_SRB2Loop, the high level loop. - -#include "../doomdef.h" -#include "../m_argv.h" -#include "../d_main.h" -#include "../i_system.h" - -#ifdef __GNUC__ -#include -#endif - -#ifdef _WII -#include -#include -#include -#ifdef REMOTE_DEBUGGING -#include -#endif -static char wiicwd[PATH_MAX] = "sd:/"; -static char localip[16] = {0}; -static char gateway[16] = {0}; -static char netmask[16] = {0}; -#endif - -#ifdef _PSP -#include -#include -PSP_HEAP_SIZE_KB(24*1024); -PSP_MAIN_THREAD_ATTR(PSP_THREAD_ATTR_USER | PSP_THREAD_ATTR_VFPU); -PSP_MAIN_THREAD_NAME("SRB2Kart"); -PSP_MAIN_THREAD_STACK_SIZE_KB(256); -#endif - -#ifdef HAVE_SDL - -#ifdef HAVE_TTF -#include -#include "i_ttf.h" -#endif - -#ifdef SDLMAIN -#include "SDL_main.h" -#elif defined(FORCESDLMAIN) -extern int SDL_main(int argc, char *argv[]); -#endif - -#ifdef LOGMESSAGES -FILE *logstream = NULL; -#endif - -#ifndef DOXYGEN -#ifndef O_TEXT -#define O_TEXT 0 -#endif - -#ifndef O_SEQUENTIAL -#define O_SEQUENTIAL 0 -#endif -#endif - -#if defined (_WIN32) && !defined (_XBOX) -#include "../win32/win_dbg.h" -typedef BOOL (WINAPI *p_IsDebuggerPresent)(VOID); -#endif - -#ifdef _arch_dreamcast -#include -KOS_INIT_FLAGS(INIT_DEFAULT -//| INIT_NET -//| INIT_MALLOCSTATS -//| INIT_QUIET -//| INIT_OCRAM -//| INIT_NO_DCLOAD -); -#endif - -#if defined (_WIN32) && !defined (_XBOX) && !defined (_WIN32_WCE) -static inline VOID MakeCodeWritable(VOID) -{ -#ifdef USEASM // Disable write-protection of code segment - DWORD OldRights; - const DWORD NewRights = PAGE_EXECUTE_READWRITE; - PBYTE pBaseOfImage = (PBYTE)GetModuleHandle(NULL); - PIMAGE_DOS_HEADER dosH =(PIMAGE_DOS_HEADER)pBaseOfImage; - PIMAGE_NT_HEADERS ntH = (PIMAGE_NT_HEADERS)(pBaseOfImage + dosH->e_lfanew); - PIMAGE_OPTIONAL_HEADER oH = (PIMAGE_OPTIONAL_HEADER) - ((PBYTE)ntH + sizeof (IMAGE_NT_SIGNATURE) + sizeof (IMAGE_FILE_HEADER)); - LPVOID pA = pBaseOfImage+oH->BaseOfCode; - SIZE_T pS = oH->SizeOfCode; -#if 1 // try to find the text section - PIMAGE_SECTION_HEADER ntS = IMAGE_FIRST_SECTION (ntH); - WORD s; - for (s = 0; s < ntH->FileHeader.NumberOfSections; s++) - { - if (memcmp (ntS[s].Name, ".text\0\0", 8) == 0) - { - pA = pBaseOfImage+ntS[s].VirtualAddress; - pS = ntS[s].Misc.VirtualSize; - break; - } - } -#endif - - if (!VirtualProtect(pA,pS,NewRights,&OldRights)) - I_Error("Could not make code writable\n"); -#endif -} -#endif - - -/** \brief The main function - - \param argc number of arg - \param *argv string table - - \return int -*/ -FUNCNORETURN -#if defined (_XBOX) && defined (__GNUC__) -void XBoxStartup() -{ - const char *logdir = NULL; - myargc = -1; - myargv = NULL; -#else -#ifdef FORCESDLMAIN -int SDL_main(int argc, char **argv) -#else -int main(int argc, char **argv) -#endif -{ - const char *logdir = NULL; - myargc = argc; - myargv = argv; /// \todo pull out path to exe from this string -#endif - -#ifdef HAVE_TTF -#ifdef _PS3 - // apparently there is a bug in SDL_PSL1GHT which needs this to be set to work around - SDL_setenv("SDL_VIDEODRIVER", "psl1ght", 1); - I_StartupTTF(FONTPOINTSIZE, SDL_INIT_VIDEO, SDL_SWSURFACE|SDL_DOUBLEBUF); -#elif defined(_WIN32) - I_StartupTTF(FONTPOINTSIZE, SDL_INIT_VIDEO|SDL_INIT_AUDIO, SDL_SWSURFACE); -#else - I_StartupTTF(FONTPOINTSIZE, SDL_INIT_VIDEO, SDL_SWSURFACE); -#endif -#endif - -#ifdef _PS3 - // initialise controllers. - //ioPadInit(7); -#endif - -// init Wii-specific stuff -#ifdef _WII - // Start network - if_config(localip, netmask, gateway, TRUE); - -#ifdef REMOTE_DEBUGGING -#if REMOTE_DEBUGGING == 0 - DEBUG_Init(GDBSTUB_DEVICE_TCP, GDBSTUB_DEF_TCPPORT); // Port 2828 -#elif REMOTE_DEBUGGING > 2 - DEBUG_Init(GDBSTUB_DEVICE_TCP, REMOTE_DEBUGGING); // Custom Port -#elif REMOTE_DEBUGGING < 0 - DEBUG_Init(GDBSTUB_DEVICE_USB, GDBSTUB_DEF_CHANNEL); // Slot 1 -#else - DEBUG_Init(GDBSTUB_DEVICE_USB, REMOTE_DEBUGGING-1); // Custom Slot -#endif -#endif - // Start FAT filesystem - fatInitDefault(); - - if (getcwd(wiicwd, PATH_MAX)) - I_PutEnv(va("HOME=%ssrb2wii", wiicwd)); -#endif - - logdir = D_Home(); - -#ifdef LOGMESSAGES -#if defined(_WIN32_WCE) || defined(GP2X) - logstream = fopen(va("%s.log",argv[0]), "a"); -#elif defined (_WII) - logstream = fopen(va("%s/srb2log.txt",logdir), "a"); -#elif defined (DEFAULTDIR) - if (logdir) - logstream = fopen(va("%s/"DEFAULTDIR"/srb2log.txt",logdir), "a"); - else -#endif - logstream = fopen("./srb2log.txt", "a"); -#endif - - //I_OutputMsg("I_StartupSystem() ...\n"); - I_StartupSystem(); -#if defined (_WIN32) && !defined (_XBOX) -#ifndef _WIN32_WCE - { - p_IsDebuggerPresent pfnIsDebuggerPresent = (p_IsDebuggerPresent)GetProcAddress(GetModuleHandleA("kernel32.dll"), "IsDebuggerPresent"); - if ((!pfnIsDebuggerPresent || !pfnIsDebuggerPresent()) -#ifdef BUGTRAP - && !InitBugTrap() -#endif - ) - { - LoadLibraryA("exchndl.dll"); - } - } -#endif - prevExceptionFilter = SetUnhandledExceptionFilter(RecordExceptionInfo); -#ifndef _WIN32_WCE - MakeCodeWritable(); -#endif -#endif - // startup SRB2 - CONS_Printf("%s", M_GetText("Setting up SRB2Kart...\n")); - D_SRB2Main(); - CONS_Printf("%s", M_GetText("Entering main game loop...\n")); - // never return - D_SRB2Loop(); - -#ifdef BUGTRAP - // This is safe even if BT didn't start. - ShutdownBugTrap(); -#endif - - // return to OS -#ifndef __GNUC__ - return 0; -#endif -} -#endif diff --git a/src/sdl12/i_system.c b/src/sdl12/i_system.c deleted file mode 100644 index 3249d13bd..000000000 --- a/src/sdl12/i_system.c +++ /dev/null @@ -1,3759 +0,0 @@ -// Emacs style mode select -*- C++ -*- -//----------------------------------------------------------------------------- -// -// Copyright (C) 1993-1996 by id Software, Inc. -// Portions Copyright (C) 1998-2000 by DooM Legacy Team. -// -// 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. -// -// Changes by Graue are in the public domain. -// -//----------------------------------------------------------------------------- -/// \file -/// \brief SRB2 system stuff for SDL - -#ifndef _WIN32_WCE -#include -#endif - -#ifdef _XBOX -#include "SRB2XBOX/xboxhelp.h" -#endif - -#if defined (_WIN32) && !defined (_XBOX) -#define RPC_NO_WINDOWS_H -#include -#include "../doomtype.h" -#ifndef _WIN32_WCE -typedef BOOL (WINAPI *p_GetDiskFreeSpaceExA)(LPCSTR, PULARGE_INTEGER, PULARGE_INTEGER, PULARGE_INTEGER); -typedef BOOL (WINAPI *p_IsProcessorFeaturePresent) (DWORD); -typedef DWORD (WINAPI *p_timeGetTime) (void); -typedef UINT (WINAPI *p_timeEndPeriod) (UINT); -typedef HANDLE (WINAPI *p_OpenFileMappingA) (DWORD, BOOL, LPCSTR); -typedef LPVOID (WINAPI *p_MapViewOfFile) (HANDLE, DWORD, DWORD, DWORD, SIZE_T); -typedef HANDLE (WINAPI *p_GetCurrentProcess) (VOID); -typedef BOOL (WINAPI *p_GetProcessAffinityMask) (HANDLE, PDWORD_PTR, PDWORD_PTR); -typedef BOOL (WINAPI *p_SetProcessAffinityMask) (HANDLE, DWORD_PTR); -#endif -#endif -#include -#include -#include -#ifdef __GNUC__ -#include -#elif defined (_MSC_VER) -#include -#endif -#if defined (__unix__) || defined (UNIXCOMMON) -#include -#endif - -#ifdef _arch_dreamcast -#include -#include -#include -#include -void __set_fpscr(long); // in libgcc / kernel's startup.s? -#else -#include -#if defined (_WIN32) && !defined (_WIN32_WCE) && !defined (_XBOX) -#include -#endif -#endif - -#ifdef _MSC_VER -#pragma warning(disable : 4214 4244) -#endif - -#ifdef HAVE_SDL - -#include - -#ifdef HAVE_TTF -#include "i_ttf.h" -#endif - -#ifdef _MSC_VER -#pragma warning(default : 4214 4244) -#endif - -#if SDL_VERSION_ATLEAST(1,2,7) && !defined (DC) -#include "SDL_cpuinfo.h" // 1.2.7 or greater -#define HAVE_SDLCPUINFO -#endif - -#ifdef _PSP -//#include -#elif !defined(_PS3) -#if defined (__unix__) || defined(__APPLE__) || (defined (UNIXCOMMON) && !defined (_arch_dreamcast) && !defined (__HAIKU__) && !defined (_WII)) -#if defined (__linux__) -#include -#else -#include -#include -/*For meminfo*/ -#include -#ifdef FREEBSD -#include -#endif -#include -#include -#endif -#endif -#endif - -#ifndef _PS3 -#if defined (__linux__) || (defined (UNIXCOMMON) && !defined (_arch_dreamcast) && !defined (_PSP) && !defined (__HAIKU__) && !defined (_WII)) -#ifndef NOTERMIOS -#include -#include // ioctl -#define HAVE_TERMIOS -#endif -#endif -#endif - -#ifndef NOMUMBLE -#if defined (__linux__) && !defined(_PS3) // need -lrt -#include -#ifdef MAP_FAILED -#define HAVE_SHM -#endif -#include -#endif - -#if defined (_WIN32) && !defined (_WIN32_WCE) && !defined (_XBOX) -#define HAVE_MUMBLE -#define WINMUMBLE -#elif defined (HAVE_SHM) -#define HAVE_MUMBLE -#endif -#endif // NOMUMBLE - -#ifdef _WIN32_WCE -#include "SRB2CE/cehelp.h" -#endif - -#ifndef O_BINARY -#define O_BINARY 0 -#endif - -// Locations for searching the main.pk3 -#ifdef _arch_dreamcast -#define DEFAULTWADLOCATION1 "/cd" -#define DEFAULTWADLOCATION2 "/pc" -#define DEFAULTWADLOCATION3 "/pc/home/alam/srb2code/data" -#define DEFAULTSEARCHPATH1 "/cd" -#define DEFAULTSEARCHPATH2 "/pc" -//#define DEFAULTSEARCHPATH3 "/pc/home/alam/srb2code/data" -#elif defined (GP2X) -#define DEFAULTWADLOCATION1 "/mnt/sd" -#define DEFAULTWADLOCATION2 "/mnt/sd/SRB2Kart-V2" -#define DEFAULTWADLOCATION3 "/tmp/mnt/sd" -#define DEFAULTWADLOCATION4 "/tmp/mnt/sd/SRB2Kart-V2" -#define DEFAULTSEARCHPATH1 "/mnt/sd" -#define DEFAULTSEARCHPATH2 "/tmp/mnt/sd" -#elif defined (_WII) -#define NOCWD -#define NOHOME -#define NEED_SDL_GETENV -#define DEFAULTWADLOCATION1 "sd:/srb2wii" -#define DEFAULTWADLOCATION2 "usb:/srb2wii" -#define DEFAULTSEARCHPATH1 "sd:/srb2wii" -#define DEFAULTSEARCHPATH2 "usb:/srb2wii" -// PS3: TODO: this will need modification most likely -#elif defined (_PS3) -#define NOCWD -#define NOHOME -#define DEFAULTWADLOCATION1 "/dev_hdd0/game/SRB2-PS3_/USRDIR/etc" -#define DEFAULTWADLOCATION2 "/dev_usb/SRB2PS3" -#define DEFAULTSEARCHPATH1 "/dev_hdd0/game/SRB2-PS3_/USRDIR/etc" -#define DEFAULTSEARCHPATH2 "/dev_usb/SRB2PS3" -#elif defined (_PSP) -#define NOCWD -#define NOHOME -#define DEFAULTWADLOCATION1 "host0:/bin/Resources" -#define DEFAULTWADLOCATION2 "ms0:/PSP/GAME/SRB2PSP" -#define DEFAULTSEARCHPATH1 "host0:/" -#define DEFAULTSEARCHPATH2 "ms0:/PSP/GAME/SRB2PSP" -#elif defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON) -#define DEFAULTWADLOCATION1 "/usr/local/share/games/SRB2Kart-V2" -#define DEFAULTWADLOCATION2 "/usr/local/games/SRB2Kart-V2" -#define DEFAULTWADLOCATION3 "/usr/share/games/SRB2Kart-V2" -#define DEFAULTWADLOCATION4 "/usr/games/SRB2Kart-V2" -#define DEFAULTSEARCHPATH1 "/usr/local/games" -#define DEFAULTSEARCHPATH2 "/usr/games" -#define DEFAULTSEARCHPATH3 "/usr/local" -#elif defined (_XBOX) -#define NOCWD -#ifdef __GNUC__ -#include -#endif -#define DEFAULTWADLOCATION1 "c:\\srb2kart-v2" -#define DEFAULTWADLOCATION2 "d:\\srb2kart-v2" -#define DEFAULTWADLOCATION3 "e:\\srb2kart-v2" -#define DEFAULTWADLOCATION4 "f:\\srb2kart-v2" -#define DEFAULTWADLOCATION5 "g:\\srb2kart-v2" -#define DEFAULTWADLOCATION6 "h:\\srb2kart-v2" -#define DEFAULTWADLOCATION7 "i:\\srb2kart-v2" -#elif defined (_WIN32_WCE) -#define NOCWD -#define NOHOME -#define DEFAULTWADLOCATION1 "\\Storage Card\\SRB2Kart-V2" -#define DEFAULTSEARCHPATH1 "\\Storage Card" -#elif defined (_WIN32) -#define DEFAULTWADLOCATION1 "c:\\games\\SRB2Kart-V2" -#define DEFAULTWADLOCATION2 "\\games\\SRB2Kart-V2" -#define DEFAULTSEARCHPATH1 "c:\\games" -#define DEFAULTSEARCHPATH2 "\\games" -#endif - -/** \brief WAD file to look for -*/ -#define WADKEYWORD "main.pk3" -/** \brief holds wad path -*/ -static char returnWadPath[256]; - -//Alam_GBC: SDL - -#include "../doomdef.h" -#include "../m_misc.h" -#include "../i_video.h" -#include "../i_sound.h" -#include "../i_system.h" -#include "../screen.h" //vid.WndParent -#include "../d_net.h" -#include "../g_game.h" -#include "../filesrch.h" -#include "../k_pwrlv.h" -#include "endtxt.h" -#include "sdlmain.h" - -#include "../i_joy.h" - -#include "../m_argv.h" - -#ifdef MAC_ALERT -#include "macosx/mac_alert.h" -#endif - -#include "../d_main.h" - -#if !defined(NOMUMBLE) && defined(HAVE_MUMBLE) -// Mumble context string -#include "../d_clisrv.h" -#include "../byteptr.h" -#endif - -/** \brief The JoyReset function - - \param JoySet Joystick info to reset - - \return void -*/ -static void JoyReset(SDLJoyInfo_t *JoySet) -{ - if (JoySet->dev) - { -#ifdef GP2X //GP2X's SDL does an illegal free on the 1st joystick... - if (SDL_JoystickIndex(JoySet->dev) != 0) -#endif - SDL_JoystickClose(JoySet->dev); - } - JoySet->dev = NULL; - JoySet->oldjoy = -1; - JoySet->axises = JoySet->buttons = JoySet->hats = JoySet->balls = 0; - //JoySet->scale -} - -/** \brief First joystick up and running -*/ -static INT32 joystick_started = 0; - -/** \brief SDL info about joystick 1 -*/ -SDLJoyInfo_t JoyInfo; - - -/** \brief Second joystick up and running -*/ -static INT32 joystick2_started = 0; - -/** \brief SDL inof about joystick 2 -*/ -SDLJoyInfo_t JoyInfo2; - - -/** \brief Third joystick up and running -*/ -static INT32 joystick3_started = 0; - -/** \brief SDL inof about joystick 3 -*/ -SDLJoyInfo_t JoyInfo3; - - -/** \brief Fourth joystick up and running -*/ -static INT32 joystick4_started = 0; - -/** \brief SDL inof about joystick 4 -*/ -SDLJoyInfo_t JoyInfo4; - - -#ifdef HAVE_TERMIOS -static INT32 fdmouse2 = -1; -static INT32 mouse2_started = 0; -#endif - -SDL_bool consolevent = SDL_FALSE; -SDL_bool framebuffer = SDL_FALSE; - -UINT8 keyboard_started = false; - -#if 0 -static void signal_handler(INT32 num) -{ - //static char msg[] = "oh no! back to reality!\r\n"; - char * sigmsg; - char sigdef[32]; - - switch (num) - { - case SIGINT: - sigmsg = "interrupt"; - break; - case SIGILL: - sigmsg = "illegal instruction - invalid function image"; - break; - case SIGFPE: - sigmsg = "floating point exception"; - break; - case SIGSEGV: - sigmsg = "segment violation"; - break; - case SIGTERM: - sigmsg = "Software termination signal from kill"; - break; -#if !(defined (__unix_) || defined (UNIXCOMMON)) - case SIGBREAK: - sigmsg = "Ctrl-Break sequence"; - break; -#endif - case SIGABRT: - sigmsg = "abnormal termination triggered by abort call"; - break; - default: - sprintf(sigdef,"signal number %d", num); - sigmsg = sigdef; - } - - I_OutputMsg("signal_handler() error: %s\n", sigmsg); - signal(num, SIG_DFL); //default signal action - raise(num); - I_Quit(); -} -#endif - -#if defined (NDEBUG) && !defined (DC) && !defined (_WIN32_WCE) -FUNCNORETURN static ATTRNORETURN void quit_handler(int num) -{ - signal(num, SIG_DFL); //default signal action - raise(num); - I_Quit(); -} -#endif - -#ifdef HAVE_TERMIOS -// TERMIOS console code from Quake3: thank you! -SDL_bool stdin_active = SDL_TRUE; - -typedef struct -{ - size_t cursor; - char buffer[256]; -} feild_t; - -feild_t tty_con; - -// when printing general stuff to stdout stderr (Sys_Printf) -// we need to disable the tty console stuff -// this increments so we can recursively disable -static INT32 ttycon_hide = 0; -// some key codes that the terminal may be using -// TTimo NOTE: I'm not sure how relevant this is -static INT32 tty_erase; -static INT32 tty_eof; - -static struct termios tty_tc; - -// ============================================================= -// tty console routines -// NOTE: if the user is editing a line when something gets printed to the early console then it won't look good -// so we provide tty_Clear and tty_Show to be called before and after a stdout or stderr output -// ============================================================= - -// flush stdin, I suspect some terminals are sending a LOT of garbage -// FIXME TTimo relevant? -#if 0 -static inline void tty_FlushIn(void) -{ - char key; - while (read(STDIN_FILENO, &key, 1)!=-1); -} -#endif - -// do a backspace -// TTimo NOTE: it seems on some terminals just sending '\b' is not enough -// so for now, in any case we send "\b \b" .. yeah well .. -// (there may be a way to find out if '\b' alone would work though) -static void tty_Back(void) -{ - char key; - ssize_t d; - key = '\b'; - d = write(STDOUT_FILENO, &key, 1); - key = ' '; - d = write(STDOUT_FILENO, &key, 1); - key = '\b'; - d = write(STDOUT_FILENO, &key, 1); - (void)d; -} - -static void tty_Clear(void) -{ - size_t i; - if (tty_con.cursor>0) - { - for (i=0; i0); - ttycon_hide--; - if (ttycon_hide == 0 && tty_con.cursor) - { - for (i=0; i 0) - { - tty_con.cursor--; - tty_con.buffer[tty_con.cursor] = '\0'; - tty_Back(); - } - ev.data1 = KEY_BACKSPACE; - } - else if (key < ' ') // check if this is a control char - { - if (key == '\n') - { - tty_Clear(); - tty_con.cursor = 0; - ev.data1 = KEY_ENTER; - } - else return; - } - else - { - // push regular character - ev.data1 = tty_con.buffer[tty_con.cursor] = key; - tty_con.cursor++; - // print the current line (this is differential) - d = write(STDOUT_FILENO, &key, 1); - } - if (ev.data1) D_PostEvent(&ev); - //tty_FlushIn(); - (void)d; -} - -#elif defined (_WIN32) && !(defined (_XBOX) || defined (_WIN32_WCE)) -static BOOL I_ReadyConsole(HANDLE ci) -{ - DWORD gotinput; - if (ci == INVALID_HANDLE_VALUE) return FALSE; - if (WaitForSingleObject(ci,0) != WAIT_OBJECT_0) return FALSE; - if (GetFileType(ci) != FILE_TYPE_CHAR) return FALSE; - if (!GetConsoleMode(ci, &gotinput)) return FALSE; - return (GetNumberOfConsoleInputEvents(ci, &gotinput) && gotinput); -} - -static boolean entering_con_command = false; - -void I_GetConsoleEvents(void) -{ - event_t ev = {0,0,0,0,0}; - HANDLE ci = GetStdHandle(STD_INPUT_HANDLE); - HANDLE co = GetStdHandle(STD_OUTPUT_HANDLE); - CONSOLE_SCREEN_BUFFER_INFO CSBI; - INPUT_RECORD input; - DWORD t; - - while (I_ReadyConsole(ci) && ReadConsoleInput(ci, &input, 1, &t) && t) - { - memset(&ev,0x00,sizeof (ev)); - switch (input.EventType) - { - case KEY_EVENT: - if (input.Event.KeyEvent.bKeyDown) - { - ev.type = ev_console; - entering_con_command = true; - switch (input.Event.KeyEvent.wVirtualKeyCode) - { - case VK_ESCAPE: - case VK_TAB: - ev.data1 = KEY_NULL; - break; - case VK_SHIFT: - ev.data1 = KEY_LSHIFT; - break; - case VK_RETURN: - entering_con_command = false; - // Fall through. - default: - ev.data1 = MapVirtualKey(input.Event.KeyEvent.wVirtualKeyCode,2); // convert in to char - } - if (co != INVALID_HANDLE_VALUE && GetFileType(co) == FILE_TYPE_CHAR && GetConsoleMode(co, &t)) - { - if (ev.data1 && ev.data1 != KEY_LSHIFT && ev.data1 != KEY_RSHIFT) - { -#ifdef _UNICODE - WriteConsole(co, &input.Event.KeyEvent.uChar.UnicodeChar, 1, &t, NULL); -#else - WriteConsole(co, &input.Event.KeyEvent.uChar.AsciiChar, 1 , &t, NULL); -#endif - } - if (input.Event.KeyEvent.wVirtualKeyCode == VK_BACK - && GetConsoleScreenBufferInfo(co,&CSBI)) - { - WriteConsoleOutputCharacterA(co, " ",1, CSBI.dwCursorPosition, &t); - } - } - } - else - { - ev.type = ev_keyup; - switch (input.Event.KeyEvent.wVirtualKeyCode) - { - case VK_SHIFT: - ev.data1 = KEY_LSHIFT; - break; - default: - break; - } - } - if (ev.data1) D_PostEvent(&ev); - break; - case MOUSE_EVENT: - case WINDOW_BUFFER_SIZE_EVENT: - case MENU_EVENT: - case FOCUS_EVENT: - break; - } - } -} - -static void I_StartupConsole(void) -{ - HANDLE ci, co; - const INT32 ded = M_CheckParm("-dedicated"); -#ifdef SDLMAIN - BOOL gotConsole = FALSE; - if (M_CheckParm("-console") || ded) - gotConsole = AllocConsole(); -#else - BOOL gotConsole = TRUE; - if (M_CheckParm("-detachconsole")) - { - FreeConsole(); - gotConsole = AllocConsole(); - } -#ifdef _DEBUG - else if (M_CheckParm("-noconsole") && !ded) -#else - else if (!M_CheckParm("-console") && !ded) -#endif - { - FreeConsole(); - gotConsole = FALSE; - } -#endif - - if (gotConsole) - { - SetConsoleTitleA("SRB2Kart Console"); - consolevent = SDL_TRUE; - } - - //Let get the real console HANDLE, because Mingw's Bash is bad! - ci = CreateFile(TEXT("CONIN$") , GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - co = CreateFile(TEXT("CONOUT$"), GENERIC_WRITE|GENERIC_READ, FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - if (ci != INVALID_HANDLE_VALUE) - { - const DWORD CM = ENABLE_LINE_INPUT|ENABLE_ECHO_INPUT|ENABLE_PROCESSED_INPUT; - SetStdHandle(STD_INPUT_HANDLE, ci); - if (GetFileType(ci) == FILE_TYPE_CHAR) - SetConsoleMode(ci, CM); //default mode but no ENABLE_MOUSE_INPUT - } - if (co != INVALID_HANDLE_VALUE) - { - SetStdHandle(STD_OUTPUT_HANDLE, co); - SetStdHandle(STD_ERROR_HANDLE, co); - } -} -static inline void I_ShutdownConsole(void){} -#else -void I_GetConsoleEvents(void){} -static inline void I_StartupConsole(void) -{ -#ifdef _arch_dreamcast - char title[] = "SRB2 for Dreamcast!\n"; - __set_fpscr(0x00040000); /* ignore FPU underflow */ - //printf("\nHello world!\n\n"); - pvr_init_defaults(); - conio_init(CONIO_TTY_PVR, CONIO_INPUT_LINE); - conio_set_theme(CONIO_THEME_MATRIX); - conio_clear(); - conio_putstr(title); - //printf("\nHello world!\n\n"); -#endif -#ifdef _DEBUG - consolevent = !M_CheckParm("-noconsole"); -#else - consolevent = M_CheckParm("-console"); -#endif - - framebuffer = M_CheckParm("-framebuffer"); - - if (framebuffer) - consolevent = SDL_FALSE; -} -static inline void I_ShutdownConsole(void){} -#endif - -// -// StartupKeyboard -// -void I_StartupKeyboard (void) -{ -#if defined (NDEBUG) && !defined (DC) -#ifdef SIGILL -// signal(SIGILL , signal_handler); -#endif -#ifdef SIGINT - signal(SIGINT , quit_handler); -#endif -#ifdef SIGSEGV -// signal(SIGSEGV , signal_handler); -#endif -#ifdef SIGBREAK - signal(SIGBREAK , quit_handler); -#endif -#ifdef SIGABRT -// signal(SIGABRT , signal_handler); -#endif -#ifdef SIGTERM - signal(SIGTERM , quit_handler); -#endif -#endif -} - -// -//I_OutputMsg -// -void I_OutputMsg(const char *fmt, ...) -{ - size_t len; - XBOXSTATIC char txt[8192]; - va_list argptr; - -#ifdef _arch_dreamcast - if (!keyboard_started) conio_printf(fmt); -#endif - - va_start(argptr,fmt); - vsprintf(txt, fmt, argptr); - va_end(argptr); - -#ifdef HAVE_TTF - if (TTF_WasInit()) I_TTFDrawText(currentfont, solid, DEFAULTFONTFGR, DEFAULTFONTFGG, DEFAULTFONTFGB, DEFAULTFONTFGA, - DEFAULTFONTBGR, DEFAULTFONTBGG, DEFAULTFONTBGB, DEFAULTFONTBGA, txt); -#endif - -#if defined (_WIN32) && !defined (_XBOX) && defined (_MSC_VER) - OutputDebugStringA(txt); -#endif - - len = strlen(txt); - -#ifdef LOGMESSAGES - if (logstream) - { - size_t d = fwrite(txt, len, 1, logstream); - fflush(logstream); - (void)d; - } -#endif - -#if defined (_WIN32) && !defined (_XBOX) && !defined(_WIN32_WCE) -#ifdef DEBUGFILE - if (debugfile != stderr) -#endif - { - HANDLE co = GetStdHandle(STD_OUTPUT_HANDLE); - DWORD bytesWritten; - - if (co == INVALID_HANDLE_VALUE) - return; - - if (GetFileType(co) == FILE_TYPE_CHAR && GetConsoleMode(co, &bytesWritten)) - { - static COORD coordNextWrite = {0,0}; - LPVOID oldLines = NULL; - INT oldLength; - CONSOLE_SCREEN_BUFFER_INFO csbi; - - // Save the lines that we're going to obliterate. - GetConsoleScreenBufferInfo(co, &csbi); - oldLength = csbi.dwSize.X * (csbi.dwCursorPosition.Y - coordNextWrite.Y) + csbi.dwCursorPosition.X - coordNextWrite.X; - - if (oldLength > 0) - { - LPVOID blank = malloc(oldLength); - if (!blank) return; - memset(blank, ' ', oldLength); // Blank out. - oldLines = malloc(oldLength*sizeof(TCHAR)); - if (!oldLines) - { - free(blank); - return; - } - - ReadConsoleOutputCharacter(co, oldLines, oldLength, coordNextWrite, &bytesWritten); - - // Move to where we what to print - which is where we would've been, - // had console input not been in the way, - SetConsoleCursorPosition(co, coordNextWrite); - - WriteConsoleA(co, blank, oldLength, &bytesWritten, NULL); - free(blank); - - // And back to where we want to print again. - SetConsoleCursorPosition(co, coordNextWrite); - } - - // Actually write the string now! - WriteConsoleA(co, txt, (DWORD)len, &bytesWritten, NULL); - - // Next time, output where we left off. - GetConsoleScreenBufferInfo(co, &csbi); - coordNextWrite = csbi.dwCursorPosition; - - // Restore what was overwritten. - if (oldLines && entering_con_command) - WriteConsole(co, oldLines, oldLength, &bytesWritten, NULL); - if (oldLines) free(oldLines); - } - else // Redirected to a file. - WriteFile(co, txt, (DWORD)len, &bytesWritten, NULL); - } -#else -#ifdef HAVE_TERMIOS - if (consolevent) - { - tty_Hide(); - } -#endif - - if (!framebuffer) - fprintf(stderr, "%s", txt); -#ifdef HAVE_TERMIOS - if (consolevent) - { - tty_Show(); - } -#endif - - // 2004-03-03 AJR Since not all messages end in newline, some were getting displayed late. - if (!framebuffer) - fflush(stderr); - -#endif -} - -// -// I_GetKey -// -INT32 I_GetKey (void) -{ - // Warning: I_GetKey empties the event queue till next keypress - event_t *ev; - INT32 rc = 0; - - // return the first keypress from the event queue - for (; eventtail != eventhead; eventtail = (eventtail+1)&(MAXEVENTS-1)) - { - ev = &events[eventtail]; - if (ev->type == ev_keydown || ev->type == ev_console) - { - rc = ev->data1; - continue; - } - } - - return rc; -} - -// -// I_JoyScale -// -void I_JoyScale(void) -{ -#ifdef GP2X - if (JoyInfo.dev && SDL_JoystickIndex(JoyInfo.dev) == 0) - Joystick.bGamepadStyle = true; - else -#endif - Joystick.bGamepadStyle = cv_joyscale.value==0; - JoyInfo.scale = Joystick.bGamepadStyle?1:cv_joyscale.value; -} - -void I_JoyScale2(void) -{ -#ifdef GP2X - if (JoyInfo2.dev && SDL_JoystickIndex(JoyInfo2.dev) == 0) - Joystick.bGamepadStyle = true; - else -#endif - Joystick2.bGamepadStyle = cv_joyscale2.value==0; - JoyInfo2.scale = Joystick2.bGamepadStyle?1:cv_joyscale2.value; -} - -void I_JoyScale3(void) -{ -#ifdef GP2X - if (JoyInfo3.dev && SDL_JoystickIndex(JoyInfo3.dev) == 0) - Joystick.bGamepadStyle = true; - else -#endif - Joystick3.bGamepadStyle = cv_joyscale3.value==0; - JoyInfo3.scale = Joystick3.bGamepadStyle?1:cv_joyscale3.value; -} - -void I_JoyScale4(void) -{ -#ifdef GP2X - if (JoyInfo4.dev && SDL_JoystickIndex(JoyInfo4.dev) == 0) - Joystick.bGamepadStyle = true; - else -#endif - Joystick4.bGamepadStyle = cv_joyscale4.value==0; - JoyInfo4.scale = Joystick4.bGamepadStyle?1:cv_joyscale4.value; -} - -/** \brief Joystick 1 buttons states -*/ -static UINT64 lastjoybuttons = 0; - -/** \brief Joystick 1 hats state -*/ -static UINT64 lastjoyhats = 0; - -/** \brief Shuts down joystick 1 - - - \return void - - -*/ -static void I_ShutdownJoystick(void) -{ - INT32 i; - event_t event; - event.type=ev_keyup; - event.data2 = 0; - event.data3 = 0; - - lastjoybuttons = lastjoyhats = 0; - - // emulate the up of all joystick buttons - for (i=0;i= 0; i--) - { - joybuttons <<= 1; - if (SDL_JoystickGetButton(JoyInfo.dev,i)) - joybuttons |= 1; - } - - if (joybuttons != lastjoybuttons) - { - INT64 j = 1; // keep only bits that changed since last time - INT64 newbuttons = joybuttons ^ lastjoybuttons; - lastjoybuttons = joybuttons; - - for (i = 0; i < JOYBUTTONS; i++, j <<= 1) - { - if (newbuttons & j) // button changed state? - { - if (joybuttons & j) - event.type = ev_keydown; - else - event.type = ev_keyup; -#ifdef _PSP - if (i == 12) - event.data1 = KEY_ESCAPE; - else -#endif - event.data1 = KEY_JOY1 + i; - D_PostEvent(&event); - } - } - } -#endif - - for (i = JoyInfo.hats - 1; i >= 0; i--) - { - Uint8 hat = SDL_JoystickGetHat(JoyInfo.dev, i); - - if (hat & SDL_HAT_UP ) joyhats|=(UINT64)0x1<<(0 + 4*i); - if (hat & SDL_HAT_DOWN ) joyhats|=(UINT64)0x1<<(1 + 4*i); - if (hat & SDL_HAT_LEFT ) joyhats|=(UINT64)0x1<<(2 + 4*i); - if (hat & SDL_HAT_RIGHT) joyhats|=(UINT64)0x1<<(3 + 4*i); - } - - if (joyhats != lastjoyhats) - { - INT64 j = 1; // keep only bits that changed since last time - INT64 newhats = joyhats ^ lastjoyhats; - lastjoyhats = joyhats; - - for (i = 0; i < JOYHATS*4; i++, j <<= 1) - { - if (newhats & j) // hat changed state? - { - if (joyhats & j) - event.type = ev_keydown; - else - event.type = ev_keyup; - event.data1 = KEY_HAT1 + i; - D_PostEvent(&event); - } - } - } - -#if 0 - // send joystick axis positions - event.type = ev_joystick; - - for (i = JOYAXISSET - 1; i >= 0; i--) - { - event.data1 = i; - if (i*2 + 1 <= JoyInfo.axises) - axisx = SDL_JoystickGetAxis(JoyInfo.dev, i*2 + 0); - else axisx = 0; - if (i*2 + 2 <= JoyInfo.axises) - axisy = SDL_JoystickGetAxis(JoyInfo.dev, i*2 + 1); - else axisy = 0; - -#ifdef _arch_dreamcast // -128 to 127 - axisx = axisx*8; - axisy = axisy*8; -#else // -32768 to 32767 - axisx = axisx/32; - axisy = axisy/32; -#endif - - if (Joystick.bGamepadStyle) - { - // gamepad control type, on or off, live or die - if (axisx < -(JOYAXISRANGE/2)) - event.data2 = -1; - else if (axisx > (JOYAXISRANGE/2)) - event.data2 = 1; - else event.data2 = 0; - if (axisy < -(JOYAXISRANGE/2)) - event.data3 = -1; - else if (axisy > (JOYAXISRANGE/2)) - event.data3 = 1; - else event.data3 = 0; - } - else - { - - axisx = JoyInfo.scale?((axisx/JoyInfo.scale)*JoyInfo.scale):axisx; - axisy = JoyInfo.scale?((axisy/JoyInfo.scale)*JoyInfo.scale):axisy; - -#ifdef SDL_JDEADZONE - if (-SDL_JDEADZONE <= axisx && axisx <= SDL_JDEADZONE) axisx = 0; - if (-SDL_JDEADZONE <= axisy && axisy <= SDL_JDEADZONE) axisy = 0; -#endif - - // analog control style , just send the raw data - event.data2 = axisx; // x axis - event.data3 = axisy; // y axis - } - D_PostEvent(&event); - } -#endif -} - -/** \brief Open joystick handle - - \param fname name of joystick - - \return axises - - -*/ -static int joy_open(const char *fname) -{ - int joyindex = atoi(fname); - int num_joy = 0; - int i; - - if (joystick_started == 0 && joystick2_started == 0 && joystick3_started == 0 && joystick4_started == 0) - { - if (SDL_InitSubSystem(SDL_INIT_JOYSTICK) == -1) - { - CONS_Printf(M_GetText("Couldn't initialize joystick: %s\n"), SDL_GetError()); - return -1; - } - else - { - num_joy = SDL_NumJoysticks(); - } - - if (num_joy < joyindex) - { - CONS_Printf(M_GetText("Cannot use joystick #%d/(%s), it doesn't exist\n"),joyindex,fname); - for (i = 0; i < num_joy; i++) - CONS_Printf("#%d/(%s)\n", i+1, SDL_JoystickName(i)); - I_ShutdownJoystick(); - return -1; - } - } - else - { - JoyReset(&JoyInfo); - //I_ShutdownJoystick(); - //joy_open(fname); - } - - num_joy = SDL_NumJoysticks(); - - if (joyindex <= 0 || num_joy == 0 || JoyInfo.oldjoy == joyindex) - { -// I_OutputMsg("Unable to use that joystick #(%s), non-number\n",fname); - if (num_joy != 0) - { - CONS_Printf(M_GetText("Found %d joysticks on this system\n"), num_joy); - for (i = 0; i < num_joy; i++) - CONS_Printf("#%d/(%s)\n", i+1, SDL_JoystickName(i)); - } - else - CONS_Printf("%s", M_GetText("Found no joysticks on this system\n")); - if (joyindex <= 0 || num_joy == 0) return 0; - } - - JoyInfo.dev = SDL_JoystickOpen(joyindex-1); - CONS_Printf(M_GetText("Joystick: %s\n"), SDL_JoystickName(joyindex-1)); - - if (JoyInfo.dev == NULL) - { - CONS_Printf(M_GetText("Couldn't open joystick: %s\n"), SDL_GetError()); - I_ShutdownJoystick(); - return -1; - } - else - { - JoyInfo.axises = SDL_JoystickNumAxes(JoyInfo.dev); - if (JoyInfo.axises > JOYAXISSET*2) - JoyInfo.axises = JOYAXISSET*2; -/* if (joyaxes<2) - { - I_OutputMsg("Not enought axes?\n"); - I_ShutdownJoystick(); - return 0; - }*/ - - JoyInfo.buttons = SDL_JoystickNumButtons(JoyInfo.dev); - if (JoyInfo.buttons > JOYBUTTONS) - JoyInfo.buttons = JOYBUTTONS; - -#ifdef DC - JoyInfo.hats = 0; -#else - JoyInfo.hats = SDL_JoystickNumHats(JoyInfo.dev); - if (JoyInfo.hats > JOYHATS) - JoyInfo.hats = JOYHATS; - - JoyInfo.balls = SDL_JoystickNumBalls(JoyInfo.dev); -#endif - - //Joystick.bGamepadStyle = !stricmp(SDL_JoystickName(SDL_JoystickIndex(JoyInfo.dev)), "pad"); - - return JoyInfo.axises; - } -} - -//Joystick2 - -/** \brief Joystick 2 buttons states -*/ -static UINT64 lastjoy2buttons = 0; - -/** \brief Joystick 2 hats state -*/ -static UINT64 lastjoy2hats = 0; - -/** \brief Shuts down joystick 2 - - - \return void -*/ -static void I_ShutdownJoystick2(void) -{ - INT32 i; - event_t event; - event.type = ev_keyup; - event.data2 = 0; - event.data3 = 0; - - lastjoy2buttons = lastjoy2hats = 0; - - // emulate the up of all joystick buttons - for (i = 0; i < JOYBUTTONS; i++) - { - event.data1 = KEY_2JOY1 + i; - D_PostEvent(&event); - } - - // emulate the up of all joystick hats - for (i = 0; i < JOYHATS*4; i++) - { - event.data1 = KEY_2HAT1 + i; - D_PostEvent(&event); - } - - // reset joystick position - event.type = ev_joystick2; - for (i = 0; i < JOYAXISSET; i++) - { - event.data1 = i; - D_PostEvent(&event); - } - - JoyReset(&JoyInfo2); - if (!joystick_started && !joystick2_started && !joystick3_started && !joystick4_started - && SDL_WasInit(SDL_INIT_JOYSTICK) == SDL_INIT_JOYSTICK) - { - SDL_QuitSubSystem(SDL_INIT_JOYSTICK); - if (cv_usejoystick2.value == 0) - { - DEBFILE("I_Joystick2: SDL's Joystick system has been shutdown\n"); - } - } -} - -void I_GetJoystick2Events(void) -{ - static event_t event = {0,0,0,0,0}; - INT32 i = 0; - UINT64 joyhats = 0; -#if 0 - INT64 joybuttons = 0; - INT32 axisx, axisy; -#endif - - if (!joystick2_started) - return; - - if (!JoyInfo2.dev) //I_ShutdownJoystick2(); - return; - - -#if 0 - //faB: look for as much buttons as g_input code supports, - // we don't use the others - for (i = JoyInfo2.buttons - 1; i >= 0; i--) - { - joybuttons <<= 1; - if (SDL_JoystickGetButton(JoyInfo2.dev,i)) - joybuttons |= 1; - } - - if (joybuttons != lastjoy2buttons) - { - INT64 j = 1; // keep only bits that changed since last time - INT64 newbuttons = joybuttons ^ lastjoy2buttons; - lastjoy2buttons = joybuttons; - - for (i = 0; i < JOYBUTTONS; i++, j <<= 1) - { - if (newbuttons & j) // button changed state? - { - if (joybuttons & j) - event.type = ev_keydown; - else - event.type = ev_keyup; - event.data1 = KEY_2JOY1 + i; - D_PostEvent(&event); - } - } - } -#endif - - for (i = JoyInfo2.hats - 1; i >= 0; i--) - { - Uint8 hat = SDL_JoystickGetHat(JoyInfo2.dev, i); - - if (hat & SDL_HAT_UP ) joyhats|=(UINT64)0x1<<(0 + 4*i); - if (hat & SDL_HAT_DOWN ) joyhats|=(UINT64)0x1<<(1 + 4*i); - if (hat & SDL_HAT_LEFT ) joyhats|=(UINT64)0x1<<(2 + 4*i); - if (hat & SDL_HAT_RIGHT) joyhats|=(UINT64)0x1<<(3 + 4*i); - } - - if (joyhats != lastjoy2hats) - { - INT64 j = 1; // keep only bits that changed since last time - INT64 newhats = joyhats ^ lastjoy2hats; - lastjoy2hats = joyhats; - - for (i = 0; i < JOYHATS*4; i++, j <<= 1) - { - if (newhats & j) // hat changed state? - { - if (joyhats & j) - event.type = ev_keydown; - else - event.type = ev_keyup; - event.data1 = KEY_2HAT1 + i; - D_PostEvent(&event); - } - } - } - -#if 0 - // send joystick axis positions - event.type = ev_joystick2; - - for (i = JOYAXISSET - 1; i >= 0; i--) - { - event.data1 = i; - if (i*2 + 1 <= JoyInfo2.axises) - axisx = SDL_JoystickGetAxis(JoyInfo2.dev, i*2 + 0); - else axisx = 0; - if (i*2 + 2 <= JoyInfo2.axises) - axisy = SDL_JoystickGetAxis(JoyInfo2.dev, i*2 + 1); - else axisy = 0; - -#ifdef _arch_dreamcast // -128 to 127 - axisx = axisx*8; - axisy = axisy*8; -#else // -32768 to 32767 - axisx = axisx/32; - axisy = axisy/32; -#endif - - if (Joystick2.bGamepadStyle) - { - // gamepad control type, on or off, live or die - if (axisx < -(JOYAXISRANGE/2)) - event.data2 = -1; - else if (axisx > (JOYAXISRANGE/2)) - event.data2 = 1; - else - event.data2 = 0; - if (axisy < -(JOYAXISRANGE/2)) - event.data3 = -1; - else if (axisy > (JOYAXISRANGE/2)) - event.data3 = 1; - else - event.data3 = 0; - } - else - { - - axisx = JoyInfo2.scale?((axisx/JoyInfo2.scale)*JoyInfo2.scale):axisx; - axisy = JoyInfo2.scale?((axisy/JoyInfo2.scale)*JoyInfo2.scale):axisy; - -#ifdef SDL_JDEADZONE - if (-SDL_JDEADZONE <= axisx && axisx <= SDL_JDEADZONE) axisx = 0; - if (-SDL_JDEADZONE <= axisy && axisy <= SDL_JDEADZONE) axisy = 0; -#endif - - // analog control style , just send the raw data - event.data2 = axisx; // x axis - event.data3 = axisy; // y axis - } - D_PostEvent(&event); - } -#endif - -} - -/** \brief Open joystick handle - - \param fname name of joystick - - \return axises - - -*/ -static int joy_open2(const char *fname) -{ - int joyindex = atoi(fname); - int num_joy = 0; - int i; - - if (joystick_started == 0 && joystick2_started == 0 && joystick3_started == 0 && joystick4_started == 0) - { - if (SDL_InitSubSystem(SDL_INIT_JOYSTICK) == -1) - { - CONS_Printf(M_GetText("Couldn't initialize joystick: %s\n"), SDL_GetError()); - return -1; - } - else - num_joy = SDL_NumJoysticks(); - - if (num_joy < joyindex) - { - CONS_Printf(M_GetText("Cannot use joystick #%d/(%s), it doesn't exist\n"),joyindex,fname); - for (i = 0; i < num_joy; i++) - CONS_Printf("#%d/(%s)\n", i+1, SDL_JoystickName(i)); - I_ShutdownJoystick2(); - return -1; - } - } - else - { - JoyReset(&JoyInfo2); - //I_ShutdownJoystick(); - //joy_open2(fname); - } - - num_joy = SDL_NumJoysticks(); - - if (joyindex <= 0 || num_joy == 0 || JoyInfo2.oldjoy == joyindex) - { -// I_OutputMsg("Unable to use that joystick #(%s), non-number\n",fname); - if (num_joy != 0) - { - CONS_Printf(M_GetText("Found %d joysticks on this system\n"), num_joy); - for (i = 0; i < num_joy; i++) - CONS_Printf("#%d/(%s)\n", i+1, SDL_JoystickName(i)); - } - else - CONS_Printf("%s", M_GetText("Found no joysticks on this system\n")); - if (joyindex <= 0 || num_joy == 0) return 0; - } - - JoyInfo2.dev = SDL_JoystickOpen(joyindex-1); - CONS_Printf(M_GetText("Joystick2: %s\n"), SDL_JoystickName(joyindex-1)); - - if (!JoyInfo2.dev) - { - CONS_Printf(M_GetText("Couldn't open joystick2: %s\n"), SDL_GetError()); - I_ShutdownJoystick2(); - return -1; - } - else - { - JoyInfo2.axises = SDL_JoystickNumAxes(JoyInfo2.dev); - if (JoyInfo2.axises > JOYAXISSET*2) - JoyInfo2.axises = JOYAXISSET*2; -/* if (joyaxes < 2) - { - I_OutputMsg("Not enought axes?\n"); - I_ShutdownJoystick2(); - return 0; - }*/ - - JoyInfo2.buttons = SDL_JoystickNumButtons(JoyInfo2.dev); - if (JoyInfo2.buttons > JOYBUTTONS) - JoyInfo2.buttons = JOYBUTTONS; - -#ifdef DC - JoyInfo2.hats = 0; -#else - JoyInfo2.hats = SDL_JoystickNumHats(JoyInfo2.dev); - if (JoyInfo2.hats > JOYHATS) - JoyInfo2.hats = JOYHATS; - - JoyInfo2.balls = SDL_JoystickNumBalls(JoyInfo2.dev); -#endif - - //Joystick.bGamepadStyle = !stricmp(SDL_JoystickName(SDL_JoystickIndex(JoyInfo2.dev)), "pad"); - - return JoyInfo2.axises; - } -} - -//Joystick3 - -/** \brief Joystick 3 buttons states -*/ -static UINT64 lastjoy3buttons = 0; - -/** \brief Joystick 3 hats state -*/ -static UINT64 lastjoy3hats = 0; - -/** \brief Shuts down joystick 3 - - - \return void -*/ -static void I_ShutdownJoystick3(void) -{ - INT32 i; - event_t event; - event.type = ev_keyup; - event.data2 = 0; - event.data3 = 0; - - lastjoy3buttons = lastjoy3hats = 0; - - // emulate the up of all joystick buttons - for (i = 0; i < JOYBUTTONS; i++) - { - event.data1 = KEY_3JOY1 + i; - D_PostEvent(&event); - } - - // emulate the up of all joystick hats - for (i = 0; i < JOYHATS*4; i++) - { - event.data1 = KEY_3HAT1 + i; - D_PostEvent(&event); - } - - // reset joystick position - event.type = ev_joystick3; - for (i = 0; i < JOYAXISSET; i++) - { - event.data1 = i; - D_PostEvent(&event); - } - - JoyReset(&JoyInfo3); - if (!joystick_started && !joystick2_started && !joystick3_started && !joystick4_started - && SDL_WasInit(SDL_INIT_JOYSTICK) == SDL_INIT_JOYSTICK) - { - SDL_QuitSubSystem(SDL_INIT_JOYSTICK); - if (cv_usejoystick3.value == 0) - { - DEBFILE("I_Joystick3: SDL's Joystick system has been shutdown\n"); - } - } -} - -void I_GetJoystick3Events(void) -{ - static event_t event = {0,0,0,0,0}; - INT32 i = 0; - UINT64 joyhats = 0; -#if 0 - INT64 joybuttons = 0; - INT32 axisx, axisy; -#endif - - if (!joystick3_started) - return; - - if (!JoyInfo3.dev) //I_ShutdownJoystick3(); - return; - - -#if 0 - //faB: look for as much buttons as g_input code supports, - // we don't use the others - for (i = JoyInfo3.buttons - 1; i >= 0; i--) - { - joybuttons <<= 1; - if (SDL_JoystickGetButton(JoyInfo3.dev,i)) - joybuttons |= 1; - } - - if (joybuttons != lastjoy3buttons) - { - INT64 j = 1; // keep only bits that changed since last time - INT64 newbuttons = joybuttons ^ lastjoy3buttons; - lastjoy3buttons = joybuttons; - - for (i = 0; i < JOYBUTTONS; i++, j <<= 1) - { - if (newbuttons & j) // button changed state? - { - if (joybuttons & j) - event.type = ev_keydown; - else - event.type = ev_keyup; - event.data1 = KEY_3JOY1 + i; - D_PostEvent(&event); - } - } - } -#endif - - for (i = JoyInfo3.hats - 1; i >= 0; i--) - { - Uint8 hat = SDL_JoystickGetHat(JoyInfo3.dev, i); - - if (hat & SDL_HAT_UP ) joyhats|=(UINT64)0x1<<(0 + 4*i); - if (hat & SDL_HAT_DOWN ) joyhats|=(UINT64)0x1<<(1 + 4*i); - if (hat & SDL_HAT_LEFT ) joyhats|=(UINT64)0x1<<(2 + 4*i); - if (hat & SDL_HAT_RIGHT) joyhats|=(UINT64)0x1<<(3 + 4*i); - } - - if (joyhats != lastjoy3hats) - { - INT64 j = 1; // keep only bits that changed since last time - INT64 newhats = joyhats ^ lastjoy3hats; - lastjoy3hats = joyhats; - - for (i = 0; i < JOYHATS*4; i++, j <<= 1) - { - if (newhats & j) // hat changed state? - { - if (joyhats & j) - event.type = ev_keydown; - else - event.type = ev_keyup; - event.data1 = KEY_3HAT1 + i; - D_PostEvent(&event); - } - } - } - -#if 0 - // send joystick axis positions - event.type = ev_joystick3; - - for (i = JOYAXISSET - 1; i >= 0; i--) - { - event.data1 = i; - if (i*2 + 1 <= JoyInfo3.axises) - axisx = SDL_JoystickGetAxis(JoyInfo3.dev, i*2 + 0); - else axisx = 0; - if (i*2 + 2 <= JoyInfo3.axises) - axisy = SDL_JoystickGetAxis(JoyInfo3.dev, i*2 + 1); - else axisy = 0; - -#ifdef _arch_dreamcast // -128 to 127 - axisx = axisx*8; - axisy = axisy*8; -#else // -32768 to 32767 - axisx = axisx/32; - axisy = axisy/32; -#endif - - if (Joystick3.bGamepadStyle) - { - // gamepad control type, on or off, live or die - if (axisx < -(JOYAXISRANGE/2)) - event.data2 = -1; - else if (axisx > (JOYAXISRANGE/2)) - event.data2 = 1; - else - event.data2 = 0; - if (axisy < -(JOYAXISRANGE/2)) - event.data3 = -1; - else if (axisy > (JOYAXISRANGE/2)) - event.data3 = 1; - else - event.data3 = 0; - } - else - { - - axisx = JoyInfo3.scale?((axisx/JoyInfo3.scale)*JoyInfo3.scale):axisx; - axisy = JoyInfo3.scale?((axisy/JoyInfo3.scale)*JoyInfo3.scale):axisy; - -#ifdef SDL_JDEADZONE - if (-SDL_JDEADZONE <= axisx && axisx <= SDL_JDEADZONE) axisx = 0; - if (-SDL_JDEADZONE <= axisy && axisy <= SDL_JDEADZONE) axisy = 0; -#endif - - // analog control style , just send the raw data - event.data2 = axisx; // x axis - event.data3 = axisy; // y axis - } - D_PostEvent(&event); - } -#endif - -} - -/** \brief Open joystick handle - - \param fname name of joystick - - \return axises - - -*/ -static int joy_open3(const char *fname) -{ - int joyindex = atoi(fname); - int num_joy = 0; - int i; - - if (joystick_started == 0 && joystick2_started == 0 && joystick3_started == 0 && joystick4_started == 0) - { - if (SDL_InitSubSystem(SDL_INIT_JOYSTICK) == -1) - { - CONS_Printf(M_GetText("Couldn't initialize joystick: %s\n"), SDL_GetError()); - return -1; - } - else - num_joy = SDL_NumJoysticks(); - - if (num_joy < joyindex) - { - CONS_Printf(M_GetText("Cannot use joystick #%d/(%s), it doesn't exist\n"),joyindex,fname); - for (i = 0; i < num_joy; i++) - CONS_Printf("#%d/(%s)\n", i+1, SDL_JoystickName(i)); - I_ShutdownJoystick3(); - return -1; - } - } - else - { - JoyReset(&JoyInfo3); - //I_ShutdownJoystick(); - //joy_open3(fname); - } - - num_joy = SDL_NumJoysticks(); - - if (joyindex <= 0 || num_joy == 0 || JoyInfo3.oldjoy == joyindex) - { -// I_OutputMsg("Unable to use that joystick #(%s), non-number\n",fname); - if (num_joy != 0) - { - CONS_Printf(M_GetText("Found %d joysticks on this system\n"), num_joy); - for (i = 0; i < num_joy; i++) - CONS_Printf("#%d/(%s)\n", i+1, SDL_JoystickName(i)); - } - else - CONS_Printf("%s", M_GetText("Found no joysticks on this system\n")); - if (joyindex <= 0 || num_joy == 0) return 0; - } - - JoyInfo3.dev = SDL_JoystickOpen(joyindex-1); - CONS_Printf(M_GetText("Joystick3: %s\n"), SDL_JoystickName(joyindex-1)); - - if (!JoyInfo3.dev) - { - CONS_Printf(M_GetText("Couldn't open joystick3: %s\n"), SDL_GetError()); - I_ShutdownJoystick3(); - return -1; - } - else - { - JoyInfo3.axises = SDL_JoystickNumAxes(JoyInfo3.dev); - if (JoyInfo3.axises > JOYAXISSET*2) - JoyInfo3.axises = JOYAXISSET*2; -/* if (joyaxes < 2) - { - I_OutputMsg("Not enought axes?\n"); - I_ShutdownJoystick3(); - return 0; - }*/ - - JoyInfo3.buttons = SDL_JoystickNumButtons(JoyInfo3.dev); - if (JoyInfo3.buttons > JOYBUTTONS) - JoyInfo3.buttons = JOYBUTTONS; - -#ifdef DC - JoyInfo3.hats = 0; -#else - JoyInfo3.hats = SDL_JoystickNumHats(JoyInfo3.dev); - if (JoyInfo3.hats > JOYHATS) - JoyInfo3.hats = JOYHATS; - - JoyInfo3.balls = SDL_JoystickNumBalls(JoyInfo3.dev); -#endif - - //Joystick.bGamepadStyle = !stricmp(SDL_JoystickName(SDL_JoystickIndex(JoyInfo3.dev)), "pad"); - - return JoyInfo3.axises; - } -} - -//Joystick4 - -/** \brief Joystick 4 buttons states -*/ -static UINT64 lastjoy4buttons = 0; - -/** \brief Joystick 4 hats state -*/ -static UINT64 lastjoy4hats = 0; - -/** \brief Shuts down joystick 4 - - - \return void -*/ -static void I_ShutdownJoystick4(void) -{ - INT32 i; - event_t event; - event.type = ev_keyup; - event.data2 = 0; - event.data3 = 0; - - lastjoy4buttons = lastjoy4hats = 0; - - // emulate the up of all joystick buttons - for (i = 0; i < JOYBUTTONS; i++) - { - event.data1 = KEY_4JOY1 + i; - D_PostEvent(&event); - } - - // emulate the up of all joystick hats - for (i = 0; i < JOYHATS*4; i++) - { - event.data1 = KEY_4HAT1 + i; - D_PostEvent(&event); - } - - // reset joystick position - event.type = ev_joystick4; - for (i = 0; i < JOYAXISSET; i++) - { - event.data1 = i; - D_PostEvent(&event); - } - - JoyReset(&JoyInfo4); - if (!joystick_started && !joystick2_started && !joystick3_started && !joystick4_started - && SDL_WasInit(SDL_INIT_JOYSTICK) == SDL_INIT_JOYSTICK) - { - SDL_QuitSubSystem(SDL_INIT_JOYSTICK); - if (cv_usejoystick4.value == 0) - { - DEBFILE("I_Joystick3: SDL's Joystick system has been shutdown\n"); - } - } -} - -void I_GetJoystick4Events(void) -{ - static event_t event = {0,0,0,0,0}; - INT32 i = 0; - UINT64 joyhats = 0; -#if 0 - INT64 joybuttons = 0; - INT32 axisx, axisy; -#endif - - if (!joystick4_started) - return; - - if (!JoyInfo4.dev) //I_ShutdownJoystick4(); - return; - - -#if 0 - //faB: look for as much buttons as g_input code supports, - // we don't use the others - for (i = JoyInfo4.buttons - 1; i >= 0; i--) - { - joybuttons <<= 1; - if (SDL_JoystickGetButton(JoyInfo4.dev,i)) - joybuttons |= 1; - } - - if (joybuttons != lastjoy4buttons) - { - INT64 j = 1; // keep only bits that changed since last time - INT64 newbuttons = joybuttons ^ lastjoy4buttons; - lastjoy4buttons = joybuttons; - - for (i = 0; i < JOYBUTTONS; i++, j <<= 1) - { - if (newbuttons & j) // button changed state? - { - if (joybuttons & j) - event.type = ev_keydown; - else - event.type = ev_keyup; - event.data1 = KEY_4JOY1 + i; - D_PostEvent(&event); - } - } - } -#endif - - for (i = JoyInfo4.hats - 1; i >= 0; i--) - { - Uint8 hat = SDL_JoystickGetHat(JoyInfo4.dev, i); - - if (hat & SDL_HAT_UP ) joyhats|=(UINT64)0x1<<(0 + 4*i); - if (hat & SDL_HAT_DOWN ) joyhats|=(UINT64)0x1<<(1 + 4*i); - if (hat & SDL_HAT_LEFT ) joyhats|=(UINT64)0x1<<(2 + 4*i); - if (hat & SDL_HAT_RIGHT) joyhats|=(UINT64)0x1<<(3 + 4*i); - } - - if (joyhats != lastjoy4hats) - { - INT64 j = 1; // keep only bits that changed since last time - INT64 newhats = joyhats ^ lastjoy4hats; - lastjoy4hats = joyhats; - - for (i = 0; i < JOYHATS*4; i++, j <<= 1) - { - if (newhats & j) // hat changed state? - { - if (joyhats & j) - event.type = ev_keydown; - else - event.type = ev_keyup; - event.data1 = KEY_4HAT1 + i; - D_PostEvent(&event); - } - } - } - -#if 0 - // send joystick axis positions - event.type = ev_joystick4; - - for (i = JOYAXISSET - 1; i >= 0; i--) - { - event.data1 = i; - if (i*2 + 1 <= JoyInfo4.axises) - axisx = SDL_JoystickGetAxis(JoyInfo4.dev, i*2 + 0); - else axisx = 0; - if (i*2 + 2 <= JoyInfo4.axises) - axisy = SDL_JoystickGetAxis(JoyInfo4.dev, i*2 + 1); - else axisy = 0; - -#ifdef _arch_dreamcast // -128 to 127 - axisx = axisx*8; - axisy = axisy*8; -#else // -32768 to 32767 - axisx = axisx/32; - axisy = axisy/32; -#endif - - if (Joystick4.bGamepadStyle) - { - // gamepad control type, on or off, live or die - if (axisx < -(JOYAXISRANGE/2)) - event.data2 = -1; - else if (axisx > (JOYAXISRANGE/2)) - event.data2 = 1; - else - event.data2 = 0; - if (axisy < -(JOYAXISRANGE/2)) - event.data3 = -1; - else if (axisy > (JOYAXISRANGE/2)) - event.data3 = 1; - else - event.data3 = 0; - } - else - { - - axisx = JoyInfo4.scale?((axisx/JoyInfo4.scale)*JoyInfo4.scale):axisx; - axisy = JoyInfo4.scale?((axisy/JoyInfo4.scale)*JoyInfo4.scale):axisy; - -#ifdef SDL_JDEADZONE - if (-SDL_JDEADZONE <= axisx && axisx <= SDL_JDEADZONE) axisx = 0; - if (-SDL_JDEADZONE <= axisy && axisy <= SDL_JDEADZONE) axisy = 0; -#endif - - // analog control style , just send the raw data - event.data2 = axisx; // x axis - event.data3 = axisy; // y axis - } - D_PostEvent(&event); - } -#endif - -} - -/** \brief Open joystick handle - - \param fname name of joystick - - \return axises - - -*/ -static int joy_open4(const char *fname) -{ - int joyindex = atoi(fname); - int num_joy = 0; - int i; - - if (joystick_started == 0 && joystick2_started == 0 && joystick3_started == 0 && joystick4_started == 0) - { - if (SDL_InitSubSystem(SDL_INIT_JOYSTICK) == -1) - { - CONS_Printf(M_GetText("Couldn't initialize joystick: %s\n"), SDL_GetError()); - return -1; - } - else - num_joy = SDL_NumJoysticks(); - - if (num_joy < joyindex) - { - CONS_Printf(M_GetText("Cannot use joystick #%d/(%s), it doesn't exist\n"),joyindex,fname); - for (i = 0; i < num_joy; i++) - CONS_Printf("#%d/(%s)\n", i+1, SDL_JoystickName(i)); - I_ShutdownJoystick3(); - return -1; - } - } - else - { - JoyReset(&JoyInfo4); - //I_ShutdownJoystick(); - //joy_open4(fname); - } - - num_joy = SDL_NumJoysticks(); - - if (joyindex <= 0 || num_joy == 0 || JoyInfo4.oldjoy == joyindex) - { -// I_OutputMsg("Unable to use that joystick #(%s), non-number\n",fname); - if (num_joy != 0) - { - CONS_Printf(M_GetText("Found %d joysticks on this system\n"), num_joy); - for (i = 0; i < num_joy; i++) - CONS_Printf("#%d/(%s)\n", i+1, SDL_JoystickName(i)); - } - else - CONS_Printf("%s", M_GetText("Found no joysticks on this system\n")); - if (joyindex <= 0 || num_joy == 0) return 0; - } - - JoyInfo4.dev = SDL_JoystickOpen(joyindex-1); - CONS_Printf(M_GetText("Joystick4: %s\n"), SDL_JoystickName(joyindex-1)); - - if (!JoyInfo4.dev) - { - CONS_Printf(M_GetText("Couldn't open joystick4: %s\n"), SDL_GetError()); - I_ShutdownJoystick4(); - return -1; - } - else - { - JoyInfo4.axises = SDL_JoystickNumAxes(JoyInfo4.dev); - if (JoyInfo4.axises > JOYAXISSET*2) - JoyInfo4.axises = JOYAXISSET*2; -/* if (joyaxes < 2) - { - I_OutputMsg("Not enought axes?\n"); - I_ShutdownJoystick4(); - return 0; - }*/ - - JoyInfo4.buttons = SDL_JoystickNumButtons(JoyInfo4.dev); - if (JoyInfo4.buttons > JOYBUTTONS) - JoyInfo4.buttons = JOYBUTTONS; - -#ifdef DC - JoyInfo4.hats = 0; -#else - JoyInfo4.hats = SDL_JoystickNumHats(JoyInfo4.dev); - if (JoyInfo4.hats > JOYHATS) - JoyInfo4.hats = JOYHATS; - - JoyInfo4.balls = SDL_JoystickNumBalls(JoyInfo4.dev); -#endif - - //Joystick.bGamepadStyle = !stricmp(SDL_JoystickName(SDL_JoystickIndex(JoyInfo4.dev)), "pad"); - - return JoyInfo4.axises; - } -} - -// -// I_InitJoystick -// -void I_InitJoystick(void) -{ - I_ShutdownJoystick(); - if (!strcmp(cv_usejoystick.string, "0") || M_CheckParm("-nojoy")) - return; - if (joy_open(cv_usejoystick.string) != -1) - JoyInfo.oldjoy = atoi(cv_usejoystick.string); - else - { - cv_usejoystick.value = 0; - return; - } - joystick_started = 1; -} - -void I_InitJoystick2(void) -{ - I_ShutdownJoystick2(); - if (!strcmp(cv_usejoystick2.string, "0") || M_CheckParm("-nojoy")) - return; - if (joy_open2(cv_usejoystick2.string) != -1) - JoyInfo2.oldjoy = atoi(cv_usejoystick2.string); - else - { - cv_usejoystick2.value = 0; - return; - } - joystick2_started = 1; -} - -void I_InitJoystick3(void) -{ - I_ShutdownJoystick3(); - if (!strcmp(cv_usejoystick3.string, "0") || M_CheckParm("-nojoy")) - return; - if (joy_open3(cv_usejoystick3.string) != -1) - JoyInfo3.oldjoy = atoi(cv_usejoystick3.string); - else - { - cv_usejoystick3.value = 0; - return; - } - joystick3_started = 1; -} - -void I_InitJoystick4(void) -{ - I_ShutdownJoystick4(); - if (!strcmp(cv_usejoystick4.string, "0") || M_CheckParm("-nojoy")) - return; - if (joy_open4(cv_usejoystick4.string) != -1) - JoyInfo4.oldjoy = atoi(cv_usejoystick4.string); - else - { - cv_usejoystick4.value = 0; - return; - } - joystick4_started = 1; -} - -static void I_ShutdownInput(void) -{ - if (SDL_WasInit(SDL_INIT_JOYSTICK) == SDL_INIT_JOYSTICK) - { - JoyReset(&JoyInfo); - JoyReset(&JoyInfo2); - JoyReset(&JoyInfo3); - JoyReset(&JoyInfo4); - SDL_QuitSubSystem(SDL_INIT_JOYSTICK); - } - -} - -INT32 I_NumJoys(void) -{ - INT32 numjoy = 0; - if (SDL_WasInit(SDL_INIT_JOYSTICK) == 0) - { - if (SDL_InitSubSystem(SDL_INIT_JOYSTICK) != -1) - numjoy = SDL_NumJoysticks(); - SDL_QuitSubSystem(SDL_INIT_JOYSTICK); - } - else - numjoy = SDL_NumJoysticks(); - return numjoy; -} - -static char joyname[255]; // MAX_PATH; joystick name is straight from the driver - -const char *I_GetJoyName(INT32 joyindex) -{ - const char *tempname = NULL; - joyindex--; //SDL's Joystick System starts at 0, not 1 - if (SDL_WasInit(SDL_INIT_JOYSTICK) == 0) - { - if (SDL_InitSubSystem(SDL_INIT_JOYSTICK) != -1) - { - tempname = SDL_JoystickNameForIndex(joyindex); - if (tempname) - strncpy(joyname, tempname, 255); - } - SDL_QuitSubSystem(SDL_INIT_JOYSTICK); - } - else - { - tempname = SDL_JoystickNameForIndex(joyindex); - if (tempname) - strncpy(joyname, tempname, 255); - } - return joyname; -} - -#ifndef NOMUMBLE -#ifdef HAVE_MUMBLE -// Best Mumble positional audio settings: -// Minimum distance 3.0 m -// Bloom 175% -// Maximum distance 80.0 m -// Minimum volume 50% -#define DEG2RAD (0.017453292519943295769236907684883l) // TAU/360 or PI/180 -#define MUMBLEUNIT (64.0f) // FRACUNITS in a Meter - -static struct { -#ifdef WINMUMBLE - UINT32 uiVersion; - DWORD uiTick; -#else - Uint32 uiVersion; - Uint32 uiTick; -#endif - float fAvatarPosition[3]; - float fAvatarFront[3]; - float fAvatarTop[3]; // defaults to Y-is-up (only used for leaning) - wchar_t name[256]; // game name - float fCameraPosition[3]; - float fCameraFront[3]; - float fCameraTop[3]; // defaults to Y-is-up (only used for leaning) - wchar_t identity[256]; // player id -#ifdef WINMUMBLE - UINT32 context_len; -#else - Uint32 context_len; -#endif - unsigned char context[256]; // server/team - wchar_t description[2048]; // game description -} *mumble = NULL; -#endif // HAVE_MUMBLE - -static void I_SetupMumble(void) -{ -#ifdef WINMUMBLE - HANDLE hMap = OpenFileMappingW(FILE_MAP_ALL_ACCESS, FALSE, L"MumbleLink"); - if (!hMap) - return; - - mumble = MapViewOfFile(hMap, FILE_MAP_ALL_ACCESS, 0, 0, sizeof(*mumble)); - if (!mumble) - CloseHandle(hMap); -#elif defined (HAVE_SHM) - int shmfd; - char memname[256]; - - snprintf(memname, 256, "/MumbleLink.%d", getuid()); - shmfd = shm_open(memname, O_RDWR, S_IRUSR | S_IWUSR); - - if(shmfd < 0) - return; - - mumble = mmap(NULL, sizeof(*mumble), PROT_READ | PROT_WRITE, MAP_SHARED, shmfd, 0); - if (mumble == MAP_FAILED) - mumble = NULL; -#endif -} - -void I_UpdateMumble(const mobj_t *mobj, const listener_t listener) -{ -#ifdef HAVE_MUMBLE - double angle; - fixed_t anglef; - - if (!mumble) - return; - - if(mumble->uiVersion != 2) { - wcsncpy(mumble->name, L"SRB2Kart "VERSIONSTRING, 256); - wcsncpy(mumble->description, L"Sonic Robo Blast 2 Kart with integrated Mumble Link support.", 2048); - mumble->uiVersion = 2; - } - mumble->uiTick++; - - if (!netgame || gamestate != GS_LEVEL) { // Zero out, but never delink. - mumble->fAvatarPosition[0] = mumble->fAvatarPosition[1] = mumble->fAvatarPosition[2] = 0.0f; - mumble->fAvatarFront[0] = 1.0f; - mumble->fAvatarFront[1] = mumble->fAvatarFront[2] = 0.0f; - mumble->fCameraPosition[0] = mumble->fCameraPosition[1] = mumble->fCameraPosition[2] = 0.0f; - mumble->fCameraFront[0] = 1.0f; - mumble->fCameraFront[1] = mumble->fCameraFront[2] = 0.0f; - return; - } - - { - UINT8 *p = mumble->context; - WRITEMEM(p, server_context, 8); - WRITEINT16(p, gamemap); - mumble->context_len = p - mumble->context; - } - - if (mobj) { - mumble->fAvatarPosition[0] = FIXED_TO_FLOAT(mobj->x) / MUMBLEUNIT; - mumble->fAvatarPosition[1] = FIXED_TO_FLOAT(mobj->z) / MUMBLEUNIT; - mumble->fAvatarPosition[2] = FIXED_TO_FLOAT(mobj->y) / MUMBLEUNIT; - - anglef = AngleFixed(mobj->angle); - angle = FIXED_TO_FLOAT(anglef)*DEG2RAD; - mumble->fAvatarFront[0] = (float)cos(angle); - mumble->fAvatarFront[1] = 0.0f; - mumble->fAvatarFront[2] = (float)sin(angle); - } else { - mumble->fAvatarPosition[0] = mumble->fAvatarPosition[1] = mumble->fAvatarPosition[2] = 0.0f; - mumble->fAvatarFront[0] = 1.0f; - mumble->fAvatarFront[1] = mumble->fAvatarFront[2] = 0.0f; - } - - mumble->fCameraPosition[0] = FIXED_TO_FLOAT(listener.x) / MUMBLEUNIT; - mumble->fCameraPosition[1] = FIXED_TO_FLOAT(listener.z) / MUMBLEUNIT; - mumble->fCameraPosition[2] = FIXED_TO_FLOAT(listener.y) / MUMBLEUNIT; - - anglef = AngleFixed(listener.angle); - angle = FIXED_TO_FLOAT(anglef)*DEG2RAD; - mumble->fCameraFront[0] = (float)cos(angle); - mumble->fCameraFront[1] = 0.0f; - mumble->fCameraFront[2] = (float)sin(angle); -#else - (void)mobj; - (void)listener; -#endif // HAVE_MUMBLE -} -#undef WINMUMBLE -#endif // NOMUMBLE - -#ifdef HAVE_TERMIOS - -void I_GetMouseEvents(void) -{ - static UINT8 mdata[5]; - static INT32 i = 0,om2b = 0; - INT32 di, j, mlp, button; - event_t event; - const INT32 mswap[8] = {0, 4, 1, 5, 2, 6, 3, 7}; - - if (!mouse2_started) return; - for (mlp = 0; mlp < 20; mlp++) - { - for (; i < 5; i++) - { - di = read(fdmouse2, mdata+i, 1); - if (di == -1) return; - } - if ((mdata[0] & 0xf8) != 0x80) - { - for (j = 1; j < 5; j++) - if ((mdata[j] & 0xf8) == 0x80) - for (i = 0; i < 5-j; i++) // shift - mdata[i] = mdata[i+j]; - if (i < 5) continue; - } - else - { - button = mswap[~mdata[0] & 0x07]; - for (j = 0; j < MOUSEBUTTONS; j++) - { - if (om2b & (1<> 4); - } - else if (bytenum == 3) - { - dx = (char)((combytes[0] & 3) << 6); - dy = (char)((combytes[0] & 12) << 4); - dx = (char)(dx + combytes[1]); - dy = (char)(dy + combytes[2]); - handlermouse2x+= dx; - handlermouse2y+= dy; - } - else if (bytenum == 4) // fourth UINT8 (logitech mouses) - { - if (buffer[i] & 32) - handlermouse2buttons |= 4; - else - handlermouse2buttons &= ~4; - } - } -} - -void I_GetMouseEvents(void) -{ - static UINT8 lastbuttons2 = 0; //mouse movement - event_t event; - - if (mouse2filehandle == INVALID_HANDLE_VALUE) - return; - - I_PoolMouse2(); - // post key event for buttons - if (handlermouse2buttons != lastbuttons2) - { - INT32 i, j = 1, k; - k = (handlermouse2buttons ^ lastbuttons2); // only changed bit to 1 - lastbuttons2 = (UINT8)handlermouse2buttons; - - for (i = 0; i < MOUSEBUTTONS; i++, j <<= 1) - if (k & j) - { - if (handlermouse2buttons & j) - event.type = ev_keydown; - else - event.type = ev_keyup; - event.data1 = KEY_2MOUSE1+i; - D_PostEvent(&event); - } - } - - if (handlermouse2x != 0 || handlermouse2y != 0) - { - event.type = ev_mouse2; - event.data1 = 0; -// event.data1 = buttons; // not needed - event.data2 = handlermouse2x << 1; - event.data3 = -handlermouse2y << 1; - handlermouse2x = 0; - handlermouse2y = 0; - - D_PostEvent(&event); - } -} -#else -void I_GetMouseEvents(void){}; -#endif - -// -// I_StartupMouse2 -// -void I_StartupMouse2(void) -{ -#ifdef HAVE_TERMIOS - struct termios m2tio; - size_t i; - INT32 dtr = -1, rts = -1;; - I_ShutdownMouse2(); - if (cv_usemouse2.value == 0) return; - if ((fdmouse2 = open(cv_mouse2port.string, O_RDONLY|O_NONBLOCK|O_NOCTTY)) == -1) - { - CONS_Printf(M_GetText("Error opening %s!\n"), cv_mouse2port.string); - return; - } - tcflush(fdmouse2, TCIOFLUSH); - m2tio.c_iflag = IGNBRK; - m2tio.c_oflag = 0; - m2tio.c_cflag = CREAD|CLOCAL|HUPCL|CS8|CSTOPB|B1200; - m2tio.c_lflag = 0; - m2tio.c_cc[VTIME] = 0; - m2tio.c_cc[VMIN] = 1; - tcsetattr(fdmouse2, TCSANOW, &m2tio); - for (i = 0; i < strlen(cv_mouse2opt.string); i++) - { - if (toupper(cv_mouse2opt.string[i]) == 'D') - { - if (cv_mouse2opt.string[i+1] == '-') - dtr = 0; - else - dtr = 1; - } - if (toupper(cv_mouse2opt.string[i]) == 'R') - { - if (cv_mouse2opt.string[i+1] == '-') - rts = 0; - else - rts = 1; - } - if (dtr != -1 || rts != -1) - { - INT32 c; - if (!ioctl(fdmouse2, TIOCMGET, &c)) - { - if (!dtr) - c &= ~TIOCM_DTR; - else if (dtr > 0) - c |= TIOCM_DTR; - } - if (!rts) - c &= ~TIOCM_RTS; - else if (rts > 0) - c |= TIOCM_RTS; - ioctl(fdmouse2, TIOCMSET, &c); - } - } - mouse2_started = 1; - I_AddExitFunc(I_ShutdownMouse2); -#elif defined (_WIN32) && !defined (_XBOX) - DCB dcb; - - if (mouse2filehandle != INVALID_HANDLE_VALUE) - I_ShutdownMouse2(); - - if (cv_usemouse2.value == 0) - return; - - if (mouse2filehandle == INVALID_HANDLE_VALUE) - { - // COM file handle - mouse2filehandle = CreateFileA(cv_mouse2port.string, GENERIC_READ | GENERIC_WRITE, - 0, // exclusive access - NULL, // no security attrs - OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, - NULL); - if (mouse2filehandle == INVALID_HANDLE_VALUE) - { - INT32 e = GetLastError(); - if (e == 5) - CONS_Alert(CONS_ERROR, M_GetText("Can't open %s: Access denied\n"), cv_mouse2port.string); - else - CONS_Alert(CONS_ERROR, M_GetText("Can't open %s: error %d\n"), cv_mouse2port.string, e); - return; - } - } - - // getevent when somthing happens - //SetCommMask(mouse2filehandle, EV_RXCHAR); - - // buffers - SetupComm(mouse2filehandle, MOUSECOMBUFFERSIZE, MOUSECOMBUFFERSIZE); - - // purge buffers - PurgeComm(mouse2filehandle, PURGE_TXABORT | PURGE_RXABORT - | PURGE_TXCLEAR | PURGE_RXCLEAR); - - // setup port to 1200 7N1 - dcb.DCBlength = sizeof (DCB); - - GetCommState(mouse2filehandle, &dcb); - - dcb.BaudRate = CBR_1200; - dcb.ByteSize = 7; - dcb.Parity = NOPARITY; - dcb.StopBits = ONESTOPBIT; - - dcb.fDtrControl = DTR_CONTROL_ENABLE; - dcb.fRtsControl = RTS_CONTROL_ENABLE; - - dcb.fBinary = TRUE; - dcb.fParity = TRUE; - - SetCommState(mouse2filehandle, &dcb); - I_AddExitFunc(I_ShutdownMouse2); -#endif -} - -// -// I_Tactile -// -void I_Tactile(FFType pFFType, const JoyFF_t *FFEffect) -{ - // UNUSED. - (void)pFFType; - (void)FFEffect; -} - -void I_Tactile2(FFType pFFType, const JoyFF_t *FFEffect) -{ - // UNUSED. - (void)pFFType; - (void)FFEffect; -} - -void I_Tactile3(FFType pFFType, const JoyFF_t *FFEffect) -{ - // UNUSED. - (void)pFFType; - (void)FFEffect; -} - -void I_Tactile4(FFType pFFType, const JoyFF_t *FFEffect) -{ - // UNUSED. - (void)pFFType; - (void)FFEffect; -} - -/** \brief empty ticcmd for player 1 -*/ -static ticcmd_t emptycmd; - -ticcmd_t *I_BaseTiccmd(void) -{ - return &emptycmd; -} - -/** \brief empty ticcmd for player 2 -*/ -static ticcmd_t emptycmd2; - -ticcmd_t *I_BaseTiccmd2(void) -{ - return &emptycmd2; -} - -/** \brief empty ticcmd for player 3 -*/ -static ticcmd_t emptycmd3; - -ticcmd_t *I_BaseTiccmd3(void) -{ - return &emptycmd3; -} - -/** \brief empty ticcmd for player 4 -*/ -static ticcmd_t emptycmd4; - -ticcmd_t *I_BaseTiccmd4(void) -{ - return &emptycmd4; -} - -#if (defined (_WIN32) && !defined (_WIN32_WCE)) && !defined (_XBOX) -static HMODULE winmm = NULL; -static DWORD starttickcount = 0; // hack for win2k time bug -static p_timeGetTime pfntimeGetTime = NULL; - -// --------- -// I_GetTime -// Use the High Resolution Timer if available, -// else use the multimedia timer which has 1 millisecond precision on Windowz 95, -// but lower precision on Windows NT -// --------- - -tic_t I_GetTime(void) -{ - tic_t newtics = 0; - - if (!starttickcount) // high precision timer - { - LARGE_INTEGER currtime; // use only LowPart if high resolution counter is not available - static LARGE_INTEGER basetime = {{0, 0}}; - - // use this if High Resolution timer is found - static LARGE_INTEGER frequency; - - if (!basetime.LowPart) - { - if (!QueryPerformanceFrequency(&frequency)) - frequency.QuadPart = 0; - else - QueryPerformanceCounter(&basetime); - } - - if (frequency.LowPart && QueryPerformanceCounter(&currtime)) - { - newtics = (INT32)((currtime.QuadPart - basetime.QuadPart) * NEWTICRATE - / frequency.QuadPart); - } - else if (pfntimeGetTime) - { - currtime.LowPart = pfntimeGetTime(); - if (!basetime.LowPart) - basetime.LowPart = currtime.LowPart; - newtics = ((currtime.LowPart - basetime.LowPart)/(1000/NEWTICRATE)); - } - } - else - newtics = (GetTickCount() - starttickcount)/(1000/NEWTICRATE); - - return newtics; -} - -static void I_ShutdownTimer(void) -{ - pfntimeGetTime = NULL; - if (winmm) - { - p_timeEndPeriod pfntimeEndPeriod = (p_timeEndPeriod)GetProcAddress(winmm, "timeEndPeriod"); - if (pfntimeEndPeriod) - pfntimeEndPeriod(1); - FreeLibrary(winmm); - winmm = NULL; - } -} -#else -// -// I_GetTime -// returns time in 1/TICRATE second tics -// -tic_t I_GetTime (void) -{ -#ifdef _arch_dreamcast - static Uint64 basetime = 0; - Uint64 ticks = timer_ms_gettime64(); //using timer_ms_gettime64 instand of SDL_GetTicks for the Dreamcast -#else - static Uint32 basetime = 0; - Uint32 ticks = SDL_GetTicks(); -#endif - - if (!basetime) - basetime = ticks; - - ticks -= basetime; - - ticks = (ticks*TICRATE); - -#if 0 //#ifdef _WIN32_WCE - ticks = (ticks/10); -#else - ticks = (ticks/1000); -#endif - - return (tic_t)ticks; -} -#endif - -// -//I_StartupTimer -// -void I_StartupTimer(void) -{ -#if (defined (_WIN32) && !defined (_WIN32_WCE)) && !defined (_XBOX) - // for win2k time bug - if (M_CheckParm("-gettickcount")) - { - starttickcount = GetTickCount(); - CONS_Printf("%s", M_GetText("Using GetTickCount()\n")); - } - winmm = LoadLibraryA("winmm.dll"); - if (winmm) - { - p_timeEndPeriod pfntimeBeginPeriod = (p_timeEndPeriod)GetProcAddress(winmm, "timeBeginPeriod"); - if (pfntimeBeginPeriod) - pfntimeBeginPeriod(1); - pfntimeGetTime = (p_timeGetTime)GetProcAddress(winmm, "timeGetTime"); - } - I_AddExitFunc(I_ShutdownTimer); -#elif 0 //#elif !defined (_arch_dreamcast) && !defined(GP2X) // the DC have it own timer and GP2X have broken pthreads? - if (SDL_InitSubSystem(SDL_INIT_TIMER) < 0) - I_Error("SRB2Kart: Needs SDL_Timer, Error: %s", SDL_GetError()); -#endif -} - - - -void I_Sleep(void) -{ -#if !(defined (_arch_dreamcast) || defined (_XBOX)) - if (cv_sleep.value > 0) - SDL_Delay(cv_sleep.value); -#endif -} - -INT32 I_StartupSystem(void) -{ - SDL_version SDLcompiled; - const SDL_version *SDLlinked; -#ifdef _XBOX -#ifdef __GNUC__ - char DP[] =" SRB2Kart!\n"; - debugPrint(DP); -#endif - unlink("e:/Games/SRB2Kart/stdout.txt"); - freopen("e:/Games/SRB2Kart/stdout.txt", "w+", stdout); - unlink("e:/Games/SRB2Kart/stderr.txt"); - freopen("e:/Games/SRB2Kart/stderr.txt", "w+", stderr); -#endif -#ifdef _arch_dreamcast -#ifdef _DEBUG - //gdb_init(); -#endif - printf(__FILE__":%i\n",__LINE__); -#ifdef _DEBUG - //gdb_breakpoint(); -#endif -#endif - SDL_VERSION(&SDLcompiled) - SDLlinked = SDL_Linked_Version(); - I_StartupConsole(); - I_OutputMsg("Compiled for SDL version: %d.%d.%d\n", - SDLcompiled.major, SDLcompiled.minor, SDLcompiled.patch); - I_OutputMsg("Linked with SDL version: %d.%d.%d\n", - SDLlinked->major, SDLlinked->minor, SDLlinked->patch); -#if 0 //#ifdef GP2X //start up everything - if (SDL_Init(SDL_INIT_NOPARACHUTE|SDL_INIT_EVERYTHING) < 0) -#else - if (SDL_Init(SDL_INIT_NOPARACHUTE) < 0) -#endif - I_Error("SRB2Kart: SDL System Error: %s", SDL_GetError()); //Alam: Oh no.... -#ifndef NOMUMBLE - I_SetupMumble(); -#endif - return 0; -} - - -// -// I_Quit -// -void I_Quit(void) -{ - static SDL_bool quiting = SDL_FALSE; - - /* prevent recursive I_Quit() */ - if (quiting) goto death; - SDLforceUngrabMouse(); - quiting = SDL_FALSE; - I_ShutdownConsole(); - M_SaveConfig(NULL); //save game config, cvars.. -#ifndef NONET - D_SaveBan(); // save the ban list -#endif - - // Make sure you lose points for ALT-F4 - if (Playing()) - K_PlayerForfeit(consoleplayer, true); - - G_SaveGameData(); // Tails 12-08-2002 - //added:16-02-98: when recording a demo, should exit using 'q' key, - // but sometimes we forget and use 'F10'.. so save here too. - - if (demorecording) - G_CheckDemoStatus(); - if (metalrecording) - G_StopMetalRecording(); - - D_QuitNetGame(); - I_ShutdownMusic(); - I_ShutdownSound(); - I_ShutdownCD(); - // use this for 1.28 19990220 by Kin - I_ShutdownGraphics(); - I_ShutdownInput(); - I_ShutdownSystem(); -#ifndef _arch_dreamcast - SDL_Quit(); -#endif - /* if option -noendtxt is set, don't print the text */ - if (!M_CheckParm("-noendtxt") && W_CheckNumForName("ENDOOM") != LUMPERROR) - { - printf("\r"); - ShowEndTxt(); - } - if (myargmalloc) - free(myargv); // Deallocate allocated memory -death: - W_Shutdown(); -#ifdef GP2X - chdir("/usr/gp2x"); - execl("/usr/gp2x/gp2xmenu", "/usr/gp2x/gp2xmenu", NULL); -#endif - exit(0); -} - -void I_WaitVBL(INT32 count) -{ - count = 1; - SDL_Delay(count); -} - -void I_BeginRead(void) -{ -} - -void I_EndRead(void) -{ -} - -// -// I_Error -// -/** \brief phuck recursive errors -*/ -static INT32 errorcount = 0; - -/** \brief recursive error detecting -*/ -static boolean shutdowning = false; - -void I_Error(const char *error, ...) -{ - va_list argptr; -#if (defined (MAC_ALERT) || defined (_WIN32) || (defined (_WIN32_WCE) && !defined (__GNUC__))) && !defined (_XBOX) - char buffer[8192]; -#endif - - // recursive error detecting - if (shutdowning) - { - errorcount++; - if (errorcount == 1) - SDLforceUngrabMouse(); - // try to shutdown each subsystem separately - if (errorcount == 2) - I_ShutdownMusic(); - if (errorcount == 3) - I_ShutdownSound(); - if (errorcount == 4) - I_ShutdownCD(); - if (errorcount == 5) - I_ShutdownGraphics(); - if (errorcount == 6) - I_ShutdownInput(); - if (errorcount == 7) - I_ShutdownSystem(); -#ifndef _arch_dreamcast - if (errorcount == 8) - SDL_Quit(); -#endif - if (errorcount == 9) - { - M_SaveConfig(NULL); - G_SaveGameData(); - } - if (errorcount > 20) - { -#ifdef MAC_ALERT - va_start(argptr, error); - vsprintf(buffer, error, argptr); - va_end(argptr); - // 2004-03-03 AJR Since the Mac user is most likely double clicking to run the game, give them a panel. - MacShowAlert("Recursive Error", buffer, "Quit", NULL, NULL); -#elif (defined (_WIN32) || (defined (_WIN32_WCE)) && !defined (__GNUC__)) && !defined (_XBOX) - va_start(argptr,error); - vsprintf(buffer, error, argptr); - va_end(argptr); -#ifndef _WIN32_WCE - { - HANDLE co = GetStdHandle(STD_OUTPUT_HANDLE); - DWORD bytesWritten; - if (co != INVALID_HANDLE_VALUE) - { - if (GetFileType(co) == FILE_TYPE_CHAR && GetConsoleMode(co, &bytesWritten)) - WriteConsoleA(co, buffer, (DWORD)strlen(buffer), NULL, NULL); - else - WriteFile(co, buffer, (DWORD)strlen(buffer), &bytesWritten, NULL); - } - } -#endif - OutputDebugStringA(buffer); - MessageBoxA(vid.WndParent, buffer, "SRB2Kart Recursive Error", MB_OK|MB_ICONERROR); -#else - // Don't print garbage - va_start(argptr, error); - if (!framebuffer) - vfprintf (stderr, error, argptr); - va_end(argptr); -#endif - W_Shutdown(); -#ifdef GP2X - chdir("/usr/gp2x"); - execl("/usr/gp2x/gp2xmenu", "/usr/gp2x/gp2xmenu", NULL); -#endif - exit(-1); // recursive errors detected - } - } - shutdowning = true; - I_ShutdownConsole(); -#ifndef MAC_ALERT - // Message first. - va_start(argptr,error); - if (!framebuffer) - { - fprintf(stderr, "Error: "); - vfprintf(stderr,error,argptr); - fprintf(stderr, "\n"); - } - va_end(argptr); - - if (!framebuffer) - fflush(stderr); -#endif - M_SaveConfig(NULL); // save game config, cvars.. -#ifndef NONET - D_SaveBan(); // save the ban list -#endif - G_SaveGameData(); // Tails 12-08-2002 - - // Shutdown. Here might be other errors. - if (demorecording) - G_CheckDemoStatus(); - if (metalrecording) - G_StopMetalRecording(); - - D_QuitNetGame(); - I_ShutdownMusic(); - I_ShutdownSound(); - I_ShutdownCD(); - // use this for 1.28 19990220 by Kin - I_ShutdownGraphics(); - I_ShutdownInput(); - I_ShutdownSystem(); -#ifndef _arch_dreamcast - SDL_Quit(); -#endif -#ifdef MAC_ALERT - va_start(argptr, error); - vsprintf(buffer, error, argptr); - va_end(argptr); - // 2004-03-03 AJR Since the Mac user is most likely double clicking to run the game, give them a panel. - MacShowAlert("Critical Error", buffer, "Quit", NULL, NULL); -#endif - W_Shutdown(); -#if defined (PARANOIA) && defined (__CYGWIN__) - *(INT32 *)2 = 4; //Alam: Debug! -#endif -#ifdef GP2X - chdir("/usr/gp2x"); - execl("/usr/gp2x/gp2xmenu", "/usr/gp2x/gp2xmenu", NULL); -#endif - exit(-1); -} - -/** \brief quit function table -*/ -static quitfuncptr quit_funcs[MAX_QUIT_FUNCS]; /* initialized to all bits 0 */ - -// -// Adds a function to the list that need to be called by I_SystemShutdown(). -// -void I_AddExitFunc(void (*func)()) -{ - INT32 c; - - for (c = 0; c < MAX_QUIT_FUNCS; c++) - { - if (!quit_funcs[c]) - { - quit_funcs[c] = func; - break; - } - } -} - - -// -// Removes a function from the list that need to be called by -// I_SystemShutdown(). -// -void I_RemoveExitFunc(void (*func)()) -{ - INT32 c; - - for (c = 0; c < MAX_QUIT_FUNCS; c++) - { - if (quit_funcs[c] == func) - { - while (c < MAX_QUIT_FUNCS-1) - { - quit_funcs[c] = quit_funcs[c+1]; - c++; - } - quit_funcs[MAX_QUIT_FUNCS-1] = NULL; - break; - } - } -} - -// -// Closes down everything. This includes restoring the initial -// palette and video mode, and removing whatever mouse, keyboard, and -// timer routines have been installed. -// -// NOTE: Shutdown user funcs are effectively called in reverse order. -// -void I_ShutdownSystem(void) -{ - INT32 c; - - for (c = MAX_QUIT_FUNCS-1; c >= 0; c--) - if (quit_funcs[c]) - (*quit_funcs[c])(); -#ifdef LOGMESSAGES - if (logstream) - { - fclose(logstream); - logstream = NULL; - } -#endif - -} - -void I_GetDiskFreeSpace(INT64 *freespace) -{ -#if defined (_arch_dreamcast) || defined (_PSP) - *freespace = 0; -#elif defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON) -#if defined (SOLARIS) || defined (__HAIKU__) || defined (_WII) || defined (_PS3) - *freespace = INT32_MAX; - return; -#else // Both Linux and BSD have this, apparently. - struct statfs stfs; - if (statfs(".", &stfs) == -1) - { - *freespace = INT32_MAX; - return; - } - *freespace = stfs.f_bavail * stfs.f_bsize; -#endif -#elif (defined (_WIN32) && !defined (_WIN32_WCE)) && !defined (_XBOX) - static p_GetDiskFreeSpaceExA pfnGetDiskFreeSpaceEx = NULL; - static boolean testwin95 = false; - ULARGE_INTEGER usedbytes, lfreespace; - - if (!testwin95) - { - pfnGetDiskFreeSpaceEx = (p_GetDiskFreeSpaceExA)GetProcAddress(GetModuleHandleA("kernel32.dll"), "GetDiskFreeSpaceExA"); - testwin95 = true; - } - if (pfnGetDiskFreeSpaceEx) - { - if (pfnGetDiskFreeSpaceEx(NULL, &lfreespace, &usedbytes, NULL)) - *freespace = lfreespace.QuadPart; - else - *freespace = INT32_MAX; - } - else - { - DWORD SectorsPerCluster, BytesPerSector, NumberOfFreeClusters, TotalNumberOfClusters; - GetDiskFreeSpace(NULL, &SectorsPerCluster, &BytesPerSector, - &NumberOfFreeClusters, &TotalNumberOfClusters); - *freespace = BytesPerSector*SectorsPerCluster*NumberOfFreeClusters; - } -#else // Dummy for platform independent; 1GB should be enough - *freespace = 1024*1024*1024; -#endif -} - -char *I_GetUserName(void) -{ -#ifdef GP2X - static char username[MAXPLAYERNAME] = "GP2XUSER"; - return username; -#elif defined (PSP) - static char username[MAXPLAYERNAME] = "PSPUSER"; - return username; -#elif !(defined (_WIN32_WCE) || defined (_XBOX)) - static char username[MAXPLAYERNAME]; - char *p; -#ifdef _WIN32 - DWORD i = MAXPLAYERNAME; - - if (!GetUserNameA(username, &i)) -#endif - { - p = I_GetEnv("USER"); - if (!p) - { - p = I_GetEnv("user"); - if (!p) - { - p = I_GetEnv("USERNAME"); - if (!p) - { - p = I_GetEnv("username"); - if (!p) - { - return NULL; - } - } - } - } - strncpy(username, p, MAXPLAYERNAME); - } - - - if (strcmp(username, "") != 0) - return username; -#endif - return NULL; // dummy for platform independent version -} - -INT32 I_mkdir(const char *dirname, INT32 unixright) -{ -//[segabor] -#if defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON) || defined (__CYGWIN__) || defined (__OS2__) - return mkdir(dirname, unixright); -#elif (defined (_WIN32) || (defined (_WIN32_WCE) && !defined (__GNUC__))) && !defined (_XBOX) - UNREFERENCED_PARAMETER(unixright); /// \todo should implement ntright under nt... - return CreateDirectoryA(dirname, NULL); -#else - (void)dirname; - (void)unixright; - return false; -#endif -} - -char *I_GetEnv(const char *name) -{ -#ifdef NEED_SDL_GETENV - return SDL_getenv(name); -#elif defined(_WIN32_WCE) - (void)name; - return NULL; -#else - return getenv(name); -#endif -} - -INT32 I_PutEnv(char *variable) -{ -#ifdef NEED_SDL_GETENV - return SDL_putenv(variable); -#elif defined(_WIN32_WCE) - return ((variable)?-1:0); -#else - return putenv(variable); -#endif -} - -INT32 I_ClipboardCopy(const char *data, size_t size) -{ - (void)data; - (void)size; - return -1; -} - -char *I_ClipboardPaste(void) -{ - return NULL; -} - -/** \brief The isWadPathOk function - - \param path string path to check - - \return if true, wad file found - - -*/ -static boolean isWadPathOk(const char *path) -{ - char *wad3path = malloc(256); - - if (!wad3path) - return false; - - sprintf(wad3path, pandf, path, WADKEYWORD); - - if (FIL_ReadFileOK(wad3path)) - { - free(wad3path); - return true; - } - - free(wad3path); - return false; -} - -static void pathonly(char *s) -{ - size_t j; - - for (j = strlen(s); j != (size_t)-1; j--) - if ((s[j] == '\\') || (s[j] == ':') || (s[j] == '/')) - { - if (s[j] == ':') s[j+1] = 0; - else s[j] = 0; - return; - } -} - -/** \brief search for main.pk3 in the given path - - \param searchDir starting path - - \return WAD path if not NULL - - -*/ -static const char *searchWad(const char *searchDir) -{ - static char tempsw[256] = ""; - filestatus_t fstemp; - - strcpy(tempsw, WADKEYWORD); - fstemp = filesearch(tempsw,searchDir,NULL,true,20); - if (fstemp == FS_FOUND) - { - pathonly(tempsw); - return tempsw; - } - - return NULL; -} - -/** \brief go through all possible paths and look for main.pk3 - - \return path to main.pk3 if any -*/ -static const char *locateWad(void) -{ - const char *envstr; - const char *WadPath; - - I_OutputMsg("SRB2WADDIR"); - // does SRB2WADDIR exist? - if (((envstr = I_GetEnv("SRB2WADDIR")) != NULL) && isWadPathOk(envstr)) - return envstr; - -#if defined(_WIN32_WCE) || defined(_PS3) || defined(_PSP) - // examine argv[0] - strcpy(returnWadPath, myargv[0]); - pathonly(returnWadPath); - I_PutEnv(va("HOME=%s",returnWadPath)); - if (isWadPathOk(returnWadPath)) - return returnWadPath; -#endif - -#ifndef NOCWD - I_OutputMsg(",."); - // examine current dir - strcpy(returnWadPath, "."); - if (isWadPathOk(returnWadPath)) - return NULL; -#endif - - // examine default dirs -#ifdef DEFAULTWADLOCATION1 - I_OutputMsg(","DEFAULTWADLOCATION1); - strcpy(returnWadPath, DEFAULTWADLOCATION1); - if (isWadPathOk(returnWadPath)) - return returnWadPath; -#endif -#ifdef DEFAULTWADLOCATION2 - I_OutputMsg(","DEFAULTWADLOCATION2); - strcpy(returnWadPath, DEFAULTWADLOCATION2); - if (isWadPathOk(returnWadPath)) - return returnWadPath; -#endif -#ifdef DEFAULTWADLOCATION3 - I_OutputMsg(","DEFAULTWADLOCATION3); - strcpy(returnWadPath, DEFAULTWADLOCATION3); - if (isWadPathOk(returnWadPath)) - return returnWadPath; -#endif -#ifdef DEFAULTWADLOCATION4 - I_OutputMsg(","DEFAULTWADLOCATION4); - strcpy(returnWadPath, DEFAULTWADLOCATION4); - if (isWadPathOk(returnWadPath)) - return returnWadPath; -#endif -#ifdef DEFAULTWADLOCATION5 - I_OutputMsg(","DEFAULTWADLOCATION5); - strcpy(returnWadPath, DEFAULTWADLOCATION5); - if (isWadPathOk(returnWadPath)) - return returnWadPath; -#endif -#ifdef DEFAULTWADLOCATION6 - I_OutputMsg(","DEFAULTWADLOCATION6); - strcpy(returnWadPath, DEFAULTWADLOCATION6); - if (isWadPathOk(returnWadPath)) - return returnWadPath; -#endif -#ifdef DEFAULTWADLOCATION7 - I_OutputMsg(","DEFAULTWADLOCATION7); - strcpy(returnWadPath, DEFAULTWADLOCATION7); - if (isWadPathOk(returnWadPath)) - return returnWadPath; -#endif -#ifndef NOHOME - // find in $HOME - I_OutputMsg(",HOME"); - if ((envstr = I_GetEnv("HOME")) != NULL) - { - WadPath = searchWad(envstr); - if (WadPath) - return WadPath; - } -#endif -#ifdef DEFAULTSEARCHPATH1 - // find in /usr/local - I_OutputMsg(", in:"DEFAULTSEARCHPATH1); - WadPath = searchWad(DEFAULTSEARCHPATH1); - if (WadPath) - return WadPath; -#endif -#ifdef DEFAULTSEARCHPATH2 - // find in /usr/games - I_OutputMsg(", in:"DEFAULTSEARCHPATH2); - WadPath = searchWad(DEFAULTSEARCHPATH2); - if (WadPath) - return WadPath; -#endif -#ifdef DEFAULTSEARCHPATH3 - // find in ??? - I_OutputMsg(", in:"DEFAULTSEARCHPATH3); - WadPath = searchWad(DEFAULTSEARCHPATH3); - if (WadPath) - return WadPath; -#endif - // if nothing was found - return NULL; -} - -const char *I_LocateWad(void) -{ - const char *waddir; - - I_OutputMsg("Looking for WADs in: "); - waddir = locateWad(); - I_OutputMsg("\n"); - - if (waddir) - { - // change to the directory where we found main.pk3 -#if (defined (_WIN32) && !defined (_WIN32_WCE)) && !defined (_XBOX) - SetCurrentDirectoryA(waddir); -#elif !defined (_WIN32_WCE) && !defined (_PS3) - if (chdir(waddir) == -1) - I_OutputMsg("Couldn't change working directory\n"); -#endif - } - return waddir; -} - -#ifdef LINUX -#define MEMINFO_FILE "/proc/meminfo" -#define MEMTOTAL "MemTotal:" -#define MEMFREE "MemFree:" -#endif - -// quick fix for compil -UINT32 I_GetFreeMem(UINT32 *total) -{ -#if defined (_arch_dreamcast) - //Dreamcast! - if (total) - *total = 16<<20; - return 8<<20; -#elif defined (_PSP) - // PSP - if (total) - *total = 32<<20; - return 16<<20; -#elif defined (FREEBSD) - struct vmmeter sum; - kvm_t *kd; - struct nlist namelist[] = - { -#define X_SUM 0 - {"_cnt"}, - {NULL} - }; - if ((kd = kvm_open(NULL, NULL, NULL, O_RDONLY, "kvm_open")) == NULL) - { - *total = 0L; - return 0; - } - if (kvm_nlist(kd, namelist) != 0) - { - kvm_close (kd); - *total = 0L; - return 0; - } - if (kvm_read(kd, namelist[X_SUM].n_value, &sum, - sizeof (sum)) != sizeof (sum)) - { - kvm_close(kd); - *total = 0L; - return 0; - } - kvm_close(kd); - - if (total) - *total = sum.v_page_count * sum.v_page_size; - return sum.v_free_count * sum.v_page_size; -#elif defined (SOLARIS) - /* Just guess */ - if (total) - *total = 32 << 20; - return 32 << 20; -#elif defined (LINUX) - /* Linux */ - char buf[1024]; - char *memTag; - UINT32 freeKBytes; - UINT32 totalKBytes; - INT32 n; - INT32 meminfo_fd = -1; - - meminfo_fd = open(MEMINFO_FILE, O_RDONLY); - n = read(meminfo_fd, buf, 1023); - close(meminfo_fd); - - if (n < 0) - { - // Error - *total = 0L; - return 0; - } - - buf[n] = '\0'; - if (NULL == (memTag = strstr(buf, MEMTOTAL))) - { - // Error - *total = 0L; - return 0; - } - - memTag += sizeof (MEMTOTAL); - totalKBytes = atoi(memTag); - - if (NULL == (memTag = strstr(buf, MEMFREE))) - { - // Error - *total = 0L; - return 0; - } - - memTag += sizeof (MEMFREE); - freeKBytes = atoi(memTag); - - if (total) - *total = totalKBytes << 10; - return freeKBytes << 10; -#elif (defined (_WIN32) || (defined (_WIN32_WCE) && !defined (__GNUC__))) && !defined (_XBOX) - MEMORYSTATUS info; - - info.dwLength = sizeof (MEMORYSTATUS); - GlobalMemoryStatus( &info ); - if (total) - *total = (UINT32)info.dwTotalPhys; - return (UINT32)info.dwAvailPhys; -#elif defined (__OS2__) - UINT32 pr_arena; - - if (total) - DosQuerySysInfo( QSV_TOTPHYSMEM, QSV_TOTPHYSMEM, - (PVOID) total, sizeof (UINT32)); - DosQuerySysInfo( QSV_MAXPRMEM, QSV_MAXPRMEM, - (PVOID) &pr_arena, sizeof (UINT32)); - - return pr_arena; -#else - // Guess 48 MB. - if (total) - *total = 48<<20; - return 48<<20; -#endif /* LINUX */ -} - -#if (defined (_WIN32) && !defined (_WIN32_WCE)) && !defined (_XBOX) -static void CPUAffinity_OnChange(void); -static consvar_t cv_cpuaffinity = {"cpuaffinity", "-1", CV_SAVE | CV_CALL, NULL, CPUAffinity_OnChange, 0, NULL, NULL, 0, 0, NULL}; - -static p_GetCurrentProcess pfnGetCurrentProcess = NULL; -static p_GetProcessAffinityMask pfnGetProcessAffinityMask = NULL; -static p_SetProcessAffinityMask pfnSetProcessAffinityMask = NULL; - -static inline VOID GetAffinityFuncs(VOID) -{ - HMODULE h = GetModuleHandleA("kernel32.dll"); - pfnGetCurrentProcess = (p_GetCurrentProcess)GetProcAddress(h, "GetCurrentProcess"); - pfnGetProcessAffinityMask = (p_GetProcessAffinityMask)GetProcAddress(h, "GetProcessAffinityMask"); - pfnSetProcessAffinityMask = (p_SetProcessAffinityMask)GetProcAddress(h, "SetProcessAffinityMask"); -} - -static void CPUAffinity_OnChange(void) -{ - DWORD_PTR dwProcMask, dwSysMask; - HANDLE selfpid; - - if (!pfnGetCurrentProcess || !pfnGetProcessAffinityMask || !pfnSetProcessAffinityMask) - return; - else - selfpid = pfnGetCurrentProcess(); - - pfnGetProcessAffinityMask(selfpid, &dwProcMask, &dwSysMask); - - /* If resulting mask is zero, don't change anything and fall back to - * actual mask. - */ - if(dwSysMask & cv_cpuaffinity.value) - { - pfnSetProcessAffinityMask(selfpid, dwSysMask & cv_cpuaffinity.value); - CV_StealthSetValue(&cv_cpuaffinity, (INT32)(dwSysMask & cv_cpuaffinity.value)); - } - else - CV_StealthSetValue(&cv_cpuaffinity, (INT32)dwProcMask); -} -#endif - -void I_RegisterSysCommands(void) -{ -#if (defined (_WIN32) && !defined (_WIN32_WCE)) && !defined (_XBOX) - GetAffinityFuncs(); - CV_RegisterVar(&cv_cpuaffinity); -#endif -} -#endif diff --git a/src/sdl12/i_video.c b/src/sdl12/i_video.c deleted file mode 100644 index 0662e63cb..000000000 --- a/src/sdl12/i_video.c +++ /dev/null @@ -1,1984 +0,0 @@ -// Emacs style mode select -*- C++ -*- -//----------------------------------------------------------------------------- -// -// Copyright (C) 1993-1996 by id Software, Inc. -// Portions Copyright (C) 1998-2000 by DooM Legacy Team. -// -// 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. -//----------------------------------------------------------------------------- -/// \file -/// \brief SRB2 graphics stuff for SDL - -#include - -#ifndef _WIN32_WCE -#include -#endif - -#ifdef _MSC_VER -#pragma warning(disable : 4214 4244) -#endif - -#ifdef HAVE_SDL - -#include - -#ifdef _MSC_VER -#pragma warning(default : 4214 4244) -#endif - -#if SDL_VERSION_ATLEAST(1,2,9) && defined (_arch_dreamcast) -#define HAVE_DCSDL -#include "SDL_dreamcast.h" -#endif - -#if SDL_VERSION_ATLEAST(1,2,9) && defined (GP2X) -#define HAVE_GP2XSDL -#include "SDL_gp2x.h" -#endif - -#if SDL_VERSION_ATLEAST(1,3,0) -#define SDLK_EQUALS SDLK_KP_EQUALSAS400 -#define SDLK_LMETA SDLK_LGUI -#define SDLK_RMETA SDLK_RGUI -#else -#define HAVE_SDLMETAKEYS -#endif - -#ifdef HAVE_TTF -#include "i_ttf.h" -#endif - -#ifdef HAVE_IMAGE -#include "SDL_image.h" -#elseif !(defined (DC) || defined (_WIN32_WCE) || defined (PSP) || defined(GP2X)) -#define LOAD_XPM //I want XPM! -#include "IMG_xpm.c" //Alam: I don't want to add SDL_Image.dll/so -#define HAVE_IMAGE //I have SDL_Image, sortof -#endif - -#ifdef HAVE_IMAGE -#include "SDL_icon.xpm" -#endif - -#include "../doomdef.h" - -#if defined (_WIN32) && !defined (_XBOX) -#include "SDL_syswm.h" -#endif - -#ifdef _arch_dreamcast -#include -#include -#include -//#include "SRB2DC/VMU.xbm" -//#include -//#define malloc pvr_mem_malloc -//#define free pvr_mem_free -#endif - -#if defined (_XBOX) && defined (__GNUC__) -#include -#endif - -#include "../doomstat.h" -#include "../i_system.h" -#include "../v_video.h" -#include "../m_argv.h" -#include "../m_menu.h" -#include "../d_main.h" -#include "../s_sound.h" -#include "../i_sound.h" // midi pause/unpause -#include "../i_joy.h" -#include "../st_stuff.h" -#include "../g_game.h" -#include "../i_video.h" -#include "../console.h" -#include "../command.h" -#include "sdlmain.h" - -#ifdef REMOTE_DEBUGGING -#ifdef _WII -#include -#endif -#endif - -#ifdef HAVE_FILTER -#define FILTERS -#include "filter/filters.h" -#endif - -// maximum number of windowed modes (see windowedModes[][]) -#if defined (_WIN32_WCE) || defined (DC) || defined (PSP) || defined(GP2X) -#define MAXWINMODES (1) -#elif defined (WII) -#define MAXWINMODES (8) -#elif defined (_PS3) -#define MAXWINMODES (26) -#else -#define MAXWINMODES (27) -#endif - -/** \brief -*/ -static INT32 numVidModes = -1; - -/** \brief -*/ -static char vidModeName[33][32]; // allow 33 different modes - -rendermode_t rendermode=render_soft; - -boolean highcolor = false; - -// synchronize page flipping with screen refresh -#if defined(DC) || (defined(GP2X) && !defined(HAVE_GP2XSDL)) -consvar_t cv_vidwait = {"vid_wait", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; -#else -consvar_t cv_vidwait = {"vid_wait", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; -#endif -static consvar_t cv_stretch = {"stretch", "Off", CV_SAVE|CV_NOSHOWHELP, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; - -UINT8 graphics_started = 0; // Is used in console.c and screen.c - -// To disable fullscreen at startup; is set in VID_PrepareModeList -boolean allow_fullscreen = false; -static SDL_bool disable_fullscreen = SDL_FALSE; -#define USE_FULLSCREEN (disable_fullscreen||!allow_fullscreen)?0:cv_fullscreen.value -static SDL_bool disable_mouse = SDL_FALSE; -#define USE_MOUSEINPUT (!disable_mouse && cv_usemouse.value && SDL_GetAppState() & SDL_APPACTIVE) -#define MOUSE_MENU false //(!disable_mouse && cv_usemouse.value && menuactive && !USE_FULLSCREEN) -#define MOUSEBUTTONS_MAX MOUSEBUTTONS - -// first entry in the modelist which is not bigger than MAXVIDWIDTHxMAXVIDHEIGHT -static INT32 firstEntry = 0; - -// SDL vars -static SDL_Surface *vidSurface = NULL; -static SDL_Surface *bufSurface = NULL; -static SDL_Surface *icoSurface = NULL; -static SDL_Color localPalette[256]; -static SDL_Rect **modeList = NULL; -#ifdef DC -static Uint8 BitsPerPixel = 15; -#else -static Uint8 BitsPerPixel = 16; -#endif -static Uint16 realwidth = BASEVIDWIDTH; -static Uint16 realheight = BASEVIDHEIGHT; -#ifdef _WIN32_WCE -static const Uint32 surfaceFlagsW = SDL_HWPALETTE; //Can't handle WinCE changing sides -#else -static const Uint32 surfaceFlagsW = SDL_HWPALETTE/*|SDL_RESIZABLE*/; -#endif -#ifdef _PSP -static const Uint32 surfaceFlagsF = SDL_HWSURFACE|SDL_FULLSCREEN; -#else -static const Uint32 surfaceFlagsF = SDL_HWPALETTE|SDL_FULLSCREEN; -#endif -static SDL_bool mousegrabok = SDL_TRUE; -#define HalfWarpMouse(x,y) SDL_WarpMouse((Uint16)(x/2),(Uint16)(y/2)) -#if defined (_WIN32_WCE) || defined (DC) || defined (PSP) || defined(GP2X) -static SDL_bool videoblitok = SDL_TRUE; -#else -static SDL_bool videoblitok = SDL_FALSE; -#endif -static SDL_bool exposevideo = SDL_FALSE; - -// windowed video modes from which to choose from. -static INT32 windowedModes[MAXWINMODES][2] = -{ -#if !(defined (_WIN32_WCE) || defined (DC) || defined (PSP) || defined (GP2X)) -#ifndef WII -#ifndef _PS3 - {1920,1200}, // 1.60,6.00 -#endif - {1680,1050}, // 1.60,5.25 - {1600,1200}, // 1.33,5.00 - {1600,1000}, // 1.60,5.00 - {1536,1152}, // 1.33,4.80 - {1536, 960}, // 1.60,4.80 - {1440, 900}, // 1.60,4.50 - {1400,1050}, // 1.33,4.375 - {1400, 875}, // 1.60,4.375 - {1360, 850}, // 1.60,4.25 - {1280, 960}, // 1.33,4.00 - {1280, 800}, // 1.60,4.00 - {1152, 864}, // 1.33,3.60 - {1120, 700}, // 1.60,3.50 - {1024, 768}, // 1.33,3.20 - { 960, 720}, // 1.33,3.00 - { 960, 600}, // 1.60,3.00 - { 800, 600}, // 1.33,2.50 - { 800, 500}, // 1.60,2.50 -#endif - { 640, 480}, // 1.33,2.00 - { 640, 400}, // 1.60,2.00 - { 576, 432}, // 1.33,1.80 - { 512, 384}, // 1.33,1.60 - { 416, 312}, // 1.33,1.30 - { 400, 300}, // 1.33,1.25 - { 320, 240}, // 1.33,1.00 -#endif - { 320, 200}, // 1.60,1.00 -}; - -static void SDLSetMode(INT32 width, INT32 height, INT32 bpp, Uint32 flags) -{ - const char *SDLVD = I_GetEnv("SDL_VIDEODRIVER"); -#ifdef _WIN32_WCE - if (bpp < 16) - bpp = 16; // 256 mode poo -#endif -#ifdef _WII - bpp = 16; // 8-bit mode poo -#endif -#ifdef DC - if (bpp < 15) - bpp = 15; - height = 240; -#endif -#ifdef PSP - bpp = 16; -#endif -#ifdef GP2X - bpp = 16; -#ifdef HAVE_GP2XSDL - height = 240; -#endif -#endif -#ifdef FILTERS - bpp = Setupf2x(width, height, bpp); -#endif - if (SDLVD && strncasecmp(SDLVD,"glSDL",6) == 0) //for glSDL videodriver - vidSurface = SDL_SetVideoMode(width, height,0,SDL_DOUBLEBUF); -#ifdef _WII // don't want it to use HWSURFACE, so make it first here - else if (SDL_VideoModeOK(width, height, bpp, flags|SDL_SWSURFACE|SDL_DOUBLEBUF) >= bpp) // SDL Wii uses double buffering - vidSurface = SDL_SetVideoMode(width, height, bpp, flags|SDL_SWSURFACE|SDL_DOUBLEBUF); -#endif - else if (cv_vidwait.value && videoblitok && SDL_VideoModeOK(width, height, bpp, flags|SDL_HWSURFACE|SDL_DOUBLEBUF) >= bpp) - vidSurface = SDL_SetVideoMode(width, height, bpp, flags|SDL_HWSURFACE|SDL_DOUBLEBUF); - else if (videoblitok && SDL_VideoModeOK(width, height, bpp, flags|SDL_HWSURFACE) >= bpp) - vidSurface = SDL_SetVideoMode(width, height, bpp, flags|SDL_HWSURFACE); - else if (SDL_VideoModeOK(width, height, bpp, flags|SDL_SWSURFACE) >= bpp) - vidSurface = SDL_SetVideoMode(width, height, bpp, flags|SDL_SWSURFACE); - else return; - realwidth = (Uint16)width; - realheight = (Uint16)height; -#ifdef HAVE_DCSDL - //SDL_DC_SetWindow(320,200); - SDL_DC_EmulateMouse(SDL_FALSE); - SDL_DC_EmulateKeyboard(SDL_TRUE); -#endif -#ifdef HAVE_GP2XSDL - SDL_ShowCursor(SDL_DISABLE); //For GP2X Open2x -#endif -#ifdef FILTERS - if (vidSurface && preSurface && f2xSurface) - { - vid.width = width/2; - vid.height = height/2; - } -#endif -} - -// -// Translates the SDL key into SRB2 key -// - -static INT32 SDLatekey(SDLKey sym) -{ - INT32 rc = sym + 0x80; - -#ifdef _WIN32_WCE - if (sym == SDLK_KP8) - sym = SDLK_UP; - else if (sym == SDLK_KP4) - sym = SDLK_LEFT; - else if (sym == SDLK_KP6) - sym = SDLK_RIGHT; - else if (sym == SDLK_KP2) - sym = SDLK_DOWN; -#endif - - switch (sym) - { - case SDLK_LEFT: - rc = KEY_LEFTARROW; - break; - case SDLK_RIGHT: - rc = KEY_RIGHTARROW; - break; - case SDLK_DOWN: - rc = KEY_DOWNARROW; - break; - case SDLK_UP: - rc = KEY_UPARROW; - break; - - case SDLK_ESCAPE: - rc = KEY_ESCAPE; - break; - case SDLK_SPACE: - rc = KEY_SPACE; - break; - case SDLK_RETURN: - case SDLK_KP_ENTER: - rc = KEY_ENTER; - break; - case SDLK_TAB: - rc = KEY_TAB; - break; - case SDLK_F1: - rc = KEY_F1; - break; - case SDLK_F2: - rc = KEY_F2; - break; - case SDLK_F3: - rc = KEY_F3; - break; - case SDLK_F4: - rc = KEY_F4; - break; - case SDLK_F5: - rc = KEY_F5; - break; - case SDLK_F6: - rc = KEY_F6; - break; - case SDLK_F7: - rc = KEY_F7; - break; - case SDLK_F8: - rc = KEY_F8; - break; - case SDLK_F9: - rc = KEY_F9; - break; - case SDLK_F10: - rc = KEY_F10; - break; - case SDLK_F11: - rc = KEY_F11; - break; - case SDLK_F12: - rc = KEY_F12; - break; - - case SDLK_BACKSPACE: - rc = KEY_BACKSPACE; - break; - case SDLK_DELETE: - rc = KEY_DEL; - break; - - case SDLK_KP_EQUALS: //Alam & Logan: WTF? Mac KB haves one! XD - case SDLK_PAUSE: - rc = KEY_PAUSE; - break; - - case SDLK_EQUALS: - case SDLK_PLUS: - rc = KEY_EQUALS; - break; - - case SDLK_MINUS: - rc = KEY_MINUS; - break; - - case SDLK_LSHIFT: - rc = KEY_LSHIFT; - break; - - case SDLK_RSHIFT: - rc = KEY_RSHIFT; - break; - - case SDLK_CAPSLOCK: - rc = KEY_CAPSLOCK; - break; - - case SDLK_LCTRL: - rc = KEY_LCTRL; - break; - case SDLK_RCTRL: - rc = KEY_RCTRL; - break; - - case SDLK_LALT: - rc = KEY_LALT; - break; - case SDLK_RALT: - rc = KEY_RALT; - break; - - case SDLK_NUMLOCK: - rc = KEY_NUMLOCK; - break; - case SDLK_SCROLLOCK: - rc = KEY_SCROLLLOCK; - break; - - case SDLK_PAGEUP: - rc = KEY_PGUP; - break; - case SDLK_PAGEDOWN: - rc = KEY_PGDN; - break; - case SDLK_END: - rc = KEY_END; - break; - case SDLK_HOME: - rc = KEY_HOME; - break; - case SDLK_INSERT: - rc = KEY_INS; - break; - - case SDLK_KP0: - rc = KEY_KEYPAD0; - break; - case SDLK_KP1: - rc = KEY_KEYPAD1; - break; - case SDLK_KP2: - rc = KEY_KEYPAD2; - break; - case SDLK_KP3: - rc = KEY_KEYPAD3; - break; - case SDLK_KP4: - rc = KEY_KEYPAD4; - break; - case SDLK_KP5: - rc = KEY_KEYPAD5; - break; - case SDLK_KP6: - rc = KEY_KEYPAD6; - break; - case SDLK_KP7: - rc = KEY_KEYPAD7; - break; - case SDLK_KP8: - rc = KEY_KEYPAD8; - break; - case SDLK_KP9: - rc = KEY_KEYPAD9; - break; - - case SDLK_KP_PERIOD: - rc = KEY_KPADDEL; - break; - case SDLK_KP_DIVIDE: - rc = KEY_KPADSLASH; - break; - case SDLK_KP_MULTIPLY: - rc = '*'; - break; - case SDLK_KP_MINUS: - rc = KEY_MINUSPAD; - break; - case SDLK_KP_PLUS: - rc = KEY_PLUSPAD; - break; - -#ifndef _arch_dreamcast - case SDLK_LSUPER: -#ifdef HAVE_SDLMETAKEYS - case SDLK_LMETA: -#endif - rc = KEY_LEFTWIN; - break; - case SDLK_RSUPER: -#ifdef HAVE_SDLMETAKEYS - case SDLK_RMETA: -#endif - rc = KEY_RIGHTWIN; - break; - - case SDLK_MENU: - rc = KEY_MENU; - break; -#endif - - default: - if (sym >= SDLK_SPACE && sym <= SDLK_DELETE) - rc = sym - SDLK_SPACE + ' '; - else if (sym >= 'A' && sym <= 'Z') - rc = sym - 'A' + 'a'; - else if (sym) - { - I_OutputMsg("Unknown Keycode %i, Name: %s\n",sym, SDL_GetKeyName( sym )); - } - else if (!sym) rc = 0; - break; - } - - return rc; -} - -static void SDLdoUngrabMouse(void) -{ - if (SDL_GRAB_ON == SDL_WM_GrabInput(SDL_GRAB_QUERY)) - { - SDL_WM_GrabInput(SDL_GRAB_OFF); - } -} - -void SDLforceUngrabMouse(void) -{ - if (SDL_WasInit(SDL_INIT_VIDEO)==SDL_INIT_VIDEO) - SDL_WM_GrabInput(SDL_GRAB_OFF); -} - -static void VID_Command_NumModes_f (void) -{ - CONS_Printf(M_GetText("%d video mode(s) available(s)\n"), VID_NumModes()); -} - -static void SurfaceInfo(const SDL_Surface *infoSurface, const char *SurfaceText) -{ - INT32 vfBPP; - const SDL_Surface *VidSur = SDL_GetVideoSurface(); - - if (!infoSurface) - return; - - if (!SurfaceText) - SurfaceText = M_GetText("Unknown Surface"); - - vfBPP = infoSurface->format?infoSurface->format->BitsPerPixel:0; - - CONS_Printf("\x82" "%s\n", SurfaceText); - CONS_Printf(M_GetText(" %ix%i at %i bit color\n"), infoSurface->w, infoSurface->h, vfBPP); - - if (infoSurface->flags&SDL_HWSURFACE) - CONS_Printf("%s", M_GetText(" Stored in video memory\n")); - else if (infoSurface->flags&SDL_OPENGL) - CONS_Printf("%s", M_GetText(" Stored in an OpenGL context\n")); - else if (infoSurface->flags&SDL_PREALLOC) - CONS_Printf("%s", M_GetText(" Uses preallocated memory\n")); - else - CONS_Printf("%s", M_GetText(" Stored in system memory\n")); - - if (infoSurface->flags&SDL_ASYNCBLIT) - CONS_Printf("%s", M_GetText(" Uses asynchronous blits if possible\n")); - else - CONS_Printf("%s", M_GetText(" Uses synchronous blits if possible\n")); - - if (infoSurface->flags&SDL_ANYFORMAT) - CONS_Printf("%s", M_GetText(" Allows any pixel-format\n")); - - if (infoSurface->flags&SDL_HWPALETTE) - CONS_Printf("%s", M_GetText(" Has exclusive palette access\n")); - else if (VidSur == infoSurface) - CONS_Printf("%s", M_GetText(" Has nonexclusive palette access\n")); - - if (infoSurface->flags&SDL_DOUBLEBUF) - CONS_Printf("%s", M_GetText(" Double buffered\n")); - else if (VidSur == infoSurface) - CONS_Printf("%s", M_GetText(" No hardware flipping\n")); - - if (infoSurface->flags&SDL_FULLSCREEN) - CONS_Printf("%s", M_GetText(" Full screen\n")); - else if (infoSurface->flags&SDL_RESIZABLE) - CONS_Printf("%s", M_GetText(" Resizable window\n")); - else if (VidSur == infoSurface) - CONS_Printf("%s", M_GetText(" Nonresizable window\n")); - - if (infoSurface->flags&SDL_HWACCEL) - CONS_Printf("%s", M_GetText(" Uses hardware acceleration blit\n")); - if (infoSurface->flags&SDL_SRCCOLORKEY) - CONS_Printf("%s", M_GetText(" Use colorkey blitting\n")); - if (infoSurface->flags&SDL_RLEACCEL) - CONS_Printf("%s", M_GetText(" Colorkey RLE acceleration blit\n")); - if (infoSurface->flags&SDL_SRCALPHA) - CONS_Printf("%s", M_GetText(" Use alpha blending acceleration blit\n")); - -} - -static void VID_Command_Info_f (void) -{ - const SDL_VideoInfo *videoInfo; - videoInfo = SDL_GetVideoInfo(); //Alam: Double-Check - if (videoInfo) - { - CONS_Printf("%s", M_GetText("Video Interface Capabilities:\n")); - if (videoInfo->hw_available) - CONS_Printf("%s", M_GetText(" Hardware surfaces\n")); - if (videoInfo->wm_available) - CONS_Printf("%s", M_GetText(" Window manager\n")); - //UnusedBits1 :6 - //UnusedBits2 :1 - if (videoInfo->blit_hw) - CONS_Printf("%s", M_GetText(" Accelerated blits HW-2-HW\n")); - if (videoInfo->blit_hw_CC) - CONS_Printf("%s", M_GetText(" Accelerated blits HW-2-HW with Colorkey\n")); - if (videoInfo->wm_available) - CONS_Printf("%s", M_GetText(" Accelerated blits HW-2-HW with Alpha\n")); - if (videoInfo->blit_sw) - { - CONS_Printf("%s", M_GetText(" Accelerated blits SW-2-HW\n")); - if (!M_CheckParm("-noblit")) videoblitok = SDL_TRUE; - } - if (videoInfo->blit_sw_CC) - CONS_Printf("%s", M_GetText(" Accelerated blits SW-2-HW with Colorkey\n")); - if (videoInfo->blit_sw_A) - CONS_Printf("%s", M_GetText(" Accelerated blits SW-2-HW with Alpha\n")); - if (videoInfo->blit_fill) - CONS_Printf("%s", M_GetText(" Accelerated Color filling\n")); - //UnusedBits3 :16 - if (videoInfo->video_mem) - CONS_Printf(M_GetText(" There is %i KB of video memory\n"), videoInfo->video_mem); - else - CONS_Printf("%s", M_GetText(" There no video memory for SDL\n")); - //*vfmt - } - SurfaceInfo(bufSurface, M_GetText("Current Engine Mode")); -#ifdef FILTERS - SurfaceInfo(preSurface, M_GetText("Prebuffer Mode")); - SurfaceInfo(f2xSurface, M_GetText("Postbuffer Mode")); -#endif - SurfaceInfo(vidSurface, M_GetText("Current Video Mode")); -} - -static void VID_Command_ModeList_f(void) -{ -#if !defined (DC) && !defined (_WIN32_WCE) && !defined (_PSP) && !defined(GP2X) - INT32 i; - - modeList = SDL_ListModes(NULL, surfaceFlagsF|SDL_HWSURFACE); //Alam: At least hardware surface - - if (modeList == (SDL_Rect **)0 && cv_fullscreen.value) - { - CONS_Printf("%s", M_GetText("No video modes present\n")); - cv_fullscreen.value = 0; - } - else if (modeList != (SDL_Rect **)0) - { - numVidModes = 0; - if (modeList == (SDL_Rect **)-1) - numVidModes = -1; // should not happen with fullscreen modes - else while (modeList[numVidModes]) - numVidModes++; - } - CONS_Printf(M_GetText("Found %d FullScreen Video Modes:\n"), numVidModes); - for (i=0 ; i= numVidModes) - break; - - CONS_Printf(M_GetText("%dx%d and "), - modeList[modeNum]->w, - modeList[modeNum]->h); - } - CONS_Printf("%s", M_GetText("None\n")); -#endif -} - -static void VID_Command_Mode_f (void) -{ - INT32 modenum; - - if (COM_Argc()!= 2) - { - CONS_Printf(M_GetText("vid_mode : set video mode, current video mode %i\n"), vid.modenum); - return; - } - - modenum = atoi(COM_Argv(1)); - - if (modenum >= VID_NumModes()) - CONS_Printf(M_GetText("Video mode not present\n")); - else - setmodeneeded = modenum+1; // request vid mode change -} - -#if defined(RPC_NO_WINDOWS_H) && !defined(_WIN32_WCE) -static VOID MainWndproc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - UNREFERENCED_PARAMETER(hWnd); - UNREFERENCED_PARAMETER(message); - UNREFERENCED_PARAMETER(wParam); - switch (message) - { - case WM_SETTEXT: - COM_BufAddText((LPCSTR)lParam); - break; - } -} -#endif - -#if 0 //#ifdef _WIN32 - // Disable Composition in Vista DWM (Desktop Window Manager) ---------------- -static HMODULE DMdll = NULL; -typedef HRESULT (CALLBACK *P_DwmIsCompositionEnabled) (BOOL *pfEnabled); -static P_DwmIsCompositionEnabled pfnDwmIsCompositionEnabled = NULL; -typedef HRESULT (CALLBACK *P_DwmEnableComposition) (BOOL fEnable); -static P_DwmEnableComposition pfnDwmEnableComposition = NULL; -static BOOL AeroWasEnabled = FALSE; - -static inline VOID UnloadDM(VOID) -{ - pfnDwmEnableComposition = NULL; - pfnDwmIsCompositionEnabled = NULL; - if (DMdll) FreeLibrary(DMdll); - DMdll = NULL; -} - -static inline BOOL LoadDM(VOID) -{ - if (DMdll) - return TRUE; - - DMdll = LoadLibraryA("dwmapi.dll"); - if (DMdll) - I_OutputMsg("dmwapi.dll loaded, Vista's Desktop Window Manager API\n"); - else - return FALSE; - - pfnDwmIsCompositionEnabled = (P_DwmIsCompositionEnabled)GetProcAddress(DMdll, "DwmIsCompositionEnabled"); - if (pfnDwmIsCompositionEnabled) - I_OutputMsg("Composition Aero API found, DwmIsCompositionEnabled\n"); - - pfnDwmEnableComposition = (P_DwmEnableComposition)GetProcAddress(DMdll, "DwmEnableComposition"); - if (pfnDwmEnableComposition) - I_OutputMsg("Composition Aero API found, DwmEnableComposition\n"); - - return TRUE; -} - -static inline VOID DisableAero(VOID) -{ - BOOL pfnDwmEnableCompositiond = FALSE; - AeroWasEnabled = FALSE; - - if (!LoadDM()) - return; - - if (pfnDwmIsCompositionEnabled && SUCCEEDED(pfnDwmIsCompositionEnabled(&pfnDwmEnableCompositiond))) - I_OutputMsg("Got the result of DwmIsCompositionEnabled, %i\n", pfnDwmEnableCompositiond); - else - return; - - if ((AeroWasEnabled = pfnDwmEnableCompositiond)) - I_OutputMsg("Disable the Aero rendering\n"); - else - return; - - if (pfnDwmEnableComposition && SUCCEEDED(pfnDwmEnableComposition(FALSE))) - I_OutputMsg("Aero rendering disabled\n"); - else - I_OutputMsg("We failed to disable the Aero rendering\n"); -} - -static inline VOID ResetAero(VOID) -{ - if (pfnDwmEnableComposition && AeroWasEnabled) - { - if (SUCCEEDED(pfnDwmEnableComposition(AeroWasEnabled))) - I_OutputMsg("Aero rendering setting restored\n"); - else - I_OutputMsg("We failed to restore Aero rendering\n"); - } - UnloadDM(); -} -#endif - -static inline void SDLJoyRemap(event_t *event) -{ -#if defined(GP2X) -#define GP2X_BUTTON_UP (0) -#define GP2X_BUTTON_DOWN (4) -#define GP2X_BUTTON_LEFT (2) -#define GP2X_BUTTON_RIGHT (6) -#define GP2X_BUTTON_UPLEFT (1) -#define GP2X_BUTTON_UPRIGHT (7) -#define GP2X_BUTTON_DOWNLEFT (3) -#define GP2X_BUTTON_DOWNRIGHT (5) -#define GP2X_BUTTON_CLICK (18) -#define GP2X_BUTTON_A (12) -#define GP2X_BUTTON_B (13) -#define GP2X_BUTTON_X (14) -#define GP2X_BUTTON_Y (15) -#define GP2X_BUTTON_L (10) -#define GP2X_BUTTON_R (11) -#define GP2X_BUTTON_START (8) -#define GP2X_BUTTON_SELECT (9) -#define GP2X_BUTTON_VOLUP (16) -#define GP2X_BUTTON_VOLDOWN (17) - if ((event->type == ev_keydown || event->type == ev_keyup) && (KEY_JOY1 <= event->data1 && event->data1 <= KEY_JOY1+JOYBUTTONS)) - { - INT32 button = event->data1-KEY_JOY1; - if (button <= 7) - { - static UINT8 DPAD = 0; - if (event->type == ev_keyup) - { - event->type = ev_console; - DPAD &= ~(1<type = ev_joystick; - DPAD |= 1<data2 = event->data3 = INT32_MAX; - if ((DPAD & (1<type = ev_joystick; - event->data2 = event->data3 = 0; - } - else switch (button) - { - case GP2X_BUTTON_UP: - event->data3 = -1; - break; - case GP2X_BUTTON_DOWN: - event->data3 = 1; - break; - case GP2X_BUTTON_LEFT: - event->data2 = -1; - break; - case GP2X_BUTTON_RIGHT: - event->data2 = 1; - break; - case GP2X_BUTTON_UPLEFT: - event->data2 = -1; - event->data3 = -1; - break; - case GP2X_BUTTON_UPRIGHT: - event->data2 = 1; - event->data3 = -1; - break; - case GP2X_BUTTON_DOWNLEFT: - event->data2 = -1; - event->data3 = 1; - break; - case GP2X_BUTTON_DOWNRIGHT: - event->data2 = 1; - event->data3 = 1; - default: - break; - } - event->data1 = 0; - return; - } - else switch (button) - { - case GP2X_BUTTON_CLICK: - event->data1 = KEY_ENTER; - break; - case GP2X_BUTTON_A: - event->data1 = KEY_JOY1+0; - break; - case GP2X_BUTTON_B: - event->data1 = KEY_JOY1+2; - break; - case GP2X_BUTTON_X: - event->data1 = KEY_JOY1+3; - break; - case GP2X_BUTTON_Y: - event->data1 = KEY_JOY1+1; - break; - case GP2X_BUTTON_L: - event->data1 = KEY_JOY1+4; - break; - case GP2X_BUTTON_R: - event->data1 = KEY_JOY1+5; - break; - case GP2X_BUTTON_START: - event->data1 = KEY_ESCAPE; - break; - case GP2X_BUTTON_SELECT: - event->data1 = KEY_JOY1+8; - break; - case GP2X_BUTTON_VOLUP: - event->data1 = KEY_JOY1+6; - break; - case GP2X_BUTTON_VOLDOWN: - event->data1 = KEY_JOY1+7; - break; - default: - break; - } - //I_OutputMsg("Button %i: event key %i and type: %i\n", button, event->data1, event->type); - } -#elif defined(_PSP) - if (event->data1 > KEY_JOY1 + 9 + 2) // All button after D-Pad and Select/Start - event->data1 -= 4; // remap D-pad to Hats, offset of -4 - else if (event->data1 == KEY_JOY1 + 6) // Down - event->data1 = KEY_HAT1+1; - else if (event->data1 == KEY_JOY1 + 7) // Left - event->data1 = KEY_HAT1+2; - else if (event->data1 == KEY_JOY1 + 8) // Up - event->data1 = KEY_HAT1+0; - else if (event->data1 == KEY_JOY1 + 9) // Right - event->data1 = KEY_HAT1+3; - else if (event->data1 == KEY_JOY1 + 10) // Select - event->data1 = KEY_TAB; - else if (event->data1 == KEY_JOY1 + 11) // Start - event->data1 = KEY_ESCAPE; -#else - (void)event; -#endif -} - -static INT32 SDLJoyAxis(const Sint16 axis, evtype_t which) -{ -#ifdef _arch_dreamcast // -128 to 127 SDL for DC have give us a smaller range - INT32 raxis = axis*8; -#else // -32768 to 32767 - INT32 raxis = axis/32; -#endif - if (which == ev_joystick) - { - if (Joystick.bGamepadStyle) - { - // gamepad control type, on or off, live or die - if (raxis < -(JOYAXISRANGE/2)) - raxis = -1; - else if (raxis > (JOYAXISRANGE/2)) - raxis = 1; - else - raxis = 0; - } - else - { - raxis = JoyInfo.scale!=1?((raxis/JoyInfo.scale)*JoyInfo.scale):raxis; - -#ifdef SDL_JDEADZONE - if (-SDL_JDEADZONE <= raxis && raxis <= SDL_JDEADZONE) - raxis = 0; -#endif - } - } - else if (which == ev_joystick2) - { - if (Joystick2.bGamepadStyle) - { - // gamepad control type, on or off, live or die - if (raxis < -(JOYAXISRANGE/2)) - raxis = -1; - else if (raxis > (JOYAXISRANGE/2)) - raxis = 1; - else raxis = 0; - } - else - { - raxis = JoyInfo2.scale!=1?((raxis/JoyInfo2.scale)*JoyInfo2.scale):raxis; - -#ifdef SDL_JDEADZONE - if (-SDL_JDEADZONE <= raxis && raxis <= SDL_JDEADZONE) - raxis = 0; -#endif - } - } - return raxis; -} - -void I_GetEvent(void) -{ - SDL_Event inputEvent; - static SDL_bool sdlquit = SDL_FALSE; //Alam: once, just once - event_t event; - - if (!graphics_started) - return; - - memset(&inputEvent, 0x00, sizeof(inputEvent)); - while (SDL_PollEvent(&inputEvent)) - { - memset(&event,0x00,sizeof (event_t)); - switch (inputEvent.type) - { - case SDL_ACTIVEEVENT: - if (inputEvent.active.state & (SDL_APPACTIVE|SDL_APPINPUTFOCUS)) - { - // pause music when alt-tab - if (inputEvent.active.gain /*&& !paused */) - { - static SDL_bool firsttimeonmouse = SDL_TRUE; - if (!firsttimeonmouse) - { - if (cv_usemouse.value) I_StartupMouse(); - } - else firsttimeonmouse = SDL_FALSE; - //if (!netgame && !con_destlines) paused = false; - if (gamestate == GS_LEVEL) - if (!paused) I_ResumeSong(0); //resume it - } - else /*if (!paused)*/ - { - if (!disable_mouse) - SDLforceUngrabMouse(); - if (!netgame && gamestate == GS_LEVEL) paused = true; - memset(gamekeydown, 0, NUMKEYS); - //S_PauseSound(); - if (gamestate == GS_LEVEL) - I_PauseSong(0); //pause it - } - } - if (MOUSE_MENU) - { - SDLdoUngrabMouse(); - break; - } - if ((SDL_APPMOUSEFOCUS&inputEvent.active.state) && USE_MOUSEINPUT && inputEvent.active.gain) - HalfWarpMouse(realwidth, realheight); - break; - case SDL_KEYDOWN: - case SDL_KEYUP: - /// \todo inputEvent.key.which? - if (inputEvent.type == SDL_KEYUP) - event.type = ev_keyup; - else if (inputEvent.type == SDL_KEYDOWN) - event.type = ev_keydown; - else break; - event.data1 = SDLatekey(inputEvent.key.keysym.sym); - if (event.data1) D_PostEvent(&event); - break; - case SDL_MOUSEMOTION: - /// \todo inputEvent.motion.which - if (MOUSE_MENU) - { - SDLdoUngrabMouse(); - break; - } - if (USE_MOUSEINPUT) - { - // If the event is from warping the pointer back to middle - // of the screen then ignore it. - if ((inputEvent.motion.x == realwidth/2) && - (inputEvent.motion.y == realheight/2)) - { - break; - } - else - { - event.data2 = +inputEvent.motion.xrel; - event.data3 = -inputEvent.motion.yrel; - } - event.type = ev_mouse; - D_PostEvent(&event); - // Warp the pointer back to the middle of the window - // or we cannot move any further if it's at a border. - if ((inputEvent.motion.x < (realwidth/2 )-(realwidth/4 )) || - (inputEvent.motion.y < (realheight/2)-(realheight/4)) || - (inputEvent.motion.x > (realwidth/2 )+(realwidth/4 )) || - (inputEvent.motion.y > (realheight/2)+(realheight/4) ) ) - { - //if (SDL_GRAB_ON == SDL_WM_GrabInput(SDL_GRAB_QUERY) || !mousegrabok) - HalfWarpMouse(realwidth, realheight); - } - } - break; - case SDL_MOUSEBUTTONDOWN: - case SDL_MOUSEBUTTONUP: - /// \todo inputEvent.button.which - if (USE_MOUSEINPUT) - { - if (inputEvent.type == SDL_MOUSEBUTTONUP) - event.type = ev_keyup; - else if (inputEvent.type == SDL_MOUSEBUTTONDOWN) - event.type = ev_keydown; - else break; - if (inputEvent.button.button==SDL_BUTTON_WHEELUP || inputEvent.button.button==SDL_BUTTON_WHEELDOWN) - { - if (inputEvent.type == SDL_MOUSEBUTTONUP) - event.data1 = 0; //Alam: dumb! this could be a real button with some mice - else - event.data1 = KEY_MOUSEWHEELUP + inputEvent.button.button - SDL_BUTTON_WHEELUP; - } - else if (inputEvent.button.button == SDL_BUTTON_MIDDLE) - event.data1 = KEY_MOUSE1+2; - else if (inputEvent.button.button == SDL_BUTTON_RIGHT) - event.data1 = KEY_MOUSE1+1; - else if (inputEvent.button.button <= MOUSEBUTTONS) - event.data1 = KEY_MOUSE1 + inputEvent.button.button - SDL_BUTTON_LEFT; - if (event.data1) D_PostEvent(&event); - } - break; - case SDL_JOYAXISMOTION: - inputEvent.jaxis.which++; - inputEvent.jaxis.axis++; - event.data1 = event.data2 = event.data3 = INT32_MAX; - if (cv_usejoystick.value == inputEvent.jaxis.which) - { - event.type = ev_joystick; - } - else if (cv_usejoystick.value == inputEvent.jaxis.which) - { - event.type = ev_joystick2; - } - else break; - //axis - if (inputEvent.jaxis.axis > JOYAXISSET*2) - break; - //vaule - if (inputEvent.jaxis.axis%2) - { - event.data1 = inputEvent.jaxis.axis / 2; - event.data2 = SDLJoyAxis(inputEvent.jaxis.value, event.type); - } - else - { - inputEvent.jaxis.axis--; - event.data1 = inputEvent.jaxis.axis / 2; - event.data3 = SDLJoyAxis(inputEvent.jaxis.value, event.type); - } - D_PostEvent(&event); - break; - case SDL_JOYBALLMOTION: - case SDL_JOYHATMOTION: - break; //NONE - case SDL_JOYBUTTONDOWN: - case SDL_JOYBUTTONUP: - inputEvent.jbutton.which++; - if (cv_usejoystick.value == inputEvent.jbutton.which) - event.data1 = KEY_JOY1; - else if (cv_usejoystick.value == inputEvent.jbutton.which) - event.data1 = KEY_2JOY1; - else break; - if (inputEvent.type == SDL_JOYBUTTONUP) - event.type = ev_keyup; - else if (inputEvent.type == SDL_JOYBUTTONDOWN) - event.type = ev_keydown; - else break; - if (inputEvent.jbutton.button < JOYBUTTONS) - event.data1 += inputEvent.jbutton.button; - else - break; - SDLJoyRemap(&event); - if (event.type != ev_console) D_PostEvent(&event); - break; -#ifndef _WIN32_WCE - case SDL_QUIT: - if (!sdlquit) - { - sdlquit = SDL_TRUE; - M_QuitResponse('y'); - } - break; -#endif -#if defined(RPC_NO_WINDOWS_H) && !defined(_WIN32_WCE) - case SDL_SYSWMEVENT: - MainWndproc(inputEvent.syswm.msg->hwnd, - inputEvent.syswm.msg->msg, - inputEvent.syswm.msg->wParam, - inputEvent.syswm.msg->lParam); - break; -#endif - case SDL_VIDEORESIZE: - if (gamestate == GS_LEVEL || gamestate == GS_TITLESCREEN || gamestate == GS_EVALUATION) - setmodeneeded = VID_GetModeForSize(inputEvent.resize.w,inputEvent.resize.h)+1; - if (render_soft == rendermode) - { -#ifdef FILTERS - INT32 filtervalue = cv_filter.value; - if (blitfilter) CV_SetValue(&cv_filter,1); -#endif - SDLSetMode(realwidth, realheight, vid.bpp*8, surfaceFlagsW); - if (vidSurface) SDL_SetColors(vidSurface, localPalette, 0, 256); -#ifdef FILTERS - CV_SetValue(&cv_filter,filtervalue); -#endif - } - else - SDLSetMode(realwidth, realheight, vid.bpp*8, surfaceFlagsW); - if (!vidSurface) - I_Error("Could not reset vidmode: %s\n",SDL_GetError()); - break; - case SDL_VIDEOEXPOSE: - exposevideo = SDL_TRUE; - break; - default: - break; - } - } - //reset wheel like in win32, I don't understand it but works - gamekeydown[KEY_MOUSEWHEELDOWN] = gamekeydown[KEY_MOUSEWHEELUP] = 0; -} - -void I_StartupMouse(void) -{ - static SDL_bool firsttimeonmouse = SDL_TRUE; - - if (disable_mouse) - return; - - if (!firsttimeonmouse) - HalfWarpMouse(realwidth, realheight); // warp to center - else - firsttimeonmouse = SDL_FALSE; - if (cv_usemouse.value) - return; - else - SDLdoUngrabMouse(); -} - -// -// I_OsPolling -// -void I_OsPolling(void) -{ - if (consolevent) - I_GetConsoleEvents(); - if (SDL_WasInit(SDL_INIT_JOYSTICK) == SDL_INIT_JOYSTICK) - { - SDL_JoystickUpdate(); - I_GetJoystickEvents(); - I_GetJoystick2Events(); - } -#ifdef _arch_dreamcast - //vmu_set_icon(VMU_bits); -#endif - - I_GetMouseEvents(); - - I_GetEvent(); -} - -// -// I_UpdateNoBlit -// -void I_UpdateNoBlit(void) -{ - if (!vidSurface) - return; - - if (vidSurface->flags&SDL_DOUBLEBUF) - SDL_Flip(vidSurface); - else if (exposevideo) - SDL_UpdateRect(vidSurface, 0, 0, 0, 0); - exposevideo = SDL_FALSE; -} - -// I_SkipFrame -// -// Returns true if it thinks we can afford to skip this frame -// from PrBoom's src/SDL/i_video.c -static inline boolean I_SkipFrame(void) -{ - static boolean skip = false; - - if (render_soft != rendermode) - return false; - - skip = !skip; - -#if 0 //(defined (GP2X) || defined (PSP) || defined (_arch_dreamcast)) - return skip; -#endif - - switch (gamestate) - { - case GS_LEVEL: - if (!paused) - return false; - case GS_WAITINGPLAYERS: - return skip; // Skip odd frames - default: - return false; - } -} - -static inline SDL_bool SDLmatchVideoformat(void) -{ - const SDL_PixelFormat *vidformat = vidSurface->format; - const INT32 vfBPP = vidformat?vidformat->BitsPerPixel:0; - return (((vfBPP == 8 && vid.bpp == 1 && - !vidformat->Rmask && !vidformat->Gmask && !vidformat->Bmask) || - (vfBPP == 15 && vid.bpp == 2 && vidformat->Rmask == 0x7C00 && - vidformat->Gmask == 0x03E0 && vidformat->Bmask == 0x001F )) && - !vidformat->Amask && (vidSurface->flags & SDL_RLEACCEL) == 0); -} - -// -// I_FinishUpdate -// -void I_FinishUpdate(void) -{ - if (!vidSurface) - return; //Alam: No software or OpenGl surface - - if (I_SkipFrame()) - return; - - if (cv_ticrate.value) - SCR_DisplayTicRate(); - - if (cv_showping.value && netgame && consoleplayer != serverplayer) - SCR_DisplayLocalPing(); - - if (render_soft == rendermode && screens[0]) - { - SDL_Rect *dstrect = NULL; - SDL_Rect rect = {0, 0, 0, 0}; - SDL_PixelFormat *vidformat = vidSurface->format; - int lockedsf = 0, blited = 0; - - rect.w = (Sint16)vid.width; - rect.h = (Sint16)vid.height; - - if (vidSurface->h > vid.height) - rect.y = (Sint16)((vidSurface->h-vid.height)/2); - - dstrect = ▭ - - - if (!bufSurface && !vid.direct) //Double-Check - { - if (vid.bpp == 1) bufSurface = SDL_CreateRGBSurfaceFrom(screens[0],vid.width,vid.height,8, - (int)vid.rowbytes,0x00000000,0x00000000,0x00000000,0x00000000); // 256 mode - else if (vid.bpp == 2) bufSurface = SDL_CreateRGBSurfaceFrom(screens[0],vid.width,vid.height,15, - (int)vid.rowbytes,0x00007C00,0x000003E0,0x0000001F,0x00000000); // 555 mode - if (bufSurface) SDL_SetColors(bufSurface, localPalette, 0, 256); - else I_OutputMsg("No system memory for SDL buffer surface\n"); - } - -#ifdef FILTERS - FilterBlit(bufSurface); - if (f2xSurface) //Alam: filter! - { - //I_OutputMsg("2x Filter Code\n"); - blited = SDL_BlitSurface(f2xSurface,NULL,vidSurface,NULL); - } - else -#endif -#if 0 - if (SDLmatchVideoformat() && !vid.direct)//Alam: DOS Way - { - if (SDL_MUSTLOCK(vidSurface)) lockedsf = SDL_LockSurface(vidSurface); - if (lockedsf == 0) - { - if (vidSurface->pixels > vid.height) - { - UINT8 *ptr = vidSurface->pixels; - size_t half_excess = vidSurface->pitch*(vidSurface->height-vid.height)/2; - memset(ptr, 0x1F, half_excess); - ptr += half_excess; - VID_BlitLinearScreen(screens[0], ptr, vid.width*vid.bpp, vid.height, - vid.rowbytes, vidSurface->pitch); - ptr += vid.height*vidSurface->pitch; - memset(ptr, 0x1F, half_excess); - } - else - VID_BlitLinearScreen(screens[0], vidSurface->pixels, vid.width*vid.bpp, - vid.height, vid.rowbytes, vidSurface->pitch ); - if (SDL_MUSTLOCK(vidSurface)) SDL_UnlockSurface(vidSurface); - } - } - else -#endif - if (bufSurface) //Alam: New Way to send video data - { - blited = SDL_BlitSurface(bufSurface,NULL,vidSurface,dstrect); - } - else if (vid.bpp == 1 && !vid.direct) - { - Uint8 *bP,*vP; //Src, Dst - Uint16 bW, vW; // Pitch Remainder - Sint32 pH, pW; //Height, Width - bP = (Uint8 *)screens[0]; - bW = (Uint16)(vid.rowbytes - vid.width); - //I_OutputMsg("Old Copy Code\n"); - if (SDL_MUSTLOCK(vidSurface)) lockedsf = SDL_LockSurface(vidSurface); - vP = (Uint8 *)vidSurface->pixels; - vW = (Uint16)(vidSurface->pitch - vidSurface->w*vidformat->BytesPerPixel); - if (vidSurface->h > vid.height) - vP += vidSurface->pitch*(vidSurface->h-vid.height)/2; - if (lockedsf == 0 && vidSurface->pixels) - { - if (vidformat->BytesPerPixel == 2) - { - for (pH=0;pH < vidSurface->h;pH++) - { - for (pW=0;pW < vidSurface->w;pW++) - { - *((Uint16 *)(void *)vP) = (Uint16)SDL_MapRGB(vidformat, - localPalette[*bP].r,localPalette[*bP].g,localPalette[*bP].b); - bP++; - vP += 2; - } - bP += bW; - vP += vW; - } - } - else if (vidformat->BytesPerPixel == 3) - { - for (pH=0;pH < vidSurface->h;pH++) - { - for (pW=0;pW < vidSurface->w;pW++) - { - *((Uint32 *)(void *)vP) = SDL_MapRGB(vidformat, - localPalette[*bP].r,localPalette[*bP].g,localPalette[*bP].b); - bP++; - vP += 3; - } - bP += bW; - vP += vW; - } - } - else if (vidformat->BytesPerPixel == 4) - { - for (pH=0;pH < vidSurface->h;pH++) - { - for (pW=0;pW < vidSurface->w;pW++) - { - *((Uint32 *)(void *)vP) = SDL_MapRGB(vidformat, - localPalette[*bP].r,localPalette[*bP].g,localPalette[*bP].b); - bP++; - vP += 4; - } - bP += bW; - vP += vW; - } - } - else - { - ;//NOP - } - } - if (SDL_MUSTLOCK(vidSurface)) SDL_UnlockSurface(vidSurface); - } - else /// \todo 15t15,15tN, others? - { - ;//NOP - } - -#ifdef HAVE_GP2XSDL - //if (blited == 0) - SDL_GP2X_WaitForBlitter(); -#endif - - if (lockedsf == 0 && blited == 0 && vidSurface->flags&SDL_DOUBLEBUF) - SDL_Flip(vidSurface); - else if (blited != -2 && lockedsf == 0) //Alam: -2 for Win32 Direct, yea, i know - SDL_UpdateRect(vidSurface, rect.x, rect.y, 0, 0); //Alam: almost always - else - I_OutputMsg("%s\n",SDL_GetError()); - } - exposevideo = SDL_FALSE; -} - -// -// I_UpdateNoVsync -// -void I_UpdateNoVsync(void) -{ - INT32 real_vidwait = cv_vidwait.value; - cv_vidwait.value = 0; - I_FinishUpdate(); - cv_vidwait.value = real_vidwait; -} - -// -// I_ReadScreen -// -void I_ReadScreen(UINT8 *scr) -{ - if (rendermode != render_soft) - I_Error ("I_ReadScreen: called while in non-software mode"); - else - VID_BlitLinearScreen(screens[0], scr, - vid.width*vid.bpp, vid.height, - vid.rowbytes, vid.rowbytes); -} - -// -// I_SetPalette -// -void I_SetPalette(RGBA_t *palette) -{ - size_t i; - for (i=0; i<256; i++) - { - localPalette[i].r = palette[i].s.red; - localPalette[i].g = palette[i].s.green; - localPalette[i].b = palette[i].s.blue; - } - if (vidSurface) SDL_SetColors(vidSurface, localPalette, 0, 256); - if (bufSurface) SDL_SetColors(bufSurface, localPalette, 0, 256); -} - -// return number of fullscreen + X11 modes -INT32 VID_NumModes(void) -{ - if (USE_FULLSCREEN && numVidModes != -1) - return numVidModes - firstEntry; - else - return MAXWINMODES; -} - -const char *VID_GetModeName(INT32 modeNum) -{ - if (USE_FULLSCREEN && numVidModes != -1) // fullscreen modes - { - modeNum += firstEntry; - if (modeNum >= numVidModes) - return NULL; - - sprintf(&vidModeName[modeNum][0], "%dx%d", - modeList[modeNum]->w, - modeList[modeNum]->h); - } - else // windowed modes - { - if (modeNum > MAXWINMODES) - return NULL; - - sprintf(&vidModeName[modeNum][0], "%dx%d", - windowedModes[modeNum][0], - windowedModes[modeNum][1]); - } - return &vidModeName[modeNum][0]; -} - -INT32 VID_GetModeForSize(INT32 w, INT32 h) -{ - INT32 matchMode = -1, i; - VID_PrepareModeList(); - if (USE_FULLSCREEN && numVidModes != -1) - { - for (i=firstEntry; iw == w && - modeList[i]->h == h) - { - matchMode = i; - break; - } - } - if (-1 == matchMode) // use smaller mode - { - w -= w%BASEVIDWIDTH; - h -= h%BASEVIDHEIGHT; - for (i=firstEntry; iw == w && - modeList[i]->h == h) - { - matchMode = i; - break; - } - } - if (-1 == matchMode) // use smallest mode - matchMode = numVidModes-1; - } - matchMode -= firstEntry; - } - else - { - for (i=0; iw <= MAXVIDWIDTH && - modeList[i]->h <= MAXVIDHEIGHT) - { - firstEntry = i; - break; - } - } - } - } - allow_fullscreen = true; -} - -static inline void SDLESSet(void) -{ -#ifdef HAVE_DCSDL - INT32 j; - SDL_DC_SetVideoDriver(SDL_DC_DIRECT_VIDEO); //SDL_DC_DMA_VIDEO - for (j=0;j<4;j++) - { - SDL_DC_MapKey(j,SDL_DC_START,SDLK_ESCAPE); - SDL_DC_MapKey(j,SDL_DC_A,SDLK_UNKNOWN); - SDL_DC_MapKey(j,SDL_DC_B,SDLK_UNKNOWN); - SDL_DC_MapKey(j,SDL_DC_X,SDLK_UNKNOWN); - SDL_DC_MapKey(j,SDL_DC_Y,SDLK_UNKNOWN); - SDL_DC_MapKey(j,SDL_DC_L,SDLK_UNKNOWN); - SDL_DC_MapKey(j,SDL_DC_R,SDLK_UNKNOWN); - //SDL_DC_MapKey(j,SDL_DC_LEFT,SDLK_UNKNOWN); - //SDL_DC_MapKey(j,SDL_DC_RIGHT,SDLK_UNKNOWN); - //SDL_DC_MapKey(j,SDL_DC_UP,SDLK_UNKNOWN); - //SDL_DC_MapKey(j,SDL_DC_DOWN,SDLK_UNKNOWN); - } - //SDL_DC_MapKey(0,SDL_DC_L,SDLK_LEFTBRACKET); - //SDL_DC_MapKey(0,SDL_DC_R,SDLK_RIGHTBRACKET); - //SDL_DC_MapKey(0,SDL_DC_START,SDLK_UNKNOWN); - //SDL_DC_MapKey(1,SDL_DC_L,SDLK_z); - //SDL_DC_MapKey(1,SDL_DC_R,SDLK_x); -#endif -#ifdef HAVE_GP2XSDL - SDL_GP2X_MiniDisplay(0,0); - //SDL_GP2X_DenyGfxMemory(NULL, 0); - SDL_GP2X_AllowGfxMemory(NULL, 0); -#endif -} - -static void SDLWMSet(void) -{ -#ifdef RPC_NO_WINDOWS_H - SDL_SysWMinfo SDLWM; - memset(&SDLWM,0,sizeof (SDL_SysWMinfo)); - SDL_VERSION(&SDLWM.version) - if (SDL_GetWMInfo(&SDLWM)) - vid.WndParent = SDLWM.window; - else - vid.WndParent = INVALID_HANDLE_VALUE; - if (vid.WndParent != INVALID_HANDLE_VALUE) - { - SetFocus(vid.WndParent); - ShowWindow(vid.WndParent, SW_SHOW); - } -#ifndef _WIN32_WCE - SDL_EventState(SDL_SYSWMEVENT, SDL_ENABLE); -#endif -#endif - SDL_EventState(SDL_VIDEORESIZE, SDL_IGNORE); -} - -static void* SDLGetDirect(void) -{ -#if 0 //#ifndef __MACH__ // Do not directly access the MacOSX's OpenGL memory - if (!SDL_MUSTLOCK(vidSurface) && SDLmatchVideoformat()) - { - vid.rowbytes = vidSurface->pitch; - return vidSurface->pixels; - } -#endif // you can not use the video memory in pixels member in fullscreen mode - return NULL; -} - -INT32 VID_SetMode(INT32 modeNum) -{ -#ifdef _WIN32_WCE - (void)modeNum; -#else - SDLdoUngrabMouse(); - vid.recalc = true; - BitsPerPixel = (Uint8)cv_scr_depth.value; - //vid.bpp = BitsPerPixel==8?1:2; - // Window title - SDL_WM_SetCaption("SRB2Kart "VERSIONSTRING, "SRB2Kart"); - - if (render_soft == rendermode) - { - //Alam: SDL_Video system free vidSurface for me - if (vid.buffer) free(vid.buffer); - vid.buffer = NULL; - if (bufSurface) SDL_FreeSurface(bufSurface); - bufSurface = NULL; - } - - if (USE_FULLSCREEN) - { - if (numVidModes != -1) - { - modeNum += firstEntry; - vid.width = modeList[modeNum]->w; - vid.height = modeList[modeNum]->h; - } - else - { - vid.width = windowedModes[modeNum][0]; - vid.height = windowedModes[modeNum][1]; - } - if (render_soft == rendermode) - { - SDLSetMode(vid.width, vid.height, BitsPerPixel, surfaceFlagsF); - - if (!vidSurface) - { - cv_fullscreen.value = 0; - modeNum = VID_GetModeForSize(vid.width,vid.height); - vid.width = windowedModes[modeNum][0]; - vid.height = windowedModes[modeNum][1]; - SDLSetMode(vid.width, vid.height, BitsPerPixel, surfaceFlagsW); - if (!vidSurface) - I_Error("Could not set vidmode: %s\n",SDL_GetError()); - } - } - } - else //(cv_fullscreen.value) - { - vid.width = windowedModes[modeNum][0]; - vid.height = windowedModes[modeNum][1]; - - if (render_soft == rendermode) - { - SDLSetMode(vid.width, vid.height, BitsPerPixel, surfaceFlagsW); - if (!vidSurface) - I_Error("Could not set vidmode: %s\n",SDL_GetError()); - } - } - - vid.modenum = VID_GetModeForSize(vidSurface->w,vidSurface->h); - - if (render_soft == rendermode) - { - vid.rowbytes = vid.width*vid.bpp; - vid.direct = SDLGetDirect(); - vid.buffer = malloc(vid.rowbytes*vid.height*NUMSCREENS); - if (vid.buffer) memset(vid.buffer,0x00,vid.rowbytes*vid.height*NUMSCREENS); - else I_Error ("Not enough memory for video buffer\n"); - } - -#if 0 // broken - if (!cv_stretch.value && (float)vid.width/vid.height != ((float)BASEVIDWIDTH/BASEVIDHEIGHT)) - vid.height = (INT32)(vid.width * ((float)BASEVIDHEIGHT/BASEVIDWIDTH));// Adjust the height to match -#endif -#endif - I_StartupMouse(); - - SDLWMSet(); - - return true; -} - -void I_StartupGraphics(void) -{ - static char SDLNOMOUSE[] = "SDL_NOMOUSE=1"; - static char SDLVIDEOMID[] = "SDL_VIDEO_CENTERED=center"; - - if (dedicated) - { - rendermode = render_none; - return; - } - if (graphics_started) - return; - - COM_AddCommand ("vid_nummodes", VID_Command_NumModes_f); - COM_AddCommand ("vid_info", VID_Command_Info_f); - COM_AddCommand ("vid_modelist", VID_Command_ModeList_f); - COM_AddCommand ("vid_mode", VID_Command_Mode_f); - CV_RegisterVar (&cv_vidwait); - CV_RegisterVar (&cv_stretch); -#ifdef FILTERS - CV_RegisterVar (&cv_filter); -#endif -#ifdef _PSP // pitch is 0, mod of 0 crash - disable_mouse = true; -#else - disable_mouse = M_CheckParm("-nomouse"); -#endif - if (disable_mouse) - I_PutEnv(SDLNOMOUSE); - if (!I_GetEnv("SDL_VIDEO_CENTERED")) - I_PutEnv(SDLVIDEOMID); - disable_fullscreen = M_CheckParm("-win"); - - keyboard_started = true; -#ifdef _arch_dreamcast - conio_shutdown(); -#endif - -#if !defined(HAVE_TTF) -#ifdef _WIN32 // Initialize Audio as well, otherwise Win32's DirectX can not use audio - if (SDL_InitSubSystem(SDL_INIT_AUDIO|SDL_INIT_VIDEO) < 0) -#else //SDL_OpenAudio will do SDL_InitSubSystem(SDL_INIT_AUDIO) - if (SDL_InitSubSystem(SDL_INIT_VIDEO) < 0) -#endif - { -#ifdef _WIN32 - if (SDL_WasInit(SDL_INIT_AUDIO)==0) - CONS_Printf(M_GetText("Couldn't initialize SDL's Audio System with Video System: %s\n"), SDL_GetError()); - if (SDL_WasInit(SDL_INIT_VIDEO)==0) -#endif - { - CONS_Printf(M_GetText("Couldn't initialize SDL's Video System: %s\n"), SDL_GetError()); - return; - } - } -#ifdef REMOTE_DEBUGGING -#ifdef _WII - _break(); // break for debugger -#endif -#endif -#endif - { - char vd[100]; //stack space for video name - CONS_Printf(M_GetText("Starting up with video driver : %s\n"), SDL_VideoDriverName(vd,100)); - if (strncasecmp(vd, "gcvideo", 8) == 0 || strncasecmp(vd, "fbcon", 6) == 0 || strncasecmp(vd, "wii", 4) == 0 || strncasecmp(vd, "psl1ght", 8) == 0) - framebuffer = SDL_TRUE; - } - if (M_CheckParm("-software")) - rendermode = render_soft; - SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY>>1,SDL_DEFAULT_REPEAT_INTERVAL<<2); - SDLESSet(); - VID_Command_ModeList_f(); - vid.buffer = NULL; // For software mode - vid.width = BASEVIDWIDTH; // Default size for startup - vid.height = BASEVIDHEIGHT; // BitsPerPixel is the SDL interface's - vid.recalc = true; // Set up the console stufff - vid.direct = NULL; // Maybe direct access? - vid.bpp = 1; // This is the game engine's Bpp - vid.WndParent = NULL; //For the window? - -#ifdef HAVE_TTF - I_ShutdownTTF(); -#endif - - // Window title -#ifdef _WIN32_WCE - SDL_WM_SetCaption("SRB2Kart "VERSIONSTRING, "SRB2Kart"); -#else - SDL_WM_SetCaption("SRB2Kart: Starting up", "SRB2Kart"); -#endif - - // Window icon -#ifdef HAVE_IMAGE - icoSurface = IMG_ReadXPMFromArray(SDL_icon_xpm); -#endif - SDL_WM_SetIcon(icoSurface, NULL); - -#ifdef _WIN32 - //DisableAero(); //also disable Aero on Vista -#endif - - rendermode = render_soft; //force software mode when there no HWRENDER code -#if defined(_WII) - vid.width = 640; - vid.height = 480; -#elif defined(_PS3) - vid.width = 720; - vid.height = 480; -#else - vid.width = BASEVIDWIDTH; - vid.height = BASEVIDHEIGHT; -#endif - SDLSetMode(vid.width, vid.height, BitsPerPixel, surfaceFlagsW); - if (!vidSurface) - { - CONS_Printf(M_GetText("Could not set vidmode: %s\n") ,SDL_GetError()); - vid.rowbytes = 0; - graphics_started = true; - return; - } - vid.rowbytes = vid.width * vid.bpp; - vid.direct = SDLGetDirect(); - vid.buffer = malloc(vid.rowbytes*vid.height*NUMSCREENS); - if (vid.buffer) memset(vid.buffer,0x00,vid.rowbytes*vid.height*NUMSCREENS); - else CONS_Printf("%s", M_GetText("Not enough memory for video buffer\n")); - - if (M_CheckParm("-nomousegrab")) - mousegrabok = SDL_FALSE; -#ifdef _DEBUG - else - { - char videodriver[4] = {'S','D','L',0}; - if (!M_CheckParm("-mousegrab") && - SDL_VideoDriverName(videodriver,4) && - strncasecmp("X11",videodriver,4) == 0) - mousegrabok = SDL_FALSE; //X11's XGrabPointer not good - } -#endif - realwidth = (Uint16)vid.width; - realheight = (Uint16)vid.height; - - VID_Command_Info_f(); - if (!disable_mouse) SDL_ShowCursor(SDL_DISABLE); - SDLdoUngrabMouse(); - - SDLWMSet(); - - graphics_started = true; -} - -void I_ShutdownGraphics(void) -{ - const rendermode_t oldrendermode = rendermode; - - rendermode = render_none; - if (icoSurface) SDL_FreeSurface(icoSurface); - icoSurface = NULL; - if (render_soft == oldrendermode) - { - vidSurface = NULL; //Alam: SDL_Video system free vidSurface for me - if (vid.buffer) free(vid.buffer); - vid.buffer = NULL; - if (bufSurface) SDL_FreeSurface(bufSurface); - bufSurface = NULL; -#ifdef FILTERS - if (preSurface) SDL_FreeSurface(preSurface); - preSurface = NULL; - if (f2xSurface) SDL_FreeSurface(f2xSurface); - f2xSurface = NULL; -#endif - } - - // was graphics initialized anyway? - if (!graphics_started) - return; - CONS_Printf("I_ShutdownGraphics: "); -#ifdef _WIN32 - //ResetAero(); -#endif - graphics_started = false; - CONS_Printf("%s", M_GetText("shut down\n")); -#ifndef _arch_dreamcast - SDL_QuitSubSystem(SDL_INIT_VIDEO); -#endif - framebuffer = SDL_FALSE; -} -#endif diff --git a/src/sdl12/macosx/Srb2mac.icns b/src/sdl12/macosx/Srb2mac.icns deleted file mode 100644 index 890c268f7..000000000 Binary files a/src/sdl12/macosx/Srb2mac.icns and /dev/null differ diff --git a/src/sdl12/macosx/Srb2mac.pbproj/project.pbxproj b/src/sdl12/macosx/Srb2mac.pbproj/project.pbxproj deleted file mode 100644 index 1fe2ea2d8..000000000 --- a/src/sdl12/macosx/Srb2mac.pbproj/project.pbxproj +++ /dev/null @@ -1,3553 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 38; - objects = { - 6726EB5E10190F860074DCBA = { - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 7; - files = ( - 6755C8D0101802C300A80195, - 6755C8D1101802C300A80195, - 6755C8D2101802C300A80195, - 6755C8D3101802C300A80195, - 6755C8D4101802C300A80195, - 6755C8D5101802C300A80195, - 6755C8D6101802C300A80195, - 6755C8D7101802C300A80195, - 6755C8D8101802C300A80195, - ); - isa = PBXCopyFilesBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - 6726EB5F10190FFC0074DCBA = { - buildActionMask = 2147483647; - files = ( - ); - generatedFileNames = ( - ); - isa = PBXShellScriptBuildPhase; - neededFileNames = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "touch -c $SRCROOT/../../comptime.c"; - }; - 6755C7A91017FE2500A80195 = { - fileEncoding = 30; - isa = PBXFileReference; - name = lzf.c; - path = ../../lzf.c; - refType = 2; - }; - 6755C7AA1017FE2500A80195 = { - fileEncoding = 30; - isa = PBXFileReference; - name = lzf.h; - path = ../../lzf.h; - refType = 2; - }; - 6755C7AB1017FE2500A80195 = { - fileEncoding = 30; - isa = PBXFileReference; - name = m_dllist.h; - path = ../../m_dllist.h; - refType = 2; - }; - 6755C7AC1017FE2500A80195 = { - fileEncoding = 30; - isa = PBXFileReference; - name = m_queue.c; - path = ../../m_queue.c; - refType = 2; - }; - 6755C7AD1017FE2500A80195 = { - fileEncoding = 30; - isa = PBXFileReference; - name = m_queue.h; - path = ../../m_queue.h; - refType = 2; - }; - 6755C7AE1017FE2500A80195 = { - fileEncoding = 30; - isa = PBXFileReference; - name = p_polyobj.c; - path = ../../p_polyobj.c; - refType = 2; - }; - 6755C7AF1017FE2500A80195 = { - fileEncoding = 30; - isa = PBXFileReference; - name = p_polyobj.h; - path = ../../p_polyobj.h; - refType = 2; - }; - 6755C7B11017FE2500A80195 = { - fileEncoding = 30; - isa = PBXFileReference; - name = string.c; - path = ../../string.c; - refType = 2; - }; - 6755C7B21017FE2500A80195 = { - fileRef = 6755C7A91017FE2500A80195; - isa = PBXBuildFile; - settings = { - }; - }; - 6755C7B31017FE2500A80195 = { - fileRef = 6755C7AA1017FE2500A80195; - isa = PBXBuildFile; - settings = { - }; - }; - 6755C7B51017FE2500A80195 = { - fileRef = 6755C7AC1017FE2500A80195; - isa = PBXBuildFile; - settings = { - }; - }; - 6755C7B71017FE2500A80195 = { - fileRef = 6755C7AE1017FE2500A80195; - isa = PBXBuildFile; - settings = { - }; - }; - 6755C7B81017FE2500A80195 = { - fileRef = 6755C7AF1017FE2500A80195; - isa = PBXBuildFile; - settings = { - }; - }; - 6755C7BB1017FE2500A80195 = { - fileRef = 6755C7A91017FE2500A80195; - isa = PBXBuildFile; - settings = { - }; - }; - 6755C7BC1017FE2500A80195 = { - fileRef = 6755C7AA1017FE2500A80195; - isa = PBXBuildFile; - settings = { - }; - }; - 6755C7BD1017FE2500A80195 = { - fileRef = 6755C7AB1017FE2500A80195; - isa = PBXBuildFile; - settings = { - }; - }; - 6755C7BE1017FE2500A80195 = { - fileRef = 6755C7AC1017FE2500A80195; - isa = PBXBuildFile; - settings = { - }; - }; - 6755C7BF1017FE2500A80195 = { - fileRef = 6755C7AD1017FE2500A80195; - isa = PBXBuildFile; - settings = { - }; - }; - 6755C7C01017FE2500A80195 = { - fileRef = 6755C7AE1017FE2500A80195; - isa = PBXBuildFile; - settings = { - }; - }; - 6755C7C11017FE2500A80195 = { - fileRef = 6755C7AF1017FE2500A80195; - isa = PBXBuildFile; - settings = { - }; - }; - 6755C7C41017FE4400A80195 = { - children = ( - 6755C7FA1017FE4500A80195, - 6755C7FB1017FE4500A80195, - ); - isa = PBXGroup; - name = macosx; - path = ""; - refType = 2; - }; - 6755C7FA1017FE4500A80195 = { - fileEncoding = 30; - isa = PBXFileReference; - path = mac_alert.c; - refType = 2; - }; - 6755C7FB1017FE4500A80195 = { - fileEncoding = 30; - isa = PBXFileReference; - path = mac_alert.h; - refType = 2; - }; - 6755C82A1017FE4500A80195 = { - fileEncoding = 30; - isa = PBXFileReference; - name = sdlmain.h; - path = ../sdlmain.h; - refType = 2; - }; - 6755C84B1017FE4500A80195 = { - fileRef = 6755C7FA1017FE4500A80195; - isa = PBXBuildFile; - settings = { - }; - }; - 6755C8651017FE4500A80195 = { - fileRef = 6755C82A1017FE4500A80195; - isa = PBXBuildFile; - settings = { - }; - }; - 6755C8861017FE4500A80195 = { - fileRef = 6755C7FA1017FE4500A80195; - isa = PBXBuildFile; - settings = { - }; - }; - 6755C8871017FE4500A80195 = { - fileRef = 6755C7FB1017FE4500A80195; - isa = PBXBuildFile; - settings = { - }; - }; - 6755C8A01017FE4500A80195 = { - fileRef = 6755C82A1017FE4500A80195; - isa = PBXBuildFile; - settings = { - }; - }; - 6755C8A41017FE8000A80195 = { - children = ( - 84177748085A1097000C01D8, - 84177749085A1097000C01D8, - 8417774A085A1097000C01D8, - 8417774B085A1097000C01D8, - 8417774C085A1097000C01D8, - 8417774D085A1097000C01D8, - 8417774E085A1097000C01D8, - 8417774F085A1097000C01D8, - 84177750085A1097000C01D8, - 84177751085A1097000C01D8, - 84177752085A1097000C01D8, - 84177753085A1097000C01D8, - 84177754085A1097000C01D8, - 84177755085A10AA000C01D8, - 84177756085A10AA000C01D8, - 6755C82A1017FE4500A80195, - 84177757085A10AA000C01D8, - 6755C7C41017FE4400A80195, - ); - isa = PBXGroup; - name = SDL; - path = ""; - refType = 2; - }; - 6755C8BE101802C300A80195 = { - isa = PBXFileReference; - name = drill.dta; - path = ../../../bin/Resources/drill.dta; - refType = 2; - }; - 6755C8BF101802C300A80195 = { - isa = PBXFileReference; - name = fmod.dll; - path = ../../../bin/Resources/fmod.dll; - refType = 2; - }; - 6755C8C0101802C300A80195 = { - isa = PBXFileReference; - name = knux.plr; - path = ../../../bin/Resources/knux.plr; - refType = 2; - }; - 6755C8C1101802C300A80195 = { - isa = PBXFileReference; - name = music.dta; - path = ../../../bin/Resources/music.dta; - refType = 2; - }; - 6755C8C2101802C300A80195 = { - isa = PBXFileReference; - name = rings.wpn; - path = ../../../bin/Resources/rings.wpn; - refType = 2; - }; - 6755C8C3101802C300A80195 = { - isa = PBXFileReference; - name = soar.dta; - path = ../../../bin/Resources/soar.dta; - refType = 2; - }; - 6755C8C4101802C300A80195 = { - isa = PBXFileReference; - name = sonic.plr; - path = ../../../bin/Resources/sonic.plr; - refType = 2; - }; - 6755C8C5101802C300A80195 = { - isa = PBXFileReference; - name = srb2.wad; - path = ../../../bin/Resources/srb2.wad; - refType = 2; - }; - 6755C8C6101802C300A80195 = { - isa = PBXFileReference; - name = tails.plr; - path = ../../../bin/Resources/tails.plr; - refType = 2; - }; - 6755C8C7101802C300A80195 = { - fileRef = 6755C8BE101802C300A80195; - isa = PBXBuildFile; - settings = { - }; - }; - 6755C8C8101802C300A80195 = { - fileRef = 6755C8BF101802C300A80195; - isa = PBXBuildFile; - settings = { - }; - }; - 6755C8C9101802C300A80195 = { - fileRef = 6755C8C0101802C300A80195; - isa = PBXBuildFile; - settings = { - }; - }; - 6755C8CA101802C300A80195 = { - fileRef = 6755C8C1101802C300A80195; - isa = PBXBuildFile; - settings = { - }; - }; - 6755C8CB101802C300A80195 = { - fileRef = 6755C8C2101802C300A80195; - isa = PBXBuildFile; - settings = { - }; - }; - 6755C8CC101802C300A80195 = { - fileRef = 6755C8C3101802C300A80195; - isa = PBXBuildFile; - settings = { - }; - }; - 6755C8CD101802C300A80195 = { - fileRef = 6755C8C4101802C300A80195; - isa = PBXBuildFile; - settings = { - }; - }; - 6755C8CE101802C300A80195 = { - fileRef = 6755C8C5101802C300A80195; - isa = PBXBuildFile; - settings = { - }; - }; - 6755C8CF101802C300A80195 = { - fileRef = 6755C8C6101802C300A80195; - isa = PBXBuildFile; - settings = { - }; - }; - 6755C8D0101802C300A80195 = { - fileRef = 6755C8BE101802C300A80195; - isa = PBXBuildFile; - settings = { - }; - }; - 6755C8D1101802C300A80195 = { - fileRef = 6755C8BF101802C300A80195; - isa = PBXBuildFile; - settings = { - }; - }; - 6755C8D2101802C300A80195 = { - fileRef = 6755C8C0101802C300A80195; - isa = PBXBuildFile; - settings = { - }; - }; - 6755C8D3101802C300A80195 = { - fileRef = 6755C8C1101802C300A80195; - isa = PBXBuildFile; - settings = { - }; - }; - 6755C8D4101802C300A80195 = { - fileRef = 6755C8C2101802C300A80195; - isa = PBXBuildFile; - settings = { - }; - }; - 6755C8D5101802C300A80195 = { - fileRef = 6755C8C3101802C300A80195; - isa = PBXBuildFile; - settings = { - }; - }; - 6755C8D6101802C300A80195 = { - fileRef = 6755C8C4101802C300A80195; - isa = PBXBuildFile; - settings = { - }; - }; - 6755C8D7101802C300A80195 = { - fileRef = 6755C8C5101802C300A80195; - isa = PBXBuildFile; - settings = { - }; - }; - 6755C8D8101802C300A80195 = { - fileRef = 6755C8C6101802C300A80195; - isa = PBXBuildFile; - settings = { - }; - }; - 677B5EC810180D4E00A80195 = { - fileRef = 84177758085A10D2000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 677B5EC910180D6600A80195 = { - children = ( - 84177758085A10D2000C01D8, - ); - isa = PBXGroup; - name = r_opengl; - refType = 4; - }; - 677B5ECA10180D7100A80195 = { - children = ( - 84F202CA08A92AA0000C01D8, - ); - isa = PBXGroup; - name = s_openal; - refType = 4; - }; - 67B2D0C91018779900A80195 = { - fileRef = 84177748085A1097000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 67B2D0CA1018779D00A80195 = { - fileRef = 84177748085A1097000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; -//670 -//671 -//672 -//673 -//674 -//840 -//841 -//842 -//843 -//844 - 840CE6B009198AA7000C01D8 = { - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - 840CE6B309198ABB000C01D8, - 840CE6B409198ABB000C01D8, - 849BD32D0A7E471D000C01D8, - ); - isa = PBXCopyFilesBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - 840CE6B309198ABB000C01D8 = { - fileRef = 84C4E04B08620A46000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 840CE6B409198ABB000C01D8 = { - fileRef = 84C4E04C08620A46000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 841776FE085A0C64000C01D8 = { - children = ( - 84C4E00D0862063C000C01D8, - 84177705085A0CDB000C01D8, - 84177706085A0D9D000C01D8, - 84177708085A0DB5000C01D8, - 84177709085A0DD1000C01D8, - 84177712085A0EB5000C01D8, - 8417770B085A0E17000C01D8, - 8417770C085A0E40000C01D8, - 8417770D085A0E4E000C01D8, - 8417770E085A0E5B000C01D8, - 8417770F085A0E66000C01D8, - 84177710085A0E71000C01D8, - 84177711085A0E77000C01D8, - 841779E2085A138F000C01D8, - 84F202C708A92A5D000C01D8, - 84C4E03F0862096F000C01D8, - 84C4E0420862098A000C01D8, - 84C4E045086209D3000C01D8, - 84C4E048086209FF000C01D8, - 84C4E04C08620A46000C01D8, - 84C4E04B08620A46000C01D8, - 849BD31C0A7E45B3000C01D8, - ); - isa = PBXGroup; - refType = 4; - }; - 84177700085A0C64000C01D8 = { - buildRules = ( - ); - buildSettings = { - COPY_PHASE_STRIP = NO; - }; - isa = PBXBuildStyle; - name = Development; - }; - 84177701085A0C64000C01D8 = { - buildRules = ( - ); - buildSettings = { - COPY_PHASE_STRIP = YES; - }; - isa = PBXBuildStyle; - name = Deployment; - }; - 84177702085A0C64000C01D8 = { - buildStyles = ( - 84177700085A0C64000C01D8, - 84177701085A0C64000C01D8, - ); - hasScannedForEncodings = 1; - isa = PBXProject; - mainGroup = 841776FE085A0C64000C01D8; - productRefGroup = 841779E2085A138F000C01D8; - projectDirPath = ""; - targets = ( - 841779E0085A138F000C01D8, - 841779E9085A13B1000C01D8, - ); - }; - 84177705085A0CDB000C01D8 = { - children = ( - 849603A80A791C11000C01D8, - 84177713085A0FCE000C01D8, - 84177714085A0FCE000C01D8, - 84177716085A0FCE000C01D8, - 84177717085A0FCE000C01D8, - 84177718085A0FCE000C01D8, - 84177719085A0FCE000C01D8, - 8417771A085A0FCE000C01D8, - 8417771B085A0FCE000C01D8, - 8417771C085A0FCE000C01D8, - 8417771D085A0FCE000C01D8, - 8417771E085A0FCE000C01D8, - 8417771F085A0FCE000C01D8, - 84177720085A0FCE000C01D8, - 84177721085A0FCE000C01D8, - 84177722085A0FCE000C01D8, - 84177723085A0FCE000C01D8, - 84177724085A0FF2000C01D8, - 84177725085A0FF2000C01D8, - 84177726085A0FF2000C01D8, - 84177727085A0FF2000C01D8, - 6755C7B11017FE2500A80195, - ); - isa = PBXGroup; - name = D_SRB2; - path = ""; - refType = 2; - }; - 84177706085A0D9D000C01D8 = { - children = ( - 8417772A085A100E000C01D8, - 8417772B085A100E000C01D8, - 8417772C085A100E000C01D8, - ); - isa = PBXGroup; - name = F_Frame; - path = ""; - refType = 2; - }; - 84177708085A0DB5000C01D8 = { - children = ( - 841779DA085A1347000C01D8, - 841778C6085A1295000C01D8, - 841778C4085A1295000C01D8, - 841778C5085A1295000C01D8, - 8417772D085A1029000C01D8, - 8417772E085A1029000C01D8, - 8417772F085A1029000C01D8, - 84177730085A1029000C01D8, - 84177731085A1029000C01D8, - 841779D4085A1296000C01D8, - 841779D5085A1296000C01D8, - ); - isa = PBXGroup; - name = G_Game; - path = ""; - refType = 2; - }; - 84177709085A0DD1000C01D8 = { - children = ( - 841778BE085A1295000C01D8, - 841778BF085A1295000C01D8, - 841778C2085A1295000C01D8, - 841778C3085A1295000C01D8, - 841778C0085A1295000C01D8, - 841778C1085A1295000C01D8, - 84177732085A1040000C01D8, - 84177733085A1040000C01D8, - 841779D2085A1296000C01D8, - 841779D3085A1296000C01D8, - 841779D8085A1296000C01D8, - 8490D433085DF537000C01D8, - ); - isa = PBXGroup; - name = H_Hud; - path = ""; - refType = 2; - }; - 8417770B085A0E17000C01D8 = { - children = ( - 6755C8A41017FE8000A80195, - 84177759085A10D2000C01D8, - 841777A4085A1200000C01D8, - 841777A5085A1200000C01D8, - 841777A6085A1200000C01D8, - 841777A8085A1200000C01D8, - 841777A9085A1200000C01D8, - 841777AA085A1200000C01D8, - 841777AB085A1200000C01D8, - 841777AC085A1200000C01D8, - 841777AD085A1200000C01D8, - 841777AE085A1200000C01D8, - ); - isa = PBXGroup; - name = I_Interface; - path = ""; - refType = 2; - }; - 8417770C085A0E40000C01D8 = { - children = ( - 8417775A085A10EB000C01D8, - 8417775B085A10EB000C01D8, - 8417775C085A10EB000C01D8, - 8417775D085A10EB000C01D8, - 8417775E085A10EB000C01D8, - 8417775F085A10EB000C01D8, - 6755C7AB1017FE2500A80195, - 84177760085A10EB000C01D8, - 84177761085A10EB000C01D8, - 84177762085A10EB000C01D8, - 84177763085A10EB000C01D8, - 84177764085A10EB000C01D8, - 84177765085A10EB000C01D8, - 6755C7AC1017FE2500A80195, - 6755C7AD1017FE2500A80195, - 84177766085A10EB000C01D8, - 84177767085A10EB000C01D8, - 84177768085A10EB000C01D8, - ); - isa = PBXGroup; - name = M_Misc; - path = ""; - refType = 2; - }; - 8417770D085A0E4E000C01D8 = { - children = ( - 84177769085A1104000C01D8, - 8417776A085A1104000C01D8, - 8417776B085A1104000C01D8, - 8417776C085A1104000C01D8, - 8417776D085A1104000C01D8, - 8417776E085A1104000C01D8, - 8417776F085A1104000C01D8, - 84177770085A1104000C01D8, - 84177771085A1104000C01D8, - 84177772085A1104000C01D8, - 84177773085A1104000C01D8, - 84177774085A1104000C01D8, - 6755C7AE1017FE2500A80195, - 6755C7AF1017FE2500A80195, - 84177775085A1104000C01D8, - 84177776085A1104000C01D8, - 84177777085A1104000C01D8, - 84177778085A1104000C01D8, - 84177779085A1104000C01D8, - 8417777A085A1104000C01D8, - 8417777B085A1104000C01D8, - 8417777C085A1104000C01D8, - 8417777D085A1104000C01D8, - 8417777E085A1104000C01D8, - 8417777F085A1104000C01D8, - 84177780085A1104000C01D8, - ); - isa = PBXGroup; - name = P_Play; - path = ""; - refType = 2; - }; - 8417770E085A0E5B000C01D8 = { - children = ( - 84177781085A111B000C01D8, - 84177782085A111B000C01D8, - 84177783085A111B000C01D8, - 84177784085A111B000C01D8, - 84177785085A111B000C01D8, - 84177786085A111B000C01D8, - 84177787085A111B000C01D8, - 84177788085A111B000C01D8, - 84177789085A111B000C01D8, - 8417778A085A111B000C01D8, - 8417778B085A111B000C01D8, - 8417778C085A111B000C01D8, - 8417778D085A111B000C01D8, - 8417778E085A111B000C01D8, - 8417778F085A111B000C01D8, - 84177790085A111B000C01D8, - 84177791085A111B000C01D8, - 84177792085A111B000C01D8, - 84177793085A111B000C01D8, - 84177794085A111B000C01D8, - 84177795085A111B000C01D8, - 84177796085A111B000C01D8, - 84177797085A111B000C01D8, - 841777A2085A1197000C01D8, - 841777A3085A1197000C01D8, - 8490D436085DF57B000C01D8, - 841779D7085A1296000C01D8, - ); - isa = PBXGroup; - name = R_Rend; - path = ""; - refType = 2; - }; - 8417770F085A0E66000C01D8 = { - children = ( - 84177798085A1138000C01D8, - 84177799085A1138000C01D8, - 8417779A085A1138000C01D8, - 8417779B085A1138000C01D8, - ); - isa = PBXGroup; - name = S_Sounds; - path = ""; - refType = 2; - }; - 84177710085A0E71000C01D8 = { - children = ( - 8417779C085A114C000C01D8, - 8417779D085A114C000C01D8, - 8417779E085A116B000C01D8, - 8417779F085A116B000C01D8, - ); - isa = PBXGroup; - name = SDL_main; - path = ""; - refType = 2; - }; - 84177711085A0E77000C01D8 = { - children = ( - 6755C7A91017FE2500A80195, - 6755C7AA1017FE2500A80195, - 841777AF085A1228000C01D8, - 841777B0085A1228000C01D8, - 841777A0085A117F000C01D8, - 841777A1085A117F000C01D8, - 841778BC085A122A000C01D8, - 841778BD085A122A000C01D8, - ); - isa = PBXGroup; - name = W_Wad; - path = ""; - refType = 2; - }; - 84177712085A0EB5000C01D8 = { - children = ( - 677B5EC910180D6600A80195, - 677B5ECA10180D7100A80195, - 84177734085A106C000C01D8, - 84177735085A106C000C01D8, - 84177736085A106C000C01D8, - 84177737085A106C000C01D8, - 84177738085A106C000C01D8, - 84177739085A106C000C01D8, - 8417773A085A106C000C01D8, - 8417773B085A106C000C01D8, - 8417773C085A106C000C01D8, - 8417773D085A106C000C01D8, - 8417773E085A106C000C01D8, - 8417773F085A106C000C01D8, - 84177740085A106C000C01D8, - 84177741085A106C000C01D8, - 84177742085A106C000C01D8, - 84177743085A106C000C01D8, - 84177744085A106C000C01D8, - 84177745085A106C000C01D8, - 84177746085A106C000C01D8, - 84177747085A106C000C01D8, - ); - isa = PBXGroup; - name = Hw_Hardware; - path = ""; - refType = 2; - }; - 84177713085A0FCE000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = d_clisrv.c; - path = ../../d_clisrv.c; - refType = 2; - }; - 84177714085A0FCE000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = d_clisrv.h; - path = ../../d_clisrv.h; - refType = 2; - }; - 84177716085A0FCE000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = d_event.h; - path = ../../d_event.h; - refType = 2; - }; - 84177717085A0FCE000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = d_main.c; - path = ../../d_main.c; - refType = 2; - }; - 84177718085A0FCE000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = d_main.h; - path = ../../d_main.h; - refType = 2; - }; - 84177719085A0FCE000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = d_net.c; - path = ../../d_net.c; - refType = 2; - }; - 8417771A085A0FCE000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = d_net.h; - path = ../../d_net.h; - refType = 2; - }; - 8417771B085A0FCE000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = d_netcmd.c; - path = ../../d_netcmd.c; - refType = 2; - }; - 8417771C085A0FCE000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = d_netcmd.h; - path = ../../d_netcmd.h; - refType = 2; - }; - 8417771D085A0FCE000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = d_netfil.c; - path = ../../d_netfil.c; - refType = 2; - }; - 8417771E085A0FCE000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = d_netfil.h; - path = ../../d_netfil.h; - refType = 2; - }; - 8417771F085A0FCE000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = d_player.h; - path = ../../d_player.h; - refType = 2; - }; - 84177720085A0FCE000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = d_think.h; - path = ../../d_think.h; - refType = 2; - }; - 84177721085A0FCE000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = d_ticcmd.h; - path = ../../d_ticcmd.h; - refType = 2; - }; - 84177722085A0FCE000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = dehacked.c; - path = ../../dehacked.c; - refType = 2; - }; - 84177723085A0FCE000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = dehacked.h; - path = ../../dehacked.h; - refType = 2; - }; - 84177724085A0FF2000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = doomdata.h; - path = ../../doomdata.h; - refType = 2; - }; - 84177725085A0FF2000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = doomdef.h; - path = ../../doomdef.h; - refType = 2; - }; - 84177726085A0FF2000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = doomstat.h; - path = ../../doomstat.h; - refType = 2; - }; - 84177727085A0FF2000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = doomtype.h; - path = ../../doomtype.h; - refType = 2; - }; - 8417772A085A100E000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = f_finale.c; - path = ../../f_finale.c; - refType = 2; - }; - 8417772B085A100E000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = f_finale.h; - path = ../../f_finale.h; - refType = 2; - }; - 8417772C085A100E000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = f_wipe.c; - path = ../../f_wipe.c; - refType = 2; - }; - 8417772D085A1029000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = g_game.c; - path = ../../g_game.c; - refType = 2; - }; - 8417772E085A1029000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = g_game.h; - path = ../../g_game.h; - refType = 2; - }; - 8417772F085A1029000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = g_input.c; - path = ../../g_input.c; - refType = 2; - }; - 84177730085A1029000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = g_input.h; - path = ../../g_input.h; - refType = 2; - }; - 84177731085A1029000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = g_state.h; - path = ../../g_state.h; - refType = 2; - }; - 84177732085A1040000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = hu_stuff.c; - path = ../../hu_stuff.c; - refType = 2; - }; - 84177733085A1040000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = hu_stuff.h; - path = ../../hu_stuff.h; - refType = 2; - }; - 84177734085A106C000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = hw_bsp.c; - path = ../../hardware/hw_bsp.c; - refType = 2; - }; - 84177735085A106C000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = hw_cache.c; - path = ../../hardware/hw_cache.c; - refType = 2; - }; - 84177736085A106C000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = hw_data.h; - path = ../../hardware/hw_data.h; - refType = 2; - }; - 84177737085A106C000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = hw_defs.h; - path = ../../hardware/hw_defs.h; - refType = 2; - }; - 84177738085A106C000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = hw_dll.h; - path = ../../hardware/hw_dll.h; - refType = 2; - }; - 84177739085A106C000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = hw_draw.c; - path = ../../hardware/hw_draw.c; - refType = 2; - }; - 8417773A085A106C000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = hw_drv.h; - path = ../../hardware/hw_drv.h; - refType = 2; - }; - 8417773C085A106C000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = hw_glob.h; - path = ../../hardware/hw_glob.h; - refType = 2; - }; - 8417773D085A106C000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = hw_light.c; - path = ../../hardware/hw_light.c; - refType = 2; - }; - 8417773E085A106C000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = hw_light.h; - path = ../../hardware/hw_light.h; - refType = 2; - }; - 8417773F085A106C000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = hw_main.c; - path = ../../hardware/hw_main.c; - refType = 2; - }; - 84177740085A106C000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = hw_main.h; - path = ../../hardware/hw_main.h; - refType = 2; - }; - 84177741085A106C000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = hw_md2.c; - path = ../../hardware/hw_md2.c; - refType = 2; - }; - 84177742085A106C000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = hw_md2.h; - path = ../../hardware/hw_md2.h; - refType = 2; - }; - 84177743085A106C000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = hw_trick.c; - path = ../../hardware/hw_trick.c; - refType = 2; - }; - 84177744085A106C000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = hw3dsdrv.h; - path = ../../hardware/hw3dsdrv.h; - refType = 2; - }; - 84177745085A106C000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = hw3sound.c; - path = ../../hardware/hw3sound.c; - refType = 2; - }; - 84177746085A106C000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = hw3sound.h; - path = ../../hardware/hw3sound.h; - refType = 2; - }; - 84177747085A106C000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = hws_data.h; - path = ../../hardware/hws_data.h; - refType = 2; - }; - 84177748085A1097000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = dosstr.c; - path = ../dosstr.c; - refType = 2; - }; - 84177749085A1097000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = endtxt.c; - path = ../endtxt.c; - refType = 2; - }; - 8417774A085A1097000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = endtxt.h; - path = ../endtxt.h; - refType = 2; - }; - 8417774B085A1097000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = filesrch.c; - path = ../../filesrch.c; - refType = 2; - }; - 8417774C085A1097000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = hwsym_sdl.c; - path = ../hwsym_sdl.c; - refType = 2; - }; - 8417774D085A1097000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = hwsym_sdl.h; - path = ../hwsym_sdl.h; - refType = 2; - }; - 8417774E085A1097000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = i_cdmus.c; - path = ../i_cdmus.c; - refType = 2; - }; - 8417774F085A1097000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = i_main.c; - path = ../i_main.c; - refType = 2; - }; - 84177750085A1097000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = i_net.c; - path = ../i_net.c; - refType = 2; - }; - 84177751085A1097000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = i_sound.c; - path = ../i_sound.c; - refType = 2; - }; - 84177752085A1097000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = i_system.c; - path = ../i_system.c; - refType = 2; - }; - 84177753085A1097000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = i_video.c; - path = ../i_video.c; - refType = 2; - }; - 84177754085A1097000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = IMG_xpm.c; - path = ../IMG_xpm.c; - refType = 2; - }; - 84177755085A10AA000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = ogl_sdl.c; - path = ../ogl_sdl.c; - refType = 2; - }; - 84177756085A10AA000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = ogl_sdl.h; - path = ../ogl_sdl.h; - refType = 2; - }; - 84177757085A10AA000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = SDL_icon.xpm; - path = ../SDL_icon.xpm; - refType = 2; - }; - 84177758085A10D2000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = r_opengl.c; - path = ../../hardware/r_opengl/r_opengl.c; - refType = 2; - }; - 84177759085A10D2000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = r_opengl.h; - path = ../../hardware/r_opengl/r_opengl.h; - refType = 2; - }; - 8417775A085A10EB000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = m_argv.c; - path = ../../m_argv.c; - refType = 2; - }; - 8417775B085A10EB000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = m_argv.h; - path = ../../m_argv.h; - refType = 2; - }; - 8417775C085A10EB000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = m_bbox.c; - path = ../../m_bbox.c; - refType = 2; - }; - 8417775D085A10EB000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = m_bbox.h; - path = ../../m_bbox.h; - refType = 2; - }; - 8417775E085A10EB000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = m_cheat.c; - path = ../../m_cheat.c; - refType = 2; - }; - 8417775F085A10EB000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = m_cheat.h; - path = ../../m_cheat.h; - refType = 2; - }; - 84177760085A10EB000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = m_fixed.c; - path = ../../m_fixed.c; - refType = 2; - }; - 84177761085A10EB000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = m_fixed.h; - path = ../../m_fixed.h; - refType = 2; - }; - 84177762085A10EB000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = m_menu.c; - path = ../../m_menu.c; - refType = 2; - }; - 84177763085A10EB000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = m_menu.h; - path = ../../m_menu.h; - refType = 2; - }; - 84177764085A10EB000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = m_misc.c; - path = ../../m_misc.c; - refType = 2; - }; - 84177765085A10EB000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = m_misc.h; - path = ../../m_misc.h; - refType = 2; - }; - 84177764085A10EB000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = apng.c; - path = ../../apng.c; - refType = 2; - }; - 84177765085A10EB000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = m_misc.h; - path = ../../apng.h; - refType = 2; - }; - 84177766085A10EB000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = m_random.c; - path = ../../m_random.c; - refType = 2; - }; - 84177767085A10EB000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = m_random.h; - path = ../../m_random.h; - refType = 2; - }; - 84177768085A10EB000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = m_swap.h; - path = ../../m_swap.h; - refType = 2; - }; - 84177769085A1104000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = p_ceilng.c; - path = ../../p_ceilng.c; - refType = 2; - }; - 8417776A085A1104000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = p_enemy.c; - path = ../../p_enemy.c; - refType = 2; - }; - 8417776B085A1104000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = p_fab.c; - path = ../../p_fab.c; - refType = 2; - }; - 8417776C085A1104000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = p_floor.c; - path = ../../p_floor.c; - refType = 2; - }; - 8417776D085A1104000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = p_inter.c; - path = ../../p_inter.c; - refType = 2; - }; - 8417776E085A1104000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = p_lights.c; - path = ../../p_lights.c; - refType = 2; - }; - 8417776F085A1104000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = p_local.h; - path = ../../p_local.h; - refType = 2; - }; - 84177770085A1104000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = p_map.c; - path = ../../p_map.c; - refType = 2; - }; - 84177771085A1104000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = p_maputl.c; - path = ../../p_maputl.c; - refType = 2; - }; - 84177772085A1104000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = p_maputl.h; - path = ../../p_maputl.h; - refType = 2; - }; - 84177773085A1104000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = p_mobj.c; - path = ../../p_mobj.c; - refType = 2; - }; - 84177774085A1104000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = p_mobj.h; - path = ../../p_mobj.h; - refType = 2; - }; - 84177775085A1104000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = p_pspr.h; - path = ../../p_pspr.h; - refType = 2; - }; - 84177776085A1104000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = p_saveg.c; - path = ../../p_saveg.c; - refType = 2; - }; - 84177777085A1104000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = p_saveg.h; - path = ../../p_saveg.h; - refType = 2; - }; - 84177778085A1104000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = p_setup.c; - path = ../../p_setup.c; - refType = 2; - }; - 84177779085A1104000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = p_setup.h; - path = ../../p_setup.h; - refType = 2; - }; - 8417777A085A1104000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = p_sight.c; - path = ../../p_sight.c; - refType = 2; - }; - 8417777B085A1104000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = p_spec.c; - path = ../../p_spec.c; - refType = 2; - }; - 8417777C085A1104000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = p_spec.h; - path = ../../p_spec.h; - refType = 2; - }; - 8417777D085A1104000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = p_telept.c; - path = ../../p_telept.c; - refType = 2; - }; - 8417777E085A1104000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = p_tick.c; - path = ../../p_tick.c; - refType = 2; - }; - 8417777F085A1104000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = p_tick.h; - path = ../../p_tick.h; - refType = 2; - }; - 84177780085A1104000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = p_user.c; - path = ../../p_user.c; - refType = 2; - }; - 84177781085A111B000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = r_bsp.c; - path = ../../r_bsp.c; - refType = 2; - }; - 84177782085A111B000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = r_bsp.h; - path = ../../r_bsp.h; - refType = 2; - }; - 84177783085A111B000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = r_data.c; - path = ../../r_data.c; - refType = 2; - }; - 84177784085A111B000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = r_data.h; - path = ../../r_data.h; - refType = 2; - }; - 84177785085A111B000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = r_defs.h; - path = ../../r_defs.h; - refType = 2; - }; - 84177786085A111B000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = r_draw.c; - path = ../../r_draw.c; - refType = 2; - }; - 84177787085A111B000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = r_draw.h; - path = ../../r_draw.h; - refType = 2; - }; - 84177788085A111B000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = r_draw8.c; - path = ../../r_draw8.c; - refType = 2; - }; - 84177789085A111B000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = r_draw16.c; - path = ../../r_draw16.c; - refType = 2; - }; - 8417778A085A111B000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = r_local.h; - path = ../../r_local.h; - refType = 2; - }; - 8417778B085A111B000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = r_main.c; - path = ../../r_main.c; - refType = 2; - }; - 8417778C085A111B000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = r_main.h; - path = ../../r_main.h; - refType = 2; - }; - 8417778D085A111B000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = r_plane.c; - path = ../../r_plane.c; - refType = 2; - }; - 8417778E085A111B000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = r_plane.h; - path = ../../r_plane.h; - refType = 2; - }; - 8417778F085A111B000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = r_segs.c; - path = ../../r_segs.c; - refType = 2; - }; - 84177790085A111B000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = r_segs.h; - path = ../../r_segs.h; - refType = 2; - }; - 84177791085A111B000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = r_sky.c; - path = ../../r_sky.c; - refType = 2; - }; - 84177792085A111B000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = r_sky.h; - path = ../../r_sky.h; - refType = 2; - }; - 84177793085A111B000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = r_splats.c; - path = ../../r_splats.c; - refType = 2; - }; - 84177794085A111B000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = r_splats.h; - path = ../../r_splats.h; - refType = 2; - }; - 84177795085A111B000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = r_state.h; - path = ../../r_state.h; - refType = 2; - }; - 84177796085A111B000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = r_things.c; - path = ../../r_things.c; - refType = 2; - }; - 84177797085A111B000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = r_things.h; - path = ../../r_things.h; - refType = 2; - }; - 84177798085A1138000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = s_sound.c; - path = ../../s_sound.c; - refType = 2; - }; - 84177799085A1138000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = s_sound.h; - path = ../../s_sound.h; - refType = 2; - }; - 8417779A085A1138000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = sounds.c; - path = ../../sounds.c; - refType = 2; - }; - 8417779B085A1138000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = sounds.h; - path = ../../sounds.h; - refType = 2; - }; - 8417779C085A114C000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - path = mac_alert.c; - refType = 2; - }; - 8417779D085A114C000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - path = mac_alert.h; - refType = 2; - }; - 8417779E085A116B000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = SDL_macosx_main.h; - path = ../SDL_main/SDL_macosx_main.h; - refType = 2; - }; - 8417779F085A116B000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = SDL_macosx_main.m; - path = ../SDL_main/SDL_macosx_main.m; - refType = 2; - }; - 841777A0085A117F000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = w_wad.c; - path = ../../w_wad.c; - refType = 2; - }; - 841777A1085A117F000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = w_wad.h; - path = ../../w_wad.h; - refType = 2; - }; - 841777A2085A1197000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = screen.c; - path = ../../screen.c; - refType = 2; - }; - 841777A3085A1197000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = screen.h; - path = ../../screen.h; - refType = 2; - }; - 841777A4085A1200000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = filesrch.h; - path = ../../filesrch.h; - refType = 2; - }; - 841777A5085A1200000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = i_joy.h; - path = ../../i_joy.h; - refType = 2; - }; - 841777A6085A1200000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = i_net.h; - path = ../../i_net.h; - refType = 2; - }; - 841777A8085A1200000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = i_sound.h; - path = ../../i_sound.h; - refType = 2; - }; - 841777A9085A1200000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = i_system.h; - path = ../../i_system.h; - refType = 2; - }; - 841777AA085A1200000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = i_tcp.c; - path = ../../i_tcp.c; - refType = 2; - }; - 841777AB085A1200000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = i_tcp.h; - path = ../../i_tcp.h; - refType = 2; - }; - 841777AC085A1200000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = i_video.h; - path = ../../i_video.h; - refType = 2; - }; - 841777AD085A1200000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = mserv.c; - path = ../../mserv.c; - refType = 2; - }; - 841777AE085A1200000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = mserv.h; - path = ../../mserv.h; - refType = 2; - }; - 841777AF085A1228000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = md5.c; - path = ../../md5.c; - refType = 2; - }; - 841777B0085A1228000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = md5.h; - path = ../../md5.h; - refType = 2; - }; - 841778BC085A122A000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = z_zone.c; - path = ../../z_zone.c; - refType = 2; - }; - 841778BD085A122A000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = z_zone.h; - path = ../../z_zone.h; - refType = 2; - }; - 841778BE085A1295000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = am_map.c; - path = ../../am_map.c; - refType = 2; - }; - 841778BF085A1295000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = am_map.h; - path = ../../am_map.h; - refType = 2; - }; - 841778C0085A1295000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = command.c; - path = ../../command.c; - refType = 2; - }; - 841778C1085A1295000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = command.h; - path = ../../command.h; - refType = 2; - }; - 841778C2085A1295000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = console.c; - path = ../../console.c; - refType = 2; - }; - 841778C3085A1295000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = console.h; - path = ../../console.h; - refType = 2; - }; - 841778C4085A1295000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = info.c; - path = ../../info.c; - refType = 2; - }; - 841778C5085A1295000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = info.h; - path = ../../info.h; - refType = 2; - }; - 841778C6085A1295000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = keys.h; - path = ../../keys.h; - refType = 2; - }; - 841779D2085A1296000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = st_stuff.c; - path = ../../st_stuff.c; - refType = 2; - }; - 841779D3085A1296000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = st_stuff.h; - path = ../../st_stuff.h; - refType = 2; - }; - 841779D4085A1296000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = tables.c; - path = ../../tables.c; - refType = 2; - }; - 841779D5085A1296000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = tables.h; - path = ../../tables.h; - refType = 2; - }; - 841779D7085A1296000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = v_video.h; - path = ../../v_video.h; - refType = 2; - }; - 841779D8085A1296000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = y_inter.c; - path = ../../y_inter.c; - refType = 2; - }; - 841779DA085A1347000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = byteptr.h; - path = ../../byteptr.h; - refType = 2; - }; - 841779DC085A138F000C01D8 = { - buildActionMask = 2147483647; - files = ( - 6755C8C7101802C300A80195, - 6755C8C8101802C300A80195, - 6755C8C9101802C300A80195, - 6755C8CA101802C300A80195, - 6755C8CB101802C300A80195, - 6755C8CC101802C300A80195, - 6755C8CD101802C300A80195, - 6755C8CE101802C300A80195, - 6755C8CF101802C300A80195, - ); - isa = PBXResourcesBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - 841779DD085A138F000C01D8 = { - buildActionMask = 2147483647; - files = ( - 84177A2A085A18A8000C01D8, - 84177A2E085A18D2000C01D8, - 84177A30085A18D3000C01D8, - 84177A32085A18D4000C01D8, - 84177A34085A18D5000C01D8, - 84177A39085A18D8000C01D8, - 84177A3F085A18DC000C01D8, - 84177A41085A18E0000C01D8, - 84177A43085A18E1000C01D8, - 84177A46085A18E8000C01D8, - 84177A4A085A18EA000C01D8, - 84177A4E085A18EC000C01D8, - 84177A50085A18F2000C01D8, - 84177A52085A193F000C01D8, - 84177A53085A1940000C01D8, - 84177A54085A1942000C01D8, - 84177A55085A1943000C01D8, - 84177A56085A195A000C01D8, - 84177A57085A195B000C01D8, - 84177A58085A1968000C01D8, - 84177A59085A1969000C01D8, - 84177A5A085A196B000C01D8, - 84177A5B085A197A000C01D8, - 84177A5C085A197C000C01D8, - 84177A5D085A197D000C01D8, - 84177A5E085A197E000C01D8, - 84177A5F085A1980000C01D8, - 84177A61085A1985000C01D8, - 84177A62085A1986000C01D8, - 84177A63085A1988000C01D8, - 84177A64085A1989000C01D8, - 84177A65085A198A000C01D8, - 84177A66085A198A000C01D8, - 84177A67085A198B000C01D8, - 84177A68085A198C000C01D8, - 84177A69085A198E000C01D8, - 84177A6B085A1994000C01D8, - 84177A6C085A1995000C01D8, - 84177A6D085A199D000C01D8, - 84177A6E085A19A0000C01D8, - 84177A6F085A19A1000C01D8, - 84177A70085A19A2000C01D8, - 84177A71085A19A4000C01D8, - 84177A72085A19A5000C01D8, - 84177A73085A19A6000C01D8, - 84177A74085A19A7000C01D8, - 84177A75085A19AC000C01D8, - 84177A76085A19AD000C01D8, - 84177A77085A19AE000C01D8, - 84177A78085A19AE000C01D8, - 84177A79085A19AF000C01D8, - 84177A7A085A19B0000C01D8, - 84177A7B085A19B3000C01D8, - 84177A7C085A19B4000C01D8, - 84177A7D085A19B5000C01D8, - 84177A7E085A19B7000C01D8, - 84177A7F085A19B8000C01D8, - 84177A80085A19B9000C01D8, - 84177A81085A19BA000C01D8, - 84177A82085A19BB000C01D8, - 84177A83085A19BB000C01D8, - 84177A84085A19BC000C01D8, - 84177A85085A19C1000C01D8, - 84177A86085A19C2000C01D8, - 84177A87085A19C3000C01D8, - 84177A88085A19C6000C01D8, - 84177A89085A19C7000C01D8, - 84177A8A085A19C9000C01D8, - 84177A8B085A19CC000C01D8, - 84177A8C085A19CD000C01D8, - 84177A8D085A19CF000C01D8, - 84177A8E085A19D0000C01D8, - 84177A90085A19D8000C01D8, - 84177A91085A19D9000C01D8, - 84177A92085A19DD000C01D8, - 84177A93085A19DF000C01D8, - 84177A94085A19E1000C01D8, - 84177A95085A19E3000C01D8, - 84177A96085A19E6000C01D8, - 8490D438085DF57B000C01D8, - 849603AA0A791C11000C01D8, - 6755C7B21017FE2500A80195, - 6755C7B31017FE2500A80195, - 6755C7B51017FE2500A80195, - 6755C7B71017FE2500A80195, - 6755C7B81017FE2500A80195, - 6755C84B1017FE4500A80195, - 6755C8651017FE4500A80195, - 677B5EC810180D4E00A80195, - 67B2D0C91018779900A80195, - ); - isa = PBXSourcesBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - 841779DE085A138F000C01D8 = { - buildActionMask = 2147483647; - files = ( - 84C4E0410862096F000C01D8, - 84C4E0440862098A000C01D8, - 84C4E047086209D3000C01D8, - 84C4E04A086209FF000C01D8, - 84C4E04F08620A46000C01D8, - 84C4E05008620A46000C01D8, - 849BD31E0A7E45B3000C01D8, - ); - isa = PBXFrameworksBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - 841779E0085A138F000C01D8 = { - buildPhases = ( - 841779DC085A138F000C01D8, - 841779DD085A138F000C01D8, - 841779DE085A138F000C01D8, - ); - buildSettings = { - DEBUGGING_SYMBOLS = NO; - FRAMEWORK_SEARCH_PATHS = "\"$(LOCAL_LIBRARY_DIR)/Frameworks\""; - HEADER_SEARCH_PATHS = "\"$(LOCAL_LIBRARY_DIR)/Frameworks/SDL.framework/Headers\" \"$(LOCAL_LIBRARY_DIR)/Frameworks/SDL_mixer.framework/Headers\" \"$(LOCAL_LIBRARY_DIR)/Frameworks/OpenAL.framework/Headers\" \"$(LOCAL_LIBRARY_DIR)/Frameworks/libpng.framework/Headers\""; - INSTALL_PATH = "$(HOME)/Applications"; - JAVA_COMPILER_DEBUGGING_SYMBOLS = NO; - OPTIMIZATION_CFLAGS = "-O2"; - OTHER_CFLAGS = "-DMAC_ALERT -DUNIXCOMMON -DSDLMAIN -DHAVE_MIXER -DHAVE_PNG -D_BIG_ENDIAN -DSTDC_HEADERS -DSDL -Wall -Winline -fno-strict-aliasing"; - OTHER_REZFLAGS = ""; - PREBINDING = NO; - PRODUCT_NAME = Srb2; - SECTORDER_FLAGS = ""; - USE_GCC3_PFE_SUPPORT = NO; - WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas -Wno-long-double"; - WRAPPER_EXTENSION = app; - }; - dependencies = ( - ); - isa = PBXApplicationTarget; - name = Srb2; - productInstallPath = "$(HOME)/Applications"; - productName = Srb2; - productReference = 841779E1085A138F000C01D8; - productSettingsXML = " - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - Srb2 - CFBundleGetInfoString - - CFBundleIconFile - Srb2mac - CFBundleIdentifier - - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - Sonic Robo Blast 2 - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.09 - CFBundleSignature - ???? - CFBundleVersion - 1.09 - NSMainNibFile - SDL_Main.nib - NSPrincipalClass - NSApplication - - -"; - }; - 841779E1085A138F000C01D8 = { - isa = PBXApplicationReference; - path = Srb2.app; - refType = 3; - }; - 841779E2085A138F000C01D8 = { - children = ( - 841779E1085A138F000C01D8, - 841779EA085A13B1000C01D8, - ); - isa = PBXGroup; - name = Products; - refType = 4; - }; - 841779E6085A13B1000C01D8 = { - buildActionMask = 2147483647; - files = ( - 84177A98085A1A0B000C01D8, - 84177A99085A1A0E000C01D8, - 84177A9A085A1A0F000C01D8, - 84177A9B085A1A11000C01D8, - 84177A9C085A1A12000C01D8, - 84177A9D085A1A14000C01D8, - 84177A9E085A1A16000C01D8, - 84177A9F085A1A1E000C01D8, - 84177AA0085A1A1F000C01D8, - 84177AA1085A1A24000C01D8, - 84177AA2085A1A25000C01D8, - 84177AA3085A1A27000C01D8, - 84177AA4085A1A28000C01D8, - 84177AA5085A1A2B000C01D8, - 84177AA6085A1A2C000C01D8, - 84177AA7085A1A2D000C01D8, - 84177AA8085A1A2F000C01D8, - 84177AA9085A1A30000C01D8, - 84177AAA085A1A31000C01D8, - 84177AB4085A1A5E000C01D8, - 84177AB5085A1A60000C01D8, - 84177AB8085A1A65000C01D8, - 84177AB9085A1A65000C01D8, - 84177ABA085A1A66000C01D8, - 84177ABB085A1A67000C01D8, - 84177ABC085A1A67000C01D8, - 84177ABD085A1A68000C01D8, - 84177AC1085A1A70000C01D8, - 84177AC2085A1A72000C01D8, - 84177AC3085A1A77000C01D8, - 84177AC4085A1A78000C01D8, - 84177AC5085A1A7A000C01D8, - 84177AC6085A1A7B000C01D8, - 84177AC7085A1A7C000C01D8, - 84177AC8085A1A7D000C01D8, - 84177AC9085A1A7F000C01D8, - 84177ACA085A1A87000C01D8, - 84177ACB085A1A88000C01D8, - 84177ACC085A1A88000C01D8, - 84177ACD085A1A89000C01D8, - 84177ACE085A1A8A000C01D8, - 84177ACF085A1A8B000C01D8, - 84177AD0085A1A8C000C01D8, - 84177AD1085A1A8D000C01D8, - 84177AD2085A1A90000C01D8, - 84177AD4085A1A92000C01D8, - 84177AD5085A1A93000C01D8, - 84177AD6085A1A94000C01D8, - 84177AD7085A1A97000C01D8, - 84177AD8085A1A97000C01D8, - 84177AD9085A1A99000C01D8, - 84177ADA085A1A9F000C01D8, - 84177ADB085A1AA0000C01D8, - 84177ADC085A1AA2000C01D8, - 84177ADF085A1AA4000C01D8, - 84177AE0085A1AA6000C01D8, - 84177AE1085A1AA7000C01D8, - 84177AE2085A1AA8000C01D8, - 84177AE3085A1AA9000C01D8, - 84177AE4085A1AAA000C01D8, - 84177AE5085A1AAE000C01D8, - 84177AE7085A1AB5000C01D8, - 84177AE8085A1AB6000C01D8, - 84177AEB085A1ABD000C01D8, - 84177AEC085A1ABF000C01D8, - 84177AED085A1ABF000C01D8, - 8490D432085DF3D6000C01D8, - 8490D437085DF57B000C01D8, - 8490D43C085E0518000C01D8, - 8490D43D085E05F6000C01D8, - 8490D43E085E05F7000C01D8, - 8490D43F085E05F8000C01D8, - 8490D440085E05FA000C01D8, - 8490D441085E05FB000C01D8, - 8490D442085E05FC000C01D8, - 8490D443085E05FE000C01D8, - 8490D444085E05FF000C01D8, - 8490D445085E0606000C01D8, - 8490D446085E060A000C01D8, - 8490D447085E060B000C01D8, - 8490D448085E067E000C01D8, - 849603A90A791C11000C01D8, - 6755C7BB1017FE2500A80195, - 6755C7BC1017FE2500A80195, - 6755C7BD1017FE2500A80195, - 6755C7BE1017FE2500A80195, - 6755C7BF1017FE2500A80195, - 6755C7C01017FE2500A80195, - 6755C7C11017FE2500A80195, - 6755C8861017FE4500A80195, - 6755C8871017FE4500A80195, - 6755C8A01017FE4500A80195, - 67B2D0CA1018779D00A80195, - ); - isa = PBXSourcesBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - 841779E7085A13B1000C01D8 = { - buildActionMask = 2147483647; - files = ( - 84C4E0400862096F000C01D8, - 84C4E0430862098A000C01D8, - 84C4E046086209D3000C01D8, - 84C4E049086209FF000C01D8, - 84C4E04E08620A46000C01D8, - 8494DFE80886EA0D000C01D8, - 849BD31D0A7E45B3000C01D8, - ); - isa = PBXFrameworksBuildPhase; - runOnlyForDeploymentPostprocessing = 0; - }; - 841779E9085A13B1000C01D8 = { - buildPhases = ( - 840CE6B009198AA7000C01D8, - 6726EB5E10190F860074DCBA, - 6726EB5F10190FFC0074DCBA, - 841779E6085A13B1000C01D8, - 841779E7085A13B1000C01D8, - ); - buildSettings = { - FRAMEWORK_SEARCH_PATHS = "\"$(LOCAL_LIBRARY_DIR)/Frameworks\""; - HEADER_SEARCH_PATHS = "\"$(LOCAL_LIBRARY_DIR)/Frameworks/SDL.framework/Headers\" \"$(LOCAL_LIBRARY_DIR)/Frameworks/SDL_mixer.framework/Headers\" \"$(LOCAL_LIBRARY_DIR)/Frameworks/OpenAL.framework/Headers\" \"$(LOCAL_LIBRARY_DIR)/Frameworks/libpng.framework/Headers\""; - INSTALL_PATH = "$(HOME)/Applications"; - OPTIMIZATION_CFLAGS = "-O0"; - OTHER_CFLAGS = "-DMAC_ALERT -DUNIXCOMMON -DSDLMAIN -DHAVE_MIXER -DHAVE_PNG -D_BIG_ENDIAN -DSTDC_HEADERS -DSDL -Wall -W -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wsign-compare -Waggregate-return -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fno-strict-aliasing -fno-exceptions -D_DEBUG"; - OTHER_REZFLAGS = ""; - PREBINDING = NO; - PRODUCT_NAME = Srb2Debug; - SECTORDER_FLAGS = ""; - USE_GCC3_PFE_SUPPORT = NO; - WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas -Wno-long-double"; - WRAPPER_EXTENSION = app; - }; - dependencies = ( - ); - isa = PBXApplicationTarget; - name = Srb2Debug; - productInstallPath = "$(HOME)/Applications"; - productName = Srb2Debug; - productReference = 841779EA085A13B1000C01D8; - productSettingsXML = " - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - Srb2Debug - CFBundleGetInfoString - - CFBundleIconFile - srb2mac - CFBundleIdentifier - - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - Sonic Robo Blast 2 - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.09 - CFBundleSignature - ???? - CFBundleVersion - 1.09 Debug - NSMainNibFile - SDL_Main.nib - NSPrincipalClass - NSApplication - - -"; - }; - 841779EA085A13B1000C01D8 = { - isa = PBXApplicationReference; - path = Srb2Debug.app; - refType = 3; - }; - 84177A2A085A18A8000C01D8 = { - fileRef = 84177713085A0FCE000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A2E085A18D2000C01D8 = { - fileRef = 84177717085A0FCE000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A30085A18D3000C01D8 = { - fileRef = 84177719085A0FCE000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A32085A18D4000C01D8 = { - fileRef = 8417771B085A0FCE000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A34085A18D5000C01D8 = { - fileRef = 8417771D085A0FCE000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A39085A18D8000C01D8 = { - fileRef = 84177722085A0FCE000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A41085A18E0000C01D8 = { - fileRef = 8417772A085A100E000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A43085A18E1000C01D8 = { - fileRef = 8417772C085A100E000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A46085A18E8000C01D8 = { - fileRef = 841778C4085A1295000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A4A085A18EA000C01D8 = { - fileRef = 8417772D085A1029000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A4E085A18EC000C01D8 = { - fileRef = 841779D4085A1296000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A50085A18F2000C01D8 = { - fileRef = 8417772F085A1029000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A52085A193F000C01D8 = { - fileRef = 841778C2085A1295000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A53085A1940000C01D8 = { - fileRef = 841778C0085A1295000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A54085A1942000C01D8 = { - fileRef = 841778BE085A1295000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A55085A1943000C01D8 = { - fileRef = 84177732085A1040000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A56085A195A000C01D8 = { - fileRef = 841779D2085A1296000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A57085A195B000C01D8 = { - fileRef = 841779D8085A1296000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A58085A1968000C01D8 = { - fileRef = 84177734085A106C000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A59085A1969000C01D8 = { - fileRef = 84177735085A106C000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A5A085A196B000C01D8 = { - fileRef = 84177739085A106C000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A5B085A197A000C01D8 = { - fileRef = 8417773D085A106C000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A5C085A197C000C01D8 = { - fileRef = 8417773F085A106C000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A5D085A197D000C01D8 = { - fileRef = 84177741085A106C000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A5E085A197E000C01D8 = { - fileRef = 84177743085A106C000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A5F085A1980000C01D8 = { - fileRef = 84177745085A106C000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A61085A1985000C01D8 = { - fileRef = 84177749085A1097000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A62085A1986000C01D8 = { - fileRef = 8417774B085A1097000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A63085A1988000C01D8 = { - fileRef = 8417774E085A1097000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A64085A1989000C01D8 = { - fileRef = 8417774F085A1097000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A65085A198A000C01D8 = { - fileRef = 84177750085A1097000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A66085A198A000C01D8 = { - fileRef = 84177751085A1097000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A67085A198B000C01D8 = { - fileRef = 84177752085A1097000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A68085A198C000C01D8 = { - fileRef = 84177753085A1097000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A69085A198E000C01D8 = { - fileRef = 84177755085A10AA000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A6B085A1994000C01D8 = { - fileRef = 841777AA085A1200000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A6C085A1995000C01D8 = { - fileRef = 841777AD085A1200000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A6D085A199D000C01D8 = { - fileRef = 8417774C085A1097000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A6E085A19A0000C01D8 = { - fileRef = 8417775A085A10EB000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A6F085A19A1000C01D8 = { - fileRef = 8417775C085A10EB000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A70085A19A2000C01D8 = { - fileRef = 8417775E085A10EB000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A71085A19A4000C01D8 = { - fileRef = 84177760085A10EB000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A72085A19A5000C01D8 = { - fileRef = 84177762085A10EB000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A73085A19A6000C01D8 = { - fileRef = 84177764085A10EB000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A74085A19A7000C01D8 = { - fileRef = 84177766085A10EB000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A75085A19AC000C01D8 = { - fileRef = 84177769085A1104000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A76085A19AD000C01D8 = { - fileRef = 8417776A085A1104000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A77085A19AE000C01D8 = { - fileRef = 8417776B085A1104000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A78085A19AE000C01D8 = { - fileRef = 8417776C085A1104000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A79085A19AF000C01D8 = { - fileRef = 8417776D085A1104000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A7A085A19B0000C01D8 = { - fileRef = 8417776E085A1104000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A7B085A19B3000C01D8 = { - fileRef = 84177770085A1104000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A7C085A19B4000C01D8 = { - fileRef = 84177771085A1104000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A7D085A19B5000C01D8 = { - fileRef = 84177773085A1104000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A7E085A19B7000C01D8 = { - fileRef = 84177776085A1104000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A7F085A19B8000C01D8 = { - fileRef = 84177778085A1104000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A80085A19B9000C01D8 = { - fileRef = 8417777A085A1104000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A81085A19BA000C01D8 = { - fileRef = 8417777B085A1104000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A82085A19BB000C01D8 = { - fileRef = 8417777D085A1104000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A83085A19BB000C01D8 = { - fileRef = 8417777E085A1104000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A84085A19BC000C01D8 = { - fileRef = 84177780085A1104000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A85085A19C1000C01D8 = { - fileRef = 84177781085A111B000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A86085A19C2000C01D8 = { - fileRef = 84177783085A111B000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A87085A19C3000C01D8 = { - fileRef = 84177786085A111B000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A88085A19C6000C01D8 = { - fileRef = 8417778B085A111B000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A89085A19C7000C01D8 = { - fileRef = 8417778D085A111B000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A8A085A19C9000C01D8 = { - fileRef = 8417778F085A111B000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A8B085A19CC000C01D8 = { - fileRef = 84177791085A111B000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A8C085A19CD000C01D8 = { - fileRef = 84177793085A111B000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A8D085A19CF000C01D8 = { - fileRef = 84177796085A111B000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A8E085A19D0000C01D8 = { - fileRef = 841777A2085A1197000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A90085A19D8000C01D8 = { - fileRef = 84177798085A1138000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A91085A19D9000C01D8 = { - fileRef = 8417779A085A1138000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A92085A19DD000C01D8 = { - fileRef = 8417779C085A114C000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A93085A19DF000C01D8 = { - fileRef = 8417779F085A116B000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A94085A19E1000C01D8 = { - fileRef = 841777A0085A117F000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A95085A19E3000C01D8 = { - fileRef = 841777AF085A1228000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A96085A19E6000C01D8 = { - fileRef = 841778BC085A122A000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A98085A1A0B000C01D8 = { - fileRef = 84177713085A0FCE000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A99085A1A0E000C01D8 = { - fileRef = 84177717085A0FCE000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A9A085A1A0F000C01D8 = { - fileRef = 84177719085A0FCE000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A9B085A1A11000C01D8 = { - fileRef = 8417771B085A0FCE000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A9C085A1A12000C01D8 = { - fileRef = 8417771D085A0FCE000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A9D085A1A14000C01D8 = { - fileRef = 84177722085A0FCE000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177A9F085A1A1E000C01D8 = { - fileRef = 8417772A085A100E000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AA0085A1A1F000C01D8 = { - fileRef = 8417772C085A100E000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AA1085A1A24000C01D8 = { - fileRef = 841778C4085A1295000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AA2085A1A25000C01D8 = { - fileRef = 8417772D085A1029000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AA3085A1A27000C01D8 = { - fileRef = 8417772F085A1029000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AA4085A1A28000C01D8 = { - fileRef = 841779D4085A1296000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AA5085A1A2B000C01D8 = { - fileRef = 841778BE085A1295000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AA6085A1A2C000C01D8 = { - fileRef = 841778C2085A1295000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AA7085A1A2D000C01D8 = { - fileRef = 841778C0085A1295000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AA8085A1A2F000C01D8 = { - fileRef = 84177732085A1040000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AA9085A1A30000C01D8 = { - fileRef = 841779D2085A1296000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AAA085A1A31000C01D8 = { - fileRef = 841779D8085A1296000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AB4085A1A5E000C01D8 = { - fileRef = 84177749085A1097000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AB5085A1A60000C01D8 = { - fileRef = 8417774B085A1097000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AB8085A1A65000C01D8 = { - fileRef = 8417774E085A1097000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AB9085A1A65000C01D8 = { - fileRef = 8417774F085A1097000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177ABA085A1A66000C01D8 = { - fileRef = 84177750085A1097000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177ABB085A1A67000C01D8 = { - fileRef = 84177751085A1097000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177ABC085A1A67000C01D8 = { - fileRef = 84177752085A1097000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177ABD085A1A68000C01D8 = { - fileRef = 84177753085A1097000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AC1085A1A70000C01D8 = { - fileRef = 841777AA085A1200000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AC2085A1A72000C01D8 = { - fileRef = 841777AD085A1200000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AC3085A1A77000C01D8 = { - fileRef = 8417775A085A10EB000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AC4085A1A78000C01D8 = { - fileRef = 8417775C085A10EB000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AC5085A1A7A000C01D8 = { - fileRef = 8417775E085A10EB000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AC6085A1A7B000C01D8 = { - fileRef = 84177760085A10EB000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AC7085A1A7C000C01D8 = { - fileRef = 84177762085A10EB000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AC8085A1A7D000C01D8 = { - fileRef = 84177764085A10EB000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AC9085A1A7F000C01D8 = { - fileRef = 84177766085A10EB000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177ACA085A1A87000C01D8 = { - fileRef = 84177769085A1104000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177ACB085A1A88000C01D8 = { - fileRef = 8417776A085A1104000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177ACC085A1A88000C01D8 = { - fileRef = 8417776B085A1104000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177ACD085A1A89000C01D8 = { - fileRef = 8417776C085A1104000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177ACE085A1A8A000C01D8 = { - fileRef = 8417776D085A1104000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177ACF085A1A8B000C01D8 = { - fileRef = 8417776E085A1104000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AD0085A1A8C000C01D8 = { - fileRef = 84177770085A1104000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AD1085A1A8D000C01D8 = { - fileRef = 84177771085A1104000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AD2085A1A90000C01D8 = { - fileRef = 84177773085A1104000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AD4085A1A92000C01D8 = { - fileRef = 84177778085A1104000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AD5085A1A93000C01D8 = { - fileRef = 8417777A085A1104000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AD6085A1A94000C01D8 = { - fileRef = 8417777B085A1104000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AD7085A1A97000C01D8 = { - fileRef = 8417777D085A1104000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AD8085A1A97000C01D8 = { - fileRef = 8417777E085A1104000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AD9085A1A99000C01D8 = { - fileRef = 84177780085A1104000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177ADA085A1A9F000C01D8 = { - fileRef = 84177781085A111B000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177ADB085A1AA0000C01D8 = { - fileRef = 84177783085A111B000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177ADC085A1AA2000C01D8 = { - fileRef = 84177786085A111B000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177ADF085A1AA4000C01D8 = { - fileRef = 8417778B085A111B000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AE0085A1AA6000C01D8 = { - fileRef = 8417778D085A111B000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AE1085A1AA7000C01D8 = { - fileRef = 8417778F085A111B000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AE2085A1AA8000C01D8 = { - fileRef = 84177791085A111B000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AE3085A1AA9000C01D8 = { - fileRef = 84177793085A111B000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AE4085A1AAA000C01D8 = { - fileRef = 84177796085A111B000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AE5085A1AAE000C01D8 = { - fileRef = 841777A2085A1197000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AE7085A1AB5000C01D8 = { - fileRef = 84177798085A1138000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AE8085A1AB6000C01D8 = { - fileRef = 8417779A085A1138000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AEB085A1ABD000C01D8 = { - fileRef = 841777AF085A1228000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AEC085A1ABF000C01D8 = { - fileRef = 841777A0085A117F000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84177AED085A1ABF000C01D8 = { - fileRef = 841778BC085A122A000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 8490D432085DF3D6000C01D8 = { - fileRef = 84177776085A1104000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 8490D433085DF537000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = y_inter.h; - path = ../../y_inter.h; - refType = 2; - }; - 8490D436085DF57B000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = v_video.c; - path = ../../v_video.c; - refType = 2; - }; - 8490D437085DF57B000C01D8 = { - fileRef = 8490D436085DF57B000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 8490D438085DF57B000C01D8 = { - fileRef = 8490D436085DF57B000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 8490D43C085E0518000C01D8 = { - fileRef = 8417779F085A116B000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 8490D43D085E05F6000C01D8 = { - fileRef = 84177734085A106C000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 8490D43E085E05F7000C01D8 = { - fileRef = 84177735085A106C000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 8490D43F085E05F8000C01D8 = { - fileRef = 84177739085A106C000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 8490D440085E05FA000C01D8 = { - fileRef = 8417773D085A106C000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 8490D441085E05FB000C01D8 = { - fileRef = 8417773F085A106C000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 8490D442085E05FC000C01D8 = { - fileRef = 84177741085A106C000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 8490D443085E05FE000C01D8 = { - fileRef = 84177743085A106C000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 8490D444085E05FF000C01D8 = { - fileRef = 84177745085A106C000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 8490D445085E0606000C01D8 = { - fileRef = 8417774C085A1097000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 8490D446085E060A000C01D8 = { - fileRef = 84177755085A10AA000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 8490D447085E060B000C01D8 = { - fileRef = 84177758085A10D2000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 8490D448085E067E000C01D8 = { - fileRef = 8417779C085A114C000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 8494DFE80886EA0D000C01D8 = { - fileRef = 84C4E04B08620A46000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 849603A80A791C11000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = comptime.c; - path = ../../comptime.c; - refType = 2; - }; - 849603A90A791C11000C01D8 = { - fileRef = 849603A80A791C11000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 849603AA0A791C11000C01D8 = { - fileRef = 849603A80A791C11000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 849BD31C0A7E45B3000C01D8 = { - isa = PBXFrameworkReference; - name = libpng.framework; - path = /Library/Frameworks/libpng.framework; - refType = 0; - }; - 849BD31D0A7E45B3000C01D8 = { - fileRef = 849BD31C0A7E45B3000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 849BD31E0A7E45B3000C01D8 = { - fileRef = 849BD31C0A7E45B3000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 849BD32D0A7E471D000C01D8 = { - fileRef = 849BD31C0A7E45B3000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84C4E00D0862063C000C01D8 = { - children = ( - 6755C8BE101802C300A80195, - 6755C8BF101802C300A80195, - 6755C8C0101802C300A80195, - 6755C8C1101802C300A80195, - 6755C8C2101802C300A80195, - 6755C8C3101802C300A80195, - 6755C8C4101802C300A80195, - 6755C8C5101802C300A80195, - 6755C8C6101802C300A80195, - ); - isa = PBXGroup; - name = Data; - refType = 4; - }; - 84C4E03F0862096F000C01D8 = { - isa = PBXFrameworkReference; - name = AppKit.framework; - path = /System/Library/Frameworks/AppKit.framework; - refType = 0; - }; - 84C4E0400862096F000C01D8 = { - fileRef = 84C4E03F0862096F000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84C4E0410862096F000C01D8 = { - fileRef = 84C4E03F0862096F000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84C4E0420862098A000C01D8 = { - isa = PBXFrameworkReference; - name = Foundation.framework; - path = /System/Library/Frameworks/Foundation.framework; - refType = 0; - }; - 84C4E0430862098A000C01D8 = { - fileRef = 84C4E0420862098A000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84C4E0440862098A000C01D8 = { - fileRef = 84C4E0420862098A000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84C4E045086209D3000C01D8 = { - isa = PBXFrameworkReference; - name = CoreFoundation.framework; - path = /System/Library/Frameworks/CoreFoundation.framework; - refType = 0; - }; - 84C4E046086209D3000C01D8 = { - fileRef = 84C4E045086209D3000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84C4E047086209D3000C01D8 = { - fileRef = 84C4E045086209D3000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84C4E048086209FF000C01D8 = { - isa = PBXFrameworkReference; - name = ApplicationServices.framework; - path = /System/Library/Frameworks/ApplicationServices.framework; - refType = 0; - }; - 84C4E049086209FF000C01D8 = { - fileRef = 84C4E048086209FF000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84C4E04A086209FF000C01D8 = { - fileRef = 84C4E048086209FF000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84C4E04B08620A46000C01D8 = { - isa = PBXFrameworkReference; - name = SDL_mixer.framework; - path = /Library/Frameworks/SDL_mixer.framework; - refType = 0; - }; - 84C4E04C08620A46000C01D8 = { - isa = PBXFrameworkReference; - name = SDL.framework; - path = /Library/Frameworks/SDL.framework; - refType = 0; - }; - 84C4E04E08620A46000C01D8 = { - fileRef = 84C4E04C08620A46000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84C4E04F08620A46000C01D8 = { - fileRef = 84C4E04B08620A46000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84C4E05008620A46000C01D8 = { - fileRef = 84C4E04C08620A46000C01D8; - isa = PBXBuildFile; - settings = { - }; - }; - 84F202C708A92A5D000C01D8 = { - isa = PBXFrameworkReference; - name = OpenAL.framework; - path = /Library/Frameworks/OpenAL.framework; - refType = 0; - }; - 84F202CA08A92AA0000C01D8 = { - fileEncoding = 30; - isa = PBXFileReference; - name = s_openal.c; - path = ../../hardware/s_openal/s_openal.c; - refType = 2; - }; - }; - rootObject = 84177702085A0C64000C01D8; -} diff --git a/src/sdl12/macosx/Srb2mac.xcodeproj/project.pbxproj b/src/sdl12/macosx/Srb2mac.xcodeproj/project.pbxproj deleted file mode 100644 index 9b9d33b7a..000000000 --- a/src/sdl12/macosx/Srb2mac.xcodeproj/project.pbxproj +++ /dev/null @@ -1,1513 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 44; - objects = { - -/* Begin PBXBuildFile section */ - 002F39FA09D0881F00EBEB88 /* SDL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 002F39F909D0881F00EBEB88 /* SDL.framework */; }; - 002F3A0009D0884600EBEB88 /* SDL.framework in Copy Frameworks into .app bundle */ = {isa = PBXBuildFile; fileRef = 002F39F909D0881F00EBEB88 /* SDL.framework */; }; - 1E308E720B71172D0015728C /* lzf.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44B2240B67EADE00BAD059 /* lzf.c */; }; - 1E32C4290B6E6D5D0029E058 /* libpng.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E32C4140B6E6D5D0029E058 /* libpng.framework */; }; - 1E32C42B0B6E6D6E0029E058 /* libpng.framework in Copy Frameworks into .app bundle */ = {isa = PBXBuildFile; fileRef = 1E32C4140B6E6D5D0029E058 /* libpng.framework */; }; - 1E44AE750B67CC2B00BAD059 /* hw_bsp.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AE610B67CC2B00BAD059 /* hw_bsp.c */; }; - 1E44AE770B67CC2B00BAD059 /* hw3sound.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AE630B67CC2B00BAD059 /* hw3sound.c */; }; - 1E44AE780B67CC2B00BAD059 /* hw_cache.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AE640B67CC2B00BAD059 /* hw_cache.c */; }; - 1E44AE7C0B67CC2B00BAD059 /* hw_light.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AE680B67CC2B00BAD059 /* hw_light.c */; }; - 1E44AE800B67CC2B00BAD059 /* hw_draw.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AE6C0B67CC2B00BAD059 /* hw_draw.c */; }; - 1E44AE820B67CC2B00BAD059 /* hw_main.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AE6E0B67CC2B00BAD059 /* hw_main.c */; }; - 1E44AE840B67CC2B00BAD059 /* hw_md2.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AE700B67CC2B00BAD059 /* hw_md2.c */; }; - 1E44AE860B67CC2B00BAD059 /* hw_trick.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AE720B67CC2B00BAD059 /* hw_trick.c */; }; - 1E44AEA40B67CC8500BAD059 /* d_clisrv.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AE8D0B67CC8400BAD059 /* d_clisrv.c */; }; - 1E44AEA70B67CC8500BAD059 /* d_main.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AE900B67CC8400BAD059 /* d_main.c */; }; - 1E44AEA80B67CC8500BAD059 /* d_net.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AE910B67CC8500BAD059 /* d_net.c */; }; - 1E44AEAB0B67CC8500BAD059 /* d_netfil.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AE940B67CC8500BAD059 /* d_netfil.c */; }; - 1E44AEAF0B67CC8500BAD059 /* d_netcmd.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AE980B67CC8500BAD059 /* d_netcmd.c */; }; - 1E44AEB30B67CC8500BAD059 /* dehacked.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AE9C0B67CC8500BAD059 /* dehacked.c */; }; - 1E44AEBF0B67CCA900BAD059 /* f_wipe.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AEBC0B67CCA900BAD059 /* f_wipe.c */; }; - 1E44AEC00B67CCA900BAD059 /* f_finale.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AEBD0B67CCA900BAD059 /* f_finale.c */; }; - 1E44AEC80B67CCC600BAD059 /* g_game.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AEC30B67CCC600BAD059 /* g_game.c */; }; - 1E44AECC0B67CCC600BAD059 /* g_input.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AEC70B67CCC600BAD059 /* g_input.c */; }; - 1E44AED00B67CCEE00BAD059 /* hu_stuff.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AECE0B67CCEE00BAD059 /* hu_stuff.c */; }; - 1E44AEDC0B67CD1300BAD059 /* i_tcp.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AED50B67CD1200BAD059 /* i_tcp.c */; }; - 1E44AEE30B67CD2B00BAD059 /* am_map.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AEE10B67CD2B00BAD059 /* am_map.c */; }; - 1E44AEE90B67CD3F00BAD059 /* command.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AEE70B67CD3F00BAD059 /* command.c */; }; - 1E44AEEC0B67CD4400BAD059 /* comptime.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AEEB0B67CD4400BAD059 /* comptime.c */; }; - 1E44AEEF0B67CD5400BAD059 /* console.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AEED0B67CD5400BAD059 /* console.c */; }; - 1E44AEF30B67CD7F00BAD059 /* filesrch.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AEF10B67CD7F00BAD059 /* filesrch.c */; }; - 1E44AF070B67CDE900BAD059 /* m_argv.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AEF80B67CDE900BAD059 /* m_argv.c */; }; - 1E44AF0A0B67CDE900BAD059 /* m_cheat.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AEFB0B67CDE900BAD059 /* m_cheat.c */; }; - 1E44AF0B0B67CDE900BAD059 /* m_bbox.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AEFC0B67CDE900BAD059 /* m_bbox.c */; }; - 1E44AF0D0B67CDE900BAD059 /* m_fixed.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AEFE0B67CDE900BAD059 /* m_fixed.c */; }; - 1E44AF0F0B67CDE900BAD059 /* m_menu.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AF000B67CDE900BAD059 /* m_menu.c */; }; - 1E44AF110B67CDE900BAD059 /* m_misc.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AF020B67CDE900BAD059 /* m_misc.c */; }; - 1E44AF110B67CDE900BAD059 /* apng.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AF020B67CDE900BAD059 /* apng.c */; }; - 1E44AF130B67CDE900BAD059 /* m_random.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AF040B67CDE900BAD059 /* m_random.c */; }; - 1E44AF1A0B67CE2A00BAD059 /* info.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AF180B67CE2A00BAD059 /* info.c */; }; - 1E44AF1E0B67CE3600BAD059 /* md5.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AF1C0B67CE3600BAD059 /* md5.c */; }; - 1E44AF220B67CE4100BAD059 /* mserv.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AF200B67CE4100BAD059 /* mserv.c */; }; - 1E44AF3C0B67CE5F00BAD059 /* p_enemy.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AF240B67CE5F00BAD059 /* p_enemy.c */; }; - 1E44AF3D0B67CE5F00BAD059 /* p_inter.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AF250B67CE5F00BAD059 /* p_inter.c */; }; - 1E44AF3E0B67CE5F00BAD059 /* p_fab.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AF260B67CE5F00BAD059 /* p_fab.c */; }; - 1E44AF3F0B67CE5F00BAD059 /* p_lights.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AF270B67CE5F00BAD059 /* p_lights.c */; }; - 1E44AF400B67CE5F00BAD059 /* p_map.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AF280B67CE5F00BAD059 /* p_map.c */; }; - 1E44AF410B67CE5F00BAD059 /* p_maputl.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AF290B67CE5F00BAD059 /* p_maputl.c */; }; - 1E44AF430B67CE5F00BAD059 /* p_mobj.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AF2B0B67CE5F00BAD059 /* p_mobj.c */; }; - 1E44AF450B67CE5F00BAD059 /* p_floor.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AF2D0B67CE5F00BAD059 /* p_floor.c */; }; - 1E44AF480B67CE5F00BAD059 /* p_saveg.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AF300B67CE5F00BAD059 /* p_saveg.c */; }; - 1E44AF4A0B67CE5F00BAD059 /* p_setup.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AF320B67CE5F00BAD059 /* p_setup.c */; }; - 1E44AF4C0B67CE5F00BAD059 /* p_sight.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AF340B67CE5F00BAD059 /* p_sight.c */; }; - 1E44AF4D0B67CE5F00BAD059 /* p_spec.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AF350B67CE5F00BAD059 /* p_spec.c */; }; - 1E44AF4F0B67CE5F00BAD059 /* p_telept.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AF370B67CE5F00BAD059 /* p_telept.c */; }; - 1E44AF500B67CE5F00BAD059 /* p_tick.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AF380B67CE5F00BAD059 /* p_tick.c */; }; - 1E44AF520B67CE5F00BAD059 /* p_user.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AF3A0B67CE5F00BAD059 /* p_user.c */; }; - 1E44AF530B67CE5F00BAD059 /* p_ceilng.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AF3B0B67CE5F00BAD059 /* p_ceilng.c */; }; - 1E44AF6C0B67CEC200BAD059 /* r_bsp.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AF550B67CEC100BAD059 /* r_bsp.c */; }; - 1E44AF6F0B67CEC200BAD059 /* r_data.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AF580B67CEC100BAD059 /* r_data.c */; }; - 1E44AF700B67CEC200BAD059 /* r_draw.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AF590B67CEC100BAD059 /* r_draw.c */; }; - 1E44AF730B67CEC200BAD059 /* r_main.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AF5C0B67CEC100BAD059 /* r_main.c */; }; - 1E44AF780B67CEC200BAD059 /* r_plane.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AF610B67CEC100BAD059 /* r_plane.c */; }; - 1E44AF7A0B67CEC200BAD059 /* r_segs.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AF630B67CEC100BAD059 /* r_segs.c */; }; - 1E44AF7C0B67CEC200BAD059 /* r_sky.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AF650B67CEC200BAD059 /* r_sky.c */; }; - 1E44AF7E0B67CEC200BAD059 /* r_splats.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AF670B67CEC200BAD059 /* r_splats.c */; }; - 1E44AF810B67CEC200BAD059 /* r_things.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AF6A0B67CEC200BAD059 /* r_things.c */; }; - 1E44AF870B67CEE000BAD059 /* s_sound.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AF850B67CEE000BAD059 /* s_sound.c */; }; - 1E44AF8B0B67CEE900BAD059 /* screen.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AF890B67CEE900BAD059 /* screen.c */; }; - 1E44AF8F0B67CEF000BAD059 /* sounds.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AF8D0B67CEF000BAD059 /* sounds.c */; }; - 1E44AF930B67CEFF00BAD059 /* st_stuff.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AF910B67CEFF00BAD059 /* st_stuff.c */; }; - 1E44AF9B0B67CF2E00BAD059 /* tables.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AF990B67CF2E00BAD059 /* tables.c */; }; - 1E44AFA50B67CF5D00BAD059 /* v_video.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AFA30B67CF5D00BAD059 /* v_video.c */; }; - 1E44AFA90B67CF6400BAD059 /* w_wad.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AFA70B67CF6400BAD059 /* w_wad.c */; }; - 1E44AFAD0B67CF6F00BAD059 /* y_inter.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AFAB0B67CF6F00BAD059 /* y_inter.c */; }; - 1E44AFB10B67CF7A00BAD059 /* z_zone.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AFAF0B67CF7A00BAD059 /* z_zone.c */; }; - 1E44AFC40B67CFDC00BAD059 /* dosstr.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AFB40B67CFDC00BAD059 /* dosstr.c */; }; - 1E44AFC50B67CFDC00BAD059 /* endtxt.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AFB50B67CFDC00BAD059 /* endtxt.c */; }; - 1E44AFC70B67CFDC00BAD059 /* hwsym_sdl.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AFB70B67CFDC00BAD059 /* hwsym_sdl.c */; }; - 1E44AFC90B67CFDC00BAD059 /* i_cdmus.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AFB90B67CFDC00BAD059 /* i_cdmus.c */; }; - 1E44AFCA0B67CFDC00BAD059 /* i_main.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AFBA0B67CFDC00BAD059 /* i_main.c */; }; - 1E44AFCB0B67CFDC00BAD059 /* i_net.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AFBB0B67CFDC00BAD059 /* i_net.c */; }; - 1E44AFCD0B67CFDC00BAD059 /* i_system.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AFBD0B67CFDC00BAD059 /* i_system.c */; }; - 1E44AFCE0B67CFDC00BAD059 /* i_video.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AFBE0B67CFDC00BAD059 /* i_video.c */; }; - 1E44AFD00B67CFDC00BAD059 /* ogl_sdl.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AFC00B67CFDC00BAD059 /* ogl_sdl.c */; }; - 1E44AFEA0B67D06200BAD059 /* Srb2mac.icns in Resources */ = {isa = PBXBuildFile; fileRef = 1E44AFE70B67D06200BAD059 /* Srb2mac.icns */; }; - 1E44AFEB0B67D06200BAD059 /* mac_alert.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AFE80B67D06200BAD059 /* mac_alert.c */; }; - 1E44AFED0B67D0AB00BAD059 /* r_opengl.c in Sources */ = {isa = PBXBuildFile; fileRef = 1E44AFEC0B67D0AB00BAD059 /* r_opengl.c */; }; - 1E44B0590B67D81E00BAD059 /* SDL_macosx_main.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E44B0570B67D81E00BAD059 /* SDL_macosx_main.m */; }; - 1E66921C0B690C5B00B7313A /* SDL_mixer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E66921B0B690C5B00B7313A /* SDL_mixer.framework */; }; - 1E66921D0B690C6B00B7313A /* SDL_mixer.framework in Copy Frameworks into .app bundle */ = {isa = PBXBuildFile; fileRef = 1E66921B0B690C5B00B7313A /* SDL_mixer.framework */; }; - 67259DFD18D2687D00F02971 /* lua_hudlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 67259DFB18D2687D00F02971 /* lua_hudlib.c */; }; - 67259DFE18D2687D00F02971 /* lua_skinlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 67259DFC18D2687D00F02971 /* lua_skinlib.c */; }; - 67259E0118D268AE00F02971 /* m_anigif.c in Sources */ = {isa = PBXBuildFile; fileRef = 67259DFF18D268AE00F02971 /* m_anigif.c */; }; - 67259E0618D268F700F02971 /* i_ttf.c in Sources */ = {isa = PBXBuildFile; fileRef = 67259E0218D268F600F02971 /* i_ttf.c */; }; - 67259E0718D268F700F02971 /* mixer_sound.c in Sources */ = {isa = PBXBuildFile; fileRef = 67259E0418D268F600F02971 /* mixer_sound.c */; }; - 67259E0818D268F700F02971 /* sdl_sound.c in Sources */ = {isa = PBXBuildFile; fileRef = 67259E0518D268F600F02971 /* sdl_sound.c */; }; - 67259E2E18D26D5700F02971 /* patch.dta in Resources */ = {isa = PBXBuildFile; fileRef = 67259E2B18D26D5700F02971 /* patch.dta */; }; - 67259E2F18D26D5700F02971 /* rings.dta in Resources */ = {isa = PBXBuildFile; fileRef = 67259E2C18D26D5700F02971 /* rings.dta */; }; - 67259E3018D26D5700F02971 /* srb2.srb in Resources */ = {isa = PBXBuildFile; fileRef = 67259E2D18D26D5700F02971 /* srb2.srb */; }; - 67259E3218D26DD200F02971 /* music.dta in Resources */ = {isa = PBXBuildFile; fileRef = 1E44AE440B67CBE800BAD059 /* music.dta */; }; - 67259E3318D26DD300F02971 /* player.dta in Resources */ = {isa = PBXBuildFile; fileRef = 67A1F91813FAD026009FA3E5 /* player.dta */; }; - 67259E3518D26DD500F02971 /* zones.dta in Resources */ = {isa = PBXBuildFile; fileRef = 6766C0AE11B057E50065F389 /* zones.dta */; }; - 676BB5200E0DE06100C95963 /* m_queue.c in Sources */ = {isa = PBXBuildFile; fileRef = 676BB51C0E0DE06100C95963 /* m_queue.c */; }; - 676BB5220E0DE06100C95963 /* p_polyobj.c in Sources */ = {isa = PBXBuildFile; fileRef = 676BB51E0E0DE06100C95963 /* p_polyobj.c */; }; - 67B83BFA14F57EAB00AAAE4E /* lapi.c in Sources */ = {isa = PBXBuildFile; fileRef = 67B83BCB14F57EAB00AAAE4E /* lapi.c */; }; - 67B83BFB14F57EAB00AAAE4E /* lauxlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 67B83BCD14F57EAB00AAAE4E /* lauxlib.c */; }; - 67B83BFC14F57EAB00AAAE4E /* lbaselib.c in Sources */ = {isa = PBXBuildFile; fileRef = 67B83BCF14F57EAB00AAAE4E /* lbaselib.c */; }; - 67B83BFD14F57EAB00AAAE4E /* lcode.c in Sources */ = {isa = PBXBuildFile; fileRef = 67B83BD014F57EAB00AAAE4E /* lcode.c */; }; - 67B83BFE14F57EAB00AAAE4E /* ldebug.c in Sources */ = {isa = PBXBuildFile; fileRef = 67B83BD214F57EAB00AAAE4E /* ldebug.c */; }; - 67B83BFF14F57EAB00AAAE4E /* ldo.c in Sources */ = {isa = PBXBuildFile; fileRef = 67B83BD414F57EAB00AAAE4E /* ldo.c */; }; - 67B83C0014F57EAB00AAAE4E /* ldump.c in Sources */ = {isa = PBXBuildFile; fileRef = 67B83BD614F57EAB00AAAE4E /* ldump.c */; }; - 67B83C0114F57EAB00AAAE4E /* lfunc.c in Sources */ = {isa = PBXBuildFile; fileRef = 67B83BD714F57EAB00AAAE4E /* lfunc.c */; }; - 67B83C0214F57EAB00AAAE4E /* lgc.c in Sources */ = {isa = PBXBuildFile; fileRef = 67B83BD914F57EAB00AAAE4E /* lgc.c */; }; - 67B83C0314F57EAB00AAAE4E /* linit.c in Sources */ = {isa = PBXBuildFile; fileRef = 67B83BDB14F57EAB00AAAE4E /* linit.c */; }; - 67B83C0414F57EAB00AAAE4E /* llex.c in Sources */ = {isa = PBXBuildFile; fileRef = 67B83BDC14F57EAB00AAAE4E /* llex.c */; }; - 67B83C0514F57EAB00AAAE4E /* lmem.c in Sources */ = {isa = PBXBuildFile; fileRef = 67B83BDF14F57EAB00AAAE4E /* lmem.c */; }; - 67B83C0614F57EAB00AAAE4E /* lobject.c in Sources */ = {isa = PBXBuildFile; fileRef = 67B83BE114F57EAB00AAAE4E /* lobject.c */; }; - 67B83C0714F57EAB00AAAE4E /* lopcodes.c in Sources */ = {isa = PBXBuildFile; fileRef = 67B83BE314F57EAB00AAAE4E /* lopcodes.c */; }; - 67B83C0814F57EAB00AAAE4E /* lparser.c in Sources */ = {isa = PBXBuildFile; fileRef = 67B83BE514F57EAB00AAAE4E /* lparser.c */; }; - 67B83C0914F57EAB00AAAE4E /* lstate.c in Sources */ = {isa = PBXBuildFile; fileRef = 67B83BE714F57EAB00AAAE4E /* lstate.c */; }; - 67B83C0A14F57EAB00AAAE4E /* lstring.c in Sources */ = {isa = PBXBuildFile; fileRef = 67B83BE914F57EAB00AAAE4E /* lstring.c */; }; - 67B83C0B14F57EAB00AAAE4E /* lstrlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 67B83BEB14F57EAB00AAAE4E /* lstrlib.c */; }; - 67B83C0C14F57EAB00AAAE4E /* ltable.c in Sources */ = {isa = PBXBuildFile; fileRef = 67B83BEC14F57EAB00AAAE4E /* ltable.c */; }; - 67B83C0D14F57EAB00AAAE4E /* ltablib.c in Sources */ = {isa = PBXBuildFile; fileRef = 67B83BEE14F57EAB00AAAE4E /* ltablib.c */; }; - 67B83C0E14F57EAB00AAAE4E /* ltm.c in Sources */ = {isa = PBXBuildFile; fileRef = 67B83BEF14F57EAB00AAAE4E /* ltm.c */; }; - 67B83C0F14F57EAB00AAAE4E /* lundump.c in Sources */ = {isa = PBXBuildFile; fileRef = 67B83BF414F57EAB00AAAE4E /* lundump.c */; }; - 67B83C1014F57EAB00AAAE4E /* lvm.c in Sources */ = {isa = PBXBuildFile; fileRef = 67B83BF614F57EAB00AAAE4E /* lvm.c */; }; - 67B83C1114F57EAB00AAAE4E /* lzio.c in Sources */ = {isa = PBXBuildFile; fileRef = 67B83BF814F57EAB00AAAE4E /* lzio.c */; }; - 67B83C1414F57ECA00AAAE4E /* b_bot.c in Sources */ = {isa = PBXBuildFile; fileRef = 67B83C1214F57ECA00AAAE4E /* b_bot.c */; }; - 67B83C2214F57EE600AAAE4E /* lua_baselib.c in Sources */ = {isa = PBXBuildFile; fileRef = 67B83C1514F57EE600AAAE4E /* lua_baselib.c */; }; - 67B83C2314F57EE600AAAE4E /* lua_consolelib.c in Sources */ = {isa = PBXBuildFile; fileRef = 67B83C1614F57EE600AAAE4E /* lua_consolelib.c */; }; - 67B83C2414F57EE600AAAE4E /* lua_hooklib.c in Sources */ = {isa = PBXBuildFile; fileRef = 67B83C1814F57EE600AAAE4E /* lua_hooklib.c */; }; - 67B83C2514F57EE600AAAE4E /* lua_infolib.c in Sources */ = {isa = PBXBuildFile; fileRef = 67B83C1914F57EE600AAAE4E /* lua_infolib.c */; }; - 67B83C2614F57EE600AAAE4E /* lua_maplib.c in Sources */ = {isa = PBXBuildFile; fileRef = 67B83C1B14F57EE600AAAE4E /* lua_maplib.c */; }; - 67B83C2714F57EE600AAAE4E /* lua_mathlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 67B83C1C14F57EE600AAAE4E /* lua_mathlib.c */; }; - 67B83C2814F57EE600AAAE4E /* lua_mobjlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 67B83C1D14F57EE600AAAE4E /* lua_mobjlib.c */; }; - 67B83C2914F57EE600AAAE4E /* lua_playerlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 67B83C1E14F57EE600AAAE4E /* lua_playerlib.c */; }; - 67B83C2A14F57EE600AAAE4E /* lua_script.c in Sources */ = {isa = PBXBuildFile; fileRef = 67B83C1F14F57EE600AAAE4E /* lua_script.c */; }; - 67B83C2B14F57EE600AAAE4E /* lua_thinkerlib.c in Sources */ = {isa = PBXBuildFile; fileRef = 67B83C2114F57EE600AAAE4E /* lua_thinkerlib.c */; }; - 67B83C3314F57F1500AAAE4E /* m_cond.c in Sources */ = {isa = PBXBuildFile; fileRef = 67B83C2F14F57F1500AAAE4E /* m_cond.c */; }; - 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; - 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 002F39FD09D0883400EBEB88 /* Copy Frameworks into .app bundle */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 12; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - 1E32C42B0B6E6D6E0029E058 /* libpng.framework in Copy Frameworks into .app bundle */, - 1E66921D0B690C6B00B7313A /* SDL_mixer.framework in Copy Frameworks into .app bundle */, - 002F3A0009D0884600EBEB88 /* SDL.framework in Copy Frameworks into .app bundle */, - ); - name = "Copy Frameworks into .app bundle"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 002F39F909D0881F00EBEB88 /* SDL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL.framework; path = /Library/Frameworks/SDL.framework; sourceTree = ""; }; - 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; - 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; - 1E32C4140B6E6D5D0029E058 /* libpng.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = libpng.framework; path = /Library/Frameworks/libpng.framework; sourceTree = ""; }; - 1E44AE440B67CBE800BAD059 /* music.dta */ = {isa = PBXFileReference; lastKnownFileType = text; name = music.dta; path = ../../../bin/Resources/music.dta; sourceTree = SOURCE_ROOT; }; - 1E44AE4B0B67CBE800BAD059 /* srb2.wad */ = {isa = PBXFileReference; lastKnownFileType = text; name = srb2.wad; path = ../../../bin/Resources/srb2.wad; sourceTree = SOURCE_ROOT; }; - 1E44AE600B67CC2B00BAD059 /* hw3dsdrv.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = hw3dsdrv.h; path = ../../hardware/hw3dsdrv.h; sourceTree = SOURCE_ROOT; }; - 1E44AE610B67CC2B00BAD059 /* hw_bsp.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = hw_bsp.c; path = ../../hardware/hw_bsp.c; sourceTree = SOURCE_ROOT; }; - 1E44AE620B67CC2B00BAD059 /* hw_defs.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = hw_defs.h; path = ../../hardware/hw_defs.h; sourceTree = SOURCE_ROOT; }; - 1E44AE630B67CC2B00BAD059 /* hw3sound.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = hw3sound.c; path = ../../hardware/hw3sound.c; sourceTree = SOURCE_ROOT; }; - 1E44AE640B67CC2B00BAD059 /* hw_cache.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = hw_cache.c; path = ../../hardware/hw_cache.c; sourceTree = SOURCE_ROOT; }; - 1E44AE650B67CC2B00BAD059 /* hw_dll.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = hw_dll.h; path = ../../hardware/hw_dll.h; sourceTree = SOURCE_ROOT; }; - 1E44AE660B67CC2B00BAD059 /* hw_drv.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = hw_drv.h; path = ../../hardware/hw_drv.h; sourceTree = SOURCE_ROOT; }; - 1E44AE680B67CC2B00BAD059 /* hw_light.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = hw_light.c; path = ../../hardware/hw_light.c; sourceTree = SOURCE_ROOT; }; - 1E44AE690B67CC2B00BAD059 /* hw_light.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = hw_light.h; path = ../../hardware/hw_light.h; sourceTree = SOURCE_ROOT; }; - 1E44AE6A0B67CC2B00BAD059 /* hw3sound.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = hw3sound.h; path = ../../hardware/hw3sound.h; sourceTree = SOURCE_ROOT; }; - 1E44AE6B0B67CC2B00BAD059 /* hw_data.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = hw_data.h; path = ../../hardware/hw_data.h; sourceTree = SOURCE_ROOT; }; - 1E44AE6C0B67CC2B00BAD059 /* hw_draw.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = hw_draw.c; path = ../../hardware/hw_draw.c; sourceTree = SOURCE_ROOT; }; - 1E44AE6D0B67CC2B00BAD059 /* hw_glob.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = hw_glob.h; path = ../../hardware/hw_glob.h; sourceTree = SOURCE_ROOT; }; - 1E44AE6E0B67CC2B00BAD059 /* hw_main.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = hw_main.c; path = ../../hardware/hw_main.c; sourceTree = SOURCE_ROOT; }; - 1E44AE6F0B67CC2B00BAD059 /* hw_main.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = hw_main.h; path = ../../hardware/hw_main.h; sourceTree = SOURCE_ROOT; }; - 1E44AE700B67CC2B00BAD059 /* hw_md2.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = hw_md2.c; path = ../../hardware/hw_md2.c; sourceTree = SOURCE_ROOT; }; - 1E44AE710B67CC2B00BAD059 /* hw_md2.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = hw_md2.h; path = ../../hardware/hw_md2.h; sourceTree = SOURCE_ROOT; }; - 1E44AE720B67CC2B00BAD059 /* hw_trick.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = hw_trick.c; path = ../../hardware/hw_trick.c; sourceTree = SOURCE_ROOT; }; - 1E44AE730B67CC2B00BAD059 /* hws_data.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = hws_data.h; path = ../../hardware/hws_data.h; sourceTree = SOURCE_ROOT; }; - 1E44AE8A0B67CC6000BAD059 /* asm_defs.inc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.pascal; name = asm_defs.inc; path = ../../asm_defs.inc; sourceTree = SOURCE_ROOT; }; - 1E44AE8D0B67CC8400BAD059 /* d_clisrv.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = d_clisrv.c; path = ../../d_clisrv.c; sourceTree = SOURCE_ROOT; }; - 1E44AE8E0B67CC8400BAD059 /* d_clisrv.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = d_clisrv.h; path = ../../d_clisrv.h; sourceTree = SOURCE_ROOT; }; - 1E44AE8F0B67CC8400BAD059 /* d_event.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = d_event.h; path = ../../d_event.h; sourceTree = SOURCE_ROOT; }; - 1E44AE900B67CC8400BAD059 /* d_main.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = d_main.c; path = ../../d_main.c; sourceTree = SOURCE_ROOT; }; - 1E44AE910B67CC8500BAD059 /* d_net.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = d_net.c; path = ../../d_net.c; sourceTree = SOURCE_ROOT; }; - 1E44AE920B67CC8500BAD059 /* d_net.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = d_net.h; path = ../../d_net.h; sourceTree = SOURCE_ROOT; }; - 1E44AE930B67CC8500BAD059 /* d_netcmd.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = d_netcmd.h; path = ../../d_netcmd.h; sourceTree = SOURCE_ROOT; }; - 1E44AE940B67CC8500BAD059 /* d_netfil.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = d_netfil.c; path = ../../d_netfil.c; sourceTree = SOURCE_ROOT; }; - 1E44AE950B67CC8500BAD059 /* d_player.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = d_player.h; path = ../../d_player.h; sourceTree = SOURCE_ROOT; }; - 1E44AE960B67CC8500BAD059 /* d_think.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = d_think.h; path = ../../d_think.h; sourceTree = SOURCE_ROOT; }; - 1E44AE980B67CC8500BAD059 /* d_netcmd.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = d_netcmd.c; path = ../../d_netcmd.c; sourceTree = SOURCE_ROOT; }; - 1E44AE990B67CC8500BAD059 /* d_ticcmd.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = d_ticcmd.h; path = ../../d_ticcmd.h; sourceTree = SOURCE_ROOT; }; - 1E44AE9A0B67CC8500BAD059 /* d_main.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = d_main.h; path = ../../d_main.h; sourceTree = SOURCE_ROOT; }; - 1E44AE9B0B67CC8500BAD059 /* d_netfil.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = d_netfil.h; path = ../../d_netfil.h; sourceTree = SOURCE_ROOT; }; - 1E44AE9C0B67CC8500BAD059 /* dehacked.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = dehacked.c; path = ../../dehacked.c; sourceTree = SOURCE_ROOT; }; - 1E44AE9D0B67CC8500BAD059 /* dehacked.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = dehacked.h; path = ../../dehacked.h; sourceTree = SOURCE_ROOT; }; - 1E44AE9E0B67CC8500BAD059 /* doomdata.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = doomdata.h; path = ../../doomdata.h; sourceTree = SOURCE_ROOT; }; - 1E44AE9F0B67CC8500BAD059 /* doomdef.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = doomdef.h; path = ../../doomdef.h; sourceTree = SOURCE_ROOT; }; - 1E44AEA00B67CC8500BAD059 /* doomstat.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = doomstat.h; path = ../../doomstat.h; sourceTree = SOURCE_ROOT; }; - 1E44AEA10B67CC8500BAD059 /* doomtype.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = doomtype.h; path = ../../doomtype.h; sourceTree = SOURCE_ROOT; }; - 1E44AEBC0B67CCA900BAD059 /* f_wipe.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = f_wipe.c; path = ../../f_wipe.c; sourceTree = SOURCE_ROOT; }; - 1E44AEBD0B67CCA900BAD059 /* f_finale.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = f_finale.c; path = ../../f_finale.c; sourceTree = SOURCE_ROOT; }; - 1E44AEBE0B67CCA900BAD059 /* f_finale.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = f_finale.h; path = ../../f_finale.h; sourceTree = SOURCE_ROOT; }; - 1E44AEC30B67CCC600BAD059 /* g_game.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = g_game.c; path = ../../g_game.c; sourceTree = SOURCE_ROOT; }; - 1E44AEC40B67CCC600BAD059 /* g_game.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = g_game.h; path = ../../g_game.h; sourceTree = SOURCE_ROOT; }; - 1E44AEC50B67CCC600BAD059 /* g_input.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = g_input.h; path = ../../g_input.h; sourceTree = SOURCE_ROOT; }; - 1E44AEC60B67CCC600BAD059 /* g_state.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = g_state.h; path = ../../g_state.h; sourceTree = SOURCE_ROOT; }; - 1E44AEC70B67CCC600BAD059 /* g_input.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = g_input.c; path = ../../g_input.c; sourceTree = SOURCE_ROOT; }; - 1E44AECE0B67CCEE00BAD059 /* hu_stuff.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = hu_stuff.c; path = ../../hu_stuff.c; sourceTree = SOURCE_ROOT; }; - 1E44AECF0B67CCEE00BAD059 /* hu_stuff.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = hu_stuff.h; path = ../../hu_stuff.h; sourceTree = SOURCE_ROOT; }; - 1E44AED30B67CD1200BAD059 /* i_net.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = i_net.h; path = ../../i_net.h; sourceTree = SOURCE_ROOT; }; - 1E44AED40B67CD1200BAD059 /* i_sound.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = i_sound.h; path = ../../i_sound.h; sourceTree = SOURCE_ROOT; }; - 1E44AED50B67CD1200BAD059 /* i_tcp.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = i_tcp.c; path = ../../i_tcp.c; sourceTree = SOURCE_ROOT; }; - 1E44AED60B67CD1200BAD059 /* i_tcp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = i_tcp.h; path = ../../i_tcp.h; sourceTree = SOURCE_ROOT; }; - 1E44AED70B67CD1200BAD059 /* i_system.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = i_system.h; path = ../../i_system.h; sourceTree = SOURCE_ROOT; }; - 1E44AED80B67CD1200BAD059 /* i_video.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = i_video.h; path = ../../i_video.h; sourceTree = SOURCE_ROOT; }; - 1E44AED90B67CD1300BAD059 /* i_joy.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = i_joy.h; path = ../../i_joy.h; sourceTree = SOURCE_ROOT; }; - 1E44AEE10B67CD2B00BAD059 /* am_map.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = am_map.c; path = ../../am_map.c; sourceTree = SOURCE_ROOT; }; - 1E44AEE20B67CD2B00BAD059 /* am_map.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = am_map.h; path = ../../am_map.h; sourceTree = SOURCE_ROOT; }; - 1E44AEE50B67CD3200BAD059 /* byteptr.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = byteptr.h; path = ../../byteptr.h; sourceTree = SOURCE_ROOT; }; - 1E44AEE70B67CD3F00BAD059 /* command.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = command.c; path = ../../command.c; sourceTree = SOURCE_ROOT; }; - 1E44AEE80B67CD3F00BAD059 /* command.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = command.h; path = ../../command.h; sourceTree = SOURCE_ROOT; }; - 1E44AEEB0B67CD4400BAD059 /* comptime.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = comptime.c; path = ../../comptime.c; sourceTree = SOURCE_ROOT; }; - 1E44AEED0B67CD5400BAD059 /* console.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = console.c; path = ../../console.c; sourceTree = SOURCE_ROOT; }; - 1E44AEEE0B67CD5400BAD059 /* console.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = console.h; path = ../../console.h; sourceTree = SOURCE_ROOT; }; - 1E44AEF10B67CD7F00BAD059 /* filesrch.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = filesrch.c; path = ../../filesrch.c; sourceTree = SOURCE_ROOT; }; - 1E44AEF20B67CD7F00BAD059 /* filesrch.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = filesrch.h; path = ../../filesrch.h; sourceTree = SOURCE_ROOT; }; - 1E44AEF50B67CD9F00BAD059 /* keys.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = keys.h; path = ../../keys.h; sourceTree = SOURCE_ROOT; }; - 1E44AEF80B67CDE900BAD059 /* m_argv.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = m_argv.c; path = ../../m_argv.c; sourceTree = SOURCE_ROOT; }; - 1E44AEF90B67CDE900BAD059 /* m_bbox.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = m_bbox.h; path = ../../m_bbox.h; sourceTree = SOURCE_ROOT; }; - 1E44AEFA0B67CDE900BAD059 /* m_argv.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = m_argv.h; path = ../../m_argv.h; sourceTree = SOURCE_ROOT; }; - 1E44AEFB0B67CDE900BAD059 /* m_cheat.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = m_cheat.c; path = ../../m_cheat.c; sourceTree = SOURCE_ROOT; }; - 1E44AEFC0B67CDE900BAD059 /* m_bbox.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = m_bbox.c; path = ../../m_bbox.c; sourceTree = SOURCE_ROOT; }; - 1E44AEFD0B67CDE900BAD059 /* m_cheat.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = m_cheat.h; path = ../../m_cheat.h; sourceTree = SOURCE_ROOT; }; - 1E44AEFE0B67CDE900BAD059 /* m_fixed.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = m_fixed.c; path = ../../m_fixed.c; sourceTree = SOURCE_ROOT; }; - 1E44AEFF0B67CDE900BAD059 /* m_fixed.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = m_fixed.h; path = ../../m_fixed.h; sourceTree = SOURCE_ROOT; }; - 1E44AF000B67CDE900BAD059 /* m_menu.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = m_menu.c; path = ../../m_menu.c; sourceTree = SOURCE_ROOT; }; - 1E44AF010B67CDE900BAD059 /* m_menu.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = m_menu.h; path = ../../m_menu.h; sourceTree = SOURCE_ROOT; }; - 1E44AF020B67CDE900BAD059 /* m_misc.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = m_misc.c; path = ../../m_misc.c; sourceTree = SOURCE_ROOT; }; - 1E44AF030B67CDE900BAD059 /* m_misc.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = m_misc.h; path = ../../m_misc.h; sourceTree = SOURCE_ROOT; }; - 1E44AF020B67CDE900BAD059 /* apng.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = apng.c; path = ../../m_misc.c; sourceTree = SOURCE_ROOT; }; - 1E44AF030B67CDE900BAD059 /* apng.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = apng.h; path = ../../m_misc.h; sourceTree = SOURCE_ROOT; }; - 1E44AF040B67CDE900BAD059 /* m_random.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = m_random.c; path = ../../m_random.c; sourceTree = SOURCE_ROOT; }; - 1E44AF050B67CDE900BAD059 /* m_random.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = m_random.h; path = ../../m_random.h; sourceTree = SOURCE_ROOT; }; - 1E44AF060B67CDE900BAD059 /* m_swap.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = m_swap.h; path = ../../m_swap.h; sourceTree = SOURCE_ROOT; }; - 1E44AF180B67CE2A00BAD059 /* info.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = info.c; path = ../../info.c; sourceTree = SOURCE_ROOT; }; - 1E44AF190B67CE2A00BAD059 /* info.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = info.h; path = ../../info.h; sourceTree = SOURCE_ROOT; }; - 1E44AF1C0B67CE3600BAD059 /* md5.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = md5.c; path = ../../md5.c; sourceTree = SOURCE_ROOT; }; - 1E44AF1D0B67CE3600BAD059 /* md5.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = md5.h; path = ../../md5.h; sourceTree = SOURCE_ROOT; }; - 1E44AF200B67CE4100BAD059 /* mserv.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = mserv.c; path = ../../mserv.c; sourceTree = SOURCE_ROOT; }; - 1E44AF210B67CE4100BAD059 /* mserv.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = mserv.h; path = ../../mserv.h; sourceTree = SOURCE_ROOT; }; - 1E44AF240B67CE5F00BAD059 /* p_enemy.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = p_enemy.c; path = ../../p_enemy.c; sourceTree = SOURCE_ROOT; }; - 1E44AF250B67CE5F00BAD059 /* p_inter.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = p_inter.c; path = ../../p_inter.c; sourceTree = SOURCE_ROOT; }; - 1E44AF260B67CE5F00BAD059 /* p_fab.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = p_fab.c; path = ../../p_fab.c; sourceTree = SOURCE_ROOT; }; - 1E44AF270B67CE5F00BAD059 /* p_lights.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = p_lights.c; path = ../../p_lights.c; sourceTree = SOURCE_ROOT; }; - 1E44AF280B67CE5F00BAD059 /* p_map.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = p_map.c; path = ../../p_map.c; sourceTree = SOURCE_ROOT; }; - 1E44AF290B67CE5F00BAD059 /* p_maputl.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = p_maputl.c; path = ../../p_maputl.c; sourceTree = SOURCE_ROOT; }; - 1E44AF2A0B67CE5F00BAD059 /* p_maputl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = p_maputl.h; path = ../../p_maputl.h; sourceTree = SOURCE_ROOT; }; - 1E44AF2B0B67CE5F00BAD059 /* p_mobj.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = p_mobj.c; path = ../../p_mobj.c; sourceTree = SOURCE_ROOT; }; - 1E44AF2C0B67CE5F00BAD059 /* p_mobj.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = p_mobj.h; path = ../../p_mobj.h; sourceTree = SOURCE_ROOT; }; - 1E44AF2D0B67CE5F00BAD059 /* p_floor.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = p_floor.c; path = ../../p_floor.c; sourceTree = SOURCE_ROOT; }; - 1E44AF2E0B67CE5F00BAD059 /* p_local.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = p_local.h; path = ../../p_local.h; sourceTree = SOURCE_ROOT; }; - 1E44AF2F0B67CE5F00BAD059 /* p_pspr.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = p_pspr.h; path = ../../p_pspr.h; sourceTree = SOURCE_ROOT; }; - 1E44AF300B67CE5F00BAD059 /* p_saveg.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = p_saveg.c; path = ../../p_saveg.c; sourceTree = SOURCE_ROOT; }; - 1E44AF310B67CE5F00BAD059 /* p_saveg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = p_saveg.h; path = ../../p_saveg.h; sourceTree = SOURCE_ROOT; }; - 1E44AF320B67CE5F00BAD059 /* p_setup.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = p_setup.c; path = ../../p_setup.c; sourceTree = SOURCE_ROOT; }; - 1E44AF330B67CE5F00BAD059 /* p_setup.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = p_setup.h; path = ../../p_setup.h; sourceTree = SOURCE_ROOT; }; - 1E44AF340B67CE5F00BAD059 /* p_sight.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = p_sight.c; path = ../../p_sight.c; sourceTree = SOURCE_ROOT; }; - 1E44AF350B67CE5F00BAD059 /* p_spec.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = p_spec.c; path = ../../p_spec.c; sourceTree = SOURCE_ROOT; }; - 1E44AF360B67CE5F00BAD059 /* p_spec.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = p_spec.h; path = ../../p_spec.h; sourceTree = SOURCE_ROOT; }; - 1E44AF370B67CE5F00BAD059 /* p_telept.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = p_telept.c; path = ../../p_telept.c; sourceTree = SOURCE_ROOT; }; - 1E44AF380B67CE5F00BAD059 /* p_tick.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = p_tick.c; path = ../../p_tick.c; sourceTree = SOURCE_ROOT; }; - 1E44AF390B67CE5F00BAD059 /* p_tick.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = p_tick.h; path = ../../p_tick.h; sourceTree = SOURCE_ROOT; }; - 1E44AF3A0B67CE5F00BAD059 /* p_user.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = p_user.c; path = ../../p_user.c; sourceTree = SOURCE_ROOT; }; - 1E44AF3B0B67CE5F00BAD059 /* p_ceilng.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = p_ceilng.c; path = ../../p_ceilng.c; sourceTree = SOURCE_ROOT; }; - 1E44AF550B67CEC100BAD059 /* r_bsp.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = r_bsp.c; path = ../../r_bsp.c; sourceTree = SOURCE_ROOT; }; - 1E44AF560B67CEC100BAD059 /* r_bsp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = r_bsp.h; path = ../../r_bsp.h; sourceTree = SOURCE_ROOT; }; - 1E44AF570B67CEC100BAD059 /* r_defs.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = r_defs.h; path = ../../r_defs.h; sourceTree = SOURCE_ROOT; }; - 1E44AF580B67CEC100BAD059 /* r_data.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = r_data.c; path = ../../r_data.c; sourceTree = SOURCE_ROOT; }; - 1E44AF590B67CEC100BAD059 /* r_draw.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = r_draw.c; path = ../../r_draw.c; sourceTree = SOURCE_ROOT; }; - 1E44AF5A0B67CEC100BAD059 /* r_draw16.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = r_draw16.c; path = ../../r_draw16.c; sourceTree = SOURCE_ROOT; }; - 1E44AF5B0B67CEC100BAD059 /* r_draw8.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = r_draw8.c; path = ../../r_draw8.c; sourceTree = SOURCE_ROOT; }; - 1E44AF5C0B67CEC100BAD059 /* r_main.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = r_main.c; path = ../../r_main.c; sourceTree = SOURCE_ROOT; }; - 1E44AF5D0B67CEC100BAD059 /* r_main.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = r_main.h; path = ../../r_main.h; sourceTree = SOURCE_ROOT; }; - 1E44AF5E0B67CEC100BAD059 /* r_data.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = r_data.h; path = ../../r_data.h; sourceTree = SOURCE_ROOT; }; - 1E44AF5F0B67CEC100BAD059 /* r_draw.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = r_draw.h; path = ../../r_draw.h; sourceTree = SOURCE_ROOT; }; - 1E44AF600B67CEC100BAD059 /* r_local.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = r_local.h; path = ../../r_local.h; sourceTree = SOURCE_ROOT; }; - 1E44AF610B67CEC100BAD059 /* r_plane.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = r_plane.c; path = ../../r_plane.c; sourceTree = SOURCE_ROOT; }; - 1E44AF620B67CEC100BAD059 /* r_plane.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = r_plane.h; path = ../../r_plane.h; sourceTree = SOURCE_ROOT; }; - 1E44AF630B67CEC100BAD059 /* r_segs.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = r_segs.c; path = ../../r_segs.c; sourceTree = SOURCE_ROOT; }; - 1E44AF640B67CEC100BAD059 /* r_segs.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = r_segs.h; path = ../../r_segs.h; sourceTree = SOURCE_ROOT; }; - 1E44AF650B67CEC200BAD059 /* r_sky.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = r_sky.c; path = ../../r_sky.c; sourceTree = SOURCE_ROOT; }; - 1E44AF660B67CEC200BAD059 /* r_sky.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = r_sky.h; path = ../../r_sky.h; sourceTree = SOURCE_ROOT; }; - 1E44AF670B67CEC200BAD059 /* r_splats.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = r_splats.c; path = ../../r_splats.c; sourceTree = SOURCE_ROOT; }; - 1E44AF680B67CEC200BAD059 /* r_splats.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = r_splats.h; path = ../../r_splats.h; sourceTree = SOURCE_ROOT; }; - 1E44AF690B67CEC200BAD059 /* r_state.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = r_state.h; path = ../../r_state.h; sourceTree = SOURCE_ROOT; }; - 1E44AF6A0B67CEC200BAD059 /* r_things.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = r_things.c; path = ../../r_things.c; sourceTree = SOURCE_ROOT; }; - 1E44AF6B0B67CEC200BAD059 /* r_things.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = r_things.h; path = ../../r_things.h; sourceTree = SOURCE_ROOT; }; - 1E44AF850B67CEE000BAD059 /* s_sound.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = s_sound.c; path = ../../s_sound.c; sourceTree = SOURCE_ROOT; }; - 1E44AF860B67CEE000BAD059 /* s_sound.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = s_sound.h; path = ../../s_sound.h; sourceTree = SOURCE_ROOT; }; - 1E44AF890B67CEE900BAD059 /* screen.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = screen.c; path = ../../screen.c; sourceTree = SOURCE_ROOT; }; - 1E44AF8A0B67CEE900BAD059 /* screen.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = screen.h; path = ../../screen.h; sourceTree = SOURCE_ROOT; }; - 1E44AF8D0B67CEF000BAD059 /* sounds.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = sounds.c; path = ../../sounds.c; sourceTree = SOURCE_ROOT; }; - 1E44AF8E0B67CEF000BAD059 /* sounds.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sounds.h; path = ../../sounds.h; sourceTree = SOURCE_ROOT; }; - 1E44AF910B67CEFF00BAD059 /* st_stuff.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = st_stuff.c; path = ../../st_stuff.c; sourceTree = SOURCE_ROOT; }; - 1E44AF920B67CEFF00BAD059 /* st_stuff.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = st_stuff.h; path = ../../st_stuff.h; sourceTree = SOURCE_ROOT; }; - 1E44AF950B67CF1300BAD059 /* string.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = string.c; path = ../../string.c; sourceTree = SOURCE_ROOT; }; - 1E44AF990B67CF2E00BAD059 /* tables.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = tables.c; path = ../../tables.c; sourceTree = SOURCE_ROOT; }; - 1E44AF9A0B67CF2E00BAD059 /* tables.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = tables.h; path = ../../tables.h; sourceTree = SOURCE_ROOT; }; - 1E44AF9D0B67CF3D00BAD059 /* tmap.nas */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = tmap.nas; path = ../../tmap.nas; sourceTree = SOURCE_ROOT; }; - 1E44AF9F0B67CF4900BAD059 /* tmap_mmx.nas */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = tmap_mmx.nas; path = ../../tmap_mmx.nas; sourceTree = SOURCE_ROOT; }; - 1E44AFA00B67CF4900BAD059 /* tmap_vc.nas */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = tmap_vc.nas; path = ../../tmap_vc.nas; sourceTree = SOURCE_ROOT; }; - 1E44AFA30B67CF5D00BAD059 /* v_video.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = v_video.c; path = ../../v_video.c; sourceTree = SOURCE_ROOT; }; - 1E44AFA40B67CF5D00BAD059 /* v_video.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = v_video.h; path = ../../v_video.h; sourceTree = SOURCE_ROOT; }; - 1E44AFA70B67CF6400BAD059 /* w_wad.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = w_wad.c; path = ../../w_wad.c; sourceTree = SOURCE_ROOT; }; - 1E44AFA80B67CF6400BAD059 /* w_wad.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = w_wad.h; path = ../../w_wad.h; sourceTree = SOURCE_ROOT; }; - 1E44AFAB0B67CF6F00BAD059 /* y_inter.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = y_inter.c; path = ../../y_inter.c; sourceTree = SOURCE_ROOT; }; - 1E44AFAC0B67CF6F00BAD059 /* y_inter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = y_inter.h; path = ../../y_inter.h; sourceTree = SOURCE_ROOT; }; - 1E44AFAF0B67CF7A00BAD059 /* z_zone.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = z_zone.c; path = ../../z_zone.c; sourceTree = SOURCE_ROOT; }; - 1E44AFB00B67CF7A00BAD059 /* z_zone.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = z_zone.h; path = ../../z_zone.h; sourceTree = SOURCE_ROOT; }; - 1E44AFB40B67CFDC00BAD059 /* dosstr.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = dosstr.c; path = ../dosstr.c; sourceTree = SOURCE_ROOT; }; - 1E44AFB50B67CFDC00BAD059 /* endtxt.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = endtxt.c; path = ../endtxt.c; sourceTree = SOURCE_ROOT; }; - 1E44AFB60B67CFDC00BAD059 /* endtxt.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = endtxt.h; path = ../endtxt.h; sourceTree = SOURCE_ROOT; }; - 1E44AFB70B67CFDC00BAD059 /* hwsym_sdl.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = hwsym_sdl.c; path = ../hwsym_sdl.c; sourceTree = SOURCE_ROOT; }; - 1E44AFB80B67CFDC00BAD059 /* hwsym_sdl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = hwsym_sdl.h; path = ../hwsym_sdl.h; sourceTree = SOURCE_ROOT; }; - 1E44AFB90B67CFDC00BAD059 /* i_cdmus.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = i_cdmus.c; path = ../i_cdmus.c; sourceTree = SOURCE_ROOT; }; - 1E44AFBA0B67CFDC00BAD059 /* i_main.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = i_main.c; path = ../i_main.c; sourceTree = SOURCE_ROOT; }; - 1E44AFBB0B67CFDC00BAD059 /* i_net.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = i_net.c; path = ../i_net.c; sourceTree = SOURCE_ROOT; }; - 1E44AFBD0B67CFDC00BAD059 /* i_system.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = i_system.c; path = ../i_system.c; sourceTree = SOURCE_ROOT; }; - 1E44AFBE0B67CFDC00BAD059 /* i_video.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = i_video.c; path = ../i_video.c; sourceTree = SOURCE_ROOT; }; - 1E44AFBF0B67CFDC00BAD059 /* IMG_xpm.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = IMG_xpm.c; path = ../IMG_xpm.c; sourceTree = SOURCE_ROOT; }; - 1E44AFC00B67CFDC00BAD059 /* ogl_sdl.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = ogl_sdl.c; path = ../ogl_sdl.c; sourceTree = SOURCE_ROOT; }; - 1E44AFC10B67CFDC00BAD059 /* ogl_sdl.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ogl_sdl.h; path = ../ogl_sdl.h; sourceTree = SOURCE_ROOT; }; - 1E44AFC20B67CFDC00BAD059 /* SDL_icon.xpm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; name = SDL_icon.xpm; path = ../SDL_icon.xpm; sourceTree = SOURCE_ROOT; }; - 1E44AFC30B67CFDC00BAD059 /* sdlmain.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = sdlmain.h; path = ../sdlmain.h; sourceTree = SOURCE_ROOT; }; - 1E44AFD50B67D03100BAD059 /* filters.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = filters.c; path = ../filter/filters.c; sourceTree = SOURCE_ROOT; }; - 1E44AFD60B67D03100BAD059 /* filters.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = filters.h; path = ../filter/filters.h; sourceTree = SOURCE_ROOT; }; - 1E44AFD70B67D03100BAD059 /* hq2x.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = hq2x.c; path = ../filter/hq2x.c; sourceTree = SOURCE_ROOT; }; - 1E44AFD80B67D03100BAD059 /* hq2x.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = hq2x.h; path = ../filter/hq2x.h; sourceTree = SOURCE_ROOT; }; - 1E44AFD90B67D03100BAD059 /* interp.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = interp.h; path = ../filter/interp.h; sourceTree = SOURCE_ROOT; }; - 1E44AFDA0B67D03100BAD059 /* lq2x.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = lq2x.c; path = ../filter/lq2x.c; sourceTree = SOURCE_ROOT; }; - 1E44AFDB0B67D03100BAD059 /* lq2x.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = lq2x.h; path = ../filter/lq2x.h; sourceTree = SOURCE_ROOT; }; - 1E44AFDC0B67D03100BAD059 /* main.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = main.c; path = ../filter/main.c; sourceTree = SOURCE_ROOT; }; - 1E44AFE60B67D06200BAD059 /* mac_alert.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = mac_alert.h; sourceTree = SOURCE_ROOT; }; - 1E44AFE70B67D06200BAD059 /* Srb2mac.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = Srb2mac.icns; sourceTree = SOURCE_ROOT; }; - 1E44AFE80B67D06200BAD059 /* mac_alert.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = mac_alert.c; sourceTree = SOURCE_ROOT; }; - 1E44AFEC0B67D0AB00BAD059 /* r_opengl.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = r_opengl.c; path = ../../hardware/r_opengl/r_opengl.c; sourceTree = SOURCE_ROOT; }; - 1E44B0560B67D81E00BAD059 /* SDL_macosx_main.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = SDL_macosx_main.h; path = ../SDL_main/SDL_macosx_main.h; sourceTree = SOURCE_ROOT; }; - 1E44B0570B67D81E00BAD059 /* SDL_macosx_main.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = SDL_macosx_main.m; path = ../SDL_main/SDL_macosx_main.m; sourceTree = SOURCE_ROOT; }; - 1E44B2240B67EADE00BAD059 /* lzf.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = lzf.c; path = ../../lzf.c; sourceTree = SOURCE_ROOT; }; - 1E44B2250B67EADE00BAD059 /* lzf.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = lzf.h; path = ../../lzf.h; sourceTree = SOURCE_ROOT; }; - 1E66921B0B690C5B00B7313A /* SDL_mixer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SDL_mixer.framework; path = /Library/Frameworks/SDL_mixer.framework; sourceTree = ""; }; - 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; - 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; - 67259DFA18D2687D00F02971 /* lua_hud.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = lua_hud.h; path = ../../lua_hud.h; sourceTree = SOURCE_ROOT; }; - 67259DFB18D2687D00F02971 /* lua_hudlib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = lua_hudlib.c; path = ../../lua_hudlib.c; sourceTree = SOURCE_ROOT; }; - 67259DFC18D2687D00F02971 /* lua_skinlib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = lua_skinlib.c; path = ../../lua_skinlib.c; sourceTree = SOURCE_ROOT; }; - 67259DFF18D268AE00F02971 /* m_anigif.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = m_anigif.c; path = ../../m_anigif.c; sourceTree = SOURCE_ROOT; }; - 67259E0018D268AE00F02971 /* m_anigif.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = m_anigif.h; path = ../../m_anigif.h; sourceTree = SOURCE_ROOT; }; - 67259E0218D268F600F02971 /* i_ttf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = i_ttf.c; path = ../i_ttf.c; sourceTree = SOURCE_ROOT; }; - 67259E0318D268F600F02971 /* i_ttf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = i_ttf.h; path = ../i_ttf.h; sourceTree = SOURCE_ROOT; }; - 67259E0418D268F600F02971 /* mixer_sound.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mixer_sound.c; path = ../mixer_sound.c; sourceTree = SOURCE_ROOT; }; - 67259E0518D268F600F02971 /* sdl_sound.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sdl_sound.c; path = ../sdl_sound.c; sourceTree = SOURCE_ROOT; }; - 67259E2B18D26D5700F02971 /* patch.dta */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = patch.dta; path = ../../../bin/Resources/patch.dta; sourceTree = SOURCE_ROOT; }; - 67259E2C18D26D5700F02971 /* rings.dta */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = rings.dta; path = ../../../bin/Resources/rings.dta; sourceTree = SOURCE_ROOT; }; - 67259E2D18D26D5700F02971 /* srb2.srb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = srb2.srb; path = ../../../bin/Resources/srb2.srb; sourceTree = SOURCE_ROOT; }; - 6766C0AE11B057E50065F389 /* zones.dta */ = {isa = PBXFileReference; lastKnownFileType = text; name = zones.dta; path = ../../../bin/Resources/zones.dta; sourceTree = SOURCE_ROOT; }; - 676BB51C0E0DE06100C95963 /* m_queue.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = m_queue.c; path = ../../m_queue.c; sourceTree = SOURCE_ROOT; }; - 676BB51D0E0DE06100C95963 /* m_queue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = m_queue.h; path = ../../m_queue.h; sourceTree = SOURCE_ROOT; }; - 676BB51E0E0DE06100C95963 /* p_polyobj.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = p_polyobj.c; path = ../../p_polyobj.c; sourceTree = SOURCE_ROOT; }; - 676BB51F0E0DE06100C95963 /* p_polyobj.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = p_polyobj.h; path = ../../p_polyobj.h; sourceTree = SOURCE_ROOT; }; - 67A1F91813FAD026009FA3E5 /* player.dta */ = {isa = PBXFileReference; lastKnownFileType = text; name = player.dta; path = ../../../bin/Resources/player.dta; sourceTree = SOURCE_ROOT; }; - 67B2071C1180FA8200E93654 /* vid_copy.s */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; name = vid_copy.s; path = ../../vid_copy.s; sourceTree = SOURCE_ROOT; }; - 67B83BCB14F57EAB00AAAE4E /* lapi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = lapi.c; path = ../../blua/lapi.c; sourceTree = SOURCE_ROOT; }; - 67B83BCC14F57EAB00AAAE4E /* lapi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = lapi.h; path = ../../blua/lapi.h; sourceTree = SOURCE_ROOT; }; - 67B83BCD14F57EAB00AAAE4E /* lauxlib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = lauxlib.c; path = ../../blua/lauxlib.c; sourceTree = SOURCE_ROOT; }; - 67B83BCE14F57EAB00AAAE4E /* lauxlib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = lauxlib.h; path = ../../blua/lauxlib.h; sourceTree = SOURCE_ROOT; }; - 67B83BCF14F57EAB00AAAE4E /* lbaselib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = lbaselib.c; path = ../../blua/lbaselib.c; sourceTree = SOURCE_ROOT; }; - 67B83BD014F57EAB00AAAE4E /* lcode.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = lcode.c; path = ../../blua/lcode.c; sourceTree = SOURCE_ROOT; }; - 67B83BD114F57EAB00AAAE4E /* lcode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = lcode.h; path = ../../blua/lcode.h; sourceTree = SOURCE_ROOT; }; - 67B83BD214F57EAB00AAAE4E /* ldebug.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ldebug.c; path = ../../blua/ldebug.c; sourceTree = SOURCE_ROOT; }; - 67B83BD314F57EAB00AAAE4E /* ldebug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ldebug.h; path = ../../blua/ldebug.h; sourceTree = SOURCE_ROOT; }; - 67B83BD414F57EAB00AAAE4E /* ldo.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ldo.c; path = ../../blua/ldo.c; sourceTree = SOURCE_ROOT; }; - 67B83BD514F57EAB00AAAE4E /* ldo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ldo.h; path = ../../blua/ldo.h; sourceTree = SOURCE_ROOT; }; - 67B83BD614F57EAB00AAAE4E /* ldump.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ldump.c; path = ../../blua/ldump.c; sourceTree = SOURCE_ROOT; }; - 67B83BD714F57EAB00AAAE4E /* lfunc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = lfunc.c; path = ../../blua/lfunc.c; sourceTree = SOURCE_ROOT; }; - 67B83BD814F57EAB00AAAE4E /* lfunc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = lfunc.h; path = ../../blua/lfunc.h; sourceTree = SOURCE_ROOT; }; - 67B83BD914F57EAB00AAAE4E /* lgc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = lgc.c; path = ../../blua/lgc.c; sourceTree = SOURCE_ROOT; }; - 67B83BDA14F57EAB00AAAE4E /* lgc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = lgc.h; path = ../../blua/lgc.h; sourceTree = SOURCE_ROOT; }; - 67B83BDB14F57EAB00AAAE4E /* linit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = linit.c; path = ../../blua/linit.c; sourceTree = SOURCE_ROOT; }; - 67B83BDC14F57EAB00AAAE4E /* llex.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = llex.c; path = ../../blua/llex.c; sourceTree = SOURCE_ROOT; }; - 67B83BDD14F57EAB00AAAE4E /* llex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = llex.h; path = ../../blua/llex.h; sourceTree = SOURCE_ROOT; }; - 67B83BDE14F57EAB00AAAE4E /* llimits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = llimits.h; path = ../../blua/llimits.h; sourceTree = SOURCE_ROOT; }; - 67B83BDF14F57EAB00AAAE4E /* lmem.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = lmem.c; path = ../../blua/lmem.c; sourceTree = SOURCE_ROOT; }; - 67B83BE014F57EAB00AAAE4E /* lmem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = lmem.h; path = ../../blua/lmem.h; sourceTree = SOURCE_ROOT; }; - 67B83BE114F57EAB00AAAE4E /* lobject.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = lobject.c; path = ../../blua/lobject.c; sourceTree = SOURCE_ROOT; }; - 67B83BE214F57EAB00AAAE4E /* lobject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = lobject.h; path = ../../blua/lobject.h; sourceTree = SOURCE_ROOT; }; - 67B83BE314F57EAB00AAAE4E /* lopcodes.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = lopcodes.c; path = ../../blua/lopcodes.c; sourceTree = SOURCE_ROOT; }; - 67B83BE414F57EAB00AAAE4E /* lopcodes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = lopcodes.h; path = ../../blua/lopcodes.h; sourceTree = SOURCE_ROOT; }; - 67B83BE514F57EAB00AAAE4E /* lparser.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = lparser.c; path = ../../blua/lparser.c; sourceTree = SOURCE_ROOT; }; - 67B83BE614F57EAB00AAAE4E /* lparser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = lparser.h; path = ../../blua/lparser.h; sourceTree = SOURCE_ROOT; }; - 67B83BE714F57EAB00AAAE4E /* lstate.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = lstate.c; path = ../../blua/lstate.c; sourceTree = SOURCE_ROOT; }; - 67B83BE814F57EAB00AAAE4E /* lstate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = lstate.h; path = ../../blua/lstate.h; sourceTree = SOURCE_ROOT; }; - 67B83BE914F57EAB00AAAE4E /* lstring.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = lstring.c; path = ../../blua/lstring.c; sourceTree = SOURCE_ROOT; }; - 67B83BEA14F57EAB00AAAE4E /* lstring.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = lstring.h; path = ../../blua/lstring.h; sourceTree = SOURCE_ROOT; }; - 67B83BEB14F57EAB00AAAE4E /* lstrlib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = lstrlib.c; path = ../../blua/lstrlib.c; sourceTree = SOURCE_ROOT; }; - 67B83BEC14F57EAB00AAAE4E /* ltable.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ltable.c; path = ../../blua/ltable.c; sourceTree = SOURCE_ROOT; }; - 67B83BED14F57EAB00AAAE4E /* ltable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ltable.h; path = ../../blua/ltable.h; sourceTree = SOURCE_ROOT; }; - 67B83BEE14F57EAB00AAAE4E /* ltablib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ltablib.c; path = ../../blua/ltablib.c; sourceTree = SOURCE_ROOT; }; - 67B83BEF14F57EAB00AAAE4E /* ltm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ltm.c; path = ../../blua/ltm.c; sourceTree = SOURCE_ROOT; }; - 67B83BF014F57EAB00AAAE4E /* ltm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ltm.h; path = ../../blua/ltm.h; sourceTree = SOURCE_ROOT; }; - 67B83BF114F57EAB00AAAE4E /* lua.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = lua.h; path = ../../blua/lua.h; sourceTree = SOURCE_ROOT; }; - 67B83BF214F57EAB00AAAE4E /* luaconf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = luaconf.h; path = ../../blua/luaconf.h; sourceTree = SOURCE_ROOT; }; - 67B83BF314F57EAB00AAAE4E /* lualib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = lualib.h; path = ../../blua/lualib.h; sourceTree = SOURCE_ROOT; }; - 67B83BF414F57EAB00AAAE4E /* lundump.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = lundump.c; path = ../../blua/lundump.c; sourceTree = SOURCE_ROOT; }; - 67B83BF514F57EAB00AAAE4E /* lundump.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = lundump.h; path = ../../blua/lundump.h; sourceTree = SOURCE_ROOT; }; - 67B83BF614F57EAB00AAAE4E /* lvm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = lvm.c; path = ../../blua/lvm.c; sourceTree = SOURCE_ROOT; }; - 67B83BF714F57EAB00AAAE4E /* lvm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = lvm.h; path = ../../blua/lvm.h; sourceTree = SOURCE_ROOT; }; - 67B83BF814F57EAB00AAAE4E /* lzio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = lzio.c; path = ../../blua/lzio.c; sourceTree = SOURCE_ROOT; }; - 67B83BF914F57EAB00AAAE4E /* lzio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = lzio.h; path = ../../blua/lzio.h; sourceTree = SOURCE_ROOT; }; - 67B83C1214F57ECA00AAAE4E /* b_bot.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = b_bot.c; path = ../../b_bot.c; sourceTree = SOURCE_ROOT; }; - 67B83C1314F57ECA00AAAE4E /* b_bot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = b_bot.h; path = ../../b_bot.h; sourceTree = SOURCE_ROOT; }; - 67B83C1514F57EE600AAAE4E /* lua_baselib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = lua_baselib.c; path = ../../lua_baselib.c; sourceTree = SOURCE_ROOT; }; - 67B83C1614F57EE600AAAE4E /* lua_consolelib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = lua_consolelib.c; path = ../../lua_consolelib.c; sourceTree = SOURCE_ROOT; }; - 67B83C1714F57EE600AAAE4E /* lua_hook.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = lua_hook.h; path = ../../lua_hook.h; sourceTree = SOURCE_ROOT; }; - 67B83C1814F57EE600AAAE4E /* lua_hooklib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = lua_hooklib.c; path = ../../lua_hooklib.c; sourceTree = SOURCE_ROOT; }; - 67B83C1914F57EE600AAAE4E /* lua_infolib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = lua_infolib.c; path = ../../lua_infolib.c; sourceTree = SOURCE_ROOT; }; - 67B83C1A14F57EE600AAAE4E /* lua_libs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = lua_libs.h; path = ../../lua_libs.h; sourceTree = SOURCE_ROOT; }; - 67B83C1B14F57EE600AAAE4E /* lua_maplib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = lua_maplib.c; path = ../../lua_maplib.c; sourceTree = SOURCE_ROOT; }; - 67B83C1C14F57EE600AAAE4E /* lua_mathlib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = lua_mathlib.c; path = ../../lua_mathlib.c; sourceTree = SOURCE_ROOT; }; - 67B83C1D14F57EE600AAAE4E /* lua_mobjlib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = lua_mobjlib.c; path = ../../lua_mobjlib.c; sourceTree = SOURCE_ROOT; }; - 67B83C1E14F57EE600AAAE4E /* lua_playerlib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = lua_playerlib.c; path = ../../lua_playerlib.c; sourceTree = SOURCE_ROOT; }; - 67B83C1F14F57EE600AAAE4E /* lua_script.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = lua_script.c; path = ../../lua_script.c; sourceTree = SOURCE_ROOT; }; - 67B83C2014F57EE600AAAE4E /* lua_script.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = lua_script.h; path = ../../lua_script.h; sourceTree = SOURCE_ROOT; }; - 67B83C2114F57EE600AAAE4E /* lua_thinkerlib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = lua_thinkerlib.c; path = ../../lua_thinkerlib.c; sourceTree = SOURCE_ROOT; }; - 67B83C2C14F57F1500AAAE4E /* fastcmp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = fastcmp.h; path = ../../fastcmp.h; sourceTree = SOURCE_ROOT; }; - 67B83C2D14F57F1500AAAE4E /* i_addrinfo.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = i_addrinfo.c; path = ../../i_addrinfo.c; sourceTree = SOURCE_ROOT; }; - 67B83C2E14F57F1500AAAE4E /* i_addrinfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = i_addrinfo.h; path = ../../i_addrinfo.h; sourceTree = SOURCE_ROOT; }; - 67B83C2F14F57F1500AAAE4E /* m_cond.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = m_cond.c; path = ../../m_cond.c; sourceTree = SOURCE_ROOT; }; - 67B83C3014F57F1500AAAE4E /* m_cond.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = m_cond.h; path = ../../m_cond.h; sourceTree = SOURCE_ROOT; }; - 67B83C3114F57F1500AAAE4E /* m_dllist.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = m_dllist.h; path = ../../m_dllist.h; sourceTree = SOURCE_ROOT; }; - 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; - 8D1107320486CEB800E47090 /* Srb2mac.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Srb2mac.app; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 8D11072E0486CEB800E47090 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 002F39FA09D0881F00EBEB88 /* SDL.framework in Frameworks */, - 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, - 1E66921C0B690C5B00B7313A /* SDL_mixer.framework in Frameworks */, - 1E32C4290B6E6D5D0029E058 /* libpng.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 080E96DDFE201D6D7F000001 /* Classes */ = { - isa = PBXGroup; - children = ( - 1E44AE890B67CC4E00BAD059 /* A_Asm */, - 67B83BCA14F57DD400AAAE4E /* B_Bot */, - 67B83BC914F57D7F00AAAE4E /* BLUA */, - 1E44AE8C0B67CC6500BAD059 /* D_Doom */, - 1E44AEBB0B67CC9800BAD059 /* F_Frame */, - 1E44AEC20B67CCB500BAD059 /* G_Game */, - 1E44AECD0B67CCD200BAD059 /* H_Hud */, - 1E44AE5C0B67CC0F00BAD059 /* Hw_Hardware */, - 1E44AED20B67CCF600BAD059 /* I_Interface */, - 67B83BC814F57D6E00AAAE4E /* LUA */, - 1E44AEF70B67CDA900BAD059 /* M_Misc */, - 1E44AF160B67CDFB00BAD059 /* P_Play */, - 1E44AF540B67CE8C00BAD059 /* R_Render */, - 1E44AF830B67CEC900BAD059 /* S_Sound */, - 1E44AF170B67CE1000BAD059 /* W_Wad */, - ); - name = Classes; - sourceTree = ""; - }; - 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { - isa = PBXGroup; - children = ( - 1E32C4140B6E6D5D0029E058 /* libpng.framework */, - 1E66921B0B690C5B00B7313A /* SDL_mixer.framework */, - 002F39F909D0881F00EBEB88 /* SDL.framework */, - 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, - ); - name = "Linked Frameworks"; - sourceTree = ""; - }; - 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { - isa = PBXGroup; - children = ( - 29B97324FDCFA39411CA2CEA /* AppKit.framework */, - 29B97325FDCFA39411CA2CEA /* Foundation.framework */, - ); - name = "Other Frameworks"; - sourceTree = ""; - }; - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 8D1107320486CEB800E47090 /* Srb2mac.app */, - ); - name = Products; - sourceTree = ""; - }; - 1E44AE5C0B67CC0F00BAD059 /* Hw_Hardware */ = { - isa = PBXGroup; - children = ( - 1E44AE600B67CC2B00BAD059 /* hw3dsdrv.h */, - 1E44AE610B67CC2B00BAD059 /* hw_bsp.c */, - 1E44AE620B67CC2B00BAD059 /* hw_defs.h */, - 1E44AE630B67CC2B00BAD059 /* hw3sound.c */, - 1E44AE640B67CC2B00BAD059 /* hw_cache.c */, - 1E44AE650B67CC2B00BAD059 /* hw_dll.h */, - 1E44AE660B67CC2B00BAD059 /* hw_drv.h */, - 1E44AE680B67CC2B00BAD059 /* hw_light.c */, - 1E44AE690B67CC2B00BAD059 /* hw_light.h */, - 1E44AE6A0B67CC2B00BAD059 /* hw3sound.h */, - 1E44AE6B0B67CC2B00BAD059 /* hw_data.h */, - 1E44AE6C0B67CC2B00BAD059 /* hw_draw.c */, - 1E44AE6D0B67CC2B00BAD059 /* hw_glob.h */, - 1E44AE6E0B67CC2B00BAD059 /* hw_main.c */, - 1E44AE6F0B67CC2B00BAD059 /* hw_main.h */, - 1E44AE700B67CC2B00BAD059 /* hw_md2.c */, - 1E44AE710B67CC2B00BAD059 /* hw_md2.h */, - 1E44AE720B67CC2B00BAD059 /* hw_trick.c */, - 1E44AE730B67CC2B00BAD059 /* hws_data.h */, - ); - name = Hw_Hardware; - sourceTree = ""; - }; - 1E44AE890B67CC4E00BAD059 /* A_Asm */ = { - isa = PBXGroup; - children = ( - 67B2071C1180FA8200E93654 /* vid_copy.s */, - 1E44AE8A0B67CC6000BAD059 /* asm_defs.inc */, - 1E44AF9D0B67CF3D00BAD059 /* tmap.nas */, - 1E44AF9F0B67CF4900BAD059 /* tmap_mmx.nas */, - 1E44AFA00B67CF4900BAD059 /* tmap_vc.nas */, - ); - name = A_Asm; - sourceTree = ""; - }; - 1E44AE8C0B67CC6500BAD059 /* D_Doom */ = { - isa = PBXGroup; - children = ( - 1E44AEEB0B67CD4400BAD059 /* comptime.c */, - 1E44AE8D0B67CC8400BAD059 /* d_clisrv.c */, - 1E44AE8E0B67CC8400BAD059 /* d_clisrv.h */, - 1E44AE8F0B67CC8400BAD059 /* d_event.h */, - 1E44AE900B67CC8400BAD059 /* d_main.c */, - 1E44AE910B67CC8500BAD059 /* d_net.c */, - 1E44AE920B67CC8500BAD059 /* d_net.h */, - 1E44AE930B67CC8500BAD059 /* d_netcmd.h */, - 1E44AE940B67CC8500BAD059 /* d_netfil.c */, - 1E44AE950B67CC8500BAD059 /* d_player.h */, - 1E44AE960B67CC8500BAD059 /* d_think.h */, - 1E44AE980B67CC8500BAD059 /* d_netcmd.c */, - 1E44AE990B67CC8500BAD059 /* d_ticcmd.h */, - 1E44AE9A0B67CC8500BAD059 /* d_main.h */, - 1E44AE9B0B67CC8500BAD059 /* d_netfil.h */, - 1E44AE9C0B67CC8500BAD059 /* dehacked.c */, - 1E44AE9D0B67CC8500BAD059 /* dehacked.h */, - 1E44AE9E0B67CC8500BAD059 /* doomdata.h */, - 1E44AE9F0B67CC8500BAD059 /* doomdef.h */, - 1E44AEA00B67CC8500BAD059 /* doomstat.h */, - 1E44AEA10B67CC8500BAD059 /* doomtype.h */, - 1E44AFAF0B67CF7A00BAD059 /* z_zone.c */, - 1E44AFB00B67CF7A00BAD059 /* z_zone.h */, - ); - name = D_Doom; - sourceTree = ""; - }; - 1E44AEBB0B67CC9800BAD059 /* F_Frame */ = { - isa = PBXGroup; - children = ( - 1E44AEBC0B67CCA900BAD059 /* f_wipe.c */, - 1E44AEBD0B67CCA900BAD059 /* f_finale.c */, - 1E44AEBE0B67CCA900BAD059 /* f_finale.h */, - 1E44AFAB0B67CF6F00BAD059 /* y_inter.c */, - 1E44AFAC0B67CF6F00BAD059 /* y_inter.h */, - ); - name = F_Frame; - sourceTree = ""; - }; - 1E44AEC20B67CCB500BAD059 /* G_Game */ = { - isa = PBXGroup; - children = ( - 1E44AEC30B67CCC600BAD059 /* g_game.c */, - 1E44AEC40B67CCC600BAD059 /* g_game.h */, - 1E44AEC50B67CCC600BAD059 /* g_input.h */, - 1E44AEC60B67CCC600BAD059 /* g_state.h */, - 1E44AEC70B67CCC600BAD059 /* g_input.c */, - ); - name = G_Game; - sourceTree = ""; - }; - 1E44AECD0B67CCD200BAD059 /* H_Hud */ = { - isa = PBXGroup; - children = ( - 1E44AEE10B67CD2B00BAD059 /* am_map.c */, - 1E44AEE20B67CD2B00BAD059 /* am_map.h */, - 1E44AEE70B67CD3F00BAD059 /* command.c */, - 1E44AEE80B67CD3F00BAD059 /* command.h */, - 1E44AEED0B67CD5400BAD059 /* console.c */, - 1E44AEEE0B67CD5400BAD059 /* console.h */, - 1E44AECE0B67CCEE00BAD059 /* hu_stuff.c */, - 1E44AECF0B67CCEE00BAD059 /* hu_stuff.h */, - 1E44AF000B67CDE900BAD059 /* m_menu.c */, - 1E44AF010B67CDE900BAD059 /* m_menu.h */, - 1E44AF910B67CEFF00BAD059 /* st_stuff.c */, - 1E44AF920B67CEFF00BAD059 /* st_stuff.h */, - ); - name = H_Hud; - sourceTree = ""; - }; - 1E44AED20B67CCF600BAD059 /* I_Interface */ = { - isa = PBXGroup; - children = ( - 67259E0218D268F600F02971 /* i_ttf.c */, - 67259E0318D268F600F02971 /* i_ttf.h */, - 67259E0418D268F600F02971 /* mixer_sound.c */, - 67259E0518D268F600F02971 /* sdl_sound.c */, - 1E44AFB30B67CF8500BAD059 /* SDL */, - 67B83C2D14F57F1500AAAE4E /* i_addrinfo.c */, - 67B83C2E14F57F1500AAAE4E /* i_addrinfo.h */, - 1E44AEE50B67CD3200BAD059 /* byteptr.h */, - 1E44AEF10B67CD7F00BAD059 /* filesrch.c */, - 1E44AEF20B67CD7F00BAD059 /* filesrch.h */, - 1E44AED30B67CD1200BAD059 /* i_net.h */, - 1E44AED40B67CD1200BAD059 /* i_sound.h */, - 1E44AED50B67CD1200BAD059 /* i_tcp.c */, - 1E44AED60B67CD1200BAD059 /* i_tcp.h */, - 1E44AED70B67CD1200BAD059 /* i_system.h */, - 1E44AED80B67CD1200BAD059 /* i_video.h */, - 1E44AED90B67CD1300BAD059 /* i_joy.h */, - 1E44AEF50B67CD9F00BAD059 /* keys.h */, - 1E44AF200B67CE4100BAD059 /* mserv.c */, - 1E44AF210B67CE4100BAD059 /* mserv.h */, - ); - name = I_Interface; - sourceTree = ""; - }; - 1E44AEF70B67CDA900BAD059 /* M_Misc */ = { - isa = PBXGroup; - children = ( - 67259DFF18D268AE00F02971 /* m_anigif.c */, - 67259E0018D268AE00F02971 /* m_anigif.h */, - 1E44AEF80B67CDE900BAD059 /* m_argv.c */, - 1E44AEFA0B67CDE900BAD059 /* m_argv.h */, - 1E44AEFC0B67CDE900BAD059 /* m_bbox.c */, - 1E44AEF90B67CDE900BAD059 /* m_bbox.h */, - 1E44AEFB0B67CDE900BAD059 /* m_cheat.c */, - 1E44AEFD0B67CDE900BAD059 /* m_cheat.h */, - 67B83C2F14F57F1500AAAE4E /* m_cond.c */, - 67B83C3014F57F1500AAAE4E /* m_cond.h */, - 67B83C3114F57F1500AAAE4E /* m_dllist.h */, - 1E44AEFE0B67CDE900BAD059 /* m_fixed.c */, - 1E44AEFF0B67CDE900BAD059 /* m_fixed.h */, - 1E44AF020B67CDE900BAD059 /* m_misc.c */, - 1E44AF030B67CDE900BAD059 /* m_misc.h */, - 1E44AF020B67CDE900BAD059 /* apng.c */, - 1E44AF030B67CDE900BAD059 /* apng.h */, - 676BB51C0E0DE06100C95963 /* m_queue.c */, - 676BB51D0E0DE06100C95963 /* m_queue.h */, - 1E44AF040B67CDE900BAD059 /* m_random.c */, - 1E44AF050B67CDE900BAD059 /* m_random.h */, - 1E44AF060B67CDE900BAD059 /* m_swap.h */, - 1E44AF950B67CF1300BAD059 /* string.c */, - ); - name = M_Misc; - sourceTree = ""; - }; - 1E44AF160B67CDFB00BAD059 /* P_Play */ = { - isa = PBXGroup; - children = ( - 1E44AF180B67CE2A00BAD059 /* info.c */, - 1E44AF190B67CE2A00BAD059 /* info.h */, - 1E44AF3B0B67CE5F00BAD059 /* p_ceilng.c */, - 1E44AF240B67CE5F00BAD059 /* p_enemy.c */, - 1E44AF250B67CE5F00BAD059 /* p_inter.c */, - 1E44AF260B67CE5F00BAD059 /* p_fab.c */, - 1E44AF270B67CE5F00BAD059 /* p_lights.c */, - 1E44AF280B67CE5F00BAD059 /* p_map.c */, - 1E44AF290B67CE5F00BAD059 /* p_maputl.c */, - 1E44AF2A0B67CE5F00BAD059 /* p_maputl.h */, - 1E44AF2B0B67CE5F00BAD059 /* p_mobj.c */, - 1E44AF2C0B67CE5F00BAD059 /* p_mobj.h */, - 1E44AF2D0B67CE5F00BAD059 /* p_floor.c */, - 1E44AF2E0B67CE5F00BAD059 /* p_local.h */, - 676BB51E0E0DE06100C95963 /* p_polyobj.c */, - 676BB51F0E0DE06100C95963 /* p_polyobj.h */, - 1E44AF2F0B67CE5F00BAD059 /* p_pspr.h */, - 1E44AF300B67CE5F00BAD059 /* p_saveg.c */, - 1E44AF310B67CE5F00BAD059 /* p_saveg.h */, - 1E44AF320B67CE5F00BAD059 /* p_setup.c */, - 1E44AF330B67CE5F00BAD059 /* p_setup.h */, - 1E44AF340B67CE5F00BAD059 /* p_sight.c */, - 1E44AF350B67CE5F00BAD059 /* p_spec.c */, - 1E44AF360B67CE5F00BAD059 /* p_spec.h */, - 1E44AF370B67CE5F00BAD059 /* p_telept.c */, - 1E44AF380B67CE5F00BAD059 /* p_tick.c */, - 1E44AF390B67CE5F00BAD059 /* p_tick.h */, - 1E44AF3A0B67CE5F00BAD059 /* p_user.c */, - 1E44AF990B67CF2E00BAD059 /* tables.c */, - 1E44AF9A0B67CF2E00BAD059 /* tables.h */, - ); - name = P_Play; - sourceTree = ""; - }; - 1E44AF170B67CE1000BAD059 /* W_Wad */ = { - isa = PBXGroup; - children = ( - 1E44B2240B67EADE00BAD059 /* lzf.c */, - 1E44B2250B67EADE00BAD059 /* lzf.h */, - 1E44AF1C0B67CE3600BAD059 /* md5.c */, - 1E44AF1D0B67CE3600BAD059 /* md5.h */, - 1E44AFA70B67CF6400BAD059 /* w_wad.c */, - 1E44AFA80B67CF6400BAD059 /* w_wad.h */, - ); - name = W_Wad; - sourceTree = ""; - }; - 1E44AF540B67CE8C00BAD059 /* R_Render */ = { - isa = PBXGroup; - children = ( - 1E44AF550B67CEC100BAD059 /* r_bsp.c */, - 1E44AF560B67CEC100BAD059 /* r_bsp.h */, - 1E44AF570B67CEC100BAD059 /* r_defs.h */, - 1E44AF580B67CEC100BAD059 /* r_data.c */, - 1E44AF590B67CEC100BAD059 /* r_draw.c */, - 1E44AF5A0B67CEC100BAD059 /* r_draw16.c */, - 1E44AF5B0B67CEC100BAD059 /* r_draw8.c */, - 1E44AF5C0B67CEC100BAD059 /* r_main.c */, - 1E44AF5D0B67CEC100BAD059 /* r_main.h */, - 1E44AF5E0B67CEC100BAD059 /* r_data.h */, - 1E44AF5F0B67CEC100BAD059 /* r_draw.h */, - 1E44AF600B67CEC100BAD059 /* r_local.h */, - 1E44AF610B67CEC100BAD059 /* r_plane.c */, - 1E44AF620B67CEC100BAD059 /* r_plane.h */, - 1E44AF630B67CEC100BAD059 /* r_segs.c */, - 1E44AF640B67CEC100BAD059 /* r_segs.h */, - 1E44AF650B67CEC200BAD059 /* r_sky.c */, - 1E44AF660B67CEC200BAD059 /* r_sky.h */, - 1E44AF670B67CEC200BAD059 /* r_splats.c */, - 1E44AF680B67CEC200BAD059 /* r_splats.h */, - 1E44AF690B67CEC200BAD059 /* r_state.h */, - 1E44AF6A0B67CEC200BAD059 /* r_things.c */, - 1E44AF6B0B67CEC200BAD059 /* r_things.h */, - 1E44AF890B67CEE900BAD059 /* screen.c */, - 1E44AF8A0B67CEE900BAD059 /* screen.h */, - 1E44AFA30B67CF5D00BAD059 /* v_video.c */, - 1E44AFA40B67CF5D00BAD059 /* v_video.h */, - ); - name = R_Render; - sourceTree = ""; - }; - 1E44AF830B67CEC900BAD059 /* S_Sound */ = { - isa = PBXGroup; - children = ( - 1E44AF850B67CEE000BAD059 /* s_sound.c */, - 1E44AF860B67CEE000BAD059 /* s_sound.h */, - 1E44AF8D0B67CEF000BAD059 /* sounds.c */, - 1E44AF8E0B67CEF000BAD059 /* sounds.h */, - ); - name = S_Sound; - sourceTree = ""; - }; - 1E44AFB30B67CF8500BAD059 /* SDL */ = { - isa = PBXGroup; - children = ( - 1E44AFE50B67D04900BAD059 /* macosx */, - 1E44AFD40B67D03100BAD059 /* filter */, - 1E44AFB40B67CFDC00BAD059 /* dosstr.c */, - 1E44AFB50B67CFDC00BAD059 /* endtxt.c */, - 1E44AFB60B67CFDC00BAD059 /* endtxt.h */, - 1E44AFB70B67CFDC00BAD059 /* hwsym_sdl.c */, - 1E44AFB80B67CFDC00BAD059 /* hwsym_sdl.h */, - 1E44AFB90B67CFDC00BAD059 /* i_cdmus.c */, - 1E44AFBA0B67CFDC00BAD059 /* i_main.c */, - 1E44AFBB0B67CFDC00BAD059 /* i_net.c */, - 1E44AFBD0B67CFDC00BAD059 /* i_system.c */, - 1E44AFBE0B67CFDC00BAD059 /* i_video.c */, - 1E44AFBF0B67CFDC00BAD059 /* IMG_xpm.c */, - 1E44AFEC0B67D0AB00BAD059 /* r_opengl.c */, - 1E44AFC00B67CFDC00BAD059 /* ogl_sdl.c */, - 1E44AFC10B67CFDC00BAD059 /* ogl_sdl.h */, - 1E44AFC20B67CFDC00BAD059 /* SDL_icon.xpm */, - 1E44AFC30B67CFDC00BAD059 /* sdlmain.h */, - ); - name = SDL; - sourceTree = ""; - }; - 1E44AFD40B67D03100BAD059 /* filter */ = { - isa = PBXGroup; - children = ( - 1E44AFD50B67D03100BAD059 /* filters.c */, - 1E44AFD60B67D03100BAD059 /* filters.h */, - 1E44AFD70B67D03100BAD059 /* hq2x.c */, - 1E44AFD80B67D03100BAD059 /* hq2x.h */, - 1E44AFD90B67D03100BAD059 /* interp.h */, - 1E44AFDA0B67D03100BAD059 /* lq2x.c */, - 1E44AFDB0B67D03100BAD059 /* lq2x.h */, - 1E44AFDC0B67D03100BAD059 /* main.c */, - ); - name = filter; - path = ../filter; - sourceTree = SOURCE_ROOT; - }; - 1E44AFE50B67D04900BAD059 /* macosx */ = { - isa = PBXGroup; - children = ( - 1E44AFE60B67D06200BAD059 /* mac_alert.h */, - 1E44AFE70B67D06200BAD059 /* Srb2mac.icns */, - 1E44AFE80B67D06200BAD059 /* mac_alert.c */, - 1E44B0560B67D81E00BAD059 /* SDL_macosx_main.h */, - 1E44B0570B67D81E00BAD059 /* SDL_macosx_main.m */, - ); - name = macosx; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* Srb2mac */ = { - isa = PBXGroup; - children = ( - 080E96DDFE201D6D7F000001 /* Classes */, - 29B97315FDCFA39411CA2CEA /* Other Sources */, - 29B97317FDCFA39411CA2CEA /* Resources */, - 29B97323FDCFA39411CA2CEA /* Frameworks */, - 19C28FACFE9D520D11CA2CBB /* Products */, - ); - name = Srb2mac; - sourceTree = ""; - }; - 29B97315FDCFA39411CA2CEA /* Other Sources */ = { - isa = PBXGroup; - children = ( - ); - name = "Other Sources"; - sourceTree = ""; - }; - 29B97317FDCFA39411CA2CEA /* Resources */ = { - isa = PBXGroup; - children = ( - 67259E2B18D26D5700F02971 /* patch.dta */, - 67259E2C18D26D5700F02971 /* rings.dta */, - 67259E2D18D26D5700F02971 /* srb2.srb */, - 67A1F91813FAD026009FA3E5 /* player.dta */, - 6766C0AE11B057E50065F389 /* zones.dta */, - 1E44AE440B67CBE800BAD059 /* music.dta */, - 1E44AE4B0B67CBE800BAD059 /* srb2.wad */, - 8D1107310486CEB800E47090 /* Info.plist */, - 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */, - ); - name = Resources; - sourceTree = ""; - }; - 29B97323FDCFA39411CA2CEA /* Frameworks */ = { - isa = PBXGroup; - children = ( - 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, - 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, - ); - name = Frameworks; - sourceTree = ""; - }; - 67B83BC814F57D6E00AAAE4E /* LUA */ = { - isa = PBXGroup; - children = ( - 67259DFA18D2687D00F02971 /* lua_hud.h */, - 67259DFB18D2687D00F02971 /* lua_hudlib.c */, - 67259DFC18D2687D00F02971 /* lua_skinlib.c */, - 67B83C2C14F57F1500AAAE4E /* fastcmp.h */, - 67B83C1514F57EE600AAAE4E /* lua_baselib.c */, - 67B83C1614F57EE600AAAE4E /* lua_consolelib.c */, - 67B83C1714F57EE600AAAE4E /* lua_hook.h */, - 67B83C1814F57EE600AAAE4E /* lua_hooklib.c */, - 67B83C1914F57EE600AAAE4E /* lua_infolib.c */, - 67B83C1A14F57EE600AAAE4E /* lua_libs.h */, - 67B83C1B14F57EE600AAAE4E /* lua_maplib.c */, - 67B83C1C14F57EE600AAAE4E /* lua_mathlib.c */, - 67B83C1D14F57EE600AAAE4E /* lua_mobjlib.c */, - 67B83C1E14F57EE600AAAE4E /* lua_playerlib.c */, - 67B83C1F14F57EE600AAAE4E /* lua_script.c */, - 67B83C2014F57EE600AAAE4E /* lua_script.h */, - 67B83C2114F57EE600AAAE4E /* lua_thinkerlib.c */, - ); - name = LUA; - sourceTree = ""; - }; - 67B83BC914F57D7F00AAAE4E /* BLUA */ = { - isa = PBXGroup; - children = ( - 67B83BCB14F57EAB00AAAE4E /* lapi.c */, - 67B83BCC14F57EAB00AAAE4E /* lapi.h */, - 67B83BCD14F57EAB00AAAE4E /* lauxlib.c */, - 67B83BCE14F57EAB00AAAE4E /* lauxlib.h */, - 67B83BCF14F57EAB00AAAE4E /* lbaselib.c */, - 67B83BD014F57EAB00AAAE4E /* lcode.c */, - 67B83BD114F57EAB00AAAE4E /* lcode.h */, - 67B83BD214F57EAB00AAAE4E /* ldebug.c */, - 67B83BD314F57EAB00AAAE4E /* ldebug.h */, - 67B83BD414F57EAB00AAAE4E /* ldo.c */, - 67B83BD514F57EAB00AAAE4E /* ldo.h */, - 67B83BD614F57EAB00AAAE4E /* ldump.c */, - 67B83BD714F57EAB00AAAE4E /* lfunc.c */, - 67B83BD814F57EAB00AAAE4E /* lfunc.h */, - 67B83BD914F57EAB00AAAE4E /* lgc.c */, - 67B83BDA14F57EAB00AAAE4E /* lgc.h */, - 67B83BDB14F57EAB00AAAE4E /* linit.c */, - 67B83BDC14F57EAB00AAAE4E /* llex.c */, - 67B83BDD14F57EAB00AAAE4E /* llex.h */, - 67B83BDE14F57EAB00AAAE4E /* llimits.h */, - 67B83BDF14F57EAB00AAAE4E /* lmem.c */, - 67B83BE014F57EAB00AAAE4E /* lmem.h */, - 67B83BE114F57EAB00AAAE4E /* lobject.c */, - 67B83BE214F57EAB00AAAE4E /* lobject.h */, - 67B83BE314F57EAB00AAAE4E /* lopcodes.c */, - 67B83BE414F57EAB00AAAE4E /* lopcodes.h */, - 67B83BE514F57EAB00AAAE4E /* lparser.c */, - 67B83BE614F57EAB00AAAE4E /* lparser.h */, - 67B83BE714F57EAB00AAAE4E /* lstate.c */, - 67B83BE814F57EAB00AAAE4E /* lstate.h */, - 67B83BE914F57EAB00AAAE4E /* lstring.c */, - 67B83BEA14F57EAB00AAAE4E /* lstring.h */, - 67B83BEB14F57EAB00AAAE4E /* lstrlib.c */, - 67B83BEC14F57EAB00AAAE4E /* ltable.c */, - 67B83BED14F57EAB00AAAE4E /* ltable.h */, - 67B83BEE14F57EAB00AAAE4E /* ltablib.c */, - 67B83BEF14F57EAB00AAAE4E /* ltm.c */, - 67B83BF014F57EAB00AAAE4E /* ltm.h */, - 67B83BF114F57EAB00AAAE4E /* lua.h */, - 67B83BF214F57EAB00AAAE4E /* luaconf.h */, - 67B83BF314F57EAB00AAAE4E /* lualib.h */, - 67B83BF414F57EAB00AAAE4E /* lundump.c */, - 67B83BF514F57EAB00AAAE4E /* lundump.h */, - 67B83BF614F57EAB00AAAE4E /* lvm.c */, - 67B83BF714F57EAB00AAAE4E /* lvm.h */, - 67B83BF814F57EAB00AAAE4E /* lzio.c */, - 67B83BF914F57EAB00AAAE4E /* lzio.h */, - ); - name = BLUA; - sourceTree = ""; - }; - 67B83BCA14F57DD400AAAE4E /* B_Bot */ = { - isa = PBXGroup; - children = ( - 67B83C1214F57ECA00AAAE4E /* b_bot.c */, - 67B83C1314F57ECA00AAAE4E /* b_bot.h */, - ); - name = B_Bot; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 8D1107260486CEB800E47090 /* Srb2mac */ = { - isa = PBXNativeTarget; - buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "Srb2mac" */; - buildPhases = ( - 8D1107290486CEB800E47090 /* Resources */, - 677E4CB30E1765500034519D /* Get SCM Info */, - 8D11072C0486CEB800E47090 /* Sources */, - 8D11072E0486CEB800E47090 /* Frameworks */, - 002F39FD09D0883400EBEB88 /* Copy Frameworks into .app bundle */, - 679B708A102B872300AA9E4C /* Make DMG */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Srb2mac; - productInstallPath = "$(HOME)/Applications"; - productName = Srb2mac; - productReference = 8D1107320486CEB800E47090 /* Srb2mac.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Srb2mac" */; - compatibilityVersion = "Xcode 2.4"; - hasScannedForEncodings = 1; - mainGroup = 29B97314FDCFA39411CA2CEA /* Srb2mac */; - projectDirPath = ""; - projectRoot = ../../..; - targets = ( - 8D1107260486CEB800E47090 /* Srb2mac */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 8D1107290486CEB800E47090 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */, - 1E44AFEA0B67D06200BAD059 /* Srb2mac.icns in Resources */, - 67259E2E18D26D5700F02971 /* patch.dta in Resources */, - 67259E2F18D26D5700F02971 /* rings.dta in Resources */, - 67259E3018D26D5700F02971 /* srb2.srb in Resources */, - 67259E3218D26DD200F02971 /* music.dta in Resources */, - 67259E3318D26DD300F02971 /* player.dta in Resources */, - 67259E3518D26DD500F02971 /* zones.dta in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 677E4CB30E1765500034519D /* Get SCM Info */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - comments = "update the time and date stamps in src/comptime.c"; - files = ( - ); - inputPaths = ( - ); - name = "Get SCM Info"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "PATH=\"/usr/local/bin:$PATH\" $SRCROOT/../../../comptime.sh $SRCROOT/../../"; - }; - 679B708A102B872300AA9E4C /* Make DMG */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - comments = "make DMG file for Release builds"; - files = ( - ); - inputPaths = ( - $BUILT_PRODUCTS_DIR/$WRAPPER_NAME, - ); - name = "Make DMG"; - outputPaths = ( - $BUILT_PRODUCTS_DIR/$TARGET_NAME.nodata.dmg, - $BUILT_PRODUCTS_DIR/$TARGET_NAME.dmg, - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "set -ex\n\n[ \"$ACTION\" = build ] || exit 0\n[ \"$CURRENT_VARIANT\" = \"normal\" ] || exit 0\n[ \"$BUILD_STYLE\" = \"Release\" ] || exit 0\n\ndir=\"$TEMP_FILES_DIR/$TARGET_NAME.disk\"\ndmg=\"$BUILT_PRODUCTS_DIR/$TARGET_NAME.dmg\"\ndmg_nodata=\"$BUILT_PRODUCTS_DIR/$TARGET_NAME.nodata.dmg\"\n\nrm -rf -- \"$dir\"\nmkdir \"$dir\"\ncp -R \"$BUILT_PRODUCTS_DIR/$WRAPPER_NAME\" \"$dir\"\nrm -f -- \"$dmg\"\nhdiutil create -ov -fs HFS+ -srcfolder \"$dir\" -volname \"$TARGET_NAME\" \"$dmg\"\nhdiutil internet-enable -yes \"$dmg\"\ncd \"$dir/$WRAPPER_NAME/Contents/Resources\"\nrm -f -- *.wad\nrm -f -- *.dta\nrm -f -- *.plr\nrm -f -- *.wpn\nrm -f -- *.srb2\ncd \"$OLDPWD\"\nrm -f -- \"$dmg_nodata\"\nhdiutil create -ov -fs HFS+ -srcfolder \"$dir\" -volname \"$TARGET_NAME Lite\" \"$dmg_nodata\"\nhdiutil internet-enable -yes \"$dmg_nodata\"\nrm -rf -- \"$dir\""; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 8D11072C0486CEB800E47090 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1E44AE750B67CC2B00BAD059 /* hw_bsp.c in Sources */, - 1E44AE770B67CC2B00BAD059 /* hw3sound.c in Sources */, - 1E44AE780B67CC2B00BAD059 /* hw_cache.c in Sources */, - 1E44AE7C0B67CC2B00BAD059 /* hw_light.c in Sources */, - 1E44AE800B67CC2B00BAD059 /* hw_draw.c in Sources */, - 1E44AE820B67CC2B00BAD059 /* hw_main.c in Sources */, - 1E44AE840B67CC2B00BAD059 /* hw_md2.c in Sources */, - 1E44AE860B67CC2B00BAD059 /* hw_trick.c in Sources */, - 1E44AEA40B67CC8500BAD059 /* d_clisrv.c in Sources */, - 1E44AEA70B67CC8500BAD059 /* d_main.c in Sources */, - 1E44AEA80B67CC8500BAD059 /* d_net.c in Sources */, - 1E44AEAB0B67CC8500BAD059 /* d_netfil.c in Sources */, - 1E44AEAF0B67CC8500BAD059 /* d_netcmd.c in Sources */, - 1E44AEB30B67CC8500BAD059 /* dehacked.c in Sources */, - 1E44AEBF0B67CCA900BAD059 /* f_wipe.c in Sources */, - 1E44AEC00B67CCA900BAD059 /* f_finale.c in Sources */, - 1E44AEC80B67CCC600BAD059 /* g_game.c in Sources */, - 1E44AECC0B67CCC600BAD059 /* g_input.c in Sources */, - 1E44AED00B67CCEE00BAD059 /* hu_stuff.c in Sources */, - 1E44AEDC0B67CD1300BAD059 /* i_tcp.c in Sources */, - 1E44AEE30B67CD2B00BAD059 /* am_map.c in Sources */, - 1E44AEE90B67CD3F00BAD059 /* command.c in Sources */, - 1E44AEEC0B67CD4400BAD059 /* comptime.c in Sources */, - 1E44AEEF0B67CD5400BAD059 /* console.c in Sources */, - 1E44AEF30B67CD7F00BAD059 /* filesrch.c in Sources */, - 1E44AF070B67CDE900BAD059 /* m_argv.c in Sources */, - 1E44AF0A0B67CDE900BAD059 /* m_cheat.c in Sources */, - 1E44AF0B0B67CDE900BAD059 /* m_bbox.c in Sources */, - 1E44AF0D0B67CDE900BAD059 /* m_fixed.c in Sources */, - 1E44AF0F0B67CDE900BAD059 /* m_menu.c in Sources */, - 1E44AF110B67CDE900BAD059 /* m_misc.c in Sources */, - 1E44AF130B67CDE900BAD059 /* m_random.c in Sources */, - 1E44AF1A0B67CE2A00BAD059 /* info.c in Sources */, - 1E44AF1E0B67CE3600BAD059 /* md5.c in Sources */, - 1E44AF220B67CE4100BAD059 /* mserv.c in Sources */, - 1E44AF3C0B67CE5F00BAD059 /* p_enemy.c in Sources */, - 1E44AF3D0B67CE5F00BAD059 /* p_inter.c in Sources */, - 1E44AF3E0B67CE5F00BAD059 /* p_fab.c in Sources */, - 1E44AF3F0B67CE5F00BAD059 /* p_lights.c in Sources */, - 1E44AF400B67CE5F00BAD059 /* p_map.c in Sources */, - 1E44AF410B67CE5F00BAD059 /* p_maputl.c in Sources */, - 1E44AF430B67CE5F00BAD059 /* p_mobj.c in Sources */, - 1E44AF450B67CE5F00BAD059 /* p_floor.c in Sources */, - 1E44AF480B67CE5F00BAD059 /* p_saveg.c in Sources */, - 1E44AF4A0B67CE5F00BAD059 /* p_setup.c in Sources */, - 1E44AF4C0B67CE5F00BAD059 /* p_sight.c in Sources */, - 1E44AF4D0B67CE5F00BAD059 /* p_spec.c in Sources */, - 1E44AF4F0B67CE5F00BAD059 /* p_telept.c in Sources */, - 1E44AF500B67CE5F00BAD059 /* p_tick.c in Sources */, - 1E44AF520B67CE5F00BAD059 /* p_user.c in Sources */, - 1E44AF530B67CE5F00BAD059 /* p_ceilng.c in Sources */, - 1E44AF6C0B67CEC200BAD059 /* r_bsp.c in Sources */, - 1E44AF6F0B67CEC200BAD059 /* r_data.c in Sources */, - 1E44AF700B67CEC200BAD059 /* r_draw.c in Sources */, - 1E44AF730B67CEC200BAD059 /* r_main.c in Sources */, - 1E44AF780B67CEC200BAD059 /* r_plane.c in Sources */, - 1E44AF7A0B67CEC200BAD059 /* r_segs.c in Sources */, - 1E44AF7C0B67CEC200BAD059 /* r_sky.c in Sources */, - 1E44AF7E0B67CEC200BAD059 /* r_splats.c in Sources */, - 1E44AF810B67CEC200BAD059 /* r_things.c in Sources */, - 1E44AF870B67CEE000BAD059 /* s_sound.c in Sources */, - 1E44AF8B0B67CEE900BAD059 /* screen.c in Sources */, - 1E44AF8F0B67CEF000BAD059 /* sounds.c in Sources */, - 1E44AF930B67CEFF00BAD059 /* st_stuff.c in Sources */, - 1E44AF9B0B67CF2E00BAD059 /* tables.c in Sources */, - 1E44AFA50B67CF5D00BAD059 /* v_video.c in Sources */, - 1E44AFA90B67CF6400BAD059 /* w_wad.c in Sources */, - 1E44AFAD0B67CF6F00BAD059 /* y_inter.c in Sources */, - 1E44AFB10B67CF7A00BAD059 /* z_zone.c in Sources */, - 1E44AFC40B67CFDC00BAD059 /* dosstr.c in Sources */, - 1E44AFC50B67CFDC00BAD059 /* endtxt.c in Sources */, - 1E44AFC70B67CFDC00BAD059 /* hwsym_sdl.c in Sources */, - 1E44AFC90B67CFDC00BAD059 /* i_cdmus.c in Sources */, - 1E44AFCA0B67CFDC00BAD059 /* i_main.c in Sources */, - 1E44AFCB0B67CFDC00BAD059 /* i_net.c in Sources */, - 1E44AFCD0B67CFDC00BAD059 /* i_system.c in Sources */, - 1E44AFCE0B67CFDC00BAD059 /* i_video.c in Sources */, - 1E44AFD00B67CFDC00BAD059 /* ogl_sdl.c in Sources */, - 1E44AFEB0B67D06200BAD059 /* mac_alert.c in Sources */, - 1E44AFED0B67D0AB00BAD059 /* r_opengl.c in Sources */, - 1E44B0590B67D81E00BAD059 /* SDL_macosx_main.m in Sources */, - 1E308E720B71172D0015728C /* lzf.c in Sources */, - 676BB5200E0DE06100C95963 /* m_queue.c in Sources */, - 676BB5220E0DE06100C95963 /* p_polyobj.c in Sources */, - 67B83BFA14F57EAB00AAAE4E /* lapi.c in Sources */, - 67B83BFB14F57EAB00AAAE4E /* lauxlib.c in Sources */, - 67B83BFC14F57EAB00AAAE4E /* lbaselib.c in Sources */, - 67B83BFD14F57EAB00AAAE4E /* lcode.c in Sources */, - 67B83BFE14F57EAB00AAAE4E /* ldebug.c in Sources */, - 67B83BFF14F57EAB00AAAE4E /* ldo.c in Sources */, - 67B83C0014F57EAB00AAAE4E /* ldump.c in Sources */, - 67B83C0114F57EAB00AAAE4E /* lfunc.c in Sources */, - 67B83C0214F57EAB00AAAE4E /* lgc.c in Sources */, - 67B83C0314F57EAB00AAAE4E /* linit.c in Sources */, - 67B83C0414F57EAB00AAAE4E /* llex.c in Sources */, - 67B83C0514F57EAB00AAAE4E /* lmem.c in Sources */, - 67B83C0614F57EAB00AAAE4E /* lobject.c in Sources */, - 67B83C0714F57EAB00AAAE4E /* lopcodes.c in Sources */, - 67B83C0814F57EAB00AAAE4E /* lparser.c in Sources */, - 67B83C0914F57EAB00AAAE4E /* lstate.c in Sources */, - 67B83C0A14F57EAB00AAAE4E /* lstring.c in Sources */, - 67B83C0B14F57EAB00AAAE4E /* lstrlib.c in Sources */, - 67B83C0C14F57EAB00AAAE4E /* ltable.c in Sources */, - 67B83C0D14F57EAB00AAAE4E /* ltablib.c in Sources */, - 67B83C0E14F57EAB00AAAE4E /* ltm.c in Sources */, - 67B83C0F14F57EAB00AAAE4E /* lundump.c in Sources */, - 67B83C1014F57EAB00AAAE4E /* lvm.c in Sources */, - 67B83C1114F57EAB00AAAE4E /* lzio.c in Sources */, - 67B83C1414F57ECA00AAAE4E /* b_bot.c in Sources */, - 67B83C2214F57EE600AAAE4E /* lua_baselib.c in Sources */, - 67B83C2314F57EE600AAAE4E /* lua_consolelib.c in Sources */, - 67B83C2414F57EE600AAAE4E /* lua_hooklib.c in Sources */, - 67B83C2514F57EE600AAAE4E /* lua_infolib.c in Sources */, - 67B83C2614F57EE600AAAE4E /* lua_maplib.c in Sources */, - 67B83C2714F57EE600AAAE4E /* lua_mathlib.c in Sources */, - 67B83C2814F57EE600AAAE4E /* lua_mobjlib.c in Sources */, - 67B83C2914F57EE600AAAE4E /* lua_playerlib.c in Sources */, - 67B83C2A14F57EE600AAAE4E /* lua_script.c in Sources */, - 67B83C2B14F57EE600AAAE4E /* lua_thinkerlib.c in Sources */, - 67B83C3314F57F1500AAAE4E /* m_cond.c in Sources */, - 67259DFD18D2687D00F02971 /* lua_hudlib.c in Sources */, - 67259DFE18D2687D00F02971 /* lua_skinlib.c in Sources */, - 67259E0118D268AE00F02971 /* m_anigif.c in Sources */, - 67259E0618D268F700F02971 /* i_ttf.c in Sources */, - 67259E0718D268F700F02971 /* mixer_sound.c in Sources */, - 67259E0818D268F700F02971 /* sdl_sound.c in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 089C165DFE840E0CC02AAC07 /* English */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - C01FCF4B08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CURRENT_PROJECT_VERSION = 2.1.24; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - NORMALSRB2, - ); - PRODUCT_NAME = Srb2mac; - }; - name = Debug; - }; - C01FCF4C08A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CURRENT_PROJECT_VERSION = 2.1.24; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - NORMALSRB2, - ); - PRODUCT_NAME = Srb2mac; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = ( - i386, - ppc, - ); - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.0.0; - DEBUG_INFORMATION_FORMAT = dwarf; - DSTROOT = "$(HOME)/Applications"; - FRAMEWORK_SEARCH_PATHS = ( - "$(HOME)/Library/Frameworks", - /Library/Frameworks, - "$(FRAMEWORK_SEARCH_PATHS)", - ); - GCC_ENABLE_CPP_EXCEPTIONS = NO; - GCC_ENABLE_CPP_RTTI = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_ENABLE_OBJC_EXCEPTIONS = NO; - GCC_ENABLE_PASCAL_STRINGS = NO; - GCC_FAST_OBJC_DISPATCH = NO; - "GCC_MODEL_TUNING[arch=ppc]" = G3; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - MAC_ALERT, - SDLMAIN, - HAVE_SDL, - HAVE_MIXER, - HAVE_PNG, - HAVE_BLUA, - LUA_USE_POSIX, - COMPVERSION, - ); - GCC_THREADSAFE_STATICS = NO; - GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; - GCC_TREAT_NONCONFORMANT_CODE_ERRORS_AS_WARNINGS = YES; - GCC_TREAT_WARNINGS_AS_ERRORS = YES; - GCC_VERSION_i386 = 4.0; - GCC_VERSION_ppc0 = 3.3; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_GLOBAL_CONSTRUCTORS = YES; - GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; - GCC_WARN_ABOUT_MISSING_NEWLINE = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = YES; - GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; - GCC_WARN_EFFECTIVE_CPLUSPLUS_VIOLATIONS = YES; - GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES; - GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = NO; - GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; - GCC_WARN_MISSING_PARENTHESES = YES; - GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = NO; - GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; - GCC_WARN_PEDANTIC = NO; - GCC_WARN_PROTOTYPE_CONVERSION = NO; - GCC_WARN_SHADOW = NO; - GCC_WARN_SIGN_COMPARE = YES; - GCC_WARN_STRICT_SELECTOR_MATCH = YES; - GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = NO; - GCC_WARN_UNKNOWN_PRAGMAS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_LABEL = YES; - GCC_WARN_UNUSED_PARAMETER = YES; - GCC_WARN_UNUSED_VALUE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - GGG_MODEL_TUNING_ppc = G3; - HEADER_SEARCH_PATHS = ( - "$(HOME)/Library/Frameworks/SDL.framework/Headers", - /Library/Frameworks/SDL.framework/Headers, - "$(HOME)/Library/Frameworks/SDL_mixer.framework/Headers", - /Library/Frameworks/SDL_mixer.framework/Headers, - "$(HOME)/Library/Frameworks/libz.framework/Headers", - /Library/Frameworks/libz.framework/Headers, - "$(HOME)/Library/Frameworks/libpng.framework/Headers", - /Library/Frameworks/libpng.framework/Headers, - "$(HEADER_SEARCH_PATHS)", - ); - INFOPLIST_FILE = Info.plist; - MACH_O_TYPE = mh_execute; - MACOSX_DEPLOYMENT_TARGET = 10.4; - "MACOSX_DEPLOYMENT_TARGET[arch=i386]" = 10.4; - "MACOSX_DEPLOYMENT_TARGET[arch=ppc64]" = 10.5; - "MACOSX_DEPLOYMENT_TARGET[arch=ppc]" = 10.2; - "MACOSX_DEPLOYMENT_TARGET[arch=x86_64]" = 10.5; - MACOSX_DEPLOYMENT_TARGET_i386 = 10.4; - MACOSX_DEPLOYMENT_TARGET_ppc = 10.2; - OBJROOT = "$(inherited)/$(PRODUCT_NAME)/$(CURRENT_PROJECT_VERSION)"; - OTHER_CFLAGS_normal = "-D_DEBUG -DPARANOIA -DRANGECHECK"; - PREBINDING = NO; - PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; - PRODUCT_NAME = SRB2dummy; - SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; - "SDKROOT[arch=i386]" = macosx10.4; - "SDKROOT[arch=ppc]" = macosx10.3.9; - SDKROOT_i386 = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; - SDKROOT_ppc = "$(DEVELOPER_SDK_DIR)/MacOSX10.3.9.sdk"; - STRIP_INSTALLED_PRODUCT = NO; - SYMROOT = "$(inherited)/$(PRODUCT_NAME)/$(CURRENT_PROJECT_VERSION)"; - WARNING_CFLAGS = ( - "-Wall", - "-W", - "-Wno-undef", - "-Wpointer-arith", - "-Wbad-function-cast", - "-Wno-cast-qual", - "-Wcast-align", - "-Wwrite-strings", - "-Waggregate-return", - "-Wmissing-prototypes", - "-Wmissing-declarations", - "-Wno-missing-noreturn", - "-Wnested-externs", - "-Winline", - ); - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = ( - i386, - ppc, - ); - COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.0.0; - DSTROOT = "$(HOME)/Applications"; - FRAMEWORK_SEARCH_PATHS = ( - "$(HOME)/Library/Frameworks", - /Library/Frameworks, - "$(FRAMEWORK_SEARCH_PATHS)", - ); - GCC_ENABLE_CPP_EXCEPTIONS = NO; - GCC_ENABLE_CPP_RTTI = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = NO; - GCC_ENABLE_PASCAL_STRINGS = NO; - GCC_FAST_OBJC_DISPATCH = NO; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - "GCC_MODEL_TUNING[arch=ppc]" = G3; - GCC_OPTIMIZATION_LEVEL = 2; - GCC_PREPROCESSOR_DEFINITIONS = ( - MAC_ALERT, - SDLMAIN, - HAVE_SDL, - HAVE_MIXER, - HAVE_PNG, - HAVE_BLUA, - LUA_USE_POSIX, - COMPVERSION, - ); - GCC_THREADSAFE_STATICS = NO; - GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; - GCC_TREAT_NONCONFORMANT_CODE_ERRORS_AS_WARNINGS = YES; - GCC_TREAT_WARNINGS_AS_ERRORS = YES; - GCC_VERSION_i386 = 4.0; - GCC_VERSION_ppc0 = 3.3; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_GLOBAL_CONSTRUCTORS = YES; - GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; - GCC_WARN_ABOUT_MISSING_NEWLINE = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = YES; - GCC_WARN_CHECK_SWITCH_STATEMENTS = YES; - GCC_WARN_EFFECTIVE_CPLUSPLUS_VIOLATIONS = YES; - GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES; - GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES; - GCC_WARN_INHIBIT_ALL_WARNINGS = NO; - GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; - GCC_WARN_MISSING_PARENTHESES = YES; - GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = NO; - GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; - GCC_WARN_PEDANTIC = NO; - GCC_WARN_PROTOTYPE_CONVERSION = NO; - GCC_WARN_SHADOW = NO; - GCC_WARN_SIGN_COMPARE = YES; - GCC_WARN_STRICT_SELECTOR_MATCH = YES; - GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNKNOWN_PRAGMAS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_LABEL = YES; - GCC_WARN_UNUSED_PARAMETER = YES; - GCC_WARN_UNUSED_VALUE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - GGG_MODEL_TUNING_ppc = G3; - HEADER_SEARCH_PATHS = ( - "$(HOME)/Library/Frameworks/SDL.framework/Headers", - /Library/Frameworks/SDL.framework/Headers, - "$(HOME)/Library/Frameworks/SDL_mixer.framework/Headers", - /Library/Frameworks/SDL_mixer.framework/Headers, - "$(HOME)/Library/Frameworks/libz.framework/Headers", - /Library/Frameworks/libz.framework/Headers, - "$(HOME)/Library/Frameworks/libpng.framework/Headers", - /Library/Frameworks/libpng.framework/Headers, - "$(HEADER_SEARCH_PATHS)", - ); - INFOPLIST_FILE = Info.plist; - MACH_O_TYPE = mh_execute; - MACOSX_DEPLOYMENT_TARGET = 10.4; - "MACOSX_DEPLOYMENT_TARGET[arch=i386]" = 10.4; - "MACOSX_DEPLOYMENT_TARGET[arch=ppc64]" = 10.5; - "MACOSX_DEPLOYMENT_TARGET[arch=ppc]" = 10.2; - "MACOSX_DEPLOYMENT_TARGET[arch=x86_64]" = 10.5; - MACOSX_DEPLOYMENT_TARGET_i386 = 10.4; - MACOSX_DEPLOYMENT_TARGET_ppc = 10.2; - OBJROOT = "$(inherited)/$(PRODUCT_NAME)/$(CURRENT_PROJECT_VERSION)"; - OTHER_CFLAGS_normal = "-DNDEBUG"; - PREBINDING = NO; - PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; - PRODUCT_NAME = SRB2dummy; - SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; - "SDKROOT[arch=i386]" = macosx10.4; - "SDKROOT[arch=ppc]" = macosx10.3.9; - SDKROOT_i386 = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; - SDKROOT_ppc = "$(DEVELOPER_SDK_DIR)/MacOSX10.3.9.sdk"; - STRIP_INSTALLED_PRODUCT = NO; - SYMROOT = "$(inherited)/$(PRODUCT_NAME)/$(CURRENT_PROJECT_VERSION)"; - WARNING_CFLAGS = ( - "-Wall", - "-W", - "-Wno-undef", - "-Wpointer-arith", - "-Wbad-function-cast", - "-Wno-cast-qual", - "-Wcast-align", - "-Wwrite-strings", - "-Waggregate-return", - "-Wmissing-prototypes", - "-Wmissing-declarations", - "-Wno-missing-noreturn", - "-Wnested-externs", - "-Winline", - "-Wno-aggregate-return", - ); - WRAPPER_EXTENSION = app; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "Srb2mac" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4B08A954540054247B /* Debug */, - C01FCF4C08A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Srb2mac" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Debug; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} diff --git a/src/sdl12/sdl_sound.c b/src/sdl12/sdl_sound.c deleted file mode 100644 index a0123d46f..000000000 --- a/src/sdl12/sdl_sound.c +++ /dev/null @@ -1,2031 +0,0 @@ -// Emacs style mode select -*- C++ -*- -//----------------------------------------------------------------------------- -// -// Copyright (C) 1993-1996 by id Software, Inc. -// -// 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. -// -// The source 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. -//----------------------------------------------------------------------------- -/// \file -/// \brief SDL interface for sound - -#include -#include "../doomdef.h" - -#ifdef _MSC_VER -#pragma warning(disable : 4214 4244) -#endif - -#if defined(HAVE_SDL) && SOUND==SOUND_SDL - -#include - -#ifdef _MSC_VER -#pragma warning(default : 4214 4244) -#endif - -#ifdef HAVE_MIXER -#include "SDL_mixer.h" -/* This is the version number macro for the current SDL_mixer version: */ -#ifndef SDL_MIXER_COMPILEDVERSION -#define SDL_MIXER_COMPILEDVERSION \ - SDL_VERSIONNUM(MIX_MAJOR_VERSION, MIX_MINOR_VERSION, MIX_PATCHLEVEL) -#endif - -/* This macro will evaluate to true if compiled with SDL_mixer at least X.Y.Z */ -#ifndef SDL_MIXER_VERSION_ATLEAST -#define SDL_MIXER_VERSION_ATLEAST(X, Y, Z) \ - (SDL_MIXER_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z)) -#endif - -#else -#define MIX_CHANNELS 8 -#endif - -#if defined (_WIN32) && !defined (_WIN32_WCE) && !defined (_XBOX) -#include -#elif defined (__GNUC__) -#include -#endif -#include "../z_zone.h" - -#include "../m_swap.h" -#include "../i_system.h" -#include "../i_sound.h" -#include "../m_argv.h" -#include "../m_misc.h" -#include "../w_wad.h" -#include "../screen.h" //vid.WndParent -#include "../doomdef.h" -#include "../doomstat.h" -#include "../s_sound.h" - -#include "../d_main.h" - -#ifdef HW3SOUND -#include "../hardware/hw3dsdrv.h" -#include "../hardware/hw3sound.h" -#include "hwsym_sdl.h" -#endif - -#ifdef HAVE_LIBGME -#include "gme/gme.h" -#endif - -// The number of internal mixing channels, -// the samples calculated for each mixing step, -// the size of the 16bit, 2 hardware channel (stereo) -// mixing buffer, and the samplerate of the raw data. - -// Needed for calling the actual sound output. -#if defined (_WIN32_WCE) || defined (DC) || defined (PSP) || defined(GP2X) -#define NUM_CHANNELS MIX_CHANNELS -#else -#define NUM_CHANNELS MIX_CHANNELS*4 -#endif - -#define INDEXOFSFX(x) ((sfxinfo_t *)x - S_sfx) - -#if defined (_WIN32_WCE) || defined (DC) || defined (PSP) -static Uint16 samplecount = 512; //Alam: .5KB samplecount at 11025hz is 46.439909297052154195011337868481ms of buffer -#elif defined(GP2X) -static Uint16 samplecount = 128; -#else -static Uint16 samplecount = 1024; //Alam: 1KB samplecount at 22050hz is 46.439909297052154195011337868481ms of buffer -#endif - -typedef struct chan_struct -{ - // The channel data pointers, start and end. - Uint8 *data; //static unsigned char *channels[NUM_CHANNELS]; - Uint8 *end; //static unsigned char *channelsend[NUM_CHANNELS]; - - // pitch - Uint32 realstep; // The channel step amount... - Uint32 step; //static UINT32 channelstep[NUM_CHANNELS]; - Uint32 stepremainder; //static UINT32 channelstepremainder[NUM_CHANNELS]; - Uint32 samplerate; // ... and a 0.16 bit remainder of last step. - - // Time/gametic that the channel started playing, - // used to determine oldest, which automatically - // has lowest priority. - tic_t starttic; //static INT32 channelstart[NUM_CHANNELS]; - - // The sound handle, determined on registration, - // used to unregister/stop/modify, - INT32 handle; //static INT32 channelhandles[NUM_CHANNELS]; - - // SFX id of the playing sound effect. - void *id; // Used to catch duplicates (like chainsaw). - sfxenum_t sfxid; //static INT32 channelids[NUM_CHANNELS]; - INT32 vol; //the channel volume - INT32 sep; //the channel pan - - // Hardware left and right channel volume lookup. - Sint16* leftvol_lookup; //static INT32 *channelleftvol_lookup[NUM_CHANNELS]; - Sint16* rightvol_lookup; //static INT32 *channelrightvol_lookup[NUM_CHANNELS]; -} chan_t; - -static chan_t channels[NUM_CHANNELS]; - -// Pitch to stepping lookup -static INT32 steptable[256]; - -// Volume lookups. -static Sint16 vol_lookup[128 * 256]; - -UINT8 sound_started = false; -static SDL_mutex *Snd_Mutex = NULL; - -//SDL's Audio -static SDL_AudioSpec audio; - -static SDL_bool musicStarted = SDL_FALSE; -#ifdef HAVE_MIXER -static SDL_mutex *Msc_Mutex = NULL; -/* FIXME: Make this file instance-specific */ -#ifdef _arch_dreamcast -#define MIDI_PATH "/ram" -#elif defined(GP2X) -#define MIDI_PATH "/mnt/sd/srb2kart-v2" -#define MIDI_PATH2 "/tmp/mnt/sd/srb2kart-v2" -#else -#define MIDI_PATH srb2home -#if defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON) -#define MIDI_PATH2 "/tmp" -#endif -#endif -#define MIDI_TMPFILE "srb2kart-v2music" -#define MIDI_TMPFILE2 "srb2kart-v2wav" -static INT32 musicvol = 62; - -#if SDL_MIXER_VERSION_ATLEAST(1,2,2) -#define MIXER_POS //Mix_FadeInMusicPos in 1.2.2+ -static void SDLCALL I_FinishMusic(void); -static double loopstartDig = 0.0l; -static SDL_bool loopingDig = SDL_FALSE; -static SDL_bool canlooping = SDL_TRUE; -#endif - -#if SDL_MIXER_VERSION_ATLEAST(1,2,7) -#define USE_RWOPS // ok, USE_RWOPS is in here -#if defined (DC) || defined (_WIN32_WCE) || defined (_XBOX) //|| defined(_WIN32) || defined(GP2X) -#undef USE_RWOPS -#endif -#endif - -#if SDL_MIXER_VERSION_ATLEAST(1,2,10) -//#define MIXER_INIT -#endif - -#ifdef USE_RWOPS -static void * Smidi[2] = { NULL, NULL }; -static SDL_bool canuseRW = SDL_TRUE; -#endif -static const char *fmidi[2] = { MIDI_TMPFILE, MIDI_TMPFILE2}; - -static const INT32 MIDIfade = 500; -static const INT32 Digfade = 0; - -static Mix_Music *music[2] = { NULL, NULL }; -#endif - -typedef struct srb2audio_s { - void *userdata; -#ifdef HAVE_LIBGME - Music_Emu *gme_emu; - UINT8 gme_pause; - UINT8 gme_loop; -#endif -} srb2audio_t; - -static srb2audio_t localdata; - -static void Snd_LockAudio(void) //Alam: Lock audio data and uninstall audio callback -{ - if (Snd_Mutex) SDL_LockMutex(Snd_Mutex); - else if (nosound) return; - else if (nomidimusic && nodigimusic -#ifdef HW3SOUND - && hws_mode == HWS_DEFAULT_MODE -#endif - ) SDL_LockAudio(); -#ifdef HAVE_MIXER - else if (musicStarted) Mix_SetPostMix(NULL, NULL); -#endif -} - -static void Snd_UnlockAudio(void) //Alam: Unlock audio data and reinstall audio callback -{ - if (Snd_Mutex) SDL_UnlockMutex(Snd_Mutex); - else if (nosound) return; - else if (nomidimusic && nodigimusic -#ifdef HW3SOUND - && hws_mode == HWS_DEFAULT_MODE -#endif - ) SDL_UnlockAudio(); -#ifdef HAVE_MIXER - else if (musicStarted) Mix_SetPostMix(audio.callback, audio.userdata); -#endif -} - -static inline Uint16 Snd_LowerRate(Uint16 sr) -{ - if (sr <= audio.freq) // already lowered rate? - return sr; // good then - for (;sr > audio.freq;) // not good? - { // then let see... - if (sr % 2) // can we div by half? - return sr; // no, just use the currect rate - sr /= 2; // we can? wonderful - } // let start over again - if (sr == audio.freq) // did we drop to the desired rate? - return sr; // perfect! but if not - return sr*2; // just keep it just above the output sample rate -} - -#ifdef _MSC_VER -#pragma warning(disable : 4200) -#pragma pack(1) -#endif - -typedef struct -{ - Uint16 header; // 3? - Uint16 samplerate; // 11025+ - Uint16 samples; // number of samples - Uint16 dummy; // 0 - Uint8 data[0]; // data; -} ATTRPACK dssfx_t; - -#ifdef _MSC_VER -#pragma pack() -#pragma warning(default : 4200) -#endif - -// -// This function loads the sound data from the WAD lump, -// for single sound. -// -static void *getsfx(lumpnum_t sfxlump, size_t *len) -{ - dssfx_t *sfx, *paddedsfx; - Uint16 sr , csr; - size_t size = *len; - SDL_AudioCVT sfxcvt; - - sfx = (dssfx_t *)malloc(size); - if (sfx) W_ReadLump(sfxlump, (void *)sfx); - else return NULL; - sr = SHORT(sfx->samplerate); - csr = Snd_LowerRate(sr); - - if (sr > csr && SDL_BuildAudioCVT(&sfxcvt, AUDIO_U8, 1, sr, AUDIO_U8, 1, csr)) - {//Alam: Setup the AudioCVT for the SFX - - sfxcvt.len = (INT32)size-8; //Alam: Chop off the header - sfxcvt.buf = malloc(sfxcvt.len * sfxcvt.len_mult); //Alam: make room - if (sfxcvt.buf) M_Memcpy(sfxcvt.buf, &(sfx->data), sfxcvt.len); //Alam: copy the sfx sample - - if (sfxcvt.buf && SDL_ConvertAudio(&sfxcvt) == 0) //Alam: let convert it! - { - size = sfxcvt.len_cvt + 8; - *len = sfxcvt.len_cvt; - - // Allocate from zone memory. - paddedsfx = (dssfx_t *) Z_Malloc(size, PU_SOUND, NULL); - - // Now copy and pad. - M_Memcpy(paddedsfx->data, sfxcvt.buf, sfxcvt.len_cvt); - free(sfxcvt.buf); - M_Memcpy(paddedsfx,sfx,8); - paddedsfx->samplerate = SHORT(csr); // new freq - } - else //Alam: the convert failed, not needed or I couldn't malloc the buf - { - if (sfxcvt.buf) free(sfxcvt.buf); - *len = size - 8; - - // Allocate from zone memory then copy and pad - paddedsfx = (dssfx_t *)M_Memcpy(Z_Malloc(size, PU_SOUND, NULL), sfx, size); - } - } - else - { - // Pads the sound effect out to the mixing buffer size. - // The original realloc would interfere with zone memory. - *len = size - 8; - - // Allocate from zone memory then copy and pad - paddedsfx = (dssfx_t *)M_Memcpy(Z_Malloc(size, PU_SOUND, NULL), sfx, size); - } - - // Remove the cached lump. - free(sfx); - - // Return allocated padded data. - return paddedsfx; -} - -// used to (re)calculate channel params based on vol, sep, pitch -static void I_SetChannelParams(chan_t *c, INT32 vol, INT32 sep, INT32 step) -{ - INT32 leftvol; - INT32 rightvol; - c->vol = vol; - c->sep = sep; - c->step = c->realstep = step; - - if (step != steptable[128]) - c->step += (((c->samplerate<<16)/audio.freq)-65536); - else if (c->samplerate != (unsigned)audio.freq) - c->step = ((c->samplerate<<16)/audio.freq); - // x^2 separation, that is, orientation/stereo. - // range is: 0 (left) - 255 (right) - - // Volume arrives in range 0..255 and it must be in 0..cv_soundvolume... - vol = (vol * cv_soundvolume.value) >> 7; - // note: >> 6 would use almost the entire dynamical range, but - // then there would be no "dynamical room" for other sounds :-/ - - leftvol = vol - ((vol*sep*sep) >> 16); ///(256*256); - sep = 255 - sep; - rightvol = vol - ((vol*sep*sep) >> 16); - - // Sanity check, clamp volume. - if (rightvol < 0) - rightvol = 0; - else if (rightvol > 127) - rightvol = 127; - if (leftvol < 0) - leftvol = 0; - else if (leftvol > 127) - leftvol = 127; - - // Get the proper lookup table piece - // for this volume level - c->leftvol_lookup = &vol_lookup[leftvol*256]; - c->rightvol_lookup = &vol_lookup[rightvol*256]; -} - -static INT32 FindChannel(INT32 handle) -{ - INT32 i; - - for (i = 0; i < NUM_CHANNELS; i++) - if (channels[i].handle == handle) - return i; - - // not found - return -1; -} - -// -// This function adds a sound to the -// list of currently active sounds, -// which is maintained as a given number -// (eight, usually) of internal channels. -// Returns a handle. -// -static INT32 addsfx(sfxenum_t sfxid, INT32 volume, INT32 step, INT32 seperation) -{ - static UINT16 handlenums = 0; - INT32 i, slot, oldestnum = 0; - tic_t oldest = gametic; - - // Play these sound effects only one at a time. -#if 1 - if ( -#if 0 - sfxid == sfx_stnmov || sfxid == sfx_sawup || sfxid == sfx_sawidl || sfxid == sfx_sawful || sfxid == sfx_sawhit || sfxid == sfx_pistol -#else - ( sfx_litng1 <= sfxid && sfxid >= sfx_litng4 ) - || sfxid == sfx_trfire || sfxid == sfx_alarm || sfxid == sfx_spin - || sfxid == sfx_athun1 || sfxid == sfx_athun2 || sfxid == sfx_rainin -#endif - ) - { - // Loop all channels, check. - for (i = 0; i < NUM_CHANNELS; i++) - { - // Active, and using the same SFX? - if ((channels[i].end) && (channels[i].sfxid == sfxid)) - { - // Reset. - channels[i].end = NULL; - // We are sure that iff, - // there will only be one. - break; - } - } - } -#endif - - // Loop all channels to find oldest SFX. - for (i = 0; (i < NUM_CHANNELS) && (channels[i].end); i++) - { - if (channels[i].starttic < oldest) - { - oldestnum = i; - oldest = channels[i].starttic; - } - } - - // Tales from the cryptic. - // If we found a channel, fine. - // If not, we simply overwrite the first one, 0. - // Probably only happens at startup. - if (i == NUM_CHANNELS) - slot = oldestnum; - else - slot = i; - - channels[slot].end = NULL; - // Okay, in the less recent channel, - // we will handle the new SFX. - // Set pointer to raw data. - channels[slot].data = (Uint8 *)S_sfx[sfxid].data; - channels[slot].samplerate = (channels[slot].data[3]<<8)+channels[slot].data[2]; - channels[slot].data += 8; //Alam: offset of the sound header - - while (FindChannel(handlenums)!=-1) - { - handlenums++; - // Reset current handle number, limited to 0..65535. - if (handlenums == UINT16_MAX) - handlenums = 0; - } - - // Assign current handle number. - // Preserved so sounds could be stopped. - channels[slot].handle = handlenums; - - // Restart steper - channels[slot].stepremainder = 0; - // Should be gametic, I presume. - channels[slot].starttic = gametic; - - I_SetChannelParams(&channels[slot], volume, seperation, step); - - // Preserve sound SFX id, - // e.g. for avoiding duplicates of chainsaw. - channels[slot].id = S_sfx[sfxid].data; - - channels[slot].sfxid = sfxid; - - // Set pointer to end of raw data. - channels[slot].end = channels[slot].data + S_sfx[sfxid].length; - - - // You tell me. - return handlenums; -} - -// -// SFX API -// Note: this was called by S_Init. -// However, whatever they did in the -// old DPMS based DOS version, this -// were simply dummies in the Linux -// version. -// See soundserver initdata(). -// -// Well... To keep compatibility with legacy doom, I have to call this in -// I_InitSound since it is not called in S_Init... (emanne@absysteme.fr) - -static inline void I_SetChannels(void) -{ - // Init internal lookups (raw data, mixing buffer, channels). - // This function sets up internal lookups used during - // the mixing process. - INT32 i; - INT32 j; - - INT32 *steptablemid = steptable + 128; - - if (nosound) - return; - - // This table provides step widths for pitch parameters. - for (i = -128; i < 128; i++) - { - const double po = pow((double)(2.0l), (double)(i / 64.0l)); - steptablemid[i] = (INT32)(po * 65536.0l); - } - - // Generates volume lookup tables - // which also turn the unsigned samples - // into signed samples. - for (i = 0; i < 128; i++) - for (j = 0; j < 256; j++) - { - //From PrDoom - // proff - made this a little bit softer, because with - // full volume the sound clipped badly - vol_lookup[i * 256 + j] = (Sint16)((i * (j - 128) * 256) / 127); - } -} - -void I_SetSfxVolume(UINT8 volume) -{ - INT32 i; - - (void)volume; - //Snd_LockAudio(); - - for (i = 0; i < NUM_CHANNELS; i++) - if (channels[i].end) I_SetChannelParams(&channels[i], channels[i].vol, channels[i].sep, channels[i].realstep); - - //Snd_UnlockAudio(); -} - -void *I_GetSfx(sfxinfo_t *sfx) -{ - if (sfx->lumpnum == LUMPERROR) - sfx->lumpnum = S_GetSfxLumpNum(sfx); -// else if (sfx->lumpnum != S_GetSfxLumpNum(sfx)) -// I_FreeSfx(sfx); - -#ifdef HW3SOUND - if (hws_mode != HWS_DEFAULT_MODE) - return HW3S_GetSfx(sfx); -#endif - - if (sfx->data) - return sfx->data; //Alam: I have it done! - - sfx->length = W_LumpLength(sfx->lumpnum); - - return getsfx(sfx->lumpnum, &sfx->length); - -} - -void I_FreeSfx(sfxinfo_t * sfx) -{ -// if (sfx->lumpnum<0) -// return; - -#ifdef HW3SOUND - if (hws_mode != HWS_DEFAULT_MODE) - { - HW3S_FreeSfx(sfx); - } - else -#endif - { - size_t i; - - for (i = 1; i < NUMSFX; i++) - { - // Alias? Example is the chaingun sound linked to pistol. - if (S_sfx[i].data == sfx->data) - { - if (S_sfx+i != sfx) S_sfx[i].data = NULL; - S_sfx[i].lumpnum = LUMPERROR; - S_sfx[i].length = 0; - } - } - //Snd_LockAudio(); //Alam: too much? - // Loop all channels, check. - for (i = 0; i < NUM_CHANNELS; i++) - { - // Active, and using the same SFX? - if (channels[i].end && channels[i].id == sfx->data) - { - channels[i].end = NULL; // Reset. - } - } - //Snd_UnlockAudio(); //Alam: too much? - Z_Free(sfx->data); - } - sfx->data = NULL; - sfx->lumpnum = LUMPERROR; -} - -// -// Starting a sound means adding it -// to the current list of active sounds -// in the internal channels. -// As the SFX info struct contains -// e.g. a pointer to the raw data, -// it is ignored. -// As our sound handling does not handle -// priority, it is ignored. -// Pitching (that is, increased speed of playback) -// is set, but currently not used by mixing. -// -INT32 I_StartSound(sfxenum_t id, UINT8 vol, UINT8 sep, UINT8 pitch, UINT8 priority, INT32 channel) -{ - (void)priority; - (void)pitch; - (void)channel; - - if (nosound) - return 0; - - if (S_sfx[id].data == NULL) return -1; - - Snd_LockAudio(); - id = addsfx(id, vol, steptable[pitch], sep); - Snd_UnlockAudio(); - - return id; // Returns a handle (not used). -} - -void I_StopSound(INT32 handle) -{ - // You need the handle returned by StartSound. - // Would be looping all channels, - // tracking down the handle, - // an setting the channel to zero. - INT32 i; - - i = FindChannel(handle); - - if (i != -1) - { - //Snd_LockAudio(); //Alam: too much? - channels[i].end = NULL; - //Snd_UnlockAudio(); //Alam: too much? - channels[i].handle = -1; - channels[i].starttic = 0; - } - -} - -boolean I_SoundIsPlaying(INT32 handle) -{ - boolean isplaying = false; - int chan = FindChannel(handle); - if (chan != -1) - isplaying = (channels[chan].end != NULL); - return isplaying; -} - -FUNCINLINE static ATTRINLINE void I_UpdateStream8S(Uint8 *stream, int len) -{ - // Mix current sound data. - // Data, from raw sound - register Sint16 dr; // Right 8bit stream - register Uint8 sample; // Center 8bit sfx - register Sint16 dl; // Left 8bit stream - - // Pointers in audio stream - Sint8 *rightout = (Sint8 *)stream; // currect right - Sint8 *leftout = rightout + 1;// currect left - const Uint8 step = 2; // Step in stream, left and right, thus two. - - INT32 chan; // Mixing channel index. - - // Determine end of the stream - len /= 2; // not 8bit mono samples, 8bit stereo ones - - if (Snd_Mutex) SDL_LockMutex(Snd_Mutex); - - // Mix sounds into the mixing buffer. - // Loop over len - while (len--) - { - // Reset left/right value. - dl = *leftout; - dr = *rightout; - - // Love thy L2 cache - made this a loop. - // Now more channels could be set at compile time - // as well. Thus loop those channels. - for (chan = 0; chan < NUM_CHANNELS; chan++) - { - // Check channel, if active. - if (channels[chan].end) - { -#if 1 - // Get the raw data from the channel. - sample = channels[chan].data[0]; -#else - // linear filtering from PrDoom - sample = (((Uint32)channels[chan].data[0] *(0x10000 - channels[chan].stepremainder)) - + ((Uint32)channels[chan].data[1]) * (channels[chan].stepremainder))) >> 16; -#endif - // Add left and right part - // for this channel (sound) - // to the current data. - // Adjust volume accordingly. - dl = (Sint16)(dl+(channels[chan].leftvol_lookup[sample]>>8)); - dr = (Sint16)(dr+(channels[chan].rightvol_lookup[sample]>>8)); - // Increment stepage - channels[chan].stepremainder += channels[chan].step; - // Check whether we are done. - if (channels[chan].data + (channels[chan].stepremainder >> 16) >= channels[chan].end) - channels[chan].end = NULL; - else - { - // step to next sample - channels[chan].data += (channels[chan].stepremainder >> 16); - // Limit to LSB??? - channels[chan].stepremainder &= 0xffff; - } - } - } - - // Clamp to range. Left hardware channel. - // Has been char instead of short. - - if (dl > 0x7f) - *leftout = 0x7f; - else if (dl < -0x80) - *leftout = -0x80; - else - *leftout = (Sint8)dl; - - // Same for right hardware channel. - if (dr > 0x7f) - *rightout = 0x7f; - else if (dr < -0x80) - *rightout = -0x80; - else - *rightout = (Sint8)dr; - - // Increment current pointers in stream - leftout += step; - rightout += step; - - } - if (Snd_Mutex) SDL_UnlockMutex(Snd_Mutex); -} - -FUNCINLINE static ATTRINLINE void I_UpdateStream8M(Uint8 *stream, int len) -{ - // Mix current sound data. - // Data, from raw sound - register Sint16 d; // Mono 8bit stream - register Uint8 sample; // Center 8bit sfx - - // Pointers in audio stream - Sint8 *monoout = (Sint8 *)stream; // currect mono - const Uint8 step = 1; // Step in stream, left and right, thus two. - - INT32 chan; // Mixing channel index. - - // Determine end of the stream - //len /= 1; // not 8bit mono samples, 8bit mono ones? - - if (Snd_Mutex) SDL_LockMutex(Snd_Mutex); - - // Mix sounds into the mixing buffer. - // Loop over len - while (len--) - { - // Reset left/right value. - d = *monoout; - - // Love thy L2 cache - made this a loop. - // Now more channels could be set at compile time - // as well. Thus loop those channels. - for (chan = 0; chan < NUM_CHANNELS; chan++) - { - // Check channel, if active. - if (channels[chan].end) - { -#if 1 - // Get the raw data from the channel. - sample = channels[chan].data[0]; -#else - // linear filtering from PrDoom - sample = (((Uint32)channels[chan].data[0] *(0x10000 - channels[chan].stepremainder)) - + ((Uint32)channels[chan].data[1]) * (channels[chan].stepremainder))) >> 16; -#endif - // Add left and right part - // for this channel (sound) - // to the current data. - // Adjust volume accordingly. - d = (Sint16)(d+((channels[chan].leftvol_lookup[sample] + channels[chan].rightvol_lookup[sample])>>9)); - // Increment stepage - channels[chan].stepremainder += channels[chan].step; - // Check whether we are done. - if (channels[chan].data + (channels[chan].stepremainder >> 16) >= channels[chan].end) - channels[chan].end = NULL; - else - { - // step to next sample - channels[chan].data += (channels[chan].stepremainder >> 16); - // Limit to LSB??? - channels[chan].stepremainder &= 0xffff; - } - } - } - - // Clamp to range. Left hardware channel. - // Has been char instead of short. - - if (d > 0x7f) - *monoout = 0x7f; - else if (d < -0x80) - *monoout = -0x80; - else - *monoout = (Sint8)d; - - // Increment current pointers in stream - monoout += step; - } - if (Snd_Mutex) SDL_UnlockMutex(Snd_Mutex); -} - -FUNCINLINE static ATTRINLINE void I_UpdateStream16S(Uint8 *stream, int len) -{ - // Mix current sound data. - // Data, from raw sound - register Sint32 dr; // Right 16bit stream - register Uint8 sample; // Center 8bit sfx - register Sint32 dl; // Left 16bit stream - - // Pointers in audio stream - Sint16 *rightout = (Sint16 *)(void *)stream; // currect right - Sint16 *leftout = rightout + 1;// currect left - const Uint8 step = 2; // Step in stream, left and right, thus two. - - INT32 chan; // Mixing channel index. - - // Determine end of the stream - len /= 4; // not 8bit mono samples, 16bit stereo ones - - if (Snd_Mutex) SDL_LockMutex(Snd_Mutex); - - // Mix sounds into the mixing buffer. - // Loop over len - while (len--) - { - // Reset left/right value. - dl = *leftout; - dr = *rightout; - - // Love thy L2 cache - made this a loop. - // Now more channels could be set at compile time - // as well. Thus loop those channels. - for (chan = 0; chan < NUM_CHANNELS; chan++) - { - // Check channel, if active. - if (channels[chan].end) - { -#if 1 - // Get the raw data from the channel. - sample = channels[chan].data[0]; -#else - // linear filtering from PrDoom - sample = (((Uint32)channels[chan].data[0] *(0x10000 - channels[chan].stepremainder)) - + ((Uint32)channels[chan].data[1]) * (channels[chan].stepremainder))) >> 16; -#endif - // Add left and right part - // for this channel (sound) - // to the current data. - // Adjust volume accordingly. - dl += channels[chan].leftvol_lookup[sample]; - dr += channels[chan].rightvol_lookup[sample]; - // Increment stepage - channels[chan].stepremainder += channels[chan].step; - // Check whether we are done. - if (channels[chan].data + (channels[chan].stepremainder >> 16) >= channels[chan].end) - channels[chan].end = NULL; - else - { - // step to next sample - channels[chan].data += (channels[chan].stepremainder >> 16); - // Limit to LSB??? - channels[chan].stepremainder &= 0xffff; - } - } - } - - // Clamp to range. Left hardware channel. - // Has been char instead of short. - - if (dl > 0x7fff) - *leftout = 0x7fff; - else if (dl < -0x8000) - *leftout = -0x8000; - else - *leftout = (Sint16)dl; - - // Same for right hardware channel. - if (dr > 0x7fff) - *rightout = 0x7fff; - else if (dr < -0x8000) - *rightout = -0x8000; - else - *rightout = (Sint16)dr; - - // Increment current pointers in stream - leftout += step; - rightout += step; - - } - if (Snd_Mutex) SDL_UnlockMutex(Snd_Mutex); -} - -FUNCINLINE static ATTRINLINE void I_UpdateStream16M(Uint8 *stream, int len) -{ - // Mix current sound data. - // Data, from raw sound - register Sint32 d; // Mono 16bit stream - register Uint8 sample; // Center 8bit sfx - - // Pointers in audio stream - Sint16 *monoout = (Sint16 *)(void *)stream; // currect mono - const Uint8 step = 1; // Step in stream, left and right, thus two. - - INT32 chan; // Mixing channel index. - - // Determine end of the stream - len /= 2; // not 8bit mono samples, 16bit mono ones - - if (Snd_Mutex) SDL_LockMutex(Snd_Mutex); - - // Mix sounds into the mixing buffer. - // Loop over len - while (len--) - { - // Reset left/right value. - d = *monoout; - - // Love thy L2 cache - made this a loop. - // Now more channels could be set at compile time - // as well. Thus loop those channels. - for (chan = 0; chan < NUM_CHANNELS; chan++) - { - // Check channel, if active. - if (channels[chan].end) - { -#if 1 - // Get the raw data from the channel. - sample = channels[chan].data[0]; -#else - // linear filtering from PrDoom - sample = (((Uint32)channels[chan].data[0] *(0x10000 - channels[chan].stepremainder)) - + ((Uint32)channels[chan].data[1]) * (channels[chan].stepremainder))) >> 16; -#endif - // Add left and right part - // for this channel (sound) - // to the current data. - // Adjust volume accordingly. - d += (channels[chan].leftvol_lookup[sample] + channels[chan].rightvol_lookup[sample])>>1; - // Increment stepage - channels[chan].stepremainder += channels[chan].step; - // Check whether we are done. - if (channels[chan].data + (channels[chan].stepremainder >> 16) >= channels[chan].end) - channels[chan].end = NULL; - else - { - // step to next sample - channels[chan].data += (channels[chan].stepremainder >> 16); - // Limit to LSB??? - channels[chan].stepremainder &= 0xffff; - } - } - } - - // Clamp to range. Left hardware channel. - // Has been char instead of short. - - if (d > 0x7fff) - *monoout = 0x7fff; - else if (d < -0x8000) - *monoout = -0x8000; - else - *monoout = (Sint16)d; - - // Increment current pointers in stream - monoout += step; - } - if (Snd_Mutex) SDL_UnlockMutex(Snd_Mutex); -} - -#ifdef HAVE_LIBGME -static void I_UpdateSteamGME(Music_Emu *emu, INT16 *stream, int len, UINT8 looping) -{ - #define GME_BUFFER_LEN 44100*2048 - // Mix current sound data. - // Data, from raw sound - register Sint32 da; - - static short gme_buffer[GME_BUFFER_LEN]; // a large buffer for gme - Sint16 *in = gme_buffer; - - do - { - int out = min(GME_BUFFER_LEN, len); - if ( gme_play( emu, len, gme_buffer ) ) { } // ignore error - len -= out; - while (out--) - { - //Left - da = *in; - in++; - da += *stream; - stream++; - //Right - da = *in; - in++; - da += *stream; - stream++; - } - if (gme_track_ended( emu )) - { - if (looping) - gme_seek( emu, 0); - else - break; - } - } while ( len ); - #undef GME_BUFFER_LEN -} -#endif - -static void SDLCALL I_UpdateStream(void *userdata, Uint8 *stream, int len) -{ - if (!sound_started || !userdata) - return; - -#if SDL_VERSION_ATLEAST(1,3,0) - if (musicStarted) - memset(stream, 0x00, len); // only work in !AUDIO_U8, that needs 0x80 -#endif - - if ((audio.channels != 1 && audio.channels != 2) || - (audio.format != AUDIO_S8 && audio.format != AUDIO_S16SYS)) - ; // no function to encode this type of stream - else if (audio.channels == 1 && audio.format == AUDIO_S8) - I_UpdateStream8M(stream, len); - else if (audio.channels == 2 && audio.format == AUDIO_S8) - I_UpdateStream8S(stream, len); - else if (audio.channels == 1 && audio.format == AUDIO_S16SYS) - I_UpdateStream16M(stream, len); - else if (audio.channels == 2 && audio.format == AUDIO_S16SYS) - { - I_UpdateStream16S(stream, len); -#ifdef HAVE_LIBGME - if (userdata) - { - srb2audio_t *sa_userdata = userdata; - if (!sa_userdata->gme_pause) - I_UpdateSteamGME(sa_userdata->gme_emu, (INT16 *)stream, len/4, sa_userdata->gme_loop); - } -#endif - - } -} - -void I_UpdateSoundParams(INT32 handle, UINT8 vol, UINT8 sep, UINT8 pitch) -{ - // Would be using the handle to identify - // on which channel the sound might be active, - // and resetting the channel parameters. - - INT32 i = FindChannel(handle); - - if (i != -1 && channels[i].end) - { - //Snd_LockAudio(); //Alam: too much? - I_SetChannelParams(&channels[i], vol, sep, steptable[pitch]); - //Snd_UnlockAudio(); //Alam: too much? - } - -} - -#ifdef HW3SOUND - -static void *soundso = NULL; - -static INT32 Init3DSDriver(const char *soName) -{ - if (soName) soundso = hwOpen(soName); -#if defined (_WIN32) && defined (_X86_) && !defined (STATIC3DS) - HW3DS.pfnStartup = hwSym("Startup@8",soundso); - HW3DS.pfnShutdown = hwSym("Shutdown@0",soundso); - HW3DS.pfnAddSfx = hwSym("AddSfx@4",soundso); - HW3DS.pfnAddSource = hwSym("AddSource@8",soundso); - HW3DS.pfnStartSource = hwSym("StartSource@4",soundso); - HW3DS.pfnStopSource = hwSym("StopSource@4",soundso); - HW3DS.pfnGetHW3DSVersion = hwSym("GetHW3DSVersion@0",soundso); - HW3DS.pfnBeginFrameUpdate = hwSym("BeginFrameUpdate@0",soundso); - HW3DS.pfnEndFrameUpdate = hwSym("EndFrameUpdate@0",soundso); - HW3DS.pfnIsPlaying = hwSym("IsPlaying@4",soundso); - HW3DS.pfnUpdateListener = hwSym("UpdateListener@8",soundso); - HW3DS.pfnUpdateSourceParms = hwSym("UpdateSourceParms@12",soundso); - HW3DS.pfnSetCone = hwSym("SetCone@8",soundso); - HW3DS.pfnSetGlobalSfxVolume = hwSym("SetGlobalSfxVolume@4",soundso); - HW3DS.pfnUpdate3DSource = hwSym("Update3DSource@8",soundso); - HW3DS.pfnReloadSource = hwSym("ReloadSource@8",soundso); - HW3DS.pfnKillSource = hwSym("KillSource@4",soundso); - HW3DS.pfnKillSfx = hwSym("KillSfx@4",soundso); - HW3DS.pfnGetHW3DSTitle = hwSym("GetHW3DSTitle@8",soundso); -#else - HW3DS.pfnStartup = hwSym("Startup",soundso); - HW3DS.pfnShutdown = hwSym("Shutdown",soundso); - HW3DS.pfnAddSfx = hwSym("AddSfx",soundso); - HW3DS.pfnAddSource = hwSym("AddSource",soundso); - HW3DS.pfnStartSource = hwSym("StartSource",soundso); - HW3DS.pfnStopSource = hwSym("StopSource",soundso); - HW3DS.pfnGetHW3DSVersion = hwSym("GetHW3DSVersion",soundso); - HW3DS.pfnBeginFrameUpdate = hwSym("BeginFrameUpdate",soundso); - HW3DS.pfnEndFrameUpdate = hwSym("EndFrameUpdate",soundso); - HW3DS.pfnIsPlaying = hwSym("IsPlaying",soundso); - HW3DS.pfnUpdateListener = hwSym("UpdateListener",soundso); - HW3DS.pfnUpdateSourceParms = hwSym("UpdateSourceParms",soundso); - HW3DS.pfnSetCone = hwSym("SetCone",soundso); - HW3DS.pfnSetGlobalSfxVolume = hwSym("SetGlobalSfxVolume",soundso); - HW3DS.pfnUpdate3DSource = hwSym("Update3DSource",soundso); - HW3DS.pfnReloadSource = hwSym("ReloadSource",soundso); - HW3DS.pfnKillSource = hwSym("KillSource",soundso); - HW3DS.pfnKillSfx = hwSym("KillSfx",soundso); - HW3DS.pfnGetHW3DSTitle = hwSym("GetHW3DSTitle",soundso); -#endif - -// if (HW3DS.pfnUpdateListener2 && HW3DS.pfnUpdateListener2 != soundso) - return true; -// else -// return false; -} -#endif - -void I_ShutdownSound(void) -{ - if (nosound || !sound_started) - return; - - CONS_Printf("I_ShutdownSound: "); - -#ifdef HW3SOUND - if (hws_mode != HWS_DEFAULT_MODE) - { - HW3S_Shutdown(); - hwClose(soundso); - return; - } -#endif - - if (nomidimusic && nodigimusic) - SDL_CloseAudio(); - CONS_Printf("%s", M_GetText("shut down\n")); - sound_started = false; - SDL_QuitSubSystem(SDL_INIT_AUDIO); - if (Snd_Mutex) - SDL_DestroyMutex(Snd_Mutex); - Snd_Mutex = NULL; -} - -void I_UpdateSound(void) -{ -} - -void I_StartupSound(void) -{ -#ifdef HW3SOUND - const char *sdrv_name = NULL; -#endif -#ifndef HAVE_MIXER - nomidimusic = nodigimusic = true; -#endif -#ifdef DC - //nosound = true; -#ifdef HAVE_MIXER - nomidimusic = true; - nodigimusic = true; -#endif -#endif - - memset(channels, 0, sizeof (channels)); //Alam: Clean it - - audio.format = AUDIO_S16SYS; - audio.channels = 2; - audio.callback = I_UpdateStream; - audio.userdata = &localdata; - - if (dedicated) - { - nosound = nomidimusic = nodigimusic = true; - return; - } - - // Configure sound device - CONS_Printf("I_StartupSound:\n"); - - // Open the audio device - if (M_CheckParm ("-freq") && M_IsNextParm()) - { - audio.freq = atoi(M_GetNextParm()); - if (!audio.freq) audio.freq = cv_samplerate.value; - audio.samples = (Uint16)((samplecount/2)*(INT32)(audio.freq/11025)); //Alam: to keep it around the same XX ms - CONS_Printf (M_GetText(" requested frequency of %d hz\n"), audio.freq); - } - else - { - audio.samples = samplecount; - audio.freq = cv_samplerate.value; - } - - if (M_CheckParm ("-mono")) - { - audio.channels = 1; - audio.samples /= 2; - } - -#if defined (_PSP) && defined (HAVE_MIXER) // Bug in PSP's SDL_OpenAudio, can not open twice - I_SetChannels(); - sound_started = true; - Snd_Mutex = SDL_CreateMutex(); -#else - if (nosound) -#endif - return; - -#ifdef HW3SOUND -#ifdef STATIC3DS - if (M_CheckParm("-3dsound") || M_CheckParm("-ds3d")) - { - hws_mode = HWS_OPENAL; - } -#elif defined (_WIN32) - if (M_CheckParm("-ds3d")) - { - hws_mode = HWS_DS3D; - sdrv_name = "s_ds3d.dll"; - } - else if (M_CheckParm("-fmod3d")) - { - hws_mode = HWS_FMOD3D; - sdrv_name = "s_fmod.dll"; - } - else if (M_CheckParm("-openal")) - { - hws_mode = HWS_OPENAL; - sdrv_name = "s_openal.dll"; - } -#else - if (M_CheckParm("-fmod3d")) - { - hws_mode = HWS_FMOD3D; - sdrv_name = "./s_fmod.so"; - } - else if (M_CheckParm("-openal")) - { - hws_mode = HWS_OPENAL; - sdrv_name = "./s_openal.so"; - } -#endif - else if (M_CheckParm("-sounddriver") && M_IsNextParm()) - { - hws_mode = HWS_OTHER; - sdrv_name = M_GetNextParm(); - } - if (hws_mode != HWS_DEFAULT_MODE) - { - if (Init3DSDriver(sdrv_name)) - { - snddev_t snddev; - - //nosound = true; - //I_AddExitFunc(I_ShutdownSound); - snddev.bps = 16; - snddev.sample_rate = audio.freq; - snddev.numsfxs = NUMSFX; -#if defined (_WIN32) && !defined (_XBOX) - snddev.cooplevel = 0x00000002; - snddev.hWnd = vid.WndParent; -#endif - if (HW3S_Init(I_Error, &snddev)) - { - audio.userdata = NULL; - CONS_Printf("%s", M_GetText(" Using 3D sound driver\n")); - return; - } - CONS_Printf("%s", M_GetText(" Failed loading 3D sound driver\n")); - // Falls back to default sound system - HW3S_Shutdown(); - hwClose(soundso); - } - CONS_Printf("%s", M_GetText(" Failed loading 3D sound driver\n")); - hws_mode = HWS_DEFAULT_MODE; - } -#endif - if (!musicStarted && SDL_OpenAudio(&audio, &audio) < 0) - { - CONS_Printf("%s", M_GetText(" couldn't open audio with desired format\n")); - nosound = true; - return; - } - else - { - char ad[100]; - CONS_Printf(M_GetText(" Starting up with audio driver : %s\n"), SDL_AudioDriverName(ad, (int)sizeof ad)); - } - samplecount = audio.samples; - CV_SetValue(&cv_samplerate, audio.freq); - CONS_Printf(M_GetText(" configured audio device with %d samples/slice at %ikhz(%dms buffer)\n"), samplecount, audio.freq/1000, (INT32) (((float)audio.samples * 1000.0f) / audio.freq)); - // Finished initialization. - CONS_Printf("%s", M_GetText(" Sound module ready\n")); - //[segabor] - if (!musicStarted) SDL_PauseAudio(0); - //Mix_Pause(0); - I_SetChannels(); - sound_started = true; - Snd_Mutex = SDL_CreateMutex(); -} - -// -// MUSIC API. -// - -void I_ShutdownMIDIMusic(void) -{ - nomidimusic = false; - if (nodigimusic) I_ShutdownMusic(); -} - -#ifdef HAVE_LIBGME -static void I_ShutdownGMEMusic(void) -{ - Snd_LockAudio(); - if (localdata.gme_emu) - gme_delete(localdata.gme_emu); - localdata.gme_emu = NULL; - Snd_UnlockAudio(); -} -#endif - -void I_ShutdownDigMusic(void) -{ - nodigimusic = false; - if (nomidimusic) I_ShutdownMusic(); -} - -#ifdef HAVE_MIXER -static boolean LoadSong(void *data, size_t lumplength, size_t selectpos) -{ - FILE *midfile; - const char *tempname; -#ifdef USE_RWOPS - if (canuseRW) - { - SDL_RWops *SDLRW; - void *olddata = Smidi[selectpos]; //quick shortcut to set - - Z_Free(olddata); //free old memory - Smidi[selectpos] = NULL; - - if (!data) - return olddata != NULL; //was there old data? - - SDLRW = SDL_RWFromConstMem(data, (int)lumplength); //new RWops from Z_zone - if (!SDLRW) //ERROR while making RWops! - { - CONS_Printf(M_GetText("Couldn't load music lump: %s\n"), SDL_GetError()); - Z_Free(data); - return false; - } - - music[selectpos] = Mix_LoadMUS_RW(SDLRW); // new Mix_Chuck from RWops - if (music[selectpos]) - Smidi[selectpos] = data; //all done - else //ERROR while making Mix_Chuck - { - CONS_Printf(M_GetText("Couldn't load music data: %s\n"), Mix_GetError()); - Z_Free(data); - SDL_RWclose(SDLRW); - Smidi[selectpos] = NULL; - } - return true; - } -#endif - tempname = va("%s/%s", MIDI_PATH, fmidi[selectpos]); - - if (!data) - { - if (FIL_FileExists(tempname)) - return unlink(tempname)+1; -#ifdef MIDI_PATH2 - else if (FIL_FileExists(tempname = va("%s/%s", MIDI_PATH2, fmidi[selectpos]))) - return unlink(tempname)+1; -#endif - else - return false; - } - - midfile = fopen(tempname, "wb"); - -#ifdef MIDI_PATH2 - if (!midfile) - { - tempname = va("%s/%s", MIDI_PATH2, fmidi[selectpos]); - midfile = fopen(tempname, "wb"); - } -#endif - - if (!midfile) - { - CONS_Printf(M_GetText("Couldn't open file %s to write music in\n"), tempname); - Z_Free(data); - return false; - } - - if (fwrite(data, lumplength, 1, midfile) == 0) - { - CONS_Printf(M_GetText("Couldn't write music into file %s because %s\n"), tempname, M_FileError(midfile)); - Z_Free(data); - fclose(midfile); - return false; - } - - fclose(midfile); - - Z_Free(data); - - music[selectpos] = Mix_LoadMUS(tempname); - if (!music[selectpos]) //ERROR while making Mix_Chuck - { - CONS_Printf(M_GetText("Couldn't load music file %s: %s\n"), tempname, Mix_GetError()); - return false; - } - return true; -} -#endif - - -void I_ShutdownMusic(void) -{ -#ifdef HAVE_MIXER - if ((nomidimusic && nodigimusic) || !musicStarted) - return; - - CONS_Printf("%s", M_GetText("I_ShutdownMusic: ")); - - I_UnRegisterSong(0); - I_StopDigSong(); - Mix_CloseAudio(); -#ifdef MIX_INIT - Mix_Quit(); -#endif - CONS_Printf("%s", M_GetText("shut down\n")); - musicStarted = SDL_FALSE; - if (Msc_Mutex) - SDL_DestroyMutex(Msc_Mutex); - Msc_Mutex = NULL; -#endif -} - -void I_InitMIDIMusic(void) -{ - if (nodigimusic) I_InitMusic(); -} - -void I_InitDigMusic(void) -{ - if (nomidimusic) I_InitMusic(); -} - -void I_InitMusic(void) -{ -#ifdef HAVE_MIXER - char ad[100]; - SDL_version MIXcompiled; - const SDL_version *MIXlinked; -#ifdef MIXER_INIT - const int mixstart = MIX_INIT_OGG; - int mixflags; -#endif -#endif -#ifdef HAVE_LIBGME - I_AddExitFunc(I_ShutdownGMEMusic); -#endif - - if ((nomidimusic && nodigimusic) || dedicated) - return; - -#ifdef HAVE_MIXER - MIX_VERSION(&MIXcompiled) - MIXlinked = Mix_Linked_Version(); - I_OutputMsg("Compiled for SDL_mixer version: %d.%d.%d\n", - MIXcompiled.major, MIXcompiled.minor, MIXcompiled.patch); -#ifdef MIXER_POS -#ifndef _WII - if (MIXlinked->major == 1 && MIXlinked->minor == 2 && MIXlinked->patch < 7) -#endif - canlooping = SDL_FALSE; -#endif -#ifdef USE_RWOPS - if (M_CheckParm("-noRW")) - canuseRW = SDL_FALSE; -#endif - I_OutputMsg("Linked with SDL_mixer version: %d.%d.%d\n", - MIXlinked->major, MIXlinked->minor, MIXlinked->patch); -#if !(defined (DC) || defined (PSP) || defined(GP2X) || defined (WII)) - if (audio.freq < 44100 && !M_CheckParm ("-freq")) //I want atleast 44Khz - { - audio.samples = (Uint16)(audio.samples*(INT32)(44100/audio.freq)); - audio.freq = 44100; //Alam: to keep it around the same XX ms - } -#endif - - if (sound_started -#ifdef HW3SOUND - && hws_mode == HWS_DEFAULT_MODE -#endif - ) - { - I_OutputMsg("Temp Shutdown of SDL Audio System"); - SDL_CloseAudio(); - I_OutputMsg(" Done\n"); - } - - CONS_Printf("%s", M_GetText("I_InitMusic:")); - -#ifdef MIXER_INIT - mixflags = Mix_Init(mixstart); - if ((mixstart & MIX_INIT_FLAC) != (mixflags & MIX_INIT_FLAC)) - { - CONS_Printf("%s", M_GetText(" Unable to load FLAC support\n")); - } - if ((mixstart & MIX_INIT_MOD ) != (mixflags & MIX_INIT_MOD )) - { - CONS_Printf("%s", M_GetText(" Unable to load MOD support\n")); - } - if ((mixstart & MIX_INIT_MP3 ) != (mixflags & MIX_INIT_MP3 )) - { - CONS_Printf("%s", M_GetText(" Unable to load MP3 support\n")); - } - if ((mixstart & MIX_INIT_OGG ) != (mixflags & MIX_INIT_OGG )) - { - CONS_Printf("%s", M_GetText(" Unable to load OGG support\n")); - } -#endif - - if (Mix_OpenAudio(audio.freq, audio.format, audio.channels, audio.samples) < 0) //open_music(&audio) - { - CONS_Printf(M_GetText(" Unable to open music: %s\n"), Mix_GetError()); - nomidimusic = nodigimusic = true; - if (sound_started -#ifdef HW3SOUND - && hws_mode == HWS_DEFAULT_MODE -#endif - ) - { - if (SDL_OpenAudio(&audio, NULL) < 0) //retry - { - CONS_Printf("%s", M_GetText(" couldn't open audio with desired format\n")); - nosound = true; - sound_started = false; - } - else - { - CONS_Printf(M_GetText(" Starting with audio driver : %s\n"), SDL_AudioDriverName(ad, (int)sizeof ad)); - } - } - return; - } - else - CONS_Printf(M_GetText(" Starting up with audio driver : %s with SDL_Mixer\n"), SDL_AudioDriverName(ad, (int)sizeof ad)); - - samplecount = audio.samples; - CV_SetValue(&cv_samplerate, audio.freq); - if (sound_started -#ifdef HW3SOUND - && hws_mode == HWS_DEFAULT_MODE -#endif - ) - I_OutputMsg(" Reconfigured SDL Audio System"); - else I_OutputMsg(" Configured SDL_Mixer System"); - I_OutputMsg(" with %d samples/slice at %ikhz(%dms buffer)\n", samplecount, audio.freq/1000, (INT32) ((audio.samples * 1000.0f) / audio.freq)); - Mix_SetPostMix(audio.callback, audio.userdata); // after mixing music, add sound effects - Mix_Resume(-1); - CONS_Printf("%s", M_GetText("Music initialized\n")); - musicStarted = SDL_TRUE; - Msc_Mutex = SDL_CreateMutex(); -#endif -} - -boolean I_PlaySong(INT32 handle, boolean looping) -{ - (void)handle; -#ifdef HAVE_MIXER - if (nomidimusic || !musicStarted || !music[handle]) - return false; - -#ifdef MIXER_POS - if (canlooping) - Mix_HookMusicFinished(NULL); -#endif - - if (Mix_FadeInMusic(music[handle], looping ? -1 : 0, MIDIfade) == -1) - CONS_Printf(M_GetText("Couldn't play song because %s\n"), Mix_GetError()); - else - { - Mix_VolumeMusic(musicvol); - return true; - } -#else - (void)looping; -#endif - return false; -} - -static void I_PauseGME(void) -{ -#ifdef HAVE_LIBGME - localdata.gme_pause = true; -#endif -} - -void I_PauseSong(INT32 handle) -{ - (void)handle; - I_PauseGME(); -#ifdef HAVE_MIXER - if ((nomidimusic && nodigimusic) || !musicStarted) - return; - - Mix_PauseMusic(); - //I_StopSong(handle); -#endif -} - -static void I_ResumeGME(void) -{ -#ifdef HAVE_LIBGME - localdata.gme_pause = false; -#endif -} - -void I_ResumeSong(INT32 handle) -{ - (void)handle; - I_ResumeGME(); -#ifdef HAVE_MIXER - if ((nomidimusic && nodigimusic) || !musicStarted) - return; - - Mix_VolumeMusic(musicvol); - Mix_ResumeMusic(); - //I_PlaySong(handle, true); -#endif -} - -void I_StopSong(INT32 handle) -{ - (void)handle; -#ifdef HAVE_MIXER - if (nomidimusic || !musicStarted) - return; - Mix_FadeOutMusic(MIDIfade); -#endif -} - -void I_UnRegisterSong(INT32 handle) -{ -#ifdef HAVE_MIXER - - if (nomidimusic || !musicStarted) - return; - - Mix_HaltMusic(); - while (Mix_PlayingMusic()) - ; - - if (music[handle]) - Mix_FreeMusic(music[handle]); - music[handle] = NULL; - LoadSong(NULL, 0, handle); -#else - (void)handle; -#endif -} - -INT32 I_RegisterSong(void *data, size_t len) -{ -#ifdef HAVE_MIXER - if (nomidimusic || !musicStarted) - return false; - - if (!LoadSong(data, len, 0)) - return false; - - if (music[0]) - return true; - - CONS_Printf(M_GetText("Couldn't load MIDI: %s\n"), Mix_GetError()); -#else - (void)len; - (void)data; -#endif - return false; -} - -void I_SetMIDIMusicVolume(UINT8 volume) -{ -#ifdef HAVE_MIXER - if ((nomidimusic && nodigimusic) || !musicStarted) - return; - - if (Msc_Mutex) SDL_LockMutex(Msc_Mutex); - musicvol = volume * 2; - if (Msc_Mutex) SDL_UnlockMutex(Msc_Mutex); - Mix_VolumeMusic(musicvol); -#else - (void)volume; -#endif -} - -#ifdef HAVE_LIBGME -static void I_CleanupGME(void *userdata) -{ - Z_Free(userdata); -} -#endif - -static boolean I_StartGMESong(const char *musicname, boolean looping) -{ -#ifdef HAVE_LIBGME - XBOXSTATIC char filename[9]; - void *data; - lumpnum_t lumpnum; - size_t lumplength; - Music_Emu *emu; - const char* gme_err; - - Snd_LockAudio(); - if (localdata.gme_emu) - gme_delete(localdata.gme_emu); - localdata.gme_emu = NULL; - Snd_UnlockAudio(); - - snprintf(filename, sizeof filename, "o_%s", musicname); - - lumpnum = W_CheckNumForName(filename); - - if (lumpnum == LUMPERROR) - { - return false; // No music found. Oh well! - } - else - lumplength = W_LumpLength(lumpnum); - - data = W_CacheLumpNum(lumpnum, PU_MUSIC); - - gme_err = gme_open_data(data, (long)lumplength, &emu, audio.freq); - if (gme_err != NULL) { - //I_OutputMsg("I_StartGMESong: error %s\n",gme_err); - return false; - } - gme_set_user_data(emu, data); - gme_set_user_cleanup(emu, I_CleanupGME); - gme_start_track(emu, 0); - gme_set_fade(emu, Digfade); - - Snd_LockAudio(); - localdata.gme_emu = emu; - localdata.gme_pause = false; - localdata.gme_loop = (UINT8)looping; - Snd_UnlockAudio(); - - return true; -#else - (void)musicname; - (void)looping; -#endif - return false; -} - -boolean I_StartDigSong(const char *musicname, boolean looping) -{ -#ifdef HAVE_MIXER - XBOXSTATIC char filename[9]; - void *data; - lumpnum_t lumpnum; - size_t lumplength; -#endif - - if(I_StartGMESong(musicname, looping)) - return true; - -#ifdef HAVE_MIXER - if (nodigimusic) - return false; - - snprintf(filename, sizeof filename, "o_%s", musicname); - - lumpnum = W_CheckNumForName(filename); - - I_StopDigSong(); - - if (lumpnum == LUMPERROR) - { - // Alam_GBC: like in win32/win_snd.c: Graue 02-29-2004: don't worry about missing music, there might still be a MIDI - //I_OutputMsg("Music lump %s not found!\n", filename); - return false; // No music found. Oh well! - } - else - lumplength = W_LumpLength(lumpnum); - - data = W_CacheLumpNum(lumpnum, PU_MUSIC); - - if (Msc_Mutex) SDL_LockMutex(Msc_Mutex); - -#ifdef MIXER_POS - if (canlooping && (loopingDig = looping) == SDL_TRUE && strcmp(data, "OggS") == 0) - looping = false; // Only on looping Ogg files, will we will do our own looping - - // Scan the Ogg Vorbis file for the COMMENT= field for a custom - // loop point - if (!looping && loopingDig) - { - size_t scan; - const char *dataum = data; - XBOXSTATIC char looplength[64]; - UINT32 loopstart = 0; - UINT8 newcount = 0; - - Mix_HookMusicFinished(I_FinishMusic); - - for (scan = 0; scan < lumplength; scan++) - { - if (*dataum++ == 'C'){ - if (*dataum++ == 'O'){ - if (*dataum++ == 'M'){ - if (*dataum++ == 'M'){ - if (*dataum++ == 'E'){ - if (*dataum++ == 'N'){ - if (*dataum++ == 'T'){ - if (*dataum++ == '='){ - if (*dataum++ == 'L'){ - if (*dataum++ == 'O'){ - if (*dataum++ == 'O'){ - if (*dataum++ == 'P'){ - if (*dataum++ == 'P'){ - if (*dataum++ == 'O'){ - if (*dataum++ == 'I'){ - if (*dataum++ == 'N'){ - if (*dataum++ == 'T'){ - if (*dataum++ == '=') - { - - while (*dataum != 1 && newcount != 63) - looplength[newcount++] = *dataum++; - - looplength[newcount] = '\0'; - - loopstart = atoi(looplength); - - } - else - dataum--;} - else - dataum--;} - else - dataum--;} - else - dataum--;} - else - dataum--;} - else - dataum--;} - else - dataum--;} - else - dataum--;} - else - dataum--;} - else - dataum--;} - else - dataum--;} - else - dataum--;} - else - dataum--;} - else - dataum--;} - else - dataum--;} - else - dataum--;} - else - dataum--;} - } - - if (loopstart > 0) - { - loopstartDig = (double)((44.1l+loopstart) / 44100.0l); //8 PCM chucks off and PCM to secs -//#ifdef GP2X//#ifdef PARANOIA - //I_OutputMsg("I_StartDigSong: setting looping point to %ul PCMs(%f seconds)\n", loopstart, loopstartDig); -//#endif - } - else - { - looping = true; // loopingDig true, but couldn't find start loop point - } - } - else - loopstartDig = 0.0l; -#else - if (looping && strcmp(data, "OggS") == 0) - I_OutputMsg("I_StartDigSong: SRB2Kart was not compiled with looping music support(no Mix_FadeInMusicPos)\n"); -#endif - - if (!LoadSong(data, lumplength, 1)) - { - if (Msc_Mutex) SDL_UnlockMutex(Msc_Mutex); - return false; - } - - // Note: LoadSong() frees the data. Let's make sure - // we don't try to use the data again. - data = NULL; - - if (Mix_FadeInMusic(music[1], looping ? -1 : 0, Digfade) == -1) - { - if (Msc_Mutex) SDL_UnlockMutex(Msc_Mutex); - I_OutputMsg("I_StartDigSong: Couldn't play song %s because %s\n", musicname, Mix_GetError()); - return false; - } - Mix_VolumeMusic(musicvol); - - if (Msc_Mutex) SDL_UnlockMutex(Msc_Mutex); - return true; -#else - (void)looping; - (void)musicname; - return false; -#endif -} - -static void I_StopGME(void) -{ -#ifdef HAVE_LIBGME - Snd_LockAudio(); - gme_seek(localdata.gme_emu, 0); - Snd_UnlockAudio(); -#endif -} - -void I_StopDigSong(void) -{ - I_StopGME(); -#ifdef HAVE_MIXER - if (nodigimusic) - return; - -#ifdef MIXER_POS - if (canlooping) - Mix_HookMusicFinished(NULL); -#endif - - Mix_HaltMusic(); - while (Mix_PlayingMusic()) - ; - - if (music[1]) - Mix_FreeMusic(music[1]); - music[1] = NULL; - LoadSong(NULL, 0, 1); -#endif -} - -void I_SetDigMusicVolume(UINT8 volume) -{ - I_SetMIDIMusicVolume(volume); -} - -boolean I_SetSongSpeed(float speed) -{ - - (void)speed; - return false; -} - -boolean I_SetSongTrack(int track) -{ - (void)track; - return false; -} - -#ifdef MIXER_POS -static void SDLCALL I_FinishMusic(void) -{ - if (!music[1]) - return; - else if (Msc_Mutex) SDL_LockMutex(Msc_Mutex); -// I_OutputMsg("I_FinishMusic: Loopping song to %g seconds\n", loopstartDig); - - if (Mix_FadeInMusicPos(music[1], loopstartDig ? 0 : -1, Digfade, loopstartDig) == 0) - Mix_VolumeMusic(musicvol); - else - I_OutputMsg("I_FinishMusic: Couldn't loop song because %s\n", Mix_GetError()); - - if (Msc_Mutex) SDL_UnlockMutex(Msc_Mutex); -} -#endif -#endif //HAVE_SDL diff --git a/src/tmap.nas b/src/tmap.nas deleted file mode 100644 index 69282d0b4..000000000 --- a/src/tmap.nas +++ /dev/null @@ -1,957 +0,0 @@ -;; SONIC ROBO BLAST 2 -;;----------------------------------------------------------------------------- -;; Copyright (C) 1998-2000 by DooM Legacy Team. -;; Copyright (C) 1999-2020 by Sonic Team Junior. -;; -;; This program is free software distributed under the -;; terms of the GNU General Public License, version 2. -;; See the 'LICENSE' file for more details. -;;----------------------------------------------------------------------------- -;; FILE: -;; tmap.nas -;; DESCRIPTION: -;; Assembler optimised rendering code for software mode. -;; Draw wall columns. - - -[BITS 32] - -%define FRACBITS 16 -%define TRANSPARENTPIXEL 255 - -%ifdef LINUX -%macro cextern 1 -[extern %1] -%endmacro - -%macro cglobal 1 -[global %1] -%endmacro - -%else -%macro cextern 1 -%define %1 _%1 -[extern %1] -%endmacro - -%macro cglobal 1 -%define %1 _%1 -[global %1] -%endmacro - -%endif - - -; The viddef_s structure. We only need the width field. -struc viddef_s - resb 12 -.width: resb 4 - resb 44 -endstruc - -;; externs -;; columns -cextern dc_x -cextern dc_yl -cextern dc_yh -cextern ylookup -cextern columnofs -cextern dc_source -cextern dc_texturemid -cextern dc_texheight -cextern dc_iscale -cextern dc_hires -cextern centery -cextern centeryfrac -cextern dc_colormap -cextern dc_transmap -cextern colormaps -cextern vid -cextern topleft - -; DELME -cextern R_DrawColumn_8 - -; polygon edge rasterizer -cextern prastertab - -[SECTION .data] - -;;.align 4 -loopcount dd 0 -pixelcount dd 0 -tystep dd 0 - -[SECTION .text] - -;;---------------------------------------------------------------------- -;; -;; R_DrawColumn : 8bpp column drawer -;; -;; New optimised version 10-01-1998 by D.Fabrice and P.Boris -;; Revised by G. Dick July 2010 to support the intervening twelve years' -;; worth of changes to the renderer. Since I only vaguely know what I'm -;; doing, this is probably rather suboptimal. Help appreciated! -;; -;;---------------------------------------------------------------------- -;; fracstep, vid.width in memory -;; eax = accumulator -;; ebx = colormap -;; ecx = count -;; edx = heightmask -;; esi = source -;; edi = dest -;; ebp = frac -;;---------------------------------------------------------------------- - -cglobal R_DrawColumn_8_ASM -; align 16 -R_DrawColumn_8_ASM: - push ebp ;; preserve caller's stack frame pointer - push esi ;; preserve register variables - push edi - push ebx -;; -;; dest = ylookup[dc_yl] + columnofs[dc_x]; -;; - mov ebp,[dc_yl] - mov edi,[ylookup+ebp*4] - mov ebx,[dc_x] - add edi,[columnofs+ebx*4] ;; edi = dest -;; -;; pixelcount = yh - yl + 1 -;; - mov ecx,[dc_yh] - add ecx,1 - sub ecx,ebp ;; pixel count - jle near .done ;; nothing to scale -;; -;; fracstep = dc_iscale; // But we just use [dc_iscale] -;; frac = (dc_texturemid + FixedMul((dc_yl << FRACBITS) - centeryfrac, fracstep)); -;; - mov eax,ebp ;; dc_yl - shl eax,FRACBITS - sub eax,[centeryfrac] - imul dword [dc_iscale] - shrd eax,edx,FRACBITS - add eax,[dc_texturemid] - mov ebp,eax ;; ebp = frac - - mov ebx,[dc_colormap] - - mov esi,[dc_source] -;; -;; if (dc_hires) frac = 0; -;; - test byte [dc_hires],0x01 - jz .texheightcheck - xor ebp,ebp - -;; -;; Check for power of two -;; -.texheightcheck: - mov edx,[dc_texheight] - sub edx,1 ;; edx = heightmask - test edx,[dc_texheight] - jnz .notpowertwo - - test ecx,0x01 ;; Test for odd no. pixels - jnz .odd - -;; -;; Texture height is a power of two, so we get modular arithmetic by -;; masking -;; -.powertwo: - mov eax,ebp ;; eax = frac - sar eax,FRACBITS ;; Integer part - and eax,edx ;; eax &= heightmask - movzx eax,byte [esi + eax] ;; eax = texel - add ebp,[dc_iscale] ;; frac += fracstep - movzx eax,byte [ebx+eax] ;; Map through colormap - mov [edi],al ;; Write pixel - ;; dest += vid.width - add edi,[vid + viddef_s.width] - -.odd: - mov eax,ebp ;; eax = frac - sar eax,FRACBITS ;; Integer part - and eax,edx ;; eax &= heightmask - movzx eax,byte [esi + eax] ;; eax = texel - add ebp,[dc_iscale] ;; frac += fracstep - movzx eax,byte [ebx+eax] ;; Map through colormap - mov [edi],al ;; Write pixel - ;; dest += vid.width - add edi,[vid + viddef_s.width] - - - sub ecx,2 ;; count -= 2 - jg .powertwo - - jmp .done - -.notpowertwo: - add edx,1 - shl edx,FRACBITS - test ebp,ebp - jns .notpowtwoloop - -.makefracpos: - add ebp,edx ;; frac is negative; make it positive - js .makefracpos - -.notpowtwoloop: - cmp ebp,edx ;; Reduce mod height - jl .writenonpowtwo - sub ebp,edx - jmp .notpowtwoloop - -.writenonpowtwo: - mov eax,ebp ;; eax = frac - sar eax,FRACBITS ;; Integer part. - mov bl,[esi + eax] ;; ebx = colormap + texel - add ebp,[dc_iscale] ;; frac += fracstep - movzx eax,byte [ebx] ;; Map through colormap - mov [edi],al ;; Write pixel - ;; dest += vid.width - add edi,[vid + viddef_s.width] - - sub ecx,1 - jnz .notpowtwoloop - -;; - -.done: - pop ebx ;; restore register variables - pop edi - pop esi - pop ebp ;; restore caller's stack frame pointer - ret - - -;;---------------------------------------------------------------------- -;; -;; R_Draw2sMultiPatchColumn : Like R_DrawColumn, but omits transparent -;; pixels. -;; -;; New optimised version 10-01-1998 by D.Fabrice and P.Boris -;; Revised by G. Dick July 2010 to support the intervening twelve years' -;; worth of changes to the renderer. Since I only vaguely know what I'm -;; doing, this is probably rather suboptimal. Help appreciated! -;; -;;---------------------------------------------------------------------- -;; fracstep, vid.width in memory -;; eax = accumulator -;; ebx = colormap -;; ecx = count -;; edx = heightmask -;; esi = source -;; edi = dest -;; ebp = frac -;;---------------------------------------------------------------------- - -cglobal R_Draw2sMultiPatchColumn_8_ASM -; align 16 -R_Draw2sMultiPatchColumn_8_ASM: - push ebp ;; preserve caller's stack frame pointer - push esi ;; preserve register variables - push edi - push ebx -;; -;; dest = ylookup[dc_yl] + columnofs[dc_x]; -;; - mov ebp,[dc_yl] - mov edi,[ylookup+ebp*4] - mov ebx,[dc_x] - add edi,[columnofs+ebx*4] ;; edi = dest -;; -;; pixelcount = yh - yl + 1 -;; - mov ecx,[dc_yh] - add ecx,1 - sub ecx,ebp ;; pixel count - jle near .done ;; nothing to scale -;; -;; fracstep = dc_iscale; // But we just use [dc_iscale] -;; frac = (dc_texturemid + FixedMul((dc_yl << FRACBITS) - centeryfrac, fracstep)); -;; - mov eax,ebp ;; dc_yl - shl eax,FRACBITS - sub eax,[centeryfrac] - imul dword [dc_iscale] - shrd eax,edx,FRACBITS - add eax,[dc_texturemid] - mov ebp,eax ;; ebp = frac - - mov ebx,[dc_colormap] - - mov esi,[dc_source] -;; -;; if (dc_hires) frac = 0; -;; - test byte [dc_hires],0x01 - jz .texheightcheck - xor ebp,ebp - -;; -;; Check for power of two -;; -.texheightcheck: - mov edx,[dc_texheight] - sub edx,1 ;; edx = heightmask - test edx,[dc_texheight] - jnz .notpowertwo - - test ecx,0x01 ;; Test for odd no. pixels - jnz .odd - -;; -;; Texture height is a power of two, so we get modular arithmetic by -;; masking -;; -.powertwo: - mov eax,ebp ;; eax = frac - sar eax,FRACBITS ;; Integer part - and eax,edx ;; eax &= heightmask - movzx eax,byte [esi + eax] ;; eax = texel - add ebp,[dc_iscale] ;; frac += fracstep - cmp al,TRANSPARENTPIXEL ;; Is pixel transparent? - je .nextpowtwoeven ;; If so, advance. - movzx eax,byte [ebx+eax] ;; Map through colormap - mov [edi],al ;; Write pixel -.nextpowtwoeven: - ;; dest += vid.width - add edi,[vid + viddef_s.width] - -.odd: - mov eax,ebp ;; eax = frac - sar eax,FRACBITS ;; Integer part - and eax,edx ;; eax &= heightmask - movzx eax,byte [esi + eax] ;; eax = texel - add ebp,[dc_iscale] ;; frac += fracstep - cmp al,TRANSPARENTPIXEL ;; Is pixel transparent? - je .nextpowtwoodd ;; If so, advance. - movzx eax,byte [ebx+eax] ;; Map through colormap - mov [edi],al ;; Write pixel -.nextpowtwoodd: - ;; dest += vid.width - add edi,[vid + viddef_s.width] - - - sub ecx,2 ;; count -= 2 - jg .powertwo - - jmp .done - -.notpowertwo: - add edx,1 - shl edx,FRACBITS - test ebp,ebp - jns .notpowtwoloop - -.makefracpos: - add ebp,edx ;; frac is negative; make it positive - js .makefracpos - -.notpowtwoloop: - cmp ebp,edx ;; Reduce mod height - jl .writenonpowtwo - sub ebp,edx - jmp .notpowtwoloop - -.writenonpowtwo: - mov eax,ebp ;; eax = frac - sar eax,FRACBITS ;; Integer part. - mov bl,[esi + eax] ;; ebx = colormap + texel - add ebp,[dc_iscale] ;; frac += fracstep - cmp bl,TRANSPARENTPIXEL ;; Is pixel transparent? - je .nextnonpowtwo ;; If so, advance. - movzx eax,byte [ebx] ;; Map through colormap - mov [edi],al ;; Write pixel -.nextnonpowtwo: - ;; dest += vid.width - add edi,[vid + viddef_s.width] - - sub ecx,1 - jnz .notpowtwoloop - -;; - -.done: - pop ebx ;; restore register variables - pop edi - pop esi - pop ebp ;; restore caller's stack frame pointer - ret - -;;---------------------------------------------------------------------- -;; R_DrawTranslucentColumnA_8 -;; -;; Vertical column texture drawer, with transparency. Replaces Doom2's -;; 'fuzz' effect, which was not so beautiful. -;; Transparency is always impressive in some way, don't know why... -;;---------------------------------------------------------------------- - -cglobal R_DrawTranslucentColumn_8_ASM -R_DrawTranslucentColumn_8_ASM: - push ebp ;; preserve caller's stack frame pointer - push esi ;; preserve register variables - push edi - push ebx -;; -;; dest = ylookup[dc_yl] + columnofs[dc_x]; -;; - mov ebp,[dc_yl] - mov ebx,ebp - mov edi,[ylookup+ebx*4] - mov ebx,[dc_x] - add edi,[columnofs+ebx*4] ;; edi = dest -;; -;; pixelcount = yh - yl + 1 -;; - mov eax,[dc_yh] - inc eax - sub eax,ebp ;; pixel count - mov [pixelcount],eax ;; save for final pixel - jle near vtdone ;; nothing to scale -;; -;; frac = dc_texturemid - (centery-dc_yl)*fracstep; -;; - mov ecx,[dc_iscale] ;; fracstep - mov eax,[centery] - sub eax,ebp - imul eax,ecx - mov edx,[dc_texturemid] - sub edx,eax - mov ebx,edx - - shr ebx,16 ;; frac int. - and ebx,0x7f - shl edx,16 ;; y frac up - - mov ebp,ecx - shl ebp,16 ;; fracstep f. up - shr ecx,16 ;; fracstep i. ->cl - and cl,0x7f - push cx - mov ecx,edx - pop cx - mov edx,[dc_colormap] - mov esi,[dc_source] -;; -;; lets rock :) ! -;; - mov eax,[pixelcount] - shr eax,0x2 - test byte [pixelcount],0x3 - mov ch,al ;; quad count - mov eax,[dc_transmap] - je vt4quadloop -;; -;; do un-even pixel -;; - test byte [pixelcount],0x1 - je trf2 - - mov ah,[esi+ebx] ;; fetch texel : colormap number - add ecx,ebp - adc bl,cl - mov al,[edi] ;; fetch dest : index into colormap - and bl,0x7f - mov dl,[eax] - mov dl,[edx] - mov [edi],dl -pf: add edi,0x12345678 -;; -;; do two non-quad-aligned pixels -;; -trf2: test byte [pixelcount],0x2 - je trf3 - - mov ah,[esi+ebx] ;; fetch texel : colormap number - add ecx,ebp - adc bl,cl - mov al,[edi] ;; fetch dest : index into colormap - and bl,0x7f - mov dl,[eax] - mov dl,[edx] - mov [edi],dl -pg: add edi,0x12345678 - - mov ah,[esi+ebx] ;; fetch texel : colormap number - add ecx,ebp - adc bl,cl - mov al,[edi] ;; fetch dest : index into colormap - and bl,0x7f - mov dl,[eax] - mov dl,[edx] - mov [edi],dl -ph: add edi,0x12345678 -;; -;; test if there was at least 4 pixels -;; -trf3: test ch,0xff ;; test quad count - je near vtdone - -;; -;; ebp : ystep frac. upper 24 bits -;; edx : y frac. upper 24 bits -;; ebx : y i. lower 7 bits, masked for index -;; ecx : ch = counter, cl = y step i. -;; eax : colormap aligned 256 -;; esi : source texture column -;; edi : dest screen -;; -vt4quadloop: - mov ah,[esi+ebx] ;; fetch texel : colormap number - mov [tystep],ebp -pi: add edi,0x12345678 - mov al,[edi] ;; fetch dest : index into colormap -pj: sub edi,0x12345678 - mov ebp,edi -pk: sub edi,0x12345678 - jmp short inloop -align 4 -vtquadloop: - add ecx,[tystep] - adc bl,cl -q1: add ebp,0x23456789 - and bl,0x7f - mov dl,[eax] - mov ah,[esi+ebx] ;; fetch texel : colormap number - mov dl,[edx] - mov [edi],dl - mov al,[ebp] ;; fetch dest : index into colormap -inloop: - add ecx,[tystep] - adc bl,cl -q2: add edi,0x23456789 - and bl,0x7f - mov dl,[eax] - mov ah,[esi+ebx] ;; fetch texel : colormap number - mov dl,[edx] - mov [ebp+0x0],dl - mov al,[edi] ;; fetch dest : index into colormap - - add ecx,[tystep] - adc bl,cl -q3: add ebp,0x23456789 - and bl,0x7f - mov dl,[eax] - mov ah,[esi+ebx] ;; fetch texel : colormap number - mov dl,[edx] - mov [edi],dl - mov al,[ebp] ;; fetch dest : index into colormap - - add ecx,[tystep] - adc bl,cl -q4: add edi,0x23456789 - and bl,0x7f - mov dl,[eax] - mov ah,[esi+ebx] ;; fetch texel : colormap number - mov dl,[edx] - mov [ebp],dl - mov al,[edi] ;; fetch dest : index into colormap - - dec ch - jne vtquadloop -vtdone: - pop ebx - pop edi - pop esi - pop ebp - ret - -;;---------------------------------------------------------------------- -;; R_DrawShadeColumn -;; -;; for smoke..etc.. test. -;;---------------------------------------------------------------------- -cglobal R_DrawShadeColumn_8_ASM -R_DrawShadeColumn_8_ASM: - push ebp ;; preserve caller's stack frame pointer - push esi ;; preserve register variables - push edi - push ebx - -;; -;; dest = ylookup[dc_yl] + columnofs[dc_x]; -;; - mov ebp,[dc_yl] - mov ebx,ebp - mov edi,[ylookup+ebx*4] - mov ebx,[dc_x] - add edi,[columnofs+ebx*4] ;; edi = dest -;; -;; pixelcount = yh - yl + 1 -;; - mov eax,[dc_yh] - inc eax - sub eax,ebp ;; pixel count - mov [pixelcount],eax ;; save for final pixel - jle near shdone ;; nothing to scale -;; -;; frac = dc_texturemid - (centery-dc_yl)*fracstep; -;; - mov ecx,[dc_iscale] ;; fracstep - mov eax,[centery] - sub eax,ebp - imul eax,ecx - mov edx,[dc_texturemid] - sub edx,eax - mov ebx,edx - shr ebx,16 ;; frac int. - and ebx,byte +0x7f - shl edx,16 ;; y frac up - - mov ebp,ecx - shl ebp,16 ;; fracstep f. up - shr ecx,16 ;; fracstep i. ->cl - and cl,0x7f - - mov esi,[dc_source] -;; -;; lets rock :) ! -;; - mov eax,[pixelcount] - mov dh,al - shr eax,2 - mov ch,al ;; quad count - mov eax,[colormaps] - test dh,3 - je sh4quadloop -;; -;; do un-even pixel -;; - test dh,0x1 - je shf2 - - mov ah,[esi+ebx] ;; fetch texel : colormap number - add edx,ebp - adc bl,cl - mov al,[edi] ;; fetch dest : index into colormap - and bl,0x7f - mov dl,[eax] - mov [edi],dl -pl: add edi,0x12345678 -;; -;; do two non-quad-aligned pixels -;; -shf2: - test dh,0x2 - je shf3 - - mov ah,[esi+ebx] ;; fetch texel : colormap number - add edx,ebp - adc bl,cl - mov al,[edi] ;; fetch dest : index into colormap - and bl,0x7f - mov dl,[eax] - mov [edi],dl -pm: add edi,0x12345678 - - mov ah,[esi+ebx] ;; fetch texel : colormap number - add edx,ebp - adc bl,cl - mov al,[edi] ;; fetch dest : index into colormap - and bl,0x7f - mov dl,[eax] - mov [edi],dl -pn: add edi,0x12345678 -;; -;; test if there was at least 4 pixels -;; -shf3: - test ch,0xff ;; test quad count - je near shdone - -;; -;; ebp : ystep frac. upper 24 bits -;; edx : y frac. upper 24 bits -;; ebx : y i. lower 7 bits, masked for index -;; ecx : ch = counter, cl = y step i. -;; eax : colormap aligned 256 -;; esi : source texture column -;; edi : dest screen -;; -sh4quadloop: - mov dh,0x7f ;; prep mask - mov ah,[esi+ebx] ;; fetch texel : colormap number - mov [tystep],ebp -po: add edi,0x12345678 - mov al,[edi] ;; fetch dest : index into colormap -pp: sub edi,0x12345678 - mov ebp,edi -pq: sub edi,0x12345678 - jmp short shinloop - -align 4 -shquadloop: - add edx,[tystep] - adc bl,cl - and bl,dh -q5: add ebp,0x12345678 - mov dl,[eax] - mov ah,[esi+ebx] ;; fetch texel : colormap number - mov [edi],dl - mov al,[ebp] ;; fetch dest : index into colormap -shinloop: - add edx,[tystep] - adc bl,cl - and bl,dh -q6: add edi,0x12345678 - mov dl,[eax] - mov ah,[esi+ebx] ;; fetch texel : colormap number - mov [ebp],dl - mov al,[edi] ;; fetch dest : index into colormap - - add edx,[tystep] - adc bl,cl - and bl,dh -q7: add ebp,0x12345678 - mov dl,[eax] - mov ah,[esi+ebx] ;; fetch texel : colormap number - mov [edi],dl - mov al,[ebp] ;; fetch dest : index into colormap - - add edx,[tystep] - adc bl,cl - and bl,dh -q8: add edi,0x12345678 - mov dl,[eax] - mov ah,[esi+ebx] ;; fetch texel : colormap number - mov [ebp],dl - mov al,[edi] ;; fetch dest : index into colormap - - dec ch - jne shquadloop - -shdone: - pop ebx ;; restore register variables - pop edi - pop esi - pop ebp ;; restore caller's stack frame pointer - ret - - -;; ======================================================================== -;; Rasterization of the segments of a LINEAR polygne textur of manire. -;; It is thus a question of interpolating coordinate them at the edges of texture in -;; the time that the X-coordinates minx/maxx for each line. -;; the argument ' dir' indicates which edges of texture are Interpol?: -;; 0: segments associs at edge TOP? and BOTTOM? (constant TY) -;; 1: segments associs at the LEFT and RIGHT edge (constant TX) -;; ======================================================================== -;; -;; void rasterize_segment_tex( LONG x1, LONG y1, LONG x2, LONG y2, LONG tv1, LONG tv2, LONG tc, LONG dir ); -;; ARG1 ARG2 ARG3 ARG4 ARG5 ARG6 ARG7 ARG8 -;; -;; Pour dir = 0, (tv1,tv2) = (tX1,tX2), tc = tY, en effet TY est constant. -;; -;; Pour dir = 1, (tv1,tv2) = (tY1,tY2), tc = tX, en effet TX est constant. -;; -;; -;; Uses: extern struct rastery *_rastertab; -;; - -MINX EQU 0 -MAXX EQU 4 -TX1 EQU 8 -TY1 EQU 12 -TX2 EQU 16 -TY2 EQU 20 -RASTERY_SIZEOF EQU 24 - -cglobal rasterize_segment_tex_asm -rasterize_segment_tex_asm: - push ebp - mov ebp,esp - - sub esp,byte +0x8 ;; allocate the local variables - - push ebx - push esi - push edi - o16 mov ax,es - push eax - -;; #define DX [ebp-4] -;; #define TD [ebp-8] - - mov eax,[ebp+0xc] ;; y1 - mov ebx,[ebp+0x14] ;; y2 - cmp ebx,eax - je near .L_finished ;; special (y1==y2) segment horizontal, exit! - - jg near .L_rasterize_right - -;;rasterize_left: ;; one rasterize a segment LEFT of the polygne - - mov ecx,eax - sub ecx,ebx - inc ecx ;; y1-y2+1 - - mov eax,RASTERY_SIZEOF - mul ebx ;; * y2 - mov esi,[prastertab] - add esi,eax ;; point into rastertab[y2] - - mov eax,[ebp+0x8] ;; ARG1 - sub eax,[ebp+0x10] ;; ARG3 - shl eax,0x10 ;; ((x1-x2)<cl - andb $0x7f,%cl - - movl C(dc_source),%esi - -// -// lets rock :) ! -// - movl C(pixelcount),%eax - movb %al,%dh - shrl $2,%eax - movb %al,%ch // quad count - movl C(dc_colormap),%eax - testb $3,%dh - jz v4quadloop - -// -// do un-even pixel -// - testb $1,%dh - jz 2f - - movb (%esi,%ebx),%al // prep un-even loops - addl %ebp,%edx // ypos f += ystep f - adcb %cl,%bl // ypos i += ystep i - movb (%eax),%dl // colormap texel - andb $0x7f,%bl // mask 0-127 texture index - movb %dl,(%edi) // output pixel - addl C(vidwidth),%edi - -// -// do two non-quad-aligned pixels -// -2: - testb $2,%dh - jz 3f - - movb (%esi,%ebx),%al // fetch source texel - addl %ebp,%edx // ypos f += ystep f - adcb %cl,%bl // ypos i += ystep i - movb (%eax),%dl // colormap texel - andb $0x7f,%bl // mask 0-127 texture index - movb %dl,(%edi) // output pixel - - movb (%esi,%ebx),%al // fetch source texel - addl %ebp,%edx // ypos f += ystep f - adcb %cl,%bl // ypos i += ystep i - movb (%eax),%dl // colormap texel - andb $0x7f,%bl // mask 0-127 texture index - addl C(vidwidth),%edi - movb %dl,(%edi) // output pixel - - addl C(vidwidth),%edi - -// -// test if there was at least 4 pixels -// -3: - testb $0xFF,%ch // test quad count - jz vdone - -// -// ebp : ystep frac. upper 24 bits -// edx : y frac. upper 24 bits -// ebx : y i. lower 7 bits, masked for index -// ecx : ch = counter, cl = y step i. -// eax : colormap aligned 256 -// esi : source texture column -// edi : dest screen -// -v4quadloop: - movb $0x7f,%dh // prep mask -// .align 4 -vquadloop: - movb (%esi,%ebx),%al // prep loop - addl %ebp,%edx // ypos f += ystep f - adcb %cl,%bl // ypos i += ystep i - movb (%eax),%dl // colormap texel - movb %dl,(%edi) // output pixel - andb $0x7f,%bl // mask 0-127 texture index - - movb (%esi,%ebx),%al // fetch source texel - addl %ebp,%edx - adcb %cl,%bl - movb (%eax),%dl -p1: movb %dl,0x12345678(%edi) - andb $0x7f,%bl - - movb (%esi,%ebx),%al // fetch source texel - addl %ebp,%edx - adcb %cl,%bl - movb (%eax),%dl -p2: movb %dl,2*0x12345678(%edi) - andb $0x7f,%bl - - movb (%esi,%ebx),%al // fetch source texel - addl %ebp,%edx - adcb %cl,%bl - movb (%eax),%dl -p3: movb %dl,3*0x12345678(%edi) - andb $0x7f,%bl - -p4: addl $4*0x12345678,%edi - - decb %ch - jnz vquadloop - -vdone: - popl %ebx // restore register variables - popl %edi - popl %esi - popl %ebp // restore caller's stack frame pointer - ret - -#ifdef HORIZONTALDRAW -// -------------------------------------------------------------------------- -// Horizontal Column Drawer Optimisation -// -------------------------------------------------------------------------- - -#ifdef LINUX - .align 2 -#else - .align 5 -#endif -.globl C(R_DrawHColumn_8) -C(R_DrawHColumn_8): - pushl %ebp - pushl %esi - pushl %edi - pushl %ebx - -// -// dest = yhlookup[dc_x] + hcolumnofs[dc_yl]; -// - movl C(dc_x),%ebx - movl C(yhlookup)(,%ebx,4),%edi - movl C(dc_yl),%ebp - movl %ebp,%ebx - addl C(hcolumnofs)(,%ebx,4),%edi // edi = dest - -// -// pixelcount = yh - yl + 1 -// - movl C(dc_yh),%eax - incl %eax - subl %ebp,%eax // pixel count - movl %eax,C(pixelcount) // save for final pixel - jle vhdone // nothing to scale - -// -// frac = dc_texturemid - (centery-dc_yl)*fracstep; -// - movl C(dc_iscale),%ecx // fracstep - movl C(centery),%eax - subl %ebp,%eax - imul %ecx,%eax - movl C(dc_texturemid),%edx - subl %eax,%edx - movl %edx,%ebx - shrl $16,%ebx // frac int. - andl $0x0000007f,%ebx - shll $16,%edx // y frac up - - movl %ecx,%ebp - shll $16,%ebp // fracstep f. up - shrl $16,%ecx // fracstep i. ->cl - andb $0x7f,%cl - - movl C(dc_source),%esi - -// -// lets rock :) ! -// - - movl C(pixelcount),%eax - movb %al,%dh - shrl $2,%eax - movb %al,%ch // quad count - - testb %ch, %ch - jz vhnearlydone - - movl C(dc_colormap),%eax - decl %edi //----- - -vhloop: - movb (%esi,%ebx),%al // fetch source texel - addl %ebp,%edx - adcb %cl,%bl - andb $0x7f,%bl - incl %edi //----- - movb (%eax),%dh - movb %dh,(%edi) //----- - - movb (%esi,%ebx),%al // fetch source texel - addl %ebp,%edx - incl %edi //----- - adcb %cl,%bl - movb (%eax),%dl - andb $0x7f,%bl - movb %dl,(%edi) //----- - - movb (%esi,%ebx),%al // fetch source texel - addl %ebp,%edx - adcb %cl,%bl -// shll $16,%edx - andb $0x7f,%bl - incl %edi //----- - movb (%eax),%dh - movb %dh,(%edi) //----- - - movb (%esi,%ebx),%al // fetch source texel - addl %ebp,%edx - incl %edi //----- - adcb %cl,%bl - movb (%eax),%dl - andb $0x7f,%bl - movb %dl,(%edi) -// movl %edx,(%edi) -// addl $4,%edi - - decb %ch - jnz vhloop - -vhnearlydone: -// movl C(pixelcount) - -vhdone: - popl %ebx - popl %edi - popl %esi - popl %ebp - ret - - -// -------------------------------------------------------------------------- -// Rotate a buffer 90 degree in clockwise order after horiz.col. draws -// -------------------------------------------------------------------------- - -#ifdef LINUX - .align 2 -#else - .align 5 -#endif -.globl C(R_RotateBuffer) -C(R_RotateBuffer): - pushl %ebp - pushl %esi - pushl %edi - pushl %ebx - - - movl C(dc_source),%esi - movl C(dc_colormap),%edi - - - movb (%esi),%ah - addl $200,%esi - movb (%ebx),%al - addl $200,%ebx - bswap %eax - movb (%esi),%ah - addl $200,%esi - movb (%ebx),%al - addl $200,%ebx - movl %eax,(%edi) - addl $4,%edi - - - popl %ebx - popl %edi - popl %esi - popl %ebp - ret -#endif - -//---------------------------------------------------------------------- -//13-02-98: -// R_DrawSkyColumn : same as R_DrawColumn but: -// -// - wrap around 256 instead of 127. -// this is needed because we have a higher texture for mouselook, -// we need at least 200 lines for the sky. -// -// NOTE: the sky should never wrap, so it could use a faster method. -// for the moment, we'll still use a wrapping method... -// -// IT S JUST A QUICK CUT N PASTE, WAS NOT OPTIMISED AS IT SHOULD BE !!! -// -//---------------------------------------------------------------------- - -#ifdef LINUX - .align 2 -#else - .align 5 -#endif -.globl C(R_DrawSkyColumn_8) -C(R_DrawSkyColumn_8): - pushl %ebp - pushl %esi - pushl %edi - pushl %ebx - -// -// dest = ylookup[dc_yl] + columnofs[dc_x]; -// - movl C(dc_yl),%ebp - movl %ebp,%ebx - movl C(ylookup)(,%ebx,4),%edi - movl C(dc_x),%ebx - addl C(columnofs)(,%ebx,4),%edi // edi = dest - -// -// pixelcount = yh - yl + 1 -// - movl C(dc_yh),%eax - incl %eax - subl %ebp,%eax // pixel count - movl %eax,C(pixelcount) // save for final pixel - jle vskydone // nothing to scale - -// -// frac = dc_texturemid - (centery-dc_yl)*fracstep; -// - movl C(dc_iscale),%ecx // fracstep - movl C(centery),%eax - subl %ebp,%eax - imul %ecx,%eax - movl C(dc_texturemid),%edx - subl %eax,%edx - movl %edx,%ebx - shrl $16,%ebx // frac int. - andl $0x000000ff,%ebx - shll $16,%edx // y frac up - - movl %ecx,%ebp - shll $16,%ebp // fracstep f. up - shrl $16,%ecx // fracstep i. ->cl - - movl C(dc_source),%esi - -// -// lets rock :) ! -// - movl C(pixelcount),%eax - movb %al,%dh - shrl $2,%eax - movb %al,%ch // quad count - movl C(dc_colormap),%eax - testb $3,%dh - jz v4skyquadloop - -// -// do un-even pixel -// - testb $1,%dh - jz 2f - - movb (%esi,%ebx),%al // prep un-even loops - addl %ebp,%edx // ypos f += ystep f - adcb %cl,%bl // ypos i += ystep i - movb (%eax),%dl // colormap texel - movb %dl,(%edi) // output pixel - addl C(vidwidth),%edi - -// -// do two non-quad-aligned pixels -// -2: - testb $2,%dh - jz 3f - - movb (%esi,%ebx),%al // fetch source texel - addl %ebp,%edx // ypos f += ystep f - adcb %cl,%bl // ypos i += ystep i - movb (%eax),%dl // colormap texel - movb %dl,(%edi) // output pixel - - movb (%esi,%ebx),%al // fetch source texel - addl %ebp,%edx // ypos f += ystep f - adcb %cl,%bl // ypos i += ystep i - movb (%eax),%dl // colormap texel - addl C(vidwidth),%edi - movb %dl,(%edi) // output pixel - - addl C(vidwidth),%edi - -// -// test if there was at least 4 pixels -// -3: - testb $0xFF,%ch // test quad count - jz vskydone - -// -// ebp : ystep frac. upper 24 bits -// edx : y frac. upper 24 bits -// ebx : y i. lower 7 bits, masked for index -// ecx : ch = counter, cl = y step i. -// eax : colormap aligned 256 -// esi : source texture column -// edi : dest screen -// -v4skyquadloop: -// .align 4 -vskyquadloop: - movb (%esi,%ebx),%al // prep loop - addl %ebp,%edx // ypos f += ystep f - adcb %cl,%bl // ypos i += ystep i - movb (%eax),%dl // colormap texel - movb %dl,(%edi) // output pixel - - movb (%esi,%ebx),%al // fetch source texel - addl %ebp,%edx - adcb %cl,%bl - movb (%eax),%dl -p1b: movb %dl,0x12345678(%edi) - - movb (%esi,%ebx),%al // fetch source texel - addl %ebp,%edx - adcb %cl,%bl - movb (%eax),%dl -p2b: movb %dl,2*0x12345678(%edi) - - movb (%esi,%ebx),%al // fetch source texel - addl %ebp,%edx - adcb %cl,%bl - movb (%eax),%dl -p3b: movb %dl,3*0x12345678(%edi) - -p4b: addl $4*0x12345678,%edi - - decb %ch - jnz vskyquadloop - -vskydone: - popl %ebx // restore register variables - popl %edi - popl %esi - popl %ebp // restore caller's stack frame pointer - ret - - - -//---------------------------------------------------------------------- -// -// R_DrawSpan -// -// Horizontal texture mapping -// -//---------------------------------------------------------------------- - - .data - -ystep: .long 0 -xstep: .long 0 -C(texwidth): .long 64 // texture width -#if !defined( LINUX) - .text -#endif -#ifdef LINUX - .align 2 -#else - .align 4 -#endif -.globl C(R_DrawSpan_8) -C(R_DrawSpan_8): - pushl %ebp // preserve caller's stack frame pointer - pushl %esi // preserve register variables - pushl %edi - pushl %ebx - - -// -// find loop count -// - movl C(ds_x2),%eax - incl %eax - subl C(ds_x1),%eax // pixel count - movl %eax,C(pixelcount) // save for final pixel - js hdone // nothing to scale - shrl $1,%eax // double pixel count - movl %eax,C(loopcount) - -// -// build composite position -// - movl C(ds_xfrac),%ebp - shll $10,%ebp - andl $0x0ffff0000,%ebp - movl C(ds_yfrac),%eax - shrl $6,%eax - andl $0x0ffff,%eax - movl C(ds_y),%edi - orl %eax,%ebp - - movl C(ds_source),%esi - -// -// calculate screen dest -// - - movl C(ylookup)(,%edi,4),%edi - movl C(ds_x1),%eax - addl C(columnofs)(,%eax,4),%edi - -// -// build composite step -// - movl C(ds_xstep),%ebx - shll $10,%ebx - andl $0x0ffff0000,%ebx - movl C(ds_ystep),%eax - shrl $6,%eax - andl $0x0ffff,%eax - orl %eax,%ebx - - //movl %eax,OFFSET hpatch1+2 // convice tasm to modify code... - movl %ebx,hpatch1+2 - //movl %eax,OFFSET hpatch2+2 // convice tasm to modify code... - movl %ebx,hpatch2+2 - movl %esi,hpatch3+2 - movl %esi,hpatch4+2 -// %eax aligned colormap -// %ebx aligned colormap -// %ecx,%edx scratch -// %esi virtual source -// %edi moving destination pointer -// %ebp frac - movl C(ds_colormap),%eax -// shld $22,%ebp,%ecx // begin calculating third pixel (y units) -// shld $6,%ebp,%ecx // begin calculating third pixel (x units) - movl %ebp,%ecx - addl %ebx,%ebp // advance frac pointer - shrw $10,%cx - roll $6,%ecx - andl $4095,%ecx // finish calculation for third pixel -// shld $22,%ebp,%edx // begin calculating fourth pixel (y units) -// shld $6,%ebp,%edx // begin calculating fourth pixel (x units) - movl %ebp,%edx - shrw $10,%dx - roll $6,%edx - addl %ebx,%ebp // advance frac pointer - andl $4095,%edx // finish calculation for fourth pixel - movl %eax,%ebx - movb (%esi,%ecx),%al // get first pixel - movb (%esi,%edx),%bl // get second pixel - testl $0x0fffffffe,C(pixelcount) - movb (%eax),%dl // color translate first pixel - -// jnz hdoubleloop // at least two pixels to map -// jmp hchecklast - -// movw $0xf0f0,%dx //see visplanes start - - jz hchecklast - movb (%ebx),%dh // color translate second pixel - movl C(loopcount),%esi -// .align 4 -hdoubleloop: -// shld $22,%ebp,%ecx // begin calculating third pixel (y units) -// shld $6,%ebp,%ecx // begin calculating third pixel (x units) - movl %ebp,%ecx - shrw $10,%cx - roll $6,%ecx -hpatch1: - addl $0x012345678,%ebp // advance frac pointer - movw %dx,(%edi) // write first pixel - andl $4095,%ecx // finish calculation for third pixel -// shld $22,%ebp,%edx // begin calculating fourth pixel (y units) -// shld $6,%ebp,%edx // begin calculating fourth pixel (x units) - movl %ebp,%edx - shrw $10,%dx - roll $6,%edx -hpatch3: - movb 0x012345678(%ecx),%al // get third pixel -// movb %bl,1(%edi) // write second pixel - andl $4095,%edx // finish calculation for fourth pixel -hpatch2: - addl $0x012345678,%ebp // advance frac pointer -hpatch4: - movb 0x012345678(%edx),%bl // get fourth pixel - movb (%eax),%dl // color translate third pixel - addl $2,%edi // advance to third pixel destination - decl %esi // done with loop? - movb (%ebx),%dh // color translate fourth pixel - jnz hdoubleloop - -// check for final pixel -hchecklast: - testl $1,C(pixelcount) - jz hdone - movb %dl,(%edi) // write final pixel - -hdone: - popl %ebx // restore register variables - popl %edi - popl %esi - popl %ebp // restore caller's stack frame pointer - ret - - -//.endif - - -//---------------------------------------------------------------------- -// R_DrawTransColumn -// -// Vertical column texture drawer, with transparency. Replaces Doom2's -// 'fuzz' effect, which was not so beautiful. -// Transparency is always impressive in some way, don't know why... -//---------------------------------------------------------------------- - -#ifdef LINUX - .align 2 -#else - .align 5 -#endif - -.globl C(R_DrawTranslucentColumn_8) -C(R_DrawTranslucentColumn_8): - pushl %ebp // preserve caller's stack frame pointer - pushl %esi // preserve register variables - pushl %edi - pushl %ebx - -// -// dest = ylookup[dc_yl] + columnofs[dc_x]; -// - movl C(dc_yl),%ebp - movl %ebp,%ebx - movl C(ylookup)(,%ebx,4),%edi - movl C(dc_x),%ebx - addl C(columnofs)(,%ebx,4),%edi // edi = dest - -// -// pixelcount = yh - yl + 1 -// - movl C(dc_yh),%eax - incl %eax - subl %ebp,%eax // pixel count - movl %eax,C(pixelcount) // save for final pixel - jle vtdone // nothing to scale - -// -// frac = dc_texturemid - (centery-dc_yl)*fracstep; -// - movl C(dc_iscale),%ecx // fracstep - movl C(centery),%eax - subl %ebp,%eax - imul %ecx,%eax - movl C(dc_texturemid),%edx - subl %eax,%edx - movl %edx,%ebx - - shrl $16,%ebx // frac int. - andl $0x0000007f,%ebx - shll $16,%edx // y frac up - - movl %ecx,%ebp - shll $16,%ebp // fracstep f. up - shrl $16,%ecx // fracstep i. ->cl - andb $0x7f,%cl - pushw %cx - movl %edx,%ecx - popw %cx - movl C(dc_colormap),%edx - movl C(dc_source),%esi - -// -// lets rock :) ! -// - movl C(pixelcount),%eax - shrl $2,%eax - testb $0x03,C(pixelcount) - movb %al,%ch // quad count - movl C(dc_transmap),%eax - jz vt4quadloop -// -// do un-even pixel -// - testb $1,C(pixelcount) - jz 2f - - movb (%esi,%ebx),%ah // fetch texel : colormap number - addl %ebp,%ecx - adcb %cl,%bl - movb (%edi),%al // fetch dest : index into colormap - andb $0x7f,%bl - movb (%eax),%dl - movb (%edx), %dl // use colormap now ! - movb %dl,(%edi) - addl C(vidwidth),%edi -// -// do two non-quad-aligned pixels -// -2: - testb $2,C(pixelcount) - jz 3f - - movb (%esi,%ebx),%ah // fetch texel : colormap number - addl %ebp,%ecx - adcb %cl,%bl - movb (%edi),%al // fetch dest : index into colormap - andb $0x7f,%bl - movb (%eax),%dl - movb (%edx), %dl // use colormap now ! - movb %dl,(%edi) - addl C(vidwidth),%edi - - movb (%esi,%ebx),%ah // fetch texel : colormap number - addl %ebp,%ecx - adcb %cl,%bl - movb (%edi),%al // fetch dest : index into colormap - andb $0x7f,%bl - movb (%eax),%dl - movb (%edx), %dl // use colormap now ! - movb %dl,(%edi) - addl C(vidwidth),%edi - -// -// test if there was at least 4 pixels -// -3: - testb $0xFF,%ch // test quad count - jz vtdone - -// -// tystep : ystep frac. upper 24 bits -// edx : upper 24 bit : colomap -// dl : tmp pixel to write -// ebx : y i. lower 7 bits, masked for index -// ecx : y frac. upper 16 bits -// ecx : ch = counter, cl = y step i. -// eax : transmap aligned 65535 (upper 16 bit) -// ah : background pixel (from the screen buffer) -// al : foreground pixel (from the texture) -// esi : source texture column -// ebp,edi : dest screen -// -vt4quadloop: - movb (%esi,%ebx),%ah // fetch texel : colormap number -p5: movb 0x12345678(%edi),%al // fetch dest : index into colormap - - movl %ebp,C(tystep) - movl %edi,%ebp - subl C(vidwidth),%edi - jmp inloop -// .align 4 -vtquadloop: - addl C(tystep),%ecx - adcb %cl,%bl -p6: addl $2*0x12345678,%ebp - andb $0x7f,%bl - movb (%eax),%dl - movb (%esi,%ebx),%ah // fetch texel : colormap number - movb (%edx), %dl // use colormap now ! - movb %dl,(%edi) - movb (%ebp),%al // fetch dest : index into colormap -inloop: - addl C(tystep),%ecx - adcb %cl,%bl -p7: addl $2*0x12345678,%edi - andb $0x7f,%bl - movb (%eax),%dl - movb (%esi,%ebx),%ah // fetch texel : colormap number - movb (%edx), %dl // use colormap now ! - movb %dl,(%ebp) - movb (%edi),%al // fetch dest : index into colormap - - addl C(tystep),%ecx - adcb %cl,%bl -p8: addl $2*0x12345678,%ebp - andb $0x7f,%bl - movb (%eax),%dl - movb (%esi,%ebx),%ah // fetch texel : colormap number - movb (%edx), %dl // use colormap now ! - movb %dl,(%edi) - movb (%ebp),%al // fetch dest : index into colormap - - addl C(tystep),%ecx - adcb %cl,%bl -p9: addl $2*0x12345678,%edi - andb $0x7f,%bl - movb (%eax),%dl - movb (%esi,%ebx),%ah // fetch texel : colormap number - movb (%edx), %dl // use colormap now ! - movb %dl,(%ebp) - movb (%edi),%al // fetch dest : index into colormap - - decb %ch - jnz vtquadloop - -vtdone: - popl %ebx // restore register variables - popl %edi - popl %esi - popl %ebp // restore caller's stack frame pointer - ret - -#endif // ifdef USEASM - - - -//---------------------------------------------------------------------- -// R_DrawShadeColumn -// -// for smoke..etc.. test. -//---------------------------------------------------------------------- - -#ifdef LINUX - .align 2 -#else - .align 5 -#endif -.globl C(R_DrawShadeColumn_8) -C(R_DrawShadeColumn_8): - pushl %ebp // preserve caller's stack frame pointer - pushl %esi // preserve register variables - pushl %edi - pushl %ebx - -// -// dest = ylookup[dc_yl] + columnofs[dc_x]; -// - movl C(dc_yl),%ebp - movl %ebp,%ebx - movl C(ylookup)(,%ebx,4),%edi - movl C(dc_x),%ebx - addl C(columnofs)(,%ebx,4),%edi // edi = dest - -// -// pixelcount = yh - yl + 1 -// - movl C(dc_yh),%eax - incl %eax - subl %ebp,%eax // pixel count - movl %eax,C(pixelcount) // save for final pixel - jle shdone // nothing to scale - -// -// frac = dc_texturemid - (centery-dc_yl)*fracstep; -// - movl C(dc_iscale),%ecx // fracstep - movl C(centery),%eax - subl %ebp,%eax - imul %ecx,%eax - movl C(dc_texturemid),%edx - subl %eax,%edx - movl %edx,%ebx - shrl $16,%ebx // frac int. - andl $0x0000007f,%ebx - shll $16,%edx // y frac up - - movl %ecx,%ebp - shll $16,%ebp // fracstep f. up - shrl $16,%ecx // fracstep i. ->cl - andb $0x7f,%cl - - movl C(dc_source),%esi - -// -// lets rock :) ! -// - movl C(pixelcount),%eax - movb %al,%dh - shrl $2,%eax - movb %al,%ch // quad count - movl C(colormaps),%eax - testb $0x03,%dh - jz sh4quadloop - -// -// do un-even pixel -// - testb $1,%dh - jz 2f - - movb (%esi,%ebx),%ah // fetch texel : colormap number - addl %ebp,%edx - adcb %cl,%bl - movb (%edi),%al // fetch dest : index into colormap - andb $0x7f,%bl - movb (%eax),%dl - movb %dl,(%edi) - addl C(vidwidth),%edi - -// -// do two non-quad-aligned pixels -// -2: - testb $2,%dh - jz 3f - - movb (%esi,%ebx),%ah // fetch texel : colormap number - addl %ebp,%edx - adcb %cl,%bl - movb (%edi),%al // fetch dest : index into colormap - andb $0x7f,%bl - movb (%eax),%dl - movb %dl,(%edi) - addl C(vidwidth),%edi - - movb (%esi,%ebx),%ah // fetch texel : colormap number - addl %ebp,%edx - adcb %cl,%bl - movb (%edi),%al // fetch dest : index into colormap - andb $0x7f,%bl - movb (%eax),%dl - movb %dl,(%edi) - addl C(vidwidth),%edi - -// -// test if there was at least 4 pixels -// -3: - testb $0xFF,%ch // test quad count - jz shdone - -// -// ebp : ystep frac. upper 24 bits -// edx : y frac. upper 24 bits -// ebx : y i. lower 7 bits, masked for index -// ecx : ch = counter, cl = y step i. -// eax : colormap aligned 256 -// esi : source texture column -// edi : dest screen -// -sh4quadloop: - movb $0x7f,%dh // prep mask - - movb (%esi,%ebx),%ah // fetch texel : colormap number -sh5: movb 0x12345678(%edi),%al // fetch dest : index into colormap - - movl %ebp,C(tystep) - movl %edi,%ebp - subl C(vidwidth),%edi - jmp shinloop -// .align 4 -shquadloop: - addl C(tystep),%edx - adcb %cl,%bl - andb %dh,%bl -sh6: addl $2*0x12345678,%ebp - movb (%eax),%dl - movb (%esi,%ebx),%ah // fetch texel : colormap number - movb %dl,(%edi) - movb (%ebp),%al // fetch dest : index into colormap -shinloop: - addl C(tystep),%edx - adcb %cl,%bl - andb %dh,%bl -sh7: addl $2*0x12345678,%edi - movb (%eax),%dl - movb (%esi,%ebx),%ah // fetch texel : colormap number - movb %dl,(%ebp) - movb (%edi),%al // fetch dest : index into colormap - - addl C(tystep),%edx - adcb %cl,%bl - andb %dh,%bl -sh8: addl $2*0x12345678,%ebp - movb (%eax),%dl - movb (%esi,%ebx),%ah // fetch texel : colormap number - movb %dl,(%edi) - movb (%ebp),%al // fetch dest : index into colormap - - addl C(tystep),%edx - adcb %cl,%bl - andb %dh,%bl -sh9: addl $2*0x12345678,%edi - movb (%eax),%dl - movb (%esi,%ebx),%ah // fetch texel : colormap number - movb %dl,(%ebp) - movb (%edi),%al // fetch dest : index into colormap - - decb %ch - jnz shquadloop - -shdone: - popl %ebx // restore register variables - popl %edi - popl %esi - popl %ebp // restore caller's stack frame pointer - ret - - - -//---------------------------------------------------------------------- -// -// R_DrawWaterColumn : basically it's just a copy of R_DrawColumn, -// but it uses dc_colormap from dc_yl to dc_yw-1 -// then it uses dc_wcolormap from dc_yw to dc_yh -// -// Thus, the 'underwater' part of the walls is remapped to 'water-like' -// colors. -// -//---------------------------------------------------------------------- - -#ifdef LINUX - .align 2 -#else - .align 5 -#endif -.globl C(R_DrawWaterColumn) -C(R_DrawWaterColumn): - pushl %ebp // preserve caller's stack frame pointer - pushl %esi // preserve register variables - pushl %edi - pushl %ebx - -// -// dest = ylookup[dc_yl] + columnofs[dc_x]; -// - movl C(dc_yl),%ebp - movl %ebp,%ebx - movl C(ylookup)(,%ebx,4),%edi - movl C(dc_x),%ebx - addl C(columnofs)(,%ebx,4),%edi // edi = dest - -// -// pixelcount = yh - yl + 1 -// - movl C(dc_yh),%eax - incl %eax - subl %ebp,%eax // pixel count - movl %eax,C(pixelcount) // save for final pixel - jle wdone // nothing to scale - -// -// frac = dc_texturemid - (centery-dc_yl)*fracstep; -// - movl C(dc_iscale),%ecx // fracstep - movl C(centery),%eax - subl %ebp,%eax - imul %ecx,%eax - movl C(dc_texturemid),%edx - subl %eax,%edx - movl %edx,%ebx - shrl $16,%ebx // frac int. - andl $0x0000007f,%ebx - shll $16,%edx // y frac up - - movl %ecx,%ebp - shll $16,%ebp // fracstep f. up - shrl $16,%ecx // fracstep i. ->cl - andb $0x7f,%cl - - movl C(dc_source),%esi - -// -// lets rock :) ! -// - movl C(pixelcount),%eax - movb %al,%dh - shrl $2,%eax - movb %al,%ch // quad count - movl C(dc_wcolormap),%eax - testb $3,%dh - jz w4quadloop - -// -// do un-even pixel -// - testb $1,%dh - jz 2f - - movb (%esi,%ebx),%al // prep un-even loops - addl %ebp,%edx // ypos f += ystep f - adcb %cl,%bl // ypos i += ystep i - movb (%eax),%dl // colormap texel - andb $0x7f,%bl // mask 0-127 texture index - movb %dl,(%edi) // output pixel - addl C(vidwidth),%edi - -// -// do two non-quad-aligned pixels -// -2: - testb $2,%dh - jz 3f - - movb (%esi,%ebx),%al // fetch source texel - addl %ebp,%edx // ypos f += ystep f - adcb %cl,%bl // ypos i += ystep i - movb (%eax),%dl // colormap texel - andb $0x7f,%bl // mask 0-127 texture index - movb %dl,(%edi) // output pixel - - movb (%esi,%ebx),%al // fetch source texel - addl %ebp,%edx // ypos f += ystep f - adcb %cl,%bl // ypos i += ystep i - movb (%eax),%dl // colormap texel - andb $0x7f,%bl // mask 0-127 texture index - addl C(vidwidth),%edi - movb %dl,(%edi) // output pixel - - addl C(vidwidth),%edi - -// -// test if there was at least 4 pixels -// -3: - testb $0xFF,%ch // test quad count - jz wdone - -// -// ebp : ystep frac. upper 24 bits -// edx : y frac. upper 24 bits -// ebx : y i. lower 7 bits, masked for index -// ecx : ch = counter, cl = y step i. -// eax : colormap aligned 256 -// esi : source texture column -// edi : dest screen -// -w4quadloop: - movb $0x7f,%dh // prep mask -// .align 4 -wquadloop: - movb (%esi,%ebx),%al // prep loop - addl %ebp,%edx // ypos f += ystep f - adcb %cl,%bl // ypos i += ystep i - movb (%eax),%dl // colormap texel - movb %dl,(%edi) // output pixel - andb $0x7f,%bl // mask 0-127 texture index - - movb (%esi,%ebx),%al // fetch source texel - addl %ebp,%edx - adcb %cl,%bl - movb (%eax),%dl -w1: movb %dl,0x12345678(%edi) - andb $0x7f,%bl - - movb (%esi,%ebx),%al // fetch source texel - addl %ebp,%edx - adcb %cl,%bl - movb (%eax),%dl -w2: movb %dl,2*0x12345678(%edi) - andb $0x7f,%bl - - movb (%esi,%ebx),%al // fetch source texel - addl %ebp,%edx - adcb %cl,%bl - movb (%eax),%dl -w3: movb %dl,3*0x12345678(%edi) - andb $0x7f,%bl - -w4: addl $4*0x12345678,%edi - - decb %ch - jnz wquadloop - -wdone: - popl %ebx // restore register variables - popl %edi - popl %esi - popl %ebp // restore caller's stack frame pointer - ret - - - - - - - -//---------------------------------------------------------------------- -// -// R_DrawSpanNoWrap -// -// Horizontal texture mapping, does not remap colors, -// neither needs to wrap around the source texture. -// -// Thus, a special optimisation can be used... -// -//---------------------------------------------------------------------- - - .data - -advancetable: .long 0, 0 -#if !defined( LINUX) - .text -#endif -#ifdef LINUX - .align 2 -#else - .align 4 -#endif -.globl C(R_DrawSpanNoWrap) -C(R_DrawSpanNoWrap): - pushl %ebp // preserve caller's stack frame pointer - pushl %esi // preserve register variables - pushl %edi - pushl %ebx - -// -// find loop count -// - - movl C(ds_x2),%eax - incl %eax - subl C(ds_x1),%eax // pixel count - movl %eax,C(pixelcount) // save for final pixel - jle htvdone // nothing to scale -// shrl $1,%eax // double pixel count -// movl %eax,C(loopcount) - -// -// calculate screen dest -// - - movl C(ds_y),%edi //full destination start address - -// -// set up advancetable -// - - movl C(ds_xstep),%ebp - movl C(ds_ystep),%ecx - movl %ecx,%eax - movl %ebp,%edx - sarl $16,%edx // xstep >>= 16; - movl C(vidwidth),%ebx - sarl $16,%eax // ystep >>= 16; - jz 0f - imull %ebx,%eax // (ystep >> 16) * texwidth; -0: - addl %edx,%eax // add in xstep - // (ystep >> 16) * texwidth + (xstep >> 16); - - movl %eax,advancetable+4 // advance base in y - addl %ebx,%eax // ((ystep >> 16) + 1) * texwidth + - // (xstep >> 16); - movl %eax,advancetable // advance extra in y - - shll $16,%ebp // left-justify xstep fractional part - movl %ebp,xstep - shll $16,%ecx // left-justify ystep fractional part - movl %ecx,ystep - -// -// calculate the texture starting address -// - movl C(ds_source),%esi // texture source - - movl C(ds_yfrac),%eax - movl %eax,%edx - sarl $16,%eax - movl C(ds_xfrac),%ecx - imull %ebx,%eax // (yfrac >> 16) * texwidth - movl %ecx,%ebx - sarl $16,%ecx - movl %ecx,%ebp - addl %eax,%ebp // source = (xfrac >> 16) + - // ((yfrac >> 16) * texwidth); - -// -// esi : texture source -// edi : screen dest -// eax : colormap aligned on 256 boundary, hehehe... -// ebx : xfrac << 16 -// ecx : used in loop, contains either 0 or -1, *4, offset into advancetable -// edx : yfrac << 16 -// ebp : offset into texture -// - - shll $16,%edx // yfrac upper word, lower byte will be used - movl C(ds_colormap),%eax - shll $16,%ebx // xfrac upper word, lower unused - - movl C(pixelcount),%ecx - shrl $2,%ecx - movb %cl,%dh // quad pixels count - - movl C(pixelcount),%ecx - andl $3,%ecx - jz htvquadloop // pixelcount is multiple of 4 - decl %ecx - jz 1f - decl %ecx - jz 2f - -// -// do one to three pixels first -// - addl ystep,%edx // yfrac += ystep - sbbl %ecx,%ecx // turn carry into 0 or -1 if set - movb (%esi,%ebp),%al // get texture pixel - addl xstep,%ebx // xfrac += xstep -// movb (%eax),%dl // pixel goes through colormap - adcl advancetable+4(,%ecx,4),%ebp // advance source - movb %al,(%edi) // write pixel dest - - incl %edi - -2: - addl ystep,%edx // yfrac += ystep - sbbl %ecx,%ecx // turn carry into 0 or -1 if set - movb (%esi,%ebp),%al // get texture pixel - addl xstep,%ebx // xfrac += xstep -// movb (%eax),%dl // pixel goes through colormap - adcl advancetable+4(,%ecx,4),%ebp // advance source - movb %al,(%edi) // write pixel dest - - incl %edi - -1: - addl ystep,%edx // yfrac += ystep - sbbl %ecx,%ecx // turn carry into 0 or -1 if set - movb (%esi,%ebp),%al // get texture pixel - addl xstep,%ebx // xfrac += xstep -// movb (%eax),%dl // pixel goes through colormap - adcl advancetable+4(,%ecx,4),%ebp // advance source - movb %al,(%edi) // write pixel dest - - incl %edi - -// -// test if there was at least 4 pixels -// - testb $0xFF,%dh - jz htvdone - -// -// two pixels per loop -// U -// V -htvquadloop: - addl ystep,%edx // yfrac += ystep - sbbl %ecx,%ecx // turn carry into 0 or -1 if set - movb (%esi,%ebp),%al // get texture pixel - addl xstep,%ebx // xfrac += xstep -// movb (%eax),%dl // pixel goes through colormap - adcl advancetable+4(,%ecx,4),%ebp // advance source - movb %al,(%edi) // write pixel dest - - addl ystep,%edx - sbbl %ecx,%ecx - movb (%esi,%ebp),%al - addl xstep,%ebx -// movb (%eax),%dl - adcl advancetable+4(,%ecx,4),%ebp - movb %al,1(%edi) - - addl ystep,%edx - sbbl %ecx,%ecx - movb (%esi,%ebp),%al - addl xstep,%ebx -// movb (%eax),%dl - adcl advancetable+4(,%ecx,4),%ebp - movb %al,2(%edi) - - addl ystep,%edx - sbbl %ecx,%ecx - movb (%esi,%ebp),%al - addl xstep,%ebx -// movb (%eax),%dl - adcl advancetable+4(,%ecx,4),%ebp - movb %al,3(%edi) - - addl $4, %edi - incl %ecx //dummy - - decb %dh - jnz htvquadloop // paire dans V-pipe - -htvdone: - popl %ebx // restore register variables - popl %edi - popl %esi - popl %ebp // restore caller's stack frame pointer - ret - - -//.endif - -#ifdef HORIZONTALDRAW -// void R_RotateBuffere (void) - -#ifdef LINUX - .align 2 -#else - .align 4 -#endif -.globl C(R_RotateBufferasm) -C(R_RotateBufferasm): - pushl %ebp // preserve caller's stack frame pointer - pushl %esi // preserve register variables - pushl %edi - pushl %ebx - - movl C(dc_source),%esi - movl C(dc_colormap),%edi - - movl $200,%edx -ra2: - movl $40,%ecx -ra: - movb -2*200(%esi),%al - movb -6*200(%esi),%bl - movb -3*200(%esi),%ah - movb -7*200(%esi),%bh - shll $16,%eax - shll $16,%ebx - movb (%esi),%al - movb -4*200(%esi),%bl - movb -1*200(%esi),%ah - movb -5*200(%esi),%bh - movl %eax,(%edi) - subl $8*200,%esi - movl %ebx,4(%edi) - addl $8,%edi - decl %ecx - jnz ra - - addl $320*200+1,%esi //32*480 passe a la ligne suivante -// addl 320-32,%edi - - decl %edx - jnz ra2 - - pop %ebp // preserve caller's stack frame pointer - pop %esi // preserve register variables - pop %edi - pop %ebx - ret -#endif diff --git a/src/tmap_asm.s b/src/tmap_asm.s deleted file mode 100644 index 3cd0f87cc..000000000 --- a/src/tmap_asm.s +++ /dev/null @@ -1,322 +0,0 @@ -// SONIC ROBO BLAST 2 -//----------------------------------------------------------------------------- -// Copyright (C) 1998-2000 by DooM Legacy Team. -// Copyright (C) 1999-2020 by Sonic Team Junior. -// -// This program is free software distributed under the -// terms of the GNU General Public License, version 2. -// See the 'LICENSE' file for more details. -//----------------------------------------------------------------------------- -/// \file tmap_asm.s -/// \brief ??? - -//.comm _dc_colormap,4 -//.comm _dc_x,4 -//.comm _dc_yl,4 -//.comm _dc_yh,4 -//.comm _dc_iscale,4 -//.comm _dc_texturemid,4 -//.comm _dc_source,4 -//.comm _ylookup,4 -//.comm _columnofs,4 -//.comm _loopcount,4 -//.comm _pixelcount,4 -.data -_pixelcount: -.long 0x00000000 -_loopcount: -.long 0x00000000 -.align 8 -_mmxcomm: -.long 0x00000000 -.text - - .align 4 -.globl _R_DrawColumn8_NOMMX -_R_DrawColumn8_NOMMX: - pushl %ebp - pushl %esi - pushl %edi - pushl %ebx - movl _dc_yl,%edx - movl _dc_yh,%eax - subl %edx,%eax - leal 1(%eax),%ebx - testl %ebx,%ebx - jle rdc8ndone - movl _dc_x,%eax - movl _ylookup, %edi - movl (%edi,%edx,4),%esi - movl _columnofs, %edi - addl (%edi,%eax,4),%esi - movl _dc_iscale,%edi - movl %edx,%eax - imull %edi,%eax - movl _dc_texturemid,%ecx - addl %eax,%ecx - - movl _dc_source,%ebp - xorl %edx, %edx - subl $0x12345678, %esi -.globl rdc8nwidth1 -rdc8nwidth1: - .align 4,0x90 -rdc8nloop: - movl %ecx,%eax - shrl $16,%eax - addl %edi,%ecx - andl $127,%eax - addl $0x12345678,%esi -.globl rdc8nwidth2 -rdc8nwidth2: - movb (%eax,%ebp),%dl - movl _dc_colormap,%eax - movb (%eax,%edx),%al - movb %al,(%esi) - decl %ebx - jne rdc8nloop -rdc8ndone: - popl %ebx - popl %edi - popl %esi - popl %ebp - ret - -// -// Optimised specifically for P54C/P55C (aka Pentium with/without MMX) -// By ES 1998/08/01 -// - -.globl _R_DrawColumn_8_Pentium -_R_DrawColumn_8_Pentium: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - movl _dc_yl,%eax // Top pixel - movl _dc_yh,%ebx // Bottom pixel - movl _ylookup, %edi - movl (%edi,%ebx,4),%ecx - subl %eax,%ebx // ebx=number of pixels-1 - jl rdc8pdone // no pixel to draw, done - jnz rdc8pmany - movl _dc_x,%edx // Special case: only one pixel - movl _columnofs, %edi - addl (%edi,%edx,4),%ecx // dest pixel at (%ecx) - movl _dc_iscale,%esi - imull %esi,%eax - movl _dc_texturemid,%edi - addl %eax,%edi // texture index in edi - movl _dc_colormap,%edx - shrl $16, %edi - movl _dc_source,%ebp - andl $127,%edi - movb (%edi,%ebp),%dl // read texture pixel - movb (%edx),%al // lookup for light - movb %al,0(%ecx) // write it - jmp rdc8pdone // done! -.align 4, 0x90 -rdc8pmany: // draw >1 pixel - movl _dc_x,%edx - movl _columnofs, %edi - movl (%edi,%edx,4),%edx - leal 0x12345678(%edx, %ecx), %edi // edi = two pixels above bottom -.globl rdc8pwidth5 -rdc8pwidth5: // DeadBeef = -2*SCREENWIDTH - movl _dc_iscale,%edx // edx = fracstep - imull %edx,%eax - shll $9, %edx // fixme: Should get 7.25 fix as input - movl _dc_texturemid,%ecx - addl %eax,%ecx // ecx = frac - movl _dc_colormap,%eax // eax = lighting/special effects LUT - shll $9, %ecx - movl _dc_source,%esi // esi = source ptr - - imull $0x12345678, %ebx // ebx = negative offset to pixel -.globl rdc8pwidth6 -rdc8pwidth6: // DeadBeef = -SCREENWIDTH - -// Begin the calculation of the two first pixels - leal (%ecx, %edx), %ebp - shrl $25, %ecx - movb (%esi, %ecx), %al - leal (%edx, %ebp), %ecx - shrl $25, %ebp - movb (%eax), %dl - -// The main loop -rdc8ploop: - movb (%esi,%ebp), %al // load 1 - leal (%ecx, %edx), %ebp // calc frac 3 - - shrl $25, %ecx // shift frac 2 - movb %dl, 0x12345678(%edi, %ebx)// store 0 -.globl rdc8pwidth1 -rdc8pwidth1: // DeadBeef = 2*SCREENWIDTH - - movb (%eax), %al // lookup 1 - - movb %al, 0x12345678(%edi, %ebx)// store 1 -.globl rdc8pwidth2 -rdc8pwidth2: // DeadBeef = 3*SCREENWIDTH - movb (%esi, %ecx), %al // load 2 - - leal (%ebp, %edx), %ecx // calc frac 4 - - shrl $25, %ebp // shift frac 3 - movb (%eax), %dl // lookup 2 - - addl $0x12345678, %ebx // counter -.globl rdc8pwidth3 -rdc8pwidth3: // DeadBeef = 2*SCREENWIDTH - jl rdc8ploop // loop - -// End of loop. Write extra pixel or just exit. - jnz rdc8pdone - movb %dl, 0x12345678(%edi, %ebx)// Write odd pixel -.globl rdc8pwidth4 -rdc8pwidth4: // DeadBeef = 2*SCREENWIDTH - -rdc8pdone: - - popl %edi - popl %esi - popl %ebx - popl %ebp - ret - -// -// MMX asm version, optimised for K6 -// By ES 1998/07/05 -// - -.globl _R_DrawColumn_8_K6_MMX -_R_DrawColumn_8_K6_MMX: - pushl %ebp - pushl %ebx - pushl %esi - pushl %edi - - movl %esp, %eax // Push 8 or 12, so that (%esp) gets aligned by 8 - andl $7,%eax - addl $8,%eax - movl %eax, _mmxcomm // Temp storage in mmxcomm: (%esp) is used instead - subl %eax,%esp - - movl _dc_yl,%edx // Top pixel - movl _dc_yh,%ebx // Bottom pixel - movl _ylookup, %edi - movl (%edi,%ebx,4),%ecx - subl %edx,%ebx // ebx=number of pixels-1 - jl 0x12345678 // no pixel to draw, done -.globl rdc8moffs1 -rdc8moffs1: - jnz rdc8mmany - movl _dc_x,%eax // Special case: only one pixel - movl _columnofs, %edi - addl (%edi,%eax,4),%ecx // dest pixel at (%ecx) - movl _dc_iscale,%esi - imull %esi,%edx - movl _dc_texturemid,%edi - addl %edx,%edi // texture index in edi - movl _dc_colormap,%edx - shrl $16, %edi - movl _dc_source,%ebp - andl $127,%edi - movb (%edi,%ebp),%dl // read texture pixel - movb (%edx),%al // lookup for light - movb %al,0(%ecx) // write it - jmp rdc8mdone // done! -.globl rdc8moffs2 -rdc8moffs2: -.align 4, 0x90 -rdc8mmany: // draw >1 pixel - movl _dc_x,%eax - movl _columnofs, %edi - movl (%edi,%eax,4),%eax - leal 0x12345678(%eax, %ecx), %esi // esi = two pixels above bottom -.globl rdc8mwidth3 -rdc8mwidth3: // DeadBeef = -2*SCREENWIDTH - movl _dc_iscale,%ecx // ecx = fracstep - imull %ecx,%edx - shll $9, %ecx // fixme: Should get 7.25 fix as input - movl _dc_texturemid,%eax - addl %edx,%eax // eax = frac - movl _dc_colormap,%edx // edx = lighting/special effects LUT - shll $9, %eax - leal (%ecx, %ecx), %edi - movl _dc_source,%ebp // ebp = source ptr - movl %edi, 0(%esp) // Start moving frac and fracstep to MMX regs - - imull $0x12345678, %ebx // ebx = negative offset to pixel -.globl rdc8mwidth5 -rdc8mwidth5: // DeadBeef = -SCREENWIDTH - - movl %edi, 4(%esp) - leal (%eax, %ecx), %edi - movq 0(%esp), %mm1 // fracstep:fracstep in mm1 - movl %eax, 0(%esp) - shrl $25, %eax - movl %edi, 4(%esp) - movzbl (%ebp, %eax), %eax - movq 0(%esp), %mm0 // frac:frac in mm0 - - paddd %mm1, %mm0 - shrl $25, %edi - movq %mm0, %mm2 - psrld $25, %mm2 // texture index in mm2 - paddd %mm1, %mm0 - movq %mm2, 0(%esp) - -.globl rdc8mloop -rdc8mloop: // The main loop - movq %mm0, %mm2 // move 4-5 to temp reg - movzbl (%ebp, %edi), %edi // read 1 - - psrld $25, %mm2 // shift 4-5 - movb (%edx,%eax), %cl // lookup 0 - - movl 0(%esp), %eax // load 2 - addl $0x12345678, %ebx // counter -.globl rdc8mwidth2 -rdc8mwidth2: // DeadBeef = 2*SCREENWIDTH - - movb %cl, (%esi, %ebx) // write 0 - movb (%edx,%edi), %ch // lookup 1 - - movb %ch, 0x12345678(%esi, %ebx) // write 1 -.globl rdc8mwidth1 -rdc8mwidth1: // DeadBeef = SCREENWIDTH - movl 4(%esp), %edi // load 3 - - paddd %mm1, %mm0 // frac 6-7 - movzbl (%ebp, %eax), %eax // lookup 2 - - movq %mm2, 0(%esp) // store texture index 4-5 - jl rdc8mloop - - jnz rdc8mno_odd - movb (%edx,%eax), %cl // write the last odd pixel - movb %cl, 0x12345678(%esi) -.globl rdc8mwidth4 -rdc8mwidth4: // DeadBeef = 2*SCREENWIDTH -rdc8mno_odd: - -.globl rdc8mdone -rdc8mdone: - emms - - addl _mmxcomm, %esp - popl %edi - popl %esi - popl %ebx - popl %ebp - ret - -// Need some extra space to align run-time -.globl R_DrawColumn_8_K6_MMX_end -R_DrawColumn_8_K6_MMX_end: -nop;nop;nop;nop;nop;nop;nop;nop; -nop;nop;nop;nop;nop;nop;nop;nop; -nop;nop;nop;nop;nop;nop;nop;nop; -nop;nop;nop;nop;nop;nop;nop; diff --git a/src/tmap_mmx.nas b/src/tmap_mmx.nas deleted file mode 100644 index 15b97499d..000000000 --- a/src/tmap_mmx.nas +++ /dev/null @@ -1,674 +0,0 @@ -;; SONIC ROBO BLAST 2 -;;----------------------------------------------------------------------------- -;; Copyright (C) 1998-2000 by DOSDOOM. -;; Copyright (C) 2010-2020 by Sonic Team Junior. -;; -;; This program is free software distributed under the -;; terms of the GNU General Public License, version 2. -;; See the 'LICENSE' file for more details. -;;----------------------------------------------------------------------------- -;; FILE: -;; tmap_mmx.nas -;; DESCRIPTION: -;; Assembler optimised rendering code for software mode, using SIMD -;; instructions. -;; Draw wall columns. - - -[BITS 32] - -%define FRACBITS 16 -%define TRANSPARENTPIXEL 255 - -%ifdef LINUX -%macro cextern 1 -[extern %1] -%endmacro - -%macro cglobal 1 -[global %1] -%endmacro - -%else -%macro cextern 1 -%define %1 _%1 -[extern %1] -%endmacro - -%macro cglobal 1 -%define %1 _%1 -[global %1] -%endmacro - -%endif - - -; The viddef_s structure. We only need the width field. -struc viddef_s - resb 12 -.width: resb 4 - resb 44 -endstruc - - -;; externs -;; columns -cextern dc_colormap -cextern dc_x -cextern dc_yl -cextern dc_yh -cextern dc_iscale -cextern dc_texturemid -cextern dc_texheight -cextern dc_source -cextern dc_hires -cextern centery -cextern centeryfrac -cextern dc_transmap - -cextern R_DrawColumn_8_ASM -cextern R_Draw2sMultiPatchColumn_8_ASM - -;; spans -cextern nflatshiftup -cextern nflatxshift -cextern nflatyshift -cextern nflatmask -cextern ds_xfrac -cextern ds_yfrac -cextern ds_xstep -cextern ds_ystep -cextern ds_x1 -cextern ds_x2 -cextern ds_y -cextern ds_source -cextern ds_colormap - -cextern ylookup -cextern columnofs -cextern vid - -[SECTION .data] - -nflatmask64 dq 0 - - -[SECTION .text] - -;;---------------------------------------------------------------------- -;; -;; R_DrawColumn : 8bpp column drawer -;; -;; MMX column drawer. -;; -;;---------------------------------------------------------------------- -;; eax = accumulator -;; ebx = colormap -;; ecx = count -;; edx = accumulator -;; esi = source -;; edi = dest -;; ebp = vid.width -;; mm0 = accumulator -;; mm1 = heightmask, twice -;; mm2 = 2 * fracstep, twice -;; mm3 = pair of consecutive fracs -;;---------------------------------------------------------------------- - - -cglobal R_DrawColumn_8_MMX -R_DrawColumn_8_MMX: - push ebp ;; preserve caller's stack frame pointer - push esi ;; preserve register variables - push edi - push ebx - -;; -;; Our algorithm requires that the texture height be a power of two. -;; If not, fall back to the non-MMX drawer. -;; -.texheightcheck: - mov edx, [dc_texheight] - sub edx, 1 ;; edx = heightmask - test edx, [dc_texheight] - jnz near .usenonMMX - - mov ebp, edx ;; Keep a copy of heightmask in a - ;; GPR for the time being. - -;; -;; Fill mm1 with heightmask -;; - movd mm1, edx ;; low dword = heightmask - punpckldq mm1, mm1 ;; copy low dword to high dword - -;; -;; dest = ylookup[dc_yl] + columnofs[dc_x]; -;; - mov eax, [dc_yl] - mov edi, [ylookup+eax*4] - mov ebx, [dc_x] - add edi, [columnofs+ebx*4] ;; edi = dest - - -;; -;; pixelcount = yh - yl + 1 -;; - mov ecx, [dc_yh] - add ecx, 1 - sub ecx, eax ;; pixel count - jle near .done ;; nothing to scale - -;; -;; fracstep = dc_iscale; -;; - movd mm2, [dc_iscale] ;; fracstep in low dword - punpckldq mm2, mm2 ;; copy to high dword - - mov ebx, [dc_colormap] - mov esi, [dc_source] - -;; -;; frac = (dc_texturemid + FixedMul((dc_yl << FRACBITS) - centeryfrac, fracstep)); -;; - ;; eax == dc_yl already - shl eax, FRACBITS - sub eax, [centeryfrac] - imul dword [dc_iscale] - shrd eax, edx, FRACBITS - add eax, [dc_texturemid] - -;; -;; if (dc_hires) frac = 0; -;; - test byte [dc_hires], 0x01 - jz .mod2 - xor eax, eax - - -;; -;; Do mod-2 pixel. -;; -.mod2: - test ecx, 1 - jz .pairprepare - mov edx, eax ;; edx = frac - add eax, [dc_iscale] ;; eax += fracstep - sar edx, FRACBITS - and edx, ebp ;; edx &= heightmask - movzx edx, byte [esi + edx] - movzx edx, byte [ebx + edx] - mov [edi], dl - - add edi, [vid + viddef_s.width] - sub ecx, 1 - jz .done - -.pairprepare: -;; -;; Prepare for the main loop. -;; - movd mm3, eax ;; Low dword = frac - movq mm4, mm3 ;; Copy to intermediate register - paddd mm4, mm2 ;; dwords of mm4 += fracstep - punpckldq mm3, mm4 ;; Low dword = first frac, high = second - pslld mm2, 1 ;; fracstep *= 2 - -;; -;; ebp = vid.width -;; - mov ebp, [vid + viddef_s.width] - - align 16 -.pairloop: - movq mm0, mm3 ;; 3B 1u. - psrad mm0, FRACBITS ;; 4B 1u. - pand mm0, mm1 ;; 3B 1u. frac &= heightmask - paddd mm3, mm2 ;; 3B 1u. frac += fracstep - - movd eax, mm0 ;; 3B 1u. Get first frac -;; IFETCH boundary - movzx eax, byte [esi + eax] ;; 4B 1u. Texture map - movzx eax, byte [ebx + eax] ;; 4B 1u. Colormap - - punpckhdq mm0, mm0 ;; 3B 1(2)u. low dword = high dword - movd edx, mm0 ;; 3B 1u. Get second frac - mov [edi], al ;; 2B 1(2)u. First pixel -;; IFETCH boundary - - movzx edx, byte [esi + edx] ;; 4B 1u. Texture map - movzx edx, byte [ebx + edx] ;; 4B 1u. Colormap - mov [edi + 1*ebp], dl ;; 3B 1(2)u. Second pixel - - lea edi, [edi + 2*ebp] ;; 3B 1u. edi += 2 * vid.width -;; IFETCH boundary - sub ecx, 2 ;; 3B 1u. count -= 2 - jnz .pairloop ;; 2B 1u. if(count != 0) goto .pairloop - - -.done: -;; -;; Clear MMX state, or else FPU operations will go badly awry. -;; - emms - - pop ebx - pop edi - pop esi - pop ebp - ret - -.usenonMMX: - call R_DrawColumn_8_ASM - jmp .done - - -;;---------------------------------------------------------------------- -;; -;; R_Draw2sMultiPatchColumn : Like R_DrawColumn, but omits transparent -;; pixels. -;; -;; MMX column drawer. -;; -;;---------------------------------------------------------------------- -;; eax = accumulator -;; ebx = colormap -;; ecx = count -;; edx = accumulator -;; esi = source -;; edi = dest -;; ebp = vid.width -;; mm0 = accumulator -;; mm1 = heightmask, twice -;; mm2 = 2 * fracstep, twice -;; mm3 = pair of consecutive fracs -;;---------------------------------------------------------------------- - - -cglobal R_Draw2sMultiPatchColumn_8_MMX -R_Draw2sMultiPatchColumn_8_MMX: - push ebp ;; preserve caller's stack frame pointer - push esi ;; preserve register variables - push edi - push ebx - -;; -;; Our algorithm requires that the texture height be a power of two. -;; If not, fall back to the non-MMX drawer. -;; -.texheightcheck: - mov edx, [dc_texheight] - sub edx, 1 ;; edx = heightmask - test edx, [dc_texheight] - jnz near .usenonMMX - - mov ebp, edx ;; Keep a copy of heightmask in a - ;; GPR for the time being. - -;; -;; Fill mm1 with heightmask -;; - movd mm1, edx ;; low dword = heightmask - punpckldq mm1, mm1 ;; copy low dword to high dword - -;; -;; dest = ylookup[dc_yl] + columnofs[dc_x]; -;; - mov eax, [dc_yl] - mov edi, [ylookup+eax*4] - mov ebx, [dc_x] - add edi, [columnofs+ebx*4] ;; edi = dest - - -;; -;; pixelcount = yh - yl + 1 -;; - mov ecx, [dc_yh] - add ecx, 1 - sub ecx, eax ;; pixel count - jle near .done ;; nothing to scale -;; -;; fracstep = dc_iscale; -;; - movd mm2, [dc_iscale] ;; fracstep in low dword - punpckldq mm2, mm2 ;; copy to high dword - - mov ebx, [dc_colormap] - mov esi, [dc_source] - -;; -;; frac = (dc_texturemid + FixedMul((dc_yl << FRACBITS) - centeryfrac, fracstep)); -;; - ;; eax == dc_yl already - shl eax, FRACBITS - sub eax, [centeryfrac] - imul dword [dc_iscale] - shrd eax, edx, FRACBITS - add eax, [dc_texturemid] - -;; -;; if (dc_hires) frac = 0; -;; - test byte [dc_hires], 0x01 - jz .mod2 - xor eax, eax - - -;; -;; Do mod-2 pixel. -;; -.mod2: - test ecx, 1 - jz .pairprepare - mov edx, eax ;; edx = frac - add eax, [dc_iscale] ;; eax += fracstep - sar edx, FRACBITS - and edx, ebp ;; edx &= heightmask - movzx edx, byte [esi + edx] - cmp dl, TRANSPARENTPIXEL - je .nextmod2 - movzx edx, byte [ebx + edx] - mov [edi], dl - -.nextmod2: - add edi, [vid + viddef_s.width] - sub ecx, 1 - jz .done - -.pairprepare: -;; -;; Prepare for the main loop. -;; - movd mm3, eax ;; Low dword = frac - movq mm4, mm3 ;; Copy to intermediate register - paddd mm4, mm2 ;; dwords of mm4 += fracstep - punpckldq mm3, mm4 ;; Low dword = first frac, high = second - pslld mm2, 1 ;; fracstep *= 2 - -;; -;; ebp = vid.width -;; - mov ebp, [vid + viddef_s.width] - - align 16 -.pairloop: - movq mm0, mm3 ;; 3B 1u. - psrad mm0, FRACBITS ;; 4B 1u. - pand mm0, mm1 ;; 3B 1u. frac &= heightmask - paddd mm3, mm2 ;; 3B 1u. frac += fracstep - - movd eax, mm0 ;; 3B 1u. Get first frac -;; IFETCH boundary - movzx eax, byte [esi + eax] ;; 4B 1u. Texture map - punpckhdq mm0, mm0 ;; 3B 1(2)u. low dword = high dword - movd edx, mm0 ;; 3B 1u. Get second frac - cmp al, TRANSPARENTPIXEL ;; 2B 1u. - je .secondinpair ;; 2B 1u. -;; IFETCH boundary - movzx eax, byte [ebx + eax] ;; 4B 1u. Colormap - mov [edi], al ;; 2B 1(2)u. First pixel - -.secondinpair: - movzx edx, byte [esi + edx] ;; 4B 1u. Texture map - cmp dl, TRANSPARENTPIXEL ;; 2B 1u. - je .nextpair ;; 2B 1u. -;; IFETCH boundary - movzx edx, byte [ebx + edx] ;; 4B 1u. Colormap - mov [edi + 1*ebp], dl ;; 3B 1(2)u. Second pixel - -.nextpair: - lea edi, [edi + 2*ebp] ;; 3B 1u. edi += 2 * vid.width - sub ecx, 2 ;; 3B 1u. count -= 2 - jnz .pairloop ;; 2B 1u. if(count != 0) goto .pairloop - - -.done: -;; -;; Clear MMX state, or else FPU operations will go badly awry. -;; - emms - - pop ebx - pop edi - pop esi - pop ebp - ret - -.usenonMMX: - call R_Draw2sMultiPatchColumn_8_ASM - jmp .done - - -;;---------------------------------------------------------------------- -;; -;; R_DrawSpan : 8bpp span drawer -;; -;; MMX span drawer. -;; -;;---------------------------------------------------------------------- -;; eax = accumulator -;; ebx = colormap -;; ecx = count -;; edx = accumulator -;; esi = source -;; edi = dest -;; ebp = two pixels -;; mm0 = accumulator -;; mm1 = xposition -;; mm2 = yposition -;; mm3 = 2 * xstep -;; mm4 = 2 * ystep -;; mm5 = nflatxshift -;; mm6 = nflatyshift -;; mm7 = accumulator -;;---------------------------------------------------------------------- - -cglobal R_DrawSpan_8_MMX -R_DrawSpan_8_MMX: - push ebp ;; preserve caller's stack frame pointer - push esi ;; preserve register variables - push edi - push ebx - -;; -;; esi = ds_source -;; ebx = ds_colormap -;; - mov esi, [ds_source] - mov ebx, [ds_colormap] - -;; -;; edi = ylookup[ds_y] + columnofs[ds_x1] -;; - mov eax, [ds_y] - mov edi, [ylookup + eax*4] - mov edx, [ds_x1] - add edi, [columnofs + edx*4] - -;; -;; ecx = ds_x2 - ds_x1 + 1 -;; - mov ecx, [ds_x2] - sub ecx, edx - add ecx, 1 - -;; -;; Needed for fracs and steps -;; - movd mm7, [nflatshiftup] - -;; -;; mm3 = xstep -;; - movd mm3, [ds_xstep] - pslld mm3, mm7 - punpckldq mm3, mm3 - -;; -;; mm4 = ystep -;; - movd mm4, [ds_ystep] - pslld mm4, mm7 - punpckldq mm4, mm4 - -;; -;; mm1 = pair of consecutive xpositions -;; - movd mm1, [ds_xfrac] - pslld mm1, mm7 - movq mm6, mm1 - paddd mm6, mm3 - punpckldq mm1, mm6 - -;; -;; mm2 = pair of consecutive ypositions -;; - movd mm2, [ds_yfrac] - pslld mm2, mm7 - movq mm6, mm2 - paddd mm6, mm4 - punpckldq mm2, mm6 - -;; -;; mm5 = nflatxshift -;; mm6 = nflatyshift -;; - movd mm5, [nflatxshift] - movd mm6, [nflatyshift] - -;; -;; Mask is in memory due to lack of registers. -;; - mov eax, [nflatmask] - mov [nflatmask64], eax - mov [nflatmask64 + 4], eax - - -;; -;; Go until we reach a dword boundary. -;; -.unaligned: - test edi, 3 - jz .alignedprep -.stragglers: - cmp ecx, 0 - je .done ;; If ecx == 0, we're finished. - -;; -;; eax = ((yposition >> nflatyshift) & nflatmask) | (xposition >> nflatxshift) -;; - movq mm0, mm1 ;; mm0 = xposition - movq mm7, mm2 ;; mm7 = yposition - paddd mm1, mm3 ;; xposition += xstep (once!) - paddd mm2, mm4 ;; yposition += ystep (once!) - psrld mm0, mm5 ;; shift - psrld mm7, mm6 ;; shift - pand mm7, [nflatmask64] ;; mask - por mm0, mm7 ;; or x and y together - - movd eax, mm0 ;; eax = index of first pixel - movzx eax, byte [esi + eax] ;; al = source[eax] - movzx eax, byte [ebx + eax] ;; al = colormap[al] - - mov [edi], al - add edi, 1 - - sub ecx, 1 - jmp .unaligned - - -.alignedprep: -;; -;; We can double the steps now. -;; - pslld mm3, 1 - pslld mm4, 1 - - -;; -;; Generate chunks of four pixels. -;; -.alignedloop: - -;; -;; Make sure we have at least four pixels. -;; - cmp ecx, 4 - jl .prestragglers - -;; -;; First two pixels. -;; - movq mm0, mm1 ;; mm0 = xposition - movq mm7, mm2 ;; mm7 = yposition - paddd mm1, mm3 ;; xposition += xstep - paddd mm2, mm4 ;; yposition += ystep - psrld mm0, mm5 ;; shift - psrld mm7, mm6 ;; shift - pand mm7, [nflatmask64] ;; mask - por mm0, mm7 ;; or x and y together - - movd eax, mm0 ;; eax = index of first pixel - movzx eax, byte [esi + eax] ;; al = source[eax] - movzx ebp, byte [ebx + eax] ;; ebp = colormap[al] - - punpckhdq mm0, mm0 ;; both dwords = high dword - movd eax, mm0 ;; eax = index of second pixel - movzx eax, byte [esi + eax] ;; al = source[eax] - movzx eax, byte [ebx + eax] ;; al = colormap[al] - shl eax, 8 ;; get pixel in right byte - or ebp, eax ;; put pixel in ebp - -;; -;; Next two pixels. -;; - movq mm0, mm1 ;; mm0 = xposition - movq mm7, mm2 ;; mm7 = yposition - paddd mm1, mm3 ;; xposition += xstep - paddd mm2, mm4 ;; yposition += ystep - psrld mm0, mm5 ;; shift - psrld mm7, mm6 ;; shift - pand mm7, [nflatmask64] ;; mask - por mm0, mm7 ;; or x and y together - - movd eax, mm0 ;; eax = index of third pixel - movzx eax, byte [esi + eax] ;; al = source[eax] - movzx eax, byte [ebx + eax] ;; al = colormap[al] - shl eax, 16 ;; get pixel in right byte - or ebp, eax ;; put pixel in ebp - - punpckhdq mm0, mm0 ;; both dwords = high dword - movd eax, mm0 ;; eax = index of second pixel - movzx eax, byte [esi + eax] ;; al = source[eax] - movzx eax, byte [ebx + eax] ;; al = colormap[al] - shl eax, 24 ;; get pixel in right byte - or ebp, eax ;; put pixel in ebp - -;; -;; Write pixels. -;; - mov [edi], ebp - add edi, 4 - - sub ecx, 4 - jmp .alignedloop - -.prestragglers: -;; -;; Back to one step at a time. -;; - psrad mm3, 1 - psrad mm4, 1 - jmp .stragglers - -.done: -;; -;; Clear MMX state, or else FPU operations will go badly awry. -;; - emms - - pop ebx - pop edi - pop esi - pop ebp - ret diff --git a/src/tmap_vc.nas b/src/tmap_vc.nas deleted file mode 100644 index 49eb21a6d..000000000 --- a/src/tmap_vc.nas +++ /dev/null @@ -1,48 +0,0 @@ -;; SONIC ROBO BLAST 2 -;;----------------------------------------------------------------------------- -;; Copyright (C) 1998-2000 by DooM Legacy Team. -;; Copyright (C) 1999-2020 by Sonic Team Junior. -;; -;; This program is free software distributed under the -;; terms of the GNU General Public License, version 2. -;; See the 'LICENSE' file for more details. -;;----------------------------------------------------------------------------- -;; FILE: -;; tmap_vc.nas -;; DESCRIPTION: -;; Assembler optimised math code for Visual C++. - - -[BITS 32] - -%macro cglobal 1 -%define %1 _%1 -[global %1] -%endmacro - -[SECTION .text write] - -;---------------------------------------------------------------------------- -;fixed_t FixedMul (fixed_t a, fixed_t b) -;---------------------------------------------------------------------------- -cglobal FixedMul -; align 16 -FixedMul: - mov eax,[esp+4] - imul dword [esp+8] - shrd eax,edx,16 - ret - -;---------------------------------------------------------------------------- -;fixed_t FixedDiv2 (fixed_t a, fixed_t b); -;---------------------------------------------------------------------------- -cglobal FixedDiv2 -; align 16 -FixedDiv2: - mov eax,[esp+4] - mov edx,eax ;; these two instructions allow the next - sar edx,31 ;; two to pair, on the Pentium processor. - shld edx,eax,16 - sal eax,16 - idiv dword [esp+8] - ret diff --git a/src/v_video.c b/src/v_video.c index b372b288c..ff1e6b75c 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -489,12 +489,6 @@ static void CV_palette_OnChange(void) V_SetPalette(0); } -#if defined (__GNUC__) && defined (__i386__) && !defined (NOASM) && !defined (__APPLE__) && !defined (NORUSEASM) -void VID_BlitLinearScreen_ASM(const UINT8 *srcptr, UINT8 *destptr, INT32 width, INT32 height, size_t srcrowbytes, - size_t destrowbytes); -#define HAVE_VIDCOPY -#endif - static void CV_constextsize_OnChange(void) { if (!con_startup) @@ -508,9 +502,6 @@ static void CV_constextsize_OnChange(void) void VID_BlitLinearScreen(const UINT8 *srcptr, UINT8 *destptr, INT32 width, INT32 height, size_t srcrowbytes, size_t destrowbytes) { -#ifdef HAVE_VIDCOPY - VID_BlitLinearScreen_ASM(srcptr,destptr,width,height,srcrowbytes,destrowbytes); -#else if ((srcrowbytes == destrowbytes) && (srcrowbytes == (size_t)width)) M_Memcpy(destptr, srcptr, srcrowbytes * height); else @@ -523,7 +514,6 @@ void VID_BlitLinearScreen(const UINT8 *srcptr, UINT8 *destptr, INT32 width, INT3 srcptr += srcrowbytes; } } -#endif } void V_AdjustXYWithSnap(INT32 *x, INT32 *y, UINT32 options, INT32 dupx, INT32 dupy) diff --git a/src/win32ce/Srb2win.ico b/src/win32ce/Srb2win.ico deleted file mode 100644 index 4e3f81336..000000000 Binary files a/src/win32ce/Srb2win.ico and /dev/null differ diff --git a/src/win32ce/win_dbg.c b/src/win32ce/win_dbg.c deleted file mode 100644 index 45b2fc322..000000000 --- a/src/win32ce/win_dbg.c +++ /dev/null @@ -1,629 +0,0 @@ -// Emacs style mode select -*- C++ -*- -//----------------------------------------------------------------------------- -// -// Copyright (C) 1998-2000 by DooM Legacy Team. -// -// 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. -//----------------------------------------------------------------------------- -/// \file -/// \brief Sources from GameDeveloper magazine article, January 1998, by Bruce Dawson. -/// this source file contains the exception handler for recording error -/// information after crashes. - -#include -#include "win_main.h" -#include "../doomdef.h" //just for VERSION -#include "win_dbg.h" -#include "../m_argv.h" //print the parameter in the log - - -#define NumCodeBytes 16 // Number of code bytes to record. -#define MaxStackDump 2048 // Maximum number of DWORDS in stack dumps. -#define StackColumns 8 // Number of columns in stack dump. - -#define ONEK 1024 -#define SIXTYFOURK (64*ONEK) -#define ONEM (ONEK*ONEK) -#define ONEG (ONEK*ONEK*ONEK) - - -// -------------------------------------------------------------------------- -// return a description for an ExceptionCode -// -------------------------------------------------------------------------- -static LPCSTR GetExceptionDescription (DWORD ExceptionCode) -{ - unsigned int i; - - struct ExceptionNames - { - DWORD ExceptionCode; - LPCSTR ExceptionName; - }; - - struct ExceptionNames ExceptionMap[] = - { - {EXCEPTION_ACCESS_VIOLATION, "an Access Violation"}, - {EXCEPTION_ARRAY_BOUNDS_EXCEEDED, "a Array Bounds Exceeded"}, - {EXCEPTION_BREAKPOINT, "a Breakpoint"}, - {EXCEPTION_DATATYPE_MISALIGNMENT, "a Datatype Misalignment"}, - {EXCEPTION_FLT_DENORMAL_OPERAND, "a Float Denormal Operand"}, - {EXCEPTION_FLT_DIVIDE_BY_ZERO, "a Float Divide By Zero"}, - {EXCEPTION_FLT_INEXACT_RESULT, "a Float Inexact Result"}, - {EXCEPTION_FLT_INVALID_OPERATION, "a Float Invalid Operation"}, - {EXCEPTION_FLT_OVERFLOW, "a Float Overflow"}, - {EXCEPTION_FLT_STACK_CHECK, "a Float Stack Check"}, - {EXCEPTION_FLT_UNDERFLOW, "a Float Underflow"}, - {EXCEPTION_ILLEGAL_INSTRUCTION, "an Illegal Instruction"}, - {EXCEPTION_IN_PAGE_ERROR, "an In Page Error"}, - {EXCEPTION_INT_DIVIDE_BY_ZERO, "an Integer Divide By Zero"}, - {EXCEPTION_INT_OVERFLOW, "an Integer Overflow"}, - {EXCEPTION_INVALID_DISPOSITION, "an Invalid Disposition"}, - {EXCEPTION_NONCONTINUABLE_EXCEPTION, "Noncontinuable Exception"}, - {EXCEPTION_PRIV_INSTRUCTION, "a Privileged Instruction"}, - {EXCEPTION_SINGLE_STEP, "a Single Step"}, - {EXCEPTION_STACK_OVERFLOW, "a Stack Overflow"}, - {0x40010005, "a Control-C"}, - {0x40010008, "a Control-Break"}, - {0xc0000006, "an In Page Error"}, - {0xc0000017, "a No Memory"}, - {0xc000001d, "an Illegal Instruction"}, - {0xc0000025, "a Noncontinuable Exception"}, - {0xc0000142, "a DLL Initialization Failed"}, - {0xe06d7363, "a Microsoft C++ Exception"}, - }; - - for (i = 0; i < (sizeof (ExceptionMap) / sizeof (ExceptionMap[0])); i++) - if (ExceptionCode == ExceptionMap[i].ExceptionCode) - return ExceptionMap[i].ExceptionName; - - return "Unknown exception type"; -} - - -// -------------------------------------------------------------------------- -// Directly output a formatted string to the errorlog file, using win32 funcs -// -------------------------------------------------------------------------- -static VOID FPrintf (HANDLE fileHandle, LPCSTR lpFmt, ...) -{ - CHAR str[1999]; - va_list arglist; - DWORD bytesWritten; - - va_start (arglist, lpFmt); - vsprintf (str, lpFmt, arglist); - va_end (arglist); - - WriteFile (fileHandle, str, (DWORD)strlen(str), &bytesWritten, NULL); -} - -// -------------------------------------------------------------------------- -// Print the specified FILETIME to output in a human readable format, -// without using the C run time. -// -------------------------------------------------------------------------- -static VOID PrintTime (LPSTR output, FILETIME TimeToPrint) -{ - WORD Date, Time; - if (FileTimeToLocalFileTime (&TimeToPrint, &TimeToPrint) && - FileTimeToDosDateTime (&TimeToPrint, &Date, &Time)) - { - // What a silly way to print out the file date/time. - wsprintfA(output, "%d/%d/%d %02d:%02d:%02d", - (Date / 32) & 15, Date & 31, (Date / 512) + 1980, - (Time / 2048), (Time / 32) & 63, (Time & 31) * 2); - } - else - output[0] = 0; -} - - -static LPTSTR GetFilePart(LPTSTR source) -{ - LPTSTR result = _tcsrchr(source, '\\'); - if (result) - result++; - else - result = source; - return result; -} - -// -------------------------------------------------------------------------- -// Print information about a code module (DLL or EXE) such as its size, -// location, time stamp, etc. -// -------------------------------------------------------------------------- -static VOID ShowModuleInfo(HANDLE LogFile, HMODULE ModuleHandle) -{ - CHAR ModName[MAX_PATH]; - IMAGE_DOS_HEADER *DosHeader; - IMAGE_NT_HEADERS *NTHeader; - HANDLE ModuleFile; - CHAR TimeBuffer[100] = ""; - DWORD FileSize = 0; -#ifdef NO_SEH_MINGW - __try1(EXCEPTION_EXECUTE_HANDLER) -#else - __try -#endif - { - if (GetModuleFileNameA(ModuleHandle, ModName, sizeof (ModName)) > 0) - { - // If GetModuleFileName returns greater than zero then this must - // be a valid code module address. Therefore we can try to walk - // our way through its structures to find the link time stamp. - DosHeader = (IMAGE_DOS_HEADER*)ModuleHandle; - if (IMAGE_DOS_SIGNATURE != DosHeader->e_magic) - return; - NTHeader = (IMAGE_NT_HEADERS*)((char *)DosHeader - + DosHeader->e_lfanew); - if (IMAGE_NT_SIGNATURE != NTHeader->Signature) - return; - // Open the code module file so that we can get its file date - // and size. - ModuleFile = CreateFileA(ModName, GENERIC_READ, - FILE_SHARE_READ, 0, OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, 0); - if (ModuleFile != INVALID_HANDLE_VALUE) - { - FILETIME LastWriteTime; - FileSize = GetFileSize(ModuleFile, 0); - if (GetFileTime(ModuleFile, 0, 0, &LastWriteTime)) - { - wsprintfA(TimeBuffer, " - file date is "); - PrintTime(TimeBuffer + strlen(TimeBuffer), LastWriteTime); - } - CloseHandle(ModuleFile); - } - FPrintf (LogFile, "%s, loaded at 0x%08x - %d bytes - %08x%s\r\n", - ModName, ModuleHandle, FileSize, - NTHeader->FileHeader.TimeDateStamp, TimeBuffer); - } - } - // Handle any exceptions by continuing from this point. -#ifdef NO_SEH_MINGW - __except1 -#else - __except(EXCEPTION_EXECUTE_HANDLER) -#endif - { - } -} - -// -------------------------------------------------------------------------- -// Scan memory looking for code modules (DLLs or EXEs). VirtualQuery is used -// to find all the blocks of address space that were reserved or committed, -// and ShowModuleInfo will display module information if they are code -// modules. -// -------------------------------------------------------------------------- -static VOID RecordModuleList(HANDLE LogFile) -{ - SYSTEM_INFO SystemInfo; - size_t PageSize; - size_t NumPages; - size_t pageNum = 0; - LPVOID LastAllocationBase = 0; - - FPrintf (LogFile, "\r\n" - "\tModule list: names, addresses, sizes, time stamps " - "and file times:\r\n"); - - // Set NumPages to the number of pages in the 4GByte address space, - // while being careful to avoid overflowing ints. - GetSystemInfo(&SystemInfo); - PageSize = SystemInfo.dwPageSize; - NumPages = 4 * (unsigned int)(ONEG / PageSize); - while (pageNum < NumPages) - { - MEMORY_BASIC_INFORMATION MemInfo; - if (VirtualQuery((LPVOID)(pageNum * PageSize), &MemInfo, - sizeof (MemInfo))) - { - if (MemInfo.RegionSize > 0) - { - // Adjust the page number to skip over this block of memory. - pageNum += MemInfo.RegionSize / PageSize; - if (MemInfo.State == MEM_COMMIT && MemInfo.AllocationBase > - LastAllocationBase) - { - // Look for new blocks of committed memory, and try - // recording their module names - this will fail - // gracefully if they aren't code modules. - LastAllocationBase = MemInfo.AllocationBase; - ShowModuleInfo(LogFile, (HMODULE)LastAllocationBase); - } - } - else - pageNum += SIXTYFOURK / PageSize; - } - else - pageNum += SIXTYFOURK / PageSize; - // If VirtualQuery fails we advance by 64K because that is the - // granularity of address space doled out by VirtualAlloc(). - } -} - - -// -------------------------------------------------------------------------- -// Record information about the user's system, such as processor type, amount -// of memory, etc. -// -------------------------------------------------------------------------- -static VOID RecordSystemInformation(HANDLE fileHandle) -{ - FILETIME CurrentTime; - CHAR TimeBuffer[100]; - CHAR ModuleName[MAX_PATH]; - CHAR UserName[200]; - DWORD UserNameSize; - SYSTEM_INFO SystemInfo; - MEMORYSTATUS MemInfo; - - GetSystemTimeAsFileTime (&CurrentTime); - PrintTime (TimeBuffer, CurrentTime); - FPrintf(fileHandle, "Error occurred at %s.\r\n", TimeBuffer); - - if (GetModuleFileNameA(NULL, ModuleName, sizeof (ModuleName)) <= 0) - strcpy (ModuleName, "Unknown"); - UserNameSize = sizeof (UserName); - if (!GetUserNameA(UserName, &UserNameSize)) - strcpy (UserName, "Unknown"); - FPrintf(fileHandle, "%s, run by %s.\r\n", ModuleName, UserName); - - GetSystemInfo (&SystemInfo); - FPrintf (fileHandle, "%d processor(s), type %d %d.%d.\r\n" - "Program Memory from 0x%p to 0x%p\r\n", - SystemInfo.dwNumberOfProcessors, - SystemInfo.dwProcessorType, - SystemInfo.wProcessorLevel, - SystemInfo.wProcessorRevision, - SystemInfo.lpMinimumApplicationAddress, - SystemInfo.lpMaximumApplicationAddress); - - MemInfo.dwLength = sizeof (MemInfo); - GlobalMemoryStatus(&MemInfo); - // Print out the amount of physical memory, rounded up. - FPrintf(fileHandle, "%d MBytes physical memory.\r\n", (MemInfo.dwTotalPhys + - ONEM - 1) / ONEM); -} - -// -------------------------------------------------------------------------- -// What we do here is trivial : open a file, write out the register information -// from the PEXCEPTION_POINTERS structure, then return EXCEPTION_CONTINUE_SEARCH -// whose magic value tells Win32 to proceed with its normal error handling -// mechanism. This is important : an error dialog will popup if possible and -// the debugger will hopefully coexist peacefully with the structured exception -// handler. -// -------------------------------------------------------------------------- -int __cdecl RecordExceptionInfo (PEXCEPTION_POINTERS data/*, LPCSTR Message, LPSTR lpCmdLine*/) -{ - PEXCEPTION_RECORD Exception; - PCONTEXT Context; - TCHAR ModuleName[MAX_PATH]; - TCHAR FileName[MAX_PATH] = TEXT("Unknown"); - LPTSTR FilePart, lastperiod; - TCHAR CrashModulePathName[MAX_PATH]; - LPCTSTR CrashModuleFileName = TEXT("Unknown"); - MEMORY_BASIC_INFORMATION MemInfo; - static int BeenHere = false; - HANDLE fileHandle; - UINT8 *code; - int codebyte,i; - - if (data) - { - Exception = data->ExceptionRecord; - Context = data->ContextRecord; - } - else - { - return EXCEPTION_CONTINUE_SEARCH; - } - - if (BeenHere) // Going recursive! That must mean this routine crashed! - return EXCEPTION_CONTINUE_SEARCH; - BeenHere = true; - - // Create a filename to record the error information to. - // Store it in the executable directory. - if (GetModuleFileName(NULL, ModuleName, sizeof (ModuleName)) <= 0) - ModuleName[0] = 0; - FilePart = GetFilePart(ModuleName); - - // Extract the file name portion and remove it's file extension. We'll - // use that name shortly. - lstrcpy (FileName, FilePart); - lastperiod = _tcsrchr (FileName, '.'); - if (lastperiod) - lastperiod[0] = 0; - // Replace the executable filename with our error log file name. - lstrcpy (FilePart, TEXT("errorlog.txt")); - fileHandle = CreateFile (ModuleName, GENERIC_WRITE, 0, NULL, OPEN_ALWAYS, - FILE_ATTRIBUTE_NORMAL | FILE_FLAG_WRITE_THROUGH, NULL); - if (fileHandle == INVALID_HANDLE_VALUE) - { - OutputDebugString (TEXT("Error creating exception report")); - return EXCEPTION_CONTINUE_SEARCH; - } - - // Append to the error log. - SetFilePointer (fileHandle, 0, 0, FILE_END); - - // Print out some blank lines to separate this error log from any previous ones. - FPrintf (fileHandle, "Email Sonic Team Junior so we can fix the bugs\r\n"); // Tails - FPrintf (fileHandle, "Make sure you tell us what you were doing to cause the crash, and if possible, record a demo!\r\n"); // Tails - FPrintf (fileHandle, "\r\n\r\n\r\n\r\n"); - FPrintf (fileHandle, "SRB2Kart %s -ERROR LOG-\r\n\r\n", VERSIONSTRING); - FPrintf (fileHandle, "\r\n"); - // VirtualQuery can be used to get the allocation base associated with a - // code address, which is the same as the ModuleHandle. This can be used - // to get the filename of the module that the crash happened in. - if (VirtualQuery ((LPVOID)(size_t)Context->Eip, &MemInfo, sizeof (MemInfo)) && - GetModuleFileName ((HMODULE)MemInfo.AllocationBase, - CrashModulePathName, - sizeof (CrashModulePathName)) > 0) - CrashModuleFileName = GetFilePart(CrashModulePathName); - - // Print out the beginning of the error log in a Win95 error window - // compatible format. - FPrintf (fileHandle, "%s caused an %s in module %s at %04x:%08x.\r\n", - FileName, GetExceptionDescription(Exception->ExceptionCode), - CrashModuleFileName, Context->SegCs, Context->Eip); - //if (&Message = Null) - FPrintf (fileHandle, "Exception handler called in %s.\r\n", "main thread"); - //else - //FPrintf (fileHandle, "Exception handler called in %s.\r\n", Message); - - RecordSystemInformation (fileHandle); - - // If the exception was an access violation, print out some additional - // information, to the error log and the debugger. - if (Exception->ExceptionCode == STATUS_ACCESS_VIOLATION && - Exception->NumberParameters >= 2) - { - TCHAR DebugMessage[1000]; - LPCTSTR readwrite = TEXT("Read from"); - if (Exception->ExceptionInformation[0]) - readwrite = TEXT("Write to"); - wsprintf(DebugMessage, TEXT("%s location %08x caused an access violation.\r\n"), - readwrite, Exception->ExceptionInformation[1]); -#ifdef _DEBUG - // The VisualC++ debugger doesn't actually tell you whether a read - // or a write caused the access violation, nor does it tell what - // address was being read or written. So I fixed that. - OutputDebugString(TEXT("Exception handler: ")); - OutputDebugString(DebugMessage); -#endif - FPrintf(fileHandle, "%s", DebugMessage); - } - - FPrintf(fileHandle, "\r\n"); - - // Print out the register values in a Win95 error window compatible format. - if ((Context->ContextFlags & CONTEXT_FULL) == CONTEXT_FULL) - { - FPrintf (fileHandle, "Registers:\r\n"); - FPrintf (fileHandle, "EAX=%.8lx CS=%.4x EIP=%.8lx EFLGS=%.8lx\r\n", - Context->Eax,Context->SegCs,Context->Eip,Context->EFlags); - FPrintf (fileHandle, "EBX=%.8lx SS=%.4x ESP=%.8lx EBP=%.8lx\r\n", - Context->Ebx,Context->SegSs,Context->Esp,Context->Ebp); - FPrintf (fileHandle, "ECX=%.8lx DS=%.4x ESI=%.8lx FS=%.4x\r\n", - Context->Ecx,Context->SegDs,Context->Esi,Context->SegFs); - FPrintf (fileHandle, "EDX=%.8lx ES=%.4x EDI=%.8lx GS=%.4x\r\n", - Context->Edx,Context->SegEs,Context->Edi,Context->SegGs); - } - - // moved down because it was causing the printout to stop - FPrintf (fileHandle, "Command Line parameters: "); - for (i = 1;i < myargc;i++) - FPrintf (fileHandle, "%s ", myargv[i]); - - FPrintf (fileHandle, "Bytes at CS : EIP:\r\n"); - - // Print out the bytes of code at the instruction pointer. Since the - // crash may have been caused by an instruction pointer that was bad, - // this code needs to be wrapped in an exception handler, in case there - // is no memory to read. If the dereferencing of code[] fails, the - // exception handler will print '??'. - code = (UINT8 *)(size_t)Context->Eip; - for (codebyte = 0; codebyte < NumCodeBytes; codebyte++) - { -#ifdef NO_SEH_MINGW - __try1(EXCEPTION_EXECUTE_HANDLER) -#else - __try -#endif - { - FPrintf (fileHandle, "%02x ", code[codebyte]); - } -#ifdef NO_SEH_MINGW - __except1 -#else - __except(EXCEPTION_EXECUTE_HANDLER) -#endif - { - FPrintf (fileHandle, "?? "); - } - } - - // Time to print part or all of the stack to the error log. This allows - // us to figure out the call stack, parameters, local variables, etc. - FPrintf (fileHandle, "\r\n" - "Stack dump:\r\n"); -#ifdef NO_SEH_MINGW - __try1(EXCEPTION_EXECUTE_HANDLER) -#else - __try -#endif - { - // Esp contains the bottom of the stack, or at least the bottom of - // the currently used area. - DWORD* pStack = (DWORD *)(size_t)Context->Esp; - DWORD* pStackTop = NULL; - size_t Count = 0; - TCHAR buffer[1000] = TEXT(""); - const int safetyzone = 50; - LPTSTR nearend = buffer + sizeof (buffer) - safetyzone*sizeof (TCHAR); - LPTSTR output = buffer; - const void *Suffix; - - // Load the top (highest address) of the stack from the - // thread information block. It will be found there in - // Win9x and Windows NT. -#ifdef __GNUC__ - __asm__("movl %%fs : 4, %%eax": "=a"(pStackTop)); -#else - __asm - { - mov eax, fs:[4] - mov pStackTop, eax - } -#endif - if (pStackTop == NULL) - goto StackSkip; - else if (pStackTop > pStack + MaxStackDump) - pStackTop = pStack + MaxStackDump; - // Too many calls to WriteFile can take a long time, causing - // confusing delays when programs crash. Therefore I implemented - // simple buffering for the stack dumping code instead of calling - // FPrintf directly. - while (pStack + 1 <= pStackTop) - { - if ((Count % StackColumns) == 0) - output += wsprintf(output, TEXT("%08x: "), pStack); - if ((++Count % StackColumns) == 0 || pStack + 2 > pStackTop) - Suffix = TEXT("\r\n"); - else - Suffix = TEXT(" "); - output += wsprintf(output, TEXT("%08x%s"), *pStack, Suffix); - pStack++; - // Check for when the buffer is almost full, and flush it to disk. - if (output > nearend) - { - FPrintf (fileHandle, "%s", buffer); - buffer[0] = 0; - output = buffer; - } - } - // Print out any final characters from the cache. - StackSkip: - FPrintf (fileHandle, "%s", buffer); - } -#ifdef NO_SEH_MINGW - __except1 -#else - __except(EXCEPTION_EXECUTE_HANDLER) -#endif - { - FPrintf(fileHandle, "Exception encountered during stack dump.\r\n"); - } - - RecordModuleList (fileHandle); - - CloseHandle (fileHandle); - - // Return the magic value which tells Win32 that this handler didn't - // actually handle the exception - so that things will proceed as per - // normal. - //BP: should put message for end user to send this file to fix any bug - return EXCEPTION_CONTINUE_SEARCH; -} - - /* - // - //FPrintf ("e-mail this file to legacy@newdoom.com, so that we can fix the problem.\r\n\r\n"); - - FPrintf ("Exception handler called in %s.\r\n", Message); - - GetSystemTime (&systemTime); - FPrintf ("Error occured at %02d/%02d/%04d %02d:%02d:%02d.\r\n", - systemTime.wMonth, systemTime.wDay, systemTime.wYear, - systemTime.wHour, systemTime.wMinute, systemTime.wSecond); - - - FPrintf ("%s\r\n", filename); - FPrintf ("Cmd-line: %s\r\n", lpCmdLine); - - // Nested exceptions can occur, get info for each one - - nER = 1; - while (ER) - { - if (nER++>1) - FPrintf ("Exception Record %d.\r\n", nER); - - FPrintf ("application caused an %s", GetExceptionCodeStr(Exception->ExceptionCode)); - - if (Context->ContextFlags & CONTEXT_CONTROL) - FPrintf (" at %.4x:%.8x.\r\n", Context->SegCs, Context->Eip); - - // in case of.. - if (Context->Eip != (unsigned long)Exception->ExceptionAddress) - FPrintf ("Exception Address = %.8x\r\n", Exception->ExceptionAddress); - - if (Exception->ExceptionCode == EXCEPTION_ACCESS_VIOLATION) - { - FPrintf ("\r\n%s location 0x%x caused an access violation.\r\n", - (Exception->ExceptionInformation[0] ? "Write to" : "Read from"), - Exception->ExceptionInformation[1]); - } - - ER = Exception->ExceptionRecord; - } - - - if (Context->ContextFlags & CONTEXT_DEBUG_REGISTERS) - { - FPrintf ("\r\nDebug Registers:\r\n"); - FPrintf ("Dr0=%.8x Dr1=%.8x Dr2=%.8x\r\n" - "Dr3=%.8x Dr6=%.8x Dr7=%.8x\r\n", - Context->Dr0, Context->Dr1, Context->Dr2, - Context->Dr3, Context->Dr6, Context->Dr7); - } - - if (Context->ContextFlags & CONTEXT_FLOATING_POINT) - { - FPrintf ("\r\nFloating Save Area:\r\n"); - FPrintf ("ControlWord =%.8x TagWord =%.8x ErrorSelector=%.8x DataSelector =%.8x\r\n" - "StatusWord =%.8x ErrorOffset =%.8x DataOffset =%.8x Cr0NpxState =%.8x\r\n", - Context->FloatSave.ControlWord, Context->FloatSave.TagWord, Context->FloatSave.ErrorSelector, Context->FloatSave.DataSelector, - Context->FloatSave.StatusWord, Context->FloatSave.ErrorOffset, Context->FloatSave.DataOffset, Context->FloatSave.Cr0NpxState - ); - - //BYTE RegisterArea[SIZE_OF_80387_REGISTERS]; - } - - - // in case of... - if ((Context->ContextFlags & CONTEXT_FULL) != CONTEXT_FULL) - { - if (!(Context->ContextFlags & CONTEXT_SEGMENTS)) - FPrintf ("Note! GS,FS,ES,DS are unspecified\r\n"); - if (!(Context->ContextFlags & CONTEXT_INTEGER)) - FPrintf ("Note! EDI,ESI,EBX,EDX,ECX,EAX are unspecified\r\n"); - if (!(Context->ContextFlags & CONTEXT_CONTROL)) - FPrintf ("Note! EBP,CS : EIP,EFlags,SS : ESP are unspecified\r\n"); - } - - FPrintf ("\r\nBytes at CS : EIP:\r\n"); - ucptr = (UINT8 *)Context->Eip; - for (i = 0; i < 16; i++) - FPrintf ("%.2x ", *ucptr++); - - FPrintf ("\r\n\r\nStack dump:\r\n"); - ulptr = (unsigned long*)Context->Esp; - for (i = 0; i < 16; i++) - FPrintf ("%.8x ", *ulptr++); - - //FPrintf ("Bytes at CS : EIP:\r\n"); - //FPrintf ("%.2x %.2x %.2x %.2x %.2x %.2x %.2x %.2x "); - - for (i = 0; i < 16; i++) - { - FPrintf ("%x - } -*/ diff --git a/src/win32ce/win_dll.c b/src/win32ce/win_dll.c deleted file mode 100644 index 2bda7126d..000000000 --- a/src/win32ce/win_dll.c +++ /dev/null @@ -1,118 +0,0 @@ -// Emacs style mode select -*- C++ -*- -//----------------------------------------------------------------------------- -// -// Copyright (C) 1998-2000 by DooM Legacy Team. -// -// 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. -//----------------------------------------------------------------------------- -/// \file -/// \brief load and initialise the 3D driver DLL - -#include "../doomdef.h" - -#ifdef HW3SOUND -#include "../hardware/hw3dsdrv.h" // get the 3D sound driver DLL export prototypes -#endif - -#include "win_dll.h" -#include "win_main.h" // I_GetLastErrorMsgBox() - -#if defined(HW3SOUND) -typedef struct loadfunc_s { - LPCSTR fnName; - LPVOID fnPointer; -} loadfunc_t; - -// -------------------------------------------------------------------------- -// Load a DLL, returns the HMODULE handle or NULL -// -------------------------------------------------------------------------- -static inline HMODULE LoadDLL (LPCSTR dllName, loadfunc_t *funcTable) -{ - LPVOID funcPtr; - loadfunc_t *loadfunc; - HMODULE hModule; - - if ((hModule = LoadLibraryA(dllName)) != NULL) - { - // get function pointers for all functions we use - for (loadfunc = funcTable; loadfunc->fnName != NULL; loadfunc++) - { - funcPtr = GetProcAddress(hModule, loadfunc->fnName); - if (!funcPtr) { - //I_GetLastErrorMsgBox (); - MessageBoxA(NULL, va("The '%s' haven't the good specification (function %s missing)\n\n" - "You must use dll from the same zip of this exe\n", dllName, loadfunc->fnName), - "Error", MB_OK|MB_ICONINFORMATION); - return FALSE; - } - // store function address - *((LPVOID*)loadfunc->fnPointer) = funcPtr; - } - } - else - { - MessageBoxA(NULL, va("LoadLibrary() FAILED : couldn't load '%s'\r\n", dllName), "Warning", MB_OK|MB_ICONINFORMATION); - //I_GetLastErrorMsgBox (); - } - - return hModule; -} - - -// -------------------------------------------------------------------------- -// Unload the DLL -// -------------------------------------------------------------------------- -static inline VOID UnloadDLL (HMODULE* pModule) -{ - if (FreeLibrary(*pModule)) - *pModule = NULL; - else - I_GetLastErrorMsgBox (); -} -#endif - -#ifdef HW3SOUND -static HMODULE hwsModule = NULL; - -static loadfunc_t hwsFuncTable[] = { - {"_Startup@8", &hw3ds_driver.pfnStartup}, - {"_Shutdown@0", &hw3ds_driver.pfnShutdown}, - {"_AddSfx@4", &hw3ds_driver.pfnAddSfx}, - {"_AddSource@8", &hw3ds_driver.pfnAddSource}, - {"_StartSource@4", &hw3ds_driver.pfnStartSource}, - {"_StopSource@4", &hw3ds_driver.pfnStopSource}, - {"_GetHW3DSVersion@0", &hw3ds_driver.pfnGetHW3DSVersion}, - {"_BeginFrameUpdate@0", &hw3ds_driver.pfnBeginFrameUpdate}, - {"_EndFrameUpdate@0", &hw3ds_driver.pfnEndFrameUpdate}, - {"_IsPlaying@4", &hw3ds_driver.pfnIsPlaying}, - {"_UpdateListener@8", &hw3ds_driver.pfnUpdateListener}, - {"_UpdateSourceParms@12", &hw3ds_driver.pfnUpdateSourceParms}, - {"_SetCone@8", &hw3ds_driver.pfnSetCone}, - {"_SetGlobalSfxVolume@4", &hw3ds_driver.pfnSetGlobalSfxVolume}, - {"_Update3DSource@8", &hw3ds_driver.pfnUpdate3DSource}, - {"_ReloadSource@8", &hw3ds_driver.pfnReloadSource}, - {"_KillSource@4", &hw3ds_driver.pfnKillSource}, - {"_KillSfx@4", &hw3ds_driver.pfnKillSfx}, - {"_GetHW3DSTitle@8", &hw3ds_driver.pfnGetHW3DSTitle}, - {NULL, NULL} -}; - -BOOL Init3DSDriver(LPCSTR dllName) -{ - hwsModule = LoadDLL(dllName, hwsFuncTable); - return (hwsModule != NULL); -} - -VOID Shutdown3DSDriver (VOID) -{ - UnloadDLL(&hwsModule); -} -#endif diff --git a/src/win32ce/win_dll.h b/src/win32ce/win_dll.h deleted file mode 100644 index f69a8c21f..000000000 --- a/src/win32ce/win_dll.h +++ /dev/null @@ -1,26 +0,0 @@ -// Emacs style mode select -*- C++ -*- -//----------------------------------------------------------------------------- -// -// Copyright (C) 1998-2000 by DooM Legacy Team. -// -// 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. -//----------------------------------------------------------------------------- -/// \file -/// \brief load/unload a DLL at run-time - -//#define WIN32_LEAN_AND_MEAN -#define RPC_NO_WINDOWS_H -#include - -#ifdef HW3SOUND -BOOL Init3DSDriver(LPCSTR dllName); -VOID Shutdown3DSDriver(VOID); -#endif diff --git a/src/win32ce/win_main.c b/src/win32ce/win_main.c deleted file mode 100644 index fe4147291..000000000 --- a/src/win32ce/win_main.c +++ /dev/null @@ -1,539 +0,0 @@ -// Emacs style mode select -*- C++ -*- -//----------------------------------------------------------------------------- -// -// Copyright (C) 1998-2000 by DooM Legacy Team. -// -// 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. -//----------------------------------------------------------------------------- -/// \file -/// \brief Win32 WinMain Entry Point -/// -/// Win32 Sonic Robo Blast 2 -/// -/// NOTE: -/// To compile WINDOWS SRB2 version : define a '_WINDOWS' symbol. -/// to do this go to Project/Settings/ menu, click C/C++ tab, in -/// 'Preprocessor definitions:' add '_WINDOWS' - -#include "../doomdef.h" -#include - -#include "../doomstat.h" // netgame -#include "resource.h" - -#include "../m_argv.h" -#include "../d_main.h" -#include "../i_system.h" - -#include "../keys.h" //hack quick test - -#include "../console.h" - -#include "fabdxlib.h" -#include "win_main.h" -#include "win_dbg.h" -#include "../i_sound.h" // midi pause/unpause -#include "../g_input.h" // KEY_MOUSEWHEELxxx - -// MSWheel support for Win95/NT3.51 -#include - -#ifndef WM_XBUTTONDOWN -#define WM_XBUTTONDOWN 523 -#endif -#ifndef WM_XBUTTONUP -#define WM_XBUTTONUP 524 -#endif -#ifndef MK_XBUTTON1 -#define MK_XBUTTON1 32 -#endif -#ifndef MK_XBUTTON2 -#define MK_XBUTTON2 64 -#endif - -typedef BOOL (WINAPI *MyFunc)(VOID); - -HINSTANCE myInstance = NULL; -HWND hWndMain = NULL; -static HCURSOR windowCursor = NULL; // main window cursor - -boolean appActive = false; // app window is active - -#ifdef LOGMESSAGES -// this is were I log debug text, cons_printf, I_error ect for window port debugging -HANDLE logstream; -#endif - -BOOL nodinput = FALSE; - -static LRESULT CALLBACK MainWndproc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - event_t ev; //Doom input event - int mouse_keys; - - // judgecutor: - // Response MSH Mouse Wheel event - - if (message == MSHWheelMessage) - { - message = WM_MOUSEWHEEL; - if (win9x) - wParam <<= 16; - } - - - switch (message) - { - case WM_CREATE: - nodinput = M_CheckParm("-nodinput"); - break; - - case WM_ACTIVATEAPP: // Handle task switching - appActive = (int)wParam; - // pause music when alt-tab - if (appActive && !paused) - I_ResumeSong(0); - else if (!paused) - I_PauseSong(0); - { - HANDLE ci = GetStdHandle(STD_INPUT_HANDLE); - if (ci != INVALID_HANDLE_VALUE && GetFileType(ci) == FILE_TYPE_CHAR) - appActive = true; - } - InvalidateRect (hWnd, NULL, TRUE); - break; - - //for MIDI music - case WM_MSTREAM_UPDATEVOLUME: - I_SetMidiChannelVolume((DWORD)wParam, dwVolumePercent); - break; - - case WM_PAINT: - if (!appActive && !bAppFullScreen && !netgame) - // app becomes inactive (if windowed) - { - // Paint "Game Paused" in the middle of the screen - PAINTSTRUCT ps; - RECT rect; - HDC hdc = BeginPaint (hWnd, &ps); - GetClientRect (hWnd, &rect); - DrawText (hdc, TEXT("Game Paused"), -1, &rect, - DT_SINGLELINE | DT_CENTER | DT_VCENTER); - EndPaint (hWnd, &ps); - return 0; - } - break; - - //case WM_RBUTTONDOWN: - //case WM_LBUTTONDOWN: - - case WM_MOVE: - if (bAppFullScreen) - { - SetWindowPos(hWnd, NULL, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOSIZE); - return 0; - } - else - { - windowPosX = (SHORT) LOWORD(lParam); // horizontal position - windowPosY = (SHORT) HIWORD(lParam); // vertical position - break; - } - break; - - // This is where switching windowed/fullscreen is handled. DirectDraw - // objects must be destroyed, recreated, and artwork reloaded. - - case WM_DISPLAYCHANGE: - case WM_SIZE: - break; - - case WM_SETCURSOR: - if (bAppFullScreen) - SetCursor(NULL); - else - SetCursor(windowCursor); - return TRUE; - - case WM_KEYUP: - ev.type = ev_keyup; - goto handleKeyDoom; - break; - - case WM_KEYDOWN: - ev.type = ev_keydown; - - handleKeyDoom: - ev.data1 = 0; - if (wParam == VK_PAUSE) - // intercept PAUSE key - { - ev.data1 = KEY_PAUSE; - } - else if (!keyboard_started) - // post some keys during the game startup - // (allow escaping from network synchronization, or pressing enter after - // an error message in the console) - { - switch (wParam) - { - case VK_ESCAPE: ev.data1 = KEY_ESCAPE; break; - case VK_RETURN: ev.data1 = KEY_ENTER; break; - default: ev.data1 = MapVirtualKey((DWORD)wParam,2); // convert in to char - } - } - - if (ev.data1) - D_PostEvent (&ev); - - return 0; - break; - - // judgecutor: - // Handle mouse events - case WM_LBUTTONDOWN: - case WM_LBUTTONUP: - case WM_RBUTTONDOWN: - case WM_RBUTTONUP: - case WM_MBUTTONDOWN: - case WM_MBUTTONUP: - case WM_XBUTTONDOWN: - case WM_XBUTTONUP: - case WM_MOUSEMOVE: - if (nodinput) - { - mouse_keys = 0; - if (wParam & MK_LBUTTON) - mouse_keys |= 1; - if (wParam & MK_RBUTTON) - mouse_keys |= 2; - if (wParam & MK_MBUTTON) - mouse_keys |= 4; - if (wParam & MK_XBUTTON1) - mouse_keys |= 8; - if (wParam & MK_XBUTTON2) - mouse_keys |= 16; - I_GetSysMouseEvents(mouse_keys); - } - break; - - - case WM_MOUSEWHEEL: - //CONS_Printf("MW_WHEEL dispatched.\n"); - ev.type = ev_keydown; - if ((INT16)HIWORD(wParam) > 0) - ev.data1 = KEY_MOUSEWHEELUP; - else - ev.data1 = KEY_MOUSEWHEELDOWN; - D_PostEvent(&ev); - break; - - case WM_SETTEXT: - COM_BufAddText((LPCSTR)lParam); - return TRUE; - break; - - case WM_CLOSE: - PostQuitMessage(0); //to quit while in-game - ev.data1 = KEY_ESCAPE; //to exit network synchronization - ev.type = ev_keydown; - D_PostEvent (&ev); - return 0; - case WM_DESTROY: - //faB: main app loop will exit the loop and proceed with I_Quit() - PostQuitMessage(0); - break; - - default: - break; - } - - return DefWindowProc(hWnd, message, wParam, lParam); -} - - -static inline VOID OpenTextConsole(void) -{ - HANDLE ci, co; - const BOOL tco = M_CheckParm("-console") != 0; - dedicated = M_CheckParm("-dedicated") != 0; - if (!(dedicated || tco)) - return; - FreeConsole(); - AllocConsole(); //Let get the real console HANDLE, because Mingw's Bash is bad! - ci = CreateFile(TEXT("CONIN$") , GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - co = CreateFile(TEXT("CONOUT$"), GENERIC_WRITE|GENERIC_READ, FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - if (ci != (HANDLE)-1) - { - const DWORD CM = ENABLE_LINE_INPUT|ENABLE_ECHO_INPUT|ENABLE_PROCESSED_INPUT; - SetStdHandle(STD_INPUT_HANDLE,ci); - if(GetFileType(ci) == FILE_TYPE_CHAR) - SetConsoleMode(ci,CM); //default mode but no ENABLE_MOUSE_INPUT - } - if(co != (HANDLE)-1) - { - SetStdHandle(STD_OUTPUT_HANDLE,co); - SetStdHandle(STD_ERROR_HANDLE,co); //maybe logstream? - } -} - -// -// Do that Windows initialization stuff... -// -static HWND OpenMainWindow (HINSTANCE hInstance, int nCmdShow, LPSTR wTitle) -{ - HWND hWnd; - WNDCLASS wc; - - // Set up and register window class - nCmdShow = 0; - wc.style = CS_HREDRAW | CS_VREDRAW /*| CS_DBLCLKS*/; - wc.lpfnWndProc = MainWndproc; - wc.cbClsExtra = 0; - wc.cbWndExtra = 0; - wc.hInstance = hInstance; - wc.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_DLICON1)); - windowCursor = LoadCursor(NULL, IDC_WAIT); //LoadCursor(hInstance, MAKEINTRESOURCE(IDC_DLCURSOR1)); - wc.hCursor = windowCursor; - wc.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH); - wc.lpszMenuName = NULL; - wc.lpszClassName = TEXT("SRB2WC"); - if (!RegisterClass(&wc)) - return (HANDLE)-1; - - // Create a window - // CreateWindowEx - seems to create just the interior, not the borders - - hWnd = CreateWindowExA( -#ifdef _DEBUG - 0, //ExStyle -#else - dedicated ? 0:WS_EX_TOPMOST, //ExStyle -#endif - "SRB2WC", //Classname - wTitle, //Windowname - WS_CAPTION|WS_POPUP|WS_SYSMENU, //dwStyle //WS_VISIBLE|WS_POPUP for bAppFullScreen - 0, - 0, - dedicated ? 0:BASEVIDWIDTH, //GetSystemMetrics(SM_CXSCREEN), - dedicated ? 0:BASEVIDHEIGHT, //GetSystemMetrics(SM_CYSCREEN), - NULL, //hWnd Parent - NULL, //hMenu Menu - hInstance, - NULL); - - return hWnd; -} - - -static inline BOOL tlErrorMessage(const TCHAR *err) -{ - /* make the cursor visible */ - SetCursor(LoadCursor(NULL, IDC_ARROW)); - - // - // warn user if there is one - // - printf("Error %s..\n", err); - fflush(stdout); - - MessageBox(hWndMain, err, TEXT("ERROR"), MB_OK); - return FALSE; -} - - -// ------------------ -// Command line stuff -// ------------------ -#define MAXCMDLINEARGS 64 -static char * myWargv[MAXCMDLINEARGS+1]; -static char myCmdline[512]; - -static VOID GetArgcArgv (LPSTR cmdline) -{ - LPSTR token; - size_t i = 0, len; - char cSep = ' '; - BOOL bCvar = FALSE, prevCvar = FALSE; - - // split arguments of command line into argv - strncpy (myCmdline, cmdline, 511); // in case window's cmdline is in protected memory..for strtok - len = strlen (myCmdline); - - myargc = 0; - while (myargc < MAXCMDLINEARGS) - { - // get token - while (myCmdline[i] == cSep) - i++; - if (i >= len) - break; - token = myCmdline + i; - if (myCmdline[i] == '"') - { - cSep = '"'; - i++; - if (!prevCvar) //cvar leave the "" in - token++; - } - else - cSep = ' '; - - //cvar - if (myCmdline[i] == '+' && cSep == ' ') //a + begins a cvarname, but not after quotes - bCvar = TRUE; - else - bCvar = FALSE; - - while (myCmdline[i] && - myCmdline[i] != cSep) - i++; - - if (myCmdline[i] == '"') - { - cSep = ' '; - if (prevCvar) - i++; // get ending " quote in arg - } - - prevCvar = bCvar; - - if (myCmdline + i > token) - { - myWargv[myargc++] = token; - } - - if (!myCmdline[i] || i >= len) - break; - - myCmdline[i++] = '\0'; - } - myWargv[myargc] = NULL; - - // m_argv.c uses myargv[], we used myWargv because we fill the arguments ourselves - // and myargv is just a pointer, so we set it to point myWargv - myargv = myWargv; -} - - -static inline VOID MakeCodeWritable(VOID) -{ -#ifdef USEASM - // Disable write-protection of code segment - DWORD OldRights; - BYTE *pBaseOfImage = (BYTE *)GetModuleHandle(NULL); - IMAGE_OPTIONAL_HEADER *pHeader = (IMAGE_OPTIONAL_HEADER *) - (pBaseOfImage + ((IMAGE_DOS_HEADER*)pBaseOfImage)->e_lfanew + - sizeof (IMAGE_NT_SIGNATURE) + sizeof (IMAGE_FILE_HEADER)); - if (!VirtualProtect(pBaseOfImage+pHeader->BaseOfCode,pHeader->SizeOfCode,PAGE_EXECUTE_READWRITE,&OldRights)) - I_Error("Could not make code writable\n"); -#endif -} - - - - -// ----------------------------------------------------------------------------- -// HandledWinMain : called by exception handler -// ----------------------------------------------------------------------------- -static int WINAPI HandledWinMain(HINSTANCE hInstance, - HINSTANCE hPrevInstance, - LPSTR lpCmdLine, - int nCmdShow) -{ - int i; - LPSTR args; - - lpCmdLine = NULL; - hPrevInstance = NULL; -#ifdef LOGMESSAGES - // DEBUG!!! - set logstream to NULL to disable debug log - logstream = INVALID_HANDLE_VALUE; - - logstream = CreateFile (TEXT("log.txt"), GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, - FILE_ATTRIBUTE_NORMAL, NULL); //file flag writethrough? -#endif - - // fill myargc,myargv for m_argv.c retrieval of cmdline arguments - CONS_Printf("GetArgcArgv() ...\n"); - args = GetCommandLineA(); - CONS_Printf("lpCmdLine is '%s'\n", args); - GetArgcArgv(args); - // Create a text console window - OpenTextConsole(); - - CONS_Printf("Myargc: %d\n", myargc); - for (i = 0; i < myargc; i++) - CONS_Printf("myargv[%d] : '%s'\n", i, myargv[i]); - - // store for later use, will we need it ? - myInstance = hInstance; - - // open a dummy window, both OpenGL and DirectX need one. - if ((hWndMain = OpenMainWindow(hInstance,nCmdShow, - va("SRB2Kart "VERSIONSTRING))) == (HANDLE)-1) - { - tlErrorMessage(TEXT("Couldn't open window")); - return FALSE; - } - - // currently starts DirectInput - CONS_Printf("I_StartupSystem() ...\n"); - I_StartupSystem(); - MakeCodeWritable(); - - // startup SRB2 - CONS_Printf("D_SRB2Main() ...\n"); - D_SRB2Main(); - CONS_Printf("Entering main app loop...\n"); - // never return - D_SRB2Loop(); - - // back to Windoze - return 0; -} - -// ----------------------------------------------------------------------------- -// Exception handler calls WinMain for catching exceptions -// ----------------------------------------------------------------------------- -int WINAPI WinMain (HINSTANCE hInstance, - HINSTANCE hPrevInstance, - LPSTR lpCmdLine, - int nCmdShow) -{ - int Result = -1; -#if 1 - HMODULE h = GetModuleHandleA("kernel32.dll"); - MyFunc pfnIsDebuggerPresent = NULL; - if (h) - pfnIsDebuggerPresent = (MyFunc)GetProcAddress(h,"IsDebuggerPresent"); - if (!pfnIsDebuggerPresent || !pfnIsDebuggerPresent()) - LoadLibrary("exchndl.dll"); -#endif -#ifdef NO_SEH_MINGW - __try1(RecordExceptionInfo(GetExceptionInformation()/*, "main thread", lpCmdLine*/)) -#else - __try -#endif - { - Result = HandledWinMain (hInstance, hPrevInstance, lpCmdLine, nCmdShow); - } -#ifdef NO_SEH_MINGW - __except1 -#else - __except (RecordExceptionInfo(GetExceptionInformation()/*, "main thread", lpCmdLine*/)) -#endif - { - SetUnhandledExceptionFilter(EXCEPTION_CONTINUE_SEARCH); //Do nothing here. - } - - return Result; -} diff --git a/src/win32ce/win_sys.c b/src/win32ce/win_sys.c deleted file mode 100644 index 1ffcc7020..000000000 --- a/src/win32ce/win_sys.c +++ /dev/null @@ -1,3505 +0,0 @@ -// Emacs style mode select -*- C++ -*- -//----------------------------------------------------------------------------- -// -// Copyright (C) 1998-2000 by DooM Legacy Team. -// -// 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. -//----------------------------------------------------------------------------- -/// \file -/// \brief win32 system i/o -/// -/// Startup & Shutdown routines for music,sound,timer,keyboard,... -/// Signal handler to trap errors and exit cleanly. - -#include "../doomdef.h" -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "../m_misc.h" -#include "../i_video.h" -#include "../i_sound.h" -#include "../i_system.h" - -#include "../d_net.h" -#include "../g_game.h" - -#include "../d_main.h" - -#include "../m_argv.h" - -#include "../w_wad.h" -#include "../z_zone.h" -#include "../g_input.h" - -#include "../keys.h" - -#include "../screen.h" - -// Wheel support for Win95/WinNT3.51 -#include - -// Taken from Win98/NT4.0 -#ifndef SM_MOUSEWHEELPRESENT -#define SM_MOUSEWHEELPRESENT 75 -#endif - -#ifndef MSH_MOUSEWHEEL -#ifdef UNICODE -#define MSH_MOUSEWHEEL L"MSWHEEL_ROLLMSG" -#else -#define MSH_MOUSEWHEEL "MSWHEEL_ROLLMSG" -#endif -#endif - -#include "win_main.h" -#include "../i_joy.h" - -#define DIRECTINPUT_VERSION 0x700 -// Force dinput.h to generate old DX3 headers. -#define DXVERSION_NTCOMPATIBLE 0x0300 -#include - -#include "fabdxlib.h" - -#ifdef __DEBUG__ -#undef NDEBUG -#endif - -/// \brief max number of joystick buttons -#define JOYBUTTONS_MAX 32 // rgbButtons[32] -/// \brief max number of joystick button events -#define JOYBUTTONS_MIN min((JOYBUTTONS),(JOYBUTTONS_MAX)) - -/// \brief max number of joysick axies -#define JOYAXISSET_MAX 4 // (lX, lY), (lZ,lRx), (lRy, lRz), rglSlider[2] is very diff -/// \brief max number ofjoystick axis events -#define JOYAXISSET_MIN min((JOYAXISSET),(JOYAXISSET_MAX)) - -/// \brief max number of joystick hats -#define JOYHATS_MAX 4 // rgdwPOV[4]; -/// \brief max number of joystick hat events -#define JOYHATS_MIN min((JOYHATS),(JOYHATS_MAX)) - -/// \brief max number of mouse buttons -#define MOUSEBUTTONS_MAX 8 // 8 bit of BYTE and DIMOFS_BUTTON7 -/// \brief max number of muse button events -#define MOUSEBUTTONS_MIN min((MOUSEBUTTONS),(MOUSEBUTTONS_MAX)) - -// ================== -// DIRECT INPUT STUFF -// ================== -BOOL bDX0300; // if true, we created a DirectInput 0x0300 version -static LPDIRECTINPUT lpDI = NULL; -static LPDIRECTINPUTDEVICE lpDIK = NULL; // Keyboard -static LPDIRECTINPUTDEVICE lpDIM = NULL; // mice -static LPDIRECTINPUTDEVICE lpDIJ = NULL; // joystick 1P -static LPDIRECTINPUTEFFECT lpDIE[NumberofForces]; // joystick 1Es -static LPDIRECTINPUTDEVICE2 lpDIJA = NULL; // joystick 1I -static LPDIRECTINPUTDEVICE lpDIJ2 = NULL; // joystick 2P -static LPDIRECTINPUTEFFECT lpDIE2[NumberofForces]; // joystick 1Es -static LPDIRECTINPUTDEVICE2 lpDIJ2A = NULL;// joystick 2I - -// Do not execute cleanup code more than once. See Shutdown_xxx() routines. -UINT8 graphics_started = 0; -UINT8 keyboard_started = 0; -UINT8 sound_started = 0; -static boolean mouse_enabled = false; -static boolean joystick_detected = false; -static boolean joystick2_detected = false; - -static void I_ShutdownKeyboard(void); -static void I_GetKeyboardEvents(void); -static void I_ShutdownJoystick(void); -static void I_ShutdownJoystick2 (void); - -static boolean entering_con_command = false; - -// -// Why would this be system specific?? hmmmm.... -// -// it is for virtual reality system, next incoming feature :) -static ticcmd_t emptycmd; -ticcmd_t *I_BaseTiccmd(void) -{ - return &emptycmd; -} - -static ticcmd_t emptycmd2; -ticcmd_t *I_BaseTiccmd2(void) -{ - return &emptycmd2; -} - -// Allocates the base zone memory, -// this function returns a valid pointer and size, -// else it should interrupt the program immediately. -// -// now checks if mem could be allocated, this is still -// prehistoric... there's a lot to do here: memory locking, detection -// of win95 etc... -// - -BOOL win9x; - -/** \brief WinNT system platform -*/ -static BOOL winnt; - -static void I_DetectWin9x(void) -{ - OSVERSIONINFO osvi; - - osvi.dwOSVersionInfoSize = sizeof (OSVERSIONINFO); - GetVersionEx(&osvi); - - winnt = (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT); - // 95 or 98 what the hell - win9x = true; -} - -// return free and total memory in the system -UINT32 I_GetFreeMem(UINT32* total) -{ - MEMORYSTATUS info; - - info.dwLength = sizeof (MEMORYSTATUS); - GlobalMemoryStatus(&info); - if (total) - *total = (ULONG)info.dwTotalPhys; - return (ULONG)info.dwAvailPhys; -} - -// --------- -// I_Profile -// Two little functions to profile our code using the high resolution timer -// --------- -static LARGE_INTEGER ProfileCount; -void I_BeginProfile(void) -{ - if (!QueryPerformanceCounter(&ProfileCount)) - I_Error("I_BeginProfile failed"); // can't profile without the high res timer -} - -// we're supposed to use this to measure very small amounts of time, -// that's why we return a DWORD and not a 64bit value -DWORD I_EndProfile(void) -{ - LARGE_INTEGER CurrTime; - DWORD ret; - if (!QueryPerformanceCounter (&CurrTime)) - I_Error("I_EndProfile failed"); - if (CurrTime.QuadPart - ProfileCount.QuadPart > (LONGLONG)0xFFFFFFFFUL) - I_Error("I_EndProfile overflow"); - ret = (DWORD)(CurrTime.QuadPart - ProfileCount.QuadPart); - // we can call I_EndProfile() several time, I_BeginProfile() need be called just once - ProfileCount = CurrTime; - - return ret; -} - -// --------- -// I_GetTime -// Use the High Resolution Timer if available, -// else use the multimedia timer which has 1 millisecond precision on Windowz 95, -// but lower precision on Windows NT -// --------- -static long hacktics = 0; // used locally for keyboard repeat keys -static DWORD starttickcount = 0; // hack for win2k time bug - -tic_t I_GetTime(void) -{ - tic_t newtics = 0; - - if (!starttickcount) // high precision timer - { - LARGE_INTEGER currtime; // use only LowPart if high resolution counter is not available - static LARGE_INTEGER basetime = {{0, 0}}; - - // use this if High Resolution timer is found - static LARGE_INTEGER frequency; - - if (!basetime.LowPart) - { - if (!QueryPerformanceFrequency(&frequency)) - frequency.QuadPart = 0; - else - QueryPerformanceCounter(&basetime); - } - - if (frequency.LowPart && QueryPerformanceCounter(&currtime)) - { - newtics = (int)((currtime.QuadPart - basetime.QuadPart) * TICRATE - / frequency.QuadPart); - } - else - { - currtime.LowPart = timeGetTime(); - if (!basetime.LowPart) - basetime.LowPart = currtime.LowPart; - newtics = ((currtime.LowPart - basetime.LowPart)/(1000/TICRATE)); - } - } - else - newtics = (GetTickCount() - starttickcount)/(1000/TICRATE); - - hacktics = newtics; // a local counter for keyboard repeat key - return newtics; -} - - -void I_Sleep(void) -{ - if (cv_sleep.value > 0) - Sleep(cv_sleep.value); -} - - -// should move to i_video -void I_WaitVBL(INT32 count) -{ - count = 0; -} - -// this is probably to activate the 'loading' disc icon -// it should set a flag, that I_FinishUpdate uses to know -// whether it draws a small 'loading' disc icon on the screen or not -// -// also it should explicitly draw the disc because the screen is -// possibly not refreshed while loading -// -void I_BeginRead(void) {} - -// see above, end the 'loading' disc icon, set the flag false -// -void I_EndRead(void) {} - -// =========================================================================================== -// EVENTS -// =========================================================================================== -static inline BOOL I_ReadyConsole(HANDLE ci) -{ - DWORD gotinput; - if (ci == (HANDLE)-1) return FALSE; - if (WaitForSingleObject(ci,0) != WAIT_OBJECT_0) return FALSE; - if (GetFileType(ci) != FILE_TYPE_CHAR) return FALSE; - return (GetNumberOfConsoleInputEvents(ci, &gotinput) && gotinput); -} - -static inline VOID I_GetConsoleEvents(VOID) -{ - event_t ev = {0,0,0,0,0}; - HANDLE ci = GetStdHandle(STD_INPUT_HANDLE); - HANDLE co = GetStdHandle(STD_OUTPUT_HANDLE); - CONSOLE_SCREEN_BUFFER_INFO CSBI; - INPUT_RECORD input; - DWORD t; - - while (I_ReadyConsole(ci) && ReadConsoleInput(ci, &input, 1, &t) && t) - { - memset(&ev,0x00,sizeof (ev)); - switch (input.EventType) - { - case KEY_EVENT: - if (input.Event.KeyEvent.bKeyDown) - { - ev.type = ev_console; - entering_con_command = true; - switch (input.Event.KeyEvent.wVirtualKeyCode) - { - case VK_ESCAPE: - case VK_TAB: - ev.data1 = KEY_NULL; - break; - case VK_SHIFT: - ev.data1 = KEY_SHIFT; - break; - case VK_RETURN: - entering_con_command = false; - // Fall through. - default: - ev.data1 = MapVirtualKey(input.Event.KeyEvent.wVirtualKeyCode,2); // convert in to char - } - if (co != (HANDLE)-1 && GetFileType(co) == FILE_TYPE_CHAR) - { - if (ev.data1 && ev.data1 != KEY_SHIFT) - { -#ifdef _UNICODE - WriteConsole(co, &input.Event.KeyEvent.uChar.UnicodeChar, 1, &t, NULL); -#else - WriteConsole(co, &input.Event.KeyEvent.uChar.AsciiChar, 1, &t, NULL); -#endif - } - if (input.Event.KeyEvent.wVirtualKeyCode == VK_BACK - && GetConsoleScreenBufferInfo(co,&CSBI)) - { - WriteConsoleOutputCharacterA(co, " ",1, CSBI.dwCursorPosition, &t); - } - } - } - else - { - ev.type = ev_keyup; - switch (input.Event.KeyEvent.wVirtualKeyCode) - { - case VK_SHIFT: - ev.data1 = KEY_SHIFT; - break; - default: - break; - } - } - if (ev.data1) D_PostEvent(&ev); - break; - case MOUSE_EVENT: - case WINDOW_BUFFER_SIZE_EVENT: - case MENU_EVENT: - case FOCUS_EVENT: - break; - } - } -} - -// ---------- -// I_GetEvent -// Post new events for all sorts of user-input -// ---------- -void I_GetEvent(void) -{ - I_GetConsoleEvents(); - I_GetKeyboardEvents(); - I_GetMouseEvents(); - I_GetJoystickEvents(); - I_GetJoystick2Events(); -} - -// ---------- -// I_OsPolling -// ---------- -void I_OsPolling(void) -{ - MSG msg; - HANDLE ci = GetStdHandle(STD_INPUT_HANDLE); - - // we need to dispatch messages to the window - // so the window procedure can respond to messages and PostEvent() for keys - // during D_SRB2Main startup. - // this one replaces the main loop of windows since I_OsPolling is called in the main loop - do - { - while (PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE)) - { - if (GetMessage(&msg, NULL, 0, 0)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - else // winspec : this is quit message - I_Quit(); - } - if (!appActive && !netgame && !I_ReadyConsole(ci)) - WaitMessage(); - } while (!appActive && !netgame && !I_ReadyConsole(ci)); - - // this is called by the network synchronization, - // check keys and allow escaping - I_GetEvent(); - - // reset "emulated keys" - gamekeydown[KEY_MOUSEWHEELUP] = 0; - gamekeydown[KEY_MOUSEWHEELDOWN] = 0; -} - -// =========================================================================================== -// TIMER -// =========================================================================================== - -static void I_ShutdownTimer(void) -{ - timeEndPeriod(1); -} - -// -// Installs the timer interrupt handler with timer speed as TICRATE. -// -#define TIMER_ID 1 -#define TIMER_RATE (1000/TICRATE) -void I_StartupTimer(void) -{ - // for win2k time bug - if (M_CheckParm("-gettickcount")) - { - starttickcount = GetTickCount(); - CONS_Printf("Using GetTickCount()\n"); - } - timeBeginPeriod(1); - I_AddExitFunc(I_ShutdownTimer); -} - -// =========================================================================================== -// EXIT CODE, ERROR HANDLING -// =========================================================================================== - -static int errorcount = 0; // phuck recursive errors -static int shutdowning = false; - -// -// Used to trap various signals, to make sure things get shut down cleanly. -// -#ifdef NDEBUG -static void signal_handler(int num) -{ - //static char msg[] = "oh no! back to reality!\r\n"; - const char *sigmsg; - char sigdef[64]; - - D_QuitNetGame(); // Fix server freezes - I_ShutdownSystem(); - - switch (num) - { - case SIGINT: - sigmsg = "interrupt"; - break; - case SIGILL: - sigmsg = "illegal instruction - invalid function image"; - break; - case SIGFPE: - sigmsg = "floating point exception"; - break; - case SIGSEGV: - sigmsg = "segment violation"; - break; - case SIGTERM: - sigmsg = "software termination signal from kill"; - break; - case SIGBREAK: - sigmsg = "Ctrl-Break sequence"; - break; - case SIGABRT: - sigmsg = "abnormal termination triggered by abort call"; - break; - default: - sprintf(sigdef, "signal number %d", num); - sigmsg = sigdef; - } - -#ifdef LOGMESSAGES - if (logstream != INVALID_HANDLE_VALUE) - { - I_OutputMsg("signal_handler() error: %s\r\n", sigmsg); - CloseHandle(logstream); - logstream = INVALID_HANDLE_VALUE; - } -#endif - - MessageBoxA(hWndMain, va("signal_handler(): %s", sigmsg), "SRB2 error", MB_OK|MB_ICONERROR); - - signal(num, SIG_DFL); // default signal action - raise(num); -} -#endif - -// -// put an error message (with format) on stderr -// -void I_OutputMsg(const char *fmt, ...) -{ - HANDLE co = GetStdHandle(STD_OUTPUT_HANDLE); - DWORD bytesWritten; - va_list argptr; - char txt[8192]; - - va_start(argptr,fmt); - vsprintf(txt, fmt, argptr); - va_end(argptr); - - OutputDebugStringA(txt); - if (co != (HANDLE)-1) - { - if (GetFileType(co) == FILE_TYPE_CHAR) - { - static COORD coordNextWrite = {0,0}; - char *oldLines = NULL; - DWORD oldLength = 0; - CONSOLE_SCREEN_BUFFER_INFO csbi; - - // Save the lines that we're going to obliterate. - GetConsoleScreenBufferInfo(co, &csbi); - oldLength = csbi.dwSize.X * (csbi.dwCursorPosition.Y - coordNextWrite.Y) + csbi.dwCursorPosition.X - coordNextWrite.X; - - if(oldLength > 0) - { - char *blank = malloc(oldLength); - oldLines = malloc(oldLength); - if(!oldLines || !blank) return; - - ReadConsoleOutputCharacterA(co, oldLines, oldLength, coordNextWrite, &bytesWritten); - - // Move to where we what to print - which is where we would've been, - // had console input not been in the way, - SetConsoleCursorPosition(co, coordNextWrite); - - // Blank out. - memset(blank, ' ', oldLength); - WriteConsoleA(co, blank, oldLength, &bytesWritten, NULL); - free(blank); - - // And back to where we want to print again. - SetConsoleCursorPosition(co, coordNextWrite); - } - - // Actually write the string now! - WriteConsoleA(co, txt, (DWORD)strlen(txt), &bytesWritten, NULL); - - // Next time, output where we left off. - GetConsoleScreenBufferInfo(co, &csbi); - coordNextWrite = csbi.dwCursorPosition; - - // Restore what was overwritten. - if(oldLines && entering_con_command) - { - WriteConsoleA(co, oldLines, oldLength, &bytesWritten, NULL); - free(oldLines); - } - } - else // Redirected to a file. - WriteFile(co, txt, (DWORD)strlen(txt), &bytesWritten, NULL); - } - -#ifdef LOGMESSAGES - if (logstream != (HANDLE)-1) - WriteFile (logstream, txt, (DWORD)strlen(txt), &bytesWritten, NULL); -#endif -} - -// display error messy after shutdowngfx -// -void I_Error(const char *error, ...) -{ - va_list argptr; - char txt[8192]; - - // added 11-2-98 recursive error detecting - if (shutdowning) - { - errorcount++; - // try to shutdown each subsystem separately - if (errorcount == 5) - I_ShutdownGraphics(); - if (errorcount == 6) - I_ShutdownSystem(); - if (errorcount == 7) - { - M_SaveConfig(NULL); - G_SaveGameData(); - } - if (errorcount > 20) - { - // Don't print garbage - va_start(argptr,error); - vsprintf(txt, error, argptr); - va_end(argptr); - - MessageBoxA(hWndMain, txt, "SRB2 Recursive Error", MB_OK|MB_ICONERROR); - exit(-1); // recursive errors detected - } - } - shutdowning = true; - - // put message to stderr - va_start(argptr, error); - wvsprintfA(txt, error, argptr); - va_end(argptr); - - CONS_Printf("I_Error(): %s\n", txt); - - // uncomment this line to print to stderr as well - //wsprintf(stderr, "I_Error(): %s\n", txt); - - // saving one time is enough! - if (!errorcount) - { - M_SaveConfig(NULL); // save game config, cvars.. - G_SaveGameData(); - } - - // save demo, could be useful for debug - // NOTE: demos are normally not saved here. - if (demorecording) - G_CheckDemoStatus(); - - D_QuitNetGame(); - - // shutdown everything that was started - I_ShutdownSystem(); - -#ifdef LOGMESSAGES - if (logstream != INVALID_HANDLE_VALUE) - { - CloseHandle(logstream); - logstream = INVALID_HANDLE_VALUE; - } -#endif - - MessageBoxA(hWndMain, txt, "SRB2 Error", MB_OK|MB_ICONERROR); - - exit(-1); -} - -static inline VOID ShowEndTxt(HANDLE co) -{ - int i; - UINT16 j, att = 0; - int nlflag = 1; - CONSOLE_SCREEN_BUFFER_INFO backupcon; - COORD resizewin = {80,-1}; - DWORD bytesWritten; - CHAR let = 0; - UINT16 *text; - void *data; - int endoomnum = W_GetNumForName("ENDOOM"); - //HANDLE ci = GetStdHandle(STD_INPUT_HANDLE); - - /* get the lump with the text */ - data = text = W_CacheLumpNum(endoomnum, PU_CACHE); - - backupcon.wAttributes = FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE; // Just in case - GetConsoleScreenBufferInfo(co, &backupcon); //Store old state - resizewin.Y = backupcon.dwSize.Y; - if (backupcon.dwSize.X < resizewin.X) - SetConsoleScreenBufferSize(co, resizewin); - - for (i = 1; i <= 80*25; i++) // print 80x25 text and deal with the attributes too - { - j = (UINT16)(*text >> 8); // attribute first - if (j != att) // attribute changed? - { - att = j; // save current attribute - SetConsoleTextAttribute(co, j); //set fg and bg color for buffer - } - - let = (char)(*text++ & 0xff); // now the text - WriteConsoleA(co, &let, 1, &bytesWritten, NULL); - - if (nlflag && !(i % 80) && backupcon.dwSize.X > resizewin.X) // do we need a nl? - { - att = backupcon.wAttributes; - SetConsoleTextAttribute(co, att); // all attributes off - WriteConsoleA(co, "\n", 1, &bytesWritten, NULL); - } - } - SetConsoleTextAttribute(co, backupcon.wAttributes); // all attributes off - //if (nlflag) - // WriteConsoleA(co, "\n", 1, &bytesWritten, NULL); - - getchar(); //pause! - - Z_Free(data); -} - - -// -// I_Quit: shutdown everything cleanly, in reverse order of Startup. -// -void I_Quit(void) -{ - HANDLE co = GetStdHandle(STD_OUTPUT_HANDLE); - // when recording a demo, should exit using 'q', - // but sometimes we forget and use Alt+F4, so save here too. - if (demorecording) - G_CheckDemoStatus(); - - M_SaveConfig(NULL); // save game config, cvars.. - G_SaveGameData(); - - // maybe it needs that the ticcount continues, - // or something else that will be finished by I_ShutdownSystem(), - // so do it before. - D_QuitNetGame(); - - // shutdown everything that was started - I_ShutdownSystem(); - - if (shutdowning || errorcount) - I_Error("Error detected (%d)", errorcount); - -#ifdef LOGMESSAGES - if (logstream != INVALID_HANDLE_VALUE) - { - I_OutputMsg("I_Quit(): end of logstream.\r\n"); - CloseHandle(logstream); - logstream = INVALID_HANDLE_VALUE; - } -#endif - if (!M_CheckParm("-noendtxt") && W_CheckNumForName("ENDOOM")!=-1 - && co != INVALID_HANDLE_VALUE && GetFileType(co) == FILE_TYPE_CHAR) - { - printf("\r"); - ShowEndTxt(co); - } - fflush(stderr); - exit(0); -} - -// -------------------------------------------------------------------------- -// I_ShowLastError -// Displays a GetLastError() error message in a MessageBox -// -------------------------------------------------------------------------- -void I_GetLastErrorMsgBox(void) -{ - LPSTR lpMsgBuf = NULL; - - FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM, - NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language - lpMsgBuf, 0, NULL); - - // Display the string. - MessageBoxA(NULL, lpMsgBuf, "GetLastError", MB_OK|MB_ICONINFORMATION); - - // put it in console too and log if any - CONS_Printf("Error: %s\n", lpMsgBuf); - - // Free the buffer. - LocalFree(lpMsgBuf); -} - -// =========================================================================================== -// CLEAN STARTUP & SHUTDOWN HANDLING, JUST CLOSE EVERYTHING YOU OPENED. -// =========================================================================================== -// -// -static quitfuncptr quit_funcs[MAX_QUIT_FUNCS] = -{ - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL -}; - -// Adds a function to the list that need to be called by I_SystemShutdown(). -// -void I_AddExitFunc(void (*func)()) -{ - int c; - - for (c = 0; c < MAX_QUIT_FUNCS; c++) - { - if (!quit_funcs[c]) - { - quit_funcs[c] = func; - break; - } - } -} - -// Removes a function from the list that need to be called by I_SystemShutdown(). -// -void I_RemoveExitFunc(void (*func)()) -{ - int c; - - for (c = 0; c < MAX_QUIT_FUNCS; c++) - { - if (quit_funcs[c] == func) - { - while (c < MAX_QUIT_FUNCS - 1) - { - quit_funcs[c] = quit_funcs[c+1]; - c++; - } - quit_funcs[MAX_QUIT_FUNCS-1] = NULL; - break; - } - } -} - -// =========================================================================================== -// DIRECT INPUT HELPER CODE -// =========================================================================================== - -// Create a DirectInputDevice interface, -// create a DirectInputDevice2 interface if possible -static void CreateDevice2(LPDIRECTINPUT di, REFGUID pguid, LPDIRECTINPUTDEVICE* lpDEV, - LPDIRECTINPUTDEVICE2* lpDEV2) -{ - HRESULT hr, hr2; - LPDIRECTINPUTDEVICE lpdid1; - LPDIRECTINPUTDEVICE2 lpdid2 = NULL; - - hr = IDirectInput_CreateDevice(di, pguid, &lpdid1, NULL); - - if (SUCCEEDED(hr)) - { - // get Device2 but only if we are not in DirectInput version 3 - if (!bDX0300 && lpDEV2) - { - LPDIRECTINPUTDEVICE2 *rp = &lpdid2; - LPVOID *tp = (LPVOID *)rp; - hr2 = IDirectInputDevice_QueryInterface(lpdid1, &IID_IDirectInputDevice2, tp); - if (FAILED(hr2)) - { - CONS_Printf("\2Could not create IDirectInput device 2"); - lpdid2 = NULL; - } - } - } - else - I_Error("Could not create IDirectInput device"); - - *lpDEV = lpdid1; - if (lpDEV2) // only if we requested it - *lpDEV2 = lpdid2; -} - -// =========================================================================================== -// DIRECT INPUT MOUSE -// =========================================================================================== - -#define DI_MOUSE_BUFFERSIZE 16 // number of data elements in mouse buffer - -// -// Initialise the mouse. -// -static void I_ShutdownMouse(void); - -void I_StartupMouse(void) -{ - // this gets called when cv_usemouse is initted - // for the win32 version, we want to startup the mouse later -} - -static HANDLE mouse2filehandle = INVALID_HANDLE_VALUE; - -static void I_ShutdownMouse2(void) -{ - if (mouse2filehandle != INVALID_HANDLE_VALUE) - { - event_t event; - int i; - - SetCommMask(mouse2filehandle, 0); - - EscapeCommFunction(mouse2filehandle, CLRDTR); - EscapeCommFunction(mouse2filehandle, CLRRTS); - - PurgeComm(mouse2filehandle, PURGE_TXABORT|PURGE_RXABORT|PURGE_TXCLEAR|PURGE_RXCLEAR); - - CloseHandle(mouse2filehandle); - - // emulate the up of all mouse buttons - for (i = 0; i < MOUSEBUTTONS; i++) - { - event.type = ev_keyup; - event.data1 = KEY_2MOUSE1 + i; - D_PostEvent(&event); - } - - mouse2filehandle = INVALID_HANDLE_VALUE; - } -} - -#define MOUSECOMBUFFERSIZE 256 -static int handlermouse2x, handlermouse2y, handlermouse2buttons; - -static void I_PoolMouse2(void) -{ - UINT8 buffer[MOUSECOMBUFFERSIZE]; - COMSTAT ComStat; - DWORD dwErrorFlags, dwLength; - char dx, dy; - - static int bytenum; - static UINT8 combytes[4]; - DWORD i; - - ClearCommError(mouse2filehandle, &dwErrorFlags, &ComStat); - dwLength = min(MOUSECOMBUFFERSIZE, ComStat.cbInQue); - - if (dwLength > 0) - { - if (!ReadFile(mouse2filehandle, buffer, dwLength, &dwLength, NULL)) - { - CONS_Printf("\2Read Error on secondary mouse port\n"); - return; - } - - // parse the mouse packets - for (i = 0; i < dwLength; i++) - { - if ((buffer[i] & 64) == 64) - bytenum = 0; - - if (bytenum < 4) - combytes[bytenum] = buffer[i]; - bytenum++; - - if (bytenum == 1) - { - handlermouse2buttons &= ~3; - handlermouse2buttons |= ((combytes[0] & (32+16)) >>4); - } - else if (bytenum == 3) - { - dx = (char)((combytes[0] & 3) << 6); - dy = (char)((combytes[0] & 12) << 4); - dx = (char)(dx + combytes[1]); - dy = (char)(dy + combytes[2]); - handlermouse2x += dx; - handlermouse2y += dy; - } - else if (bytenum == 4) // fourth byte (logitech mouses) - { - if (buffer[i] & 32) - handlermouse2buttons |= 4; - else - handlermouse2buttons &= ~4; - } - } - } -} - -// secondary mouse doesn't use DirectX, therefore forget all about grabbing, acquire, etc. -void I_StartupMouse2(void) -{ - DCB dcb; - - if (mouse2filehandle != INVALID_HANDLE_VALUE) - I_ShutdownMouse2(); - - if (!cv_usemouse2.value) - return; - - if (mouse2filehandle != INVALID_HANDLE_VALUE) - { - // COM file handle - mouse2filehandle = CreateFileA(cv_mouse2port.string, GENERIC_READ|GENERIC_WRITE, - 0, // exclusive access - NULL, // no security attrs - OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - if (mouse2filehandle == INVALID_HANDLE_VALUE) - { - int e = GetLastError(); - if (e == 5) - CONS_Printf("\2Can't open %s: Access denied\n" - "The port is probably already used by another device (mouse, modem,...)\n", - cv_mouse2port.string); - else - CONS_Printf("\2Can't open %s: error %d\n", cv_mouse2port.string, e); - return; - } - } - - // buffers - SetupComm(mouse2filehandle, MOUSECOMBUFFERSIZE, MOUSECOMBUFFERSIZE); - - // purge buffers - PurgeComm(mouse2filehandle, PURGE_TXABORT|PURGE_RXABORT|PURGE_TXCLEAR|PURGE_RXCLEAR); - - // setup port to 1200 7N1 - dcb.DCBlength = sizeof (DCB); - - GetCommState(mouse2filehandle, &dcb); - - dcb.BaudRate = CBR_1200; - dcb.ByteSize = 7; - dcb.Parity = NOPARITY; - dcb.StopBits = ONESTOPBIT; - - dcb.fDtrControl = DTR_CONTROL_ENABLE; - dcb.fRtsControl = RTS_CONTROL_ENABLE; - - dcb.fBinary = dcb.fParity = TRUE; - - SetCommState(mouse2filehandle, &dcb); - - I_AddExitFunc(I_ShutdownMouse2); -} - -#define MAX_MOUSE_BTNS 5 -static int center_x, center_y; -static int old_mparms[3], new_mparms[3] = {0, 0, 1}; -static boolean restore_mouse = FALSE; -static int old_mouse_state = 0; -unsigned int MSHWheelMessage = 0; - -static void I_DoStartupSysMouse(void) -{ - boolean valid; - RECT w_rect; - - valid = SystemParametersInfo(SPI_GETMOUSE, 0, old_mparms, 0); - if (valid) - { - new_mparms[2] = old_mparms[2]; - restore_mouse = SystemParametersInfo(SPI_SETMOUSE, 0, new_mparms, 0); - } - - if (bAppFullScreen) - { - w_rect.top = 0; - w_rect.left = 0; - } - else - { - w_rect.top = windowPosY; - w_rect.left = windowPosX; - } - - w_rect.bottom = w_rect.top + VIDHEIGHT; - w_rect.right = w_rect.left + VIDWIDTH; - center_x = w_rect.left + (VIDWIDTH >> 1); - center_y = w_rect.top + (VIDHEIGHT >> 1); - SetCursor(NULL); - SetCursorPos(center_x, center_y); - SetCapture(hWndMain); - ClipCursor(&w_rect); -} - -static void I_ShutdownSysMouse(void) -{ - if (restore_mouse) - SystemParametersInfo(SPI_SETMOUSE, 0, old_mparms, 0); - ClipCursor(NULL); - ReleaseCapture(); -} - -void I_RestartSysMouse(void) -{ - if (nodinput) - { - I_ShutdownSysMouse(); - I_DoStartupSysMouse(); - } -} - -void I_GetSysMouseEvents(int mouse_state) -{ - int i; - event_t event; - int xmickeys = 0, ymickeys = 0; - POINT c_pos; - - for (i = 0; i < MAX_MOUSE_BTNS; i++) - { - // check if button pressed - if ((mouse_state & (1 << i)) && !(old_mouse_state & (1 << i))) - { - event.type = ev_keydown; - event.data1 = KEY_MOUSE1 + i; - D_PostEvent(&event); - } - // check if button released - if (!(mouse_state & (1 << i)) && (old_mouse_state & (1 << i))) - { - event.type = ev_keyup; - event.data1 = KEY_MOUSE1 + i; - D_PostEvent(&event); - } - } - old_mouse_state = mouse_state; - - // proceed mouse movements - GetCursorPos(&c_pos); - xmickeys = c_pos.x - center_x; - ymickeys = c_pos.y - center_y; - - if (xmickeys || ymickeys) - { - event.type = ev_mouse; - event.data1 = 0; - event.data2 = xmickeys; - event.data3 = -ymickeys; - D_PostEvent(&event); - SetCursorPos(center_x, center_y); - } -} - -// This is called just before entering the main game loop, -// when we are going fullscreen and the loading screen has finished. -void I_DoStartupMouse(void) -{ - DIPROPDWORD dip; - - // mouse detection may be skipped by setting usemouse false - if (!cv_usemouse.value || M_CheckParm("-nomouse")) - { - mouse_enabled = false; - return; - } - - if (nodinput) - { - CONS_Printf("\tMouse will not use DirectInput.\n"); - // System mouse input will be initiated by VID_SetMode - I_AddExitFunc(I_ShutdownMouse); - - MSHWheelMessage = RegisterWindowMessage(MSH_MOUSEWHEEL); - } - else if (!lpDIM) // acquire the mouse only once - { - CreateDevice2(lpDI, &GUID_SysMouse, &lpDIM, NULL); - - if (lpDIM) - { - if (FAILED(IDirectInputDevice_SetDataFormat(lpDIM, &c_dfDIMouse))) - I_Error("Couldn't set mouse data format"); - - // create buffer for buffered data - dip.diph.dwSize = sizeof (dip); - dip.diph.dwHeaderSize = sizeof (dip.diph); - dip.diph.dwObj = 0; - dip.diph.dwHow = DIPH_DEVICE; - dip.dwData = DI_MOUSE_BUFFERSIZE; - if (FAILED(IDirectInputDevice_SetProperty(lpDIM, DIPROP_BUFFERSIZE, &dip.diph))) - I_Error("Couldn't set mouse buffer size"); - - if (FAILED(IDirectInputDevice_SetCooperativeLevel(lpDIM, hWndMain, - DISCL_EXCLUSIVE|DISCL_FOREGROUND))) - { - I_Error("Couldn't set mouse coop level"); - } - I_AddExitFunc(I_ShutdownMouse); - } - else - I_Error("Couldn't create mouse input"); - } - - // if re-enabled while running, just set mouse_enabled true again, - // do not acquire the mouse more than once - mouse_enabled = true; -} - -// -// Shutdown Mouse DirectInput device -// -static void I_ShutdownMouse(void) -{ - int i; - event_t event; - - CONS_Printf("I_ShutdownMouse()\n"); - - if (lpDIM) - { - IDirectInputDevice_Unacquire(lpDIM); - IDirectInputDevice_Release(lpDIM); - lpDIM = NULL; - } - - // emulate the up of all mouse buttons - for (i = 0; i < MOUSEBUTTONS; i++) - { - event.type = ev_keyup; - event.data1 = KEY_MOUSE1 + i; - D_PostEvent(&event); - } - if (nodinput) - I_ShutdownSysMouse(); - - mouse_enabled = false; -} - -// -// Get buffered data from the mouse -// -void I_GetMouseEvents(void) -{ - DIDEVICEOBJECTDATA rgdod[DI_MOUSE_BUFFERSIZE]; - DWORD dwItems, d; - HRESULT hr; - - event_t event; - int xmickeys, ymickeys; - - if (mouse2filehandle != INVALID_HANDLE_VALUE) - { - //mouse movement - static UINT8 lastbuttons2 = 0; - - I_PoolMouse2(); - // post key event for buttons - if (handlermouse2buttons != lastbuttons2) - { - int i, j = 1, k; - k = handlermouse2buttons ^ lastbuttons2; // only changed bit to 1 - lastbuttons2 = (UINT8)handlermouse2buttons; - - for (i = 0; i < MOUSEBUTTONS; i++, j <<= 1) - if (k & j) - { - if (handlermouse2buttons & j) - event.type = ev_keydown; - else - event.type = ev_keyup; - event.data1 = KEY_2MOUSE1 + i; - D_PostEvent(&event); - } - } - - if (handlermouse2x || handlermouse2y) - { - event.type = ev_mouse2; - event.data1 = 0; - event.data2 = handlermouse2x<<1; - event.data3 = -handlermouse2y<<1; - handlermouse2x = 0; - handlermouse2y = 0; - - D_PostEvent(&event); - } - } - - if (!mouse_enabled || nodinput) - return; - -getBufferedData: - dwItems = DI_MOUSE_BUFFERSIZE; - hr = IDirectInputDevice_GetDeviceData(lpDIM, sizeof (DIDEVICEOBJECTDATA), rgdod, &dwItems, 0); - - // If data stream was interrupted, reacquire the device and try again. - if (hr == DIERR_INPUTLOST || hr == DIERR_NOTACQUIRED) - { - hr = IDirectInputDevice_Acquire(lpDIM); - if (SUCCEEDED(hr)) - goto getBufferedData; - } - - // We got buffered input, act on it - if (SUCCEEDED(hr)) - { - xmickeys = ymickeys = 0; - - // dwItems contains number of elements read (could be 0) - for (d = 0; d < dwItems; d++) - { - if (rgdod[d].dwOfs >= DIMOFS_BUTTON0 && - rgdod[d].dwOfs < DIMOFS_BUTTON0 + MOUSEBUTTONS) - { - if (rgdod[d].dwData & 0x80) // Button down - event.type = ev_keydown; - else - event.type = ev_keyup; // Button up - - event.data1 = rgdod[d].dwOfs - DIMOFS_BUTTON0 + KEY_MOUSE1; - D_PostEvent(&event); - } - else if (rgdod[d].dwOfs == DIMOFS_X) - xmickeys += rgdod[d].dwData; - else if (rgdod[d].dwOfs == DIMOFS_Y) - ymickeys += rgdod[d].dwData; - - else if (rgdod[d].dwOfs == DIMOFS_Z) - { - // z-axes the wheel - if ((int)rgdod[d].dwData > 0) - event.data1 = KEY_MOUSEWHEELUP; - else - event.data1 = KEY_MOUSEWHEELDOWN; - event.type = ev_keydown; - D_PostEvent(&event); - } - - } - - if (xmickeys || ymickeys) - { - event.type = ev_mouse; - event.data1 = 0; - event.data2 = xmickeys; - event.data3 = -ymickeys; - D_PostEvent(&event); - } - } -} - -// =========================================================================================== -// DIRECT INPUT JOYSTICK -// =========================================================================================== - -struct DIJoyInfo_s -{ - BYTE X,Y,Z,Rx,Ry,Rz,U,V; - LONG ForceAxises; -}; -typedef struct DIJoyInfo_s DIJoyInfo_t; - -// private info - static BYTE iJoyNum; // used by enumeration - static DIJoyInfo_t JoyInfo; - static BYTE iJoy2Num; - static DIJoyInfo_t JoyInfo2; - -//----------------------------------------------------------------------------- -// Name: EnumAxesCallback() -// Desc: Callback function for enumerating the axes on a joystick and counting -// each force feedback enabled axis -//----------------------------------------------------------------------------- -static BOOL CALLBACK EnumAxesCallback(const DIDEVICEOBJECTINSTANCE* pdidoi, - VOID* pContext) -{ - DWORD* pdwNumForceFeedbackAxis = (DWORD*) pContext; - - if ((pdidoi->dwFlags & DIDOI_FFACTUATOR) != 0) - (*pdwNumForceFeedbackAxis)++; - - return DIENUM_CONTINUE; -} - - -static HRESULT SetupForceTacile(LPDIRECTINPUTDEVICE2 DJI, LPDIRECTINPUTEFFECT *DJE, DWORD FFAXIS, FFType EffectType,REFGUID EffectGUID) -{ - HRESULT hr; - DIEFFECT eff; - DWORD rgdwAxes[2] = { DIJOFS_X, DIJOFS_Y }; - LONG rglDirection[2] = { 0, 0 }; - DICONSTANTFORCE cf = { 0 }; // LONG lMagnitude - DIRAMPFORCE rf = {0,0}; // LONG lStart, lEnd; - DIPERIODIC pf = {0,0,0,0}; - ZeroMemory(&eff, sizeof (eff)); - if (FFAXIS > 2) - FFAXIS = 2; //up to 2 FFAXIS - eff.dwSize = sizeof (DIEFFECT); - eff.dwFlags = DIEFF_CARTESIAN | DIEFF_OBJECTOFFSETS; // Cartesian and data format offsets - eff.dwDuration = INFINITE; - eff.dwSamplePeriod = 0; - eff.dwGain = DI_FFNOMINALMAX; - eff.dwTriggerButton = DIEB_NOTRIGGER; - eff.dwTriggerRepeatInterval = 0; - eff.cAxes = FFAXIS; - eff.rgdwAxes = rgdwAxes; - eff.rglDirection = rglDirection; - eff.lpEnvelope = NULL; - eff.lpvTypeSpecificParams = NULL; - if (EffectType == ConstantForce) - { - eff.cbTypeSpecificParams = sizeof (cf); - eff.lpvTypeSpecificParams = &cf; - } - else if (EffectType == RampForce) - { - eff.cbTypeSpecificParams = sizeof (rf); - eff.lpvTypeSpecificParams = &rf; - } - else if (EffectType >= SquareForce && SawtoothDownForce >= EffectType) - { - eff.cbTypeSpecificParams = sizeof (pf); - eff.lpvTypeSpecificParams = &pf; - } -#if (DIRECTINPUT_VERSION >= 0x0600) - //eff.dwStartDelay = 0; -#endif - - // Create the prepared effect - if (FAILED(hr = IDirectInputDevice2_CreateEffect(DJI, EffectGUID, - &eff, DJE, NULL))) - { - return hr; - } - - if (NULL == *DJE) - return E_FAIL; - - return hr; -} - -static BOOL CALLBACK DIEnumEffectsCallback1(LPCDIEFFECTINFO pdei, LPVOID pvRef) -{ - LPDIRECTINPUTEFFECT *DJE = pvRef; - if (DIEFT_GETTYPE(pdei->dwEffType) == DIEFT_CONSTANTFORCE) - { - if (SUCCEEDED(SetupForceTacile(lpDIJA,DJE, JoyInfo.ForceAxises, ConstantForce, &pdei->guid))) - return DIENUM_STOP; - } - if (DIEFT_GETTYPE(pdei->dwEffType) == DIEFT_RAMPFORCE) - { - if (SUCCEEDED(SetupForceTacile(lpDIJA,DJE, JoyInfo.ForceAxises, RampForce, &pdei->guid))) - return DIENUM_STOP; - } - return DIENUM_CONTINUE; -} - -static BOOL CALLBACK DIEnumEffectsCallback2(LPCDIEFFECTINFO pdei, LPVOID pvRef) -{ - LPDIRECTINPUTEFFECT *DJE = pvRef; - if (DIEFT_GETTYPE(pdei->dwEffType) == DIEFT_CONSTANTFORCE) - { - if (SUCCEEDED(SetupForceTacile(lpDIJ2A,DJE, JoyInfo2.ForceAxises, ConstantForce, &pdei->guid))) - return DIENUM_STOP; - } - if (DIEFT_GETTYPE(pdei->dwEffType) == DIEFT_RAMPFORCE) - { - if (SUCCEEDED(SetupForceTacile(lpDIJ2A,DJE, JoyInfo2.ForceAxises, RampForce, &pdei->guid))) - return DIENUM_STOP; - } - return DIENUM_CONTINUE; -} - -static REFGUID DIETable[] = -{ - &GUID_ConstantForce, //ConstantForce - &GUID_RampForce, //RampForce - &GUID_Square, //SquareForce - &GUID_Sine, //SineForce - &GUID_Triangle, //TriangleForce - &GUID_SawtoothUp, //SawtoothUpForce - &GUID_SawtoothDown, //SawtoothDownForce - (REFGUID)-1, //NumberofForces -}; - -static HRESULT SetupAllForces(LPDIRECTINPUTDEVICE2 DJI, LPDIRECTINPUTEFFECT DJE[], DWORD FFAXIS) -{ - FFType ForceType = EvilForce; - if (DJI == lpDIJA) - { - IDirectInputDevice2_EnumEffects(DJI,DIEnumEffectsCallback1,&DJE[ConstantForce],DIEFT_CONSTANTFORCE); - IDirectInputDevice2_EnumEffects(DJI,DIEnumEffectsCallback1,&DJE[RampForce],DIEFT_RAMPFORCE); - } - else if (DJI == lpDIJA) - { - IDirectInputDevice2_EnumEffects(DJI,DIEnumEffectsCallback2,&DJE[ConstantForce],DIEFT_CONSTANTFORCE); - IDirectInputDevice2_EnumEffects(DJI,DIEnumEffectsCallback2,&DJE[RampForce],DIEFT_RAMPFORCE); - } - for (ForceType = SquareForce; ForceType > NumberofForces && DIETable[ForceType] != (REFGUID)-1; ForceType++) - if (DIETable[ForceType]) - SetupForceTacile(DJI,&DJE[ForceType], FFAXIS, ForceType, DIETable[ForceType]); - return S_OK; -} - -static void LimitEffect(LPDIEFFECT eff, FFType EffectType) -{ - LPDICONSTANTFORCE pCF = eff->lpvTypeSpecificParams; - LPDIPERIODIC pDP= eff->lpvTypeSpecificParams; - if (eff->rglDirection) - { - } -/* if (eff->dwDuration != INFINITE && eff->dwDuration < 0) - { - eff->dwDuration = 0; - }*/ - if (eff->dwGain != 0) - { - if (eff->dwGain > DI_FFNOMINALMAX) - eff->dwGain = DI_FFNOMINALMAX; - //else if (eff->dwGain < -DI_FFNOMINALMAX) - // eff->dwGain = DI_FFNOMINALMAX; - } - if (EffectType == ConstantForce && pCF->lMagnitude) - { - } - else if (EffectType >= SquareForce && SawtoothDownForce >= EffectType && pDP) - { - } - -} - -static HRESULT SetForceTacile(LPDIRECTINPUTEFFECT SDIE, const JoyFF_t *FF,DWORD FFAXIS, FFType EffectType) -{ - DIEFFECT eff; - HRESULT hr; - LONG Magnitude; - LONG rglDirection[2] = { 0, 0 }; - DICONSTANTFORCE cf = { 0 }; // LONG lMagnitude - DIRAMPFORCE rf = {0,0}; // LONG lStart, lEnd; - DIPERIODIC pf = {0,0,0,0}; - if (!FF) - IDirectInputEffect_Stop(SDIE); - Magnitude = FF->Magnitude; - ZeroMemory(&eff, sizeof (eff)); - eff.dwSize = sizeof (eff); - //DIEP_START - eff.dwFlags = DIEFF_CARTESIAN | DIEFF_OBJECTOFFSETS; // Cartesian and data format offsets - //DIEP_DURATION - eff.dwDuration = FF->Duration; - //DIEP_GAIN - eff.dwGain = FF->Gain; - //DIEP_DIRECTION - eff.rglDirection = rglDirection; - //DIEP_TYPESPECIFICPARAMS - if (FFAXIS > 1) - { - double dMagnitude; - dMagnitude = (double)Magnitude; - dMagnitude = hypot(dMagnitude, dMagnitude); - Magnitude = (DWORD)dMagnitude; - rglDirection[0] = FF->ForceX; - rglDirection[1] = FF->ForceY; - } - if (EffectType == ConstantForce) - { - cf.lMagnitude = Magnitude; - eff.cbTypeSpecificParams = sizeof (cf); - eff.lpvTypeSpecificParams = &cf; - } - else if (EffectType == RampForce) - { - rf.lStart = FF->Start; - rf.lEnd = FF->End; - eff.cbTypeSpecificParams = sizeof (rf); - eff.lpvTypeSpecificParams = &rf; - } - else if (EffectType >= SquareForce && SawtoothDownForce >= EffectType) - { - pf.dwMagnitude = Magnitude; - pf.lOffset = FF->Offset; - pf.dwPhase = FF->Phase; - pf.dwPeriod = FF->Period; - eff.cbTypeSpecificParams = sizeof (pf); - eff.lpvTypeSpecificParams = &pf; - } - - LimitEffect(&eff, EffectType); - - hr = IDirectInputEffect_SetParameters(SDIE, &eff, - DIEP_START|DIEP_DURATION|DIEP_GAIN|DIEP_DIRECTION|DIEP_TYPESPECIFICPARAMS); - return hr; -} - -void I_Tactile(FFType Type, const JoyFF_t *Effect) -{ - if (!lpDIJA) return; - if (FAILED(IDirectInputDevice2_Acquire(lpDIJA))) - return; - if (Type == EvilForce) - IDirectInputDevice2_SendForceFeedbackCommand(lpDIJA,DISFFC_STOPALL); - if (Type <= EvilForce || Type > NumberofForces || !lpDIE[Type]) - return; - SetForceTacile(lpDIE[Type], Effect, JoyInfo.ForceAxises, Type); -} - -void I_Tactile2(FFType Type, const JoyFF_t *Effect) -{ - if (!lpDIJ2A) return; - if (FAILED(IDirectInputDevice2_Acquire(lpDIJ2A))) - return; - if (Type == EvilForce) - IDirectInputDevice2_SendForceFeedbackCommand(lpDIJ2A,DISFFC_STOPALL); - if (Type <= EvilForce || Type > NumberofForces || !lpDIE2[Type]) - return; - SetForceTacile(lpDIE2[Type],Effect, JoyInfo2.ForceAxises, Type); -} - -// ------------------ -// SetDIDwordProperty (HELPER) -// Set a DWORD property on a DirectInputDevice. -// ------------------ -static HRESULT SetDIDwordProperty(LPDIRECTINPUTDEVICE pdev, - REFGUID guidProperty, - DWORD dwObject, - DWORD dwHow, - DWORD dwValue) -{ - DIPROPDWORD dipdw; - - dipdw.diph.dwSize = sizeof (dipdw); - dipdw.diph.dwHeaderSize = sizeof (dipdw.diph); - dipdw.diph.dwObj = dwObject; - dipdw.diph.dwHow = dwHow; - dipdw.dwData = dwValue; - - return IDirectInputDevice_SetProperty(pdev, guidProperty, &dipdw.diph); -} - - -// --------------- -// DIEnumJoysticks -// There is no such thing as a 'system' joystick, contrary to mouse, -// we must enumerate and choose one joystick device to use -// --------------- -static BOOL CALLBACK DIEnumJoysticks (LPCDIDEVICEINSTANCE lpddi, - LPVOID pvRef) //cv_usejoystick -{ - LPDIRECTINPUTDEVICE pdev; - DIPROPRANGE diprg; - DIDEVCAPS caps; - BOOL bUseThisOne = FALSE; - - iJoyNum++; - - //faB: if cv holds a string description of joystick, the value from atoi() is 0 - // else, the value was probably set by user at console to one of the previously - // enumerated joysticks - if (((consvar_t *)pvRef)->value == iJoyNum -#ifndef _UNICODE - || !lstrcmpA(((consvar_t *)pvRef)->string, lpddi->tszProductName) -#endif - ) - bUseThisOne = TRUE; - - //CONS_Printf(" cv joy is %s\n", ((consvar_t *)pvRef)->string); - - // print out device name - CONS_Printf("%c%d: %s\n", - (bUseThisOne) ? '\2' : ' ', // show name in white if this is the one we will use - iJoyNum, - //(GET_DIDEVICE_SUBTYPE(lpddi->dwDevType) == DIDEVTYPEJOYSTICK_GAMEPAD) ? "Gamepad " : "Joystick", - lpddi->tszProductName); //, lpddi->tszInstanceName); - - // use specified joystick (cv_usejoystick.value in pvRef) - if (!bUseThisOne) - return DIENUM_CONTINUE; - - ((consvar_t *)pvRef)->value = iJoyNum; - if (IDirectInput_CreateDevice (lpDI, &lpddi->guidInstance, - &pdev, NULL) != DI_OK) - { - // if it failed, then we can't use this joystick for some - // bizarre reason. (Maybe the user unplugged it while we - // were in the middle of enumerating it.) So continue enumerating - CONS_Printf("DIEnumJoysticks(): CreateDevice FAILED\n"); - return DIENUM_CONTINUE; - } - - // get the Device capabilities - // - caps.dwSize = sizeof (DIDEVCAPS_DX3); - if (FAILED(IDirectInputDevice_GetCapabilities (pdev, &caps))) - { - CONS_Printf("DIEnumJoysticks(): GetCapabilities FAILED\n"); - IDirectInputDevice_Release (pdev); - return DIENUM_CONTINUE; - } - if (!(caps.dwFlags & DIDC_ATTACHED)) // should be, since we enumerate only attached devices - return DIENUM_CONTINUE; - - Joystick.bJoyNeedPoll = ((caps.dwFlags & DIDC_POLLEDDATAFORMAT) != 0); - - if (caps.dwFlags & DIDC_FORCEFEEDBACK) - JoyInfo.ForceAxises = 0; - else - JoyInfo.ForceAxises = -1; - - Joystick.bGamepadStyle = (GET_DIDEVICE_SUBTYPE(caps.dwDevType) == DIDEVTYPEJOYSTICK_GAMEPAD); - //DEBUG CONS_Printf("Gamepad: %d\n", Joystick.bGamepadStyle); - - - CONS_Printf("Capabilities: %d axes, %d buttons, %d POVs, poll %d, Gamepad %d\n", - caps.dwAxes, caps.dwButtons, caps.dwPOVs, Joystick.bJoyNeedPoll, Joystick.bGamepadStyle); - - // Set the data format to "simple joystick" - a predefined data format - // - // A data format specifies which controls on a device we - // are interested in, and how they should be reported. - // - // This tells DirectInput that we will be passing a - // DIJOYSTATE structure to IDirectInputDevice::GetDeviceState. - if (IDirectInputDevice_SetDataFormat (pdev, &c_dfDIJoystick) != DI_OK) - { - CONS_Printf("DIEnumJoysticks(): SetDataFormat FAILED\n"); - IDirectInputDevice_Release (pdev); - return DIENUM_CONTINUE; - } - - // Set the cooperativity level to let DirectInput know how - // this device should interact with the system and with other - // DirectInput applications. - if (IDirectInputDevice_SetCooperativeLevel (pdev, hWndMain, - DISCL_EXCLUSIVE | DISCL_FOREGROUND) != DI_OK) - { - CONS_Printf("DIEnumJoysticks(): SetCooperativeLevel FAILED\n"); - IDirectInputDevice_Release (pdev); - return DIENUM_CONTINUE; - } - - // set the range of the joystick axis - diprg.diph.dwSize = sizeof (DIPROPRANGE); - diprg.diph.dwHeaderSize = sizeof (DIPROPHEADER); - diprg.diph.dwHow = DIPH_BYOFFSET; - diprg.lMin = -JOYAXISRANGE; // value for extreme left - diprg.lMax = +JOYAXISRANGE; // value for extreme right - - diprg.diph.dwObj = DIJOFS_X; // set the x-axis range - if (FAILED(IDirectInputDevice_SetProperty(pdev, DIPROP_RANGE, &diprg.diph))) - { - //goto SetPropFail; - JoyInfo.X = FALSE; - } - else JoyInfo.X = TRUE; - - diprg.diph.dwObj = DIJOFS_Y; // set the y-axis range - if (FAILED(IDirectInputDevice_SetProperty(pdev, DIPROP_RANGE, &diprg.diph))) - { -//SetPropFail: -// CONS_Printf("DIEnumJoysticks(): SetProperty FAILED\n"); -// IDirectInputDevice_Release (pdev); -// return DIENUM_CONTINUE; - JoyInfo.Y = FALSE; - } - else JoyInfo.Y = TRUE; - - diprg.diph.dwObj = DIJOFS_Z; // set the z-axis range - if (FAILED(IDirectInputDevice_SetProperty(pdev, DIPROP_RANGE, &diprg.diph))) - { - //CONS_Printf("DIJOFS_Z not found\n"); - JoyInfo.Z = FALSE; - } - else JoyInfo.Z = TRUE; - - diprg.diph.dwObj = DIJOFS_RX; // set the x-rudder range - if (FAILED(IDirectInputDevice_SetProperty(pdev, DIPROP_RANGE, &diprg.diph))) - { - //CONS_Printf("DIJOFS_RX (x-rudder) not found\n"); - JoyInfo.Rx = FALSE; - } - else JoyInfo.Rx = TRUE; - - diprg.diph.dwObj = DIJOFS_RY; // set the y-rudder range - if (FAILED(IDirectInputDevice_SetProperty(pdev, DIPROP_RANGE, &diprg.diph))) - { - //CONS_Printf("DIJOFS_RY (y-rudder) not found\n"); - JoyInfo.Ry = FALSE; - } - else JoyInfo.Ry = TRUE; - - diprg.diph.dwObj = DIJOFS_RZ; // set the z-rudder range - if (FAILED(IDirectInputDevice_SetProperty(pdev, DIPROP_RANGE, &diprg.diph))) - { - //CONS_Printf("DIJOFS_RZ (z-rudder) not found\n"); - JoyInfo.Rz = FALSE; - } - else JoyInfo.Rz = TRUE; - diprg.diph.dwObj = DIJOFS_SLIDER(0); // set the x-misc range - if (FAILED(IDirectInputDevice_SetProperty(pdev, DIPROP_RANGE, &diprg.diph))) - { - //CONS_Printf("DIJOFS_RZ (x-misc) not found\n"); - JoyInfo.U = FALSE; - } - else JoyInfo.U = TRUE; - - diprg.diph.dwObj = DIJOFS_SLIDER(1); // set the y-misc range - if (FAILED(IDirectInputDevice_SetProperty(pdev, DIPROP_RANGE, &diprg.diph))) - { - //CONS_Printf("DIJOFS_RZ (y-misc) not found\n"); - JoyInfo.V = FALSE; - } - else JoyInfo.V = TRUE; - - // set X axis dead zone to 25% (to avoid accidental turning) - if (!Joystick.bGamepadStyle) - { - if (JoyInfo.X) - if (FAILED(SetDIDwordProperty (pdev, DIPROP_DEADZONE, DIJOFS_X, - DIPH_BYOFFSET, 2500))) - { - CONS_Printf("DIEnumJoysticks(): couldn't SetProperty for X DEAD ZONE"); - //IDirectInputDevice_Release (pdev); - //return DIENUM_CONTINUE; - } - if (JoyInfo.Y) - if (FAILED(SetDIDwordProperty (pdev, DIPROP_DEADZONE, DIJOFS_Y, - DIPH_BYOFFSET, 2500))) - { - CONS_Printf("DIEnumJoysticks(): couldn't SetProperty for Y DEAD ZONE\n"); - //IDirectInputDevice_Release (pdev); - //return DIENUM_CONTINUE; - } - if (JoyInfo.Z) - if (FAILED(SetDIDwordProperty (pdev, DIPROP_DEADZONE, DIJOFS_Z, - DIPH_BYOFFSET, 2500))) - { - CONS_Printf("DIEnumJoysticks(): couldn't SetProperty for Z DEAD ZONE\n"); - //IDirectInputDevice_Release (pdev); - //return DIENUM_CONTINUE; - } - if (JoyInfo.Rx) - if (FAILED(SetDIDwordProperty (pdev, DIPROP_DEADZONE, DIJOFS_RX, - DIPH_BYOFFSET, 2500))) - { - CONS_Printf("DIEnumJoysticks(): couldn't SetProperty for RX DEAD ZONE\n"); - //IDirectInputDevice_Release (pdev); - //return DIENUM_CONTINUE; - } - if (JoyInfo.Ry) - if (FAILED(SetDIDwordProperty (pdev, DIPROP_DEADZONE, DIJOFS_RY, - DIPH_BYOFFSET, 2500))) - { - CONS_Printf("DIEnumJoysticks(): couldn't SetProperty for RY DEAD ZONE\n"); - //IDirectInputDevice_Release (pdev); - //return DIENUM_CONTINUE; - } - if (JoyInfo.Rz) - if (FAILED(SetDIDwordProperty (pdev, DIPROP_DEADZONE, DIJOFS_RZ, - DIPH_BYOFFSET, 2500))) - { - CONS_Printf("DIEnumJoysticks(): couldn't SetProperty for RZ DEAD ZONE\n"); - //IDirectInputDevice_Release (pdev); - //return DIENUM_CONTINUE; - } - if (JoyInfo.U) - if (FAILED(SetDIDwordProperty (pdev, DIPROP_DEADZONE, DIJOFS_SLIDER(0), - DIPH_BYOFFSET, 2500))) - { - CONS_Printf("DIEnumJoysticks(): couldn't SetProperty for U DEAD ZONE\n"); - //IDirectInputDevice_Release (pdev); - //return DIENUM_CONTINUE; - } - if (JoyInfo.V) - if (FAILED(SetDIDwordProperty (pdev, DIPROP_DEADZONE, DIJOFS_SLIDER(1), - DIPH_BYOFFSET, 2500))) - { - CONS_Printf("DIEnumJoysticks(): couldn't SetProperty for V DEAD ZONE\n"); - //IDirectInputDevice_Release (pdev); - //return DIENUM_CONTINUE; - } - } - - // query for IDirectInputDevice2 - we need this to poll the joystick - if (bDX0300) - { - FFType i = EvilForce; - // we won't use the poll - lpDIJA = NULL; - for (i = 0; i > NumberofForces; i++) - lpDIE[i] = NULL; - } - else - { - LPDIRECTINPUTDEVICE2 *rp = &lpDIJA; - LPVOID *tp = (LPVOID *)rp; - if (FAILED(IDirectInputDevice_QueryInterface(pdev, &IID_IDirectInputDevice2, tp))) - { - CONS_Printf("DIEnumJoysticks(): QueryInterface FAILED\n"); - IDirectInputDevice_Release (pdev); - return DIENUM_CONTINUE; - } - - if (lpDIJA && JoyInfo.ForceAxises != -1) - { - // Since we will be playing force feedback effects, we should disable the - // auto-centering spring. - if (FAILED(SetDIDwordProperty(pdev, DIPROP_AUTOCENTER, 0, DIPH_DEVICE, FALSE))) - { - //NOP - } - - // Enumerate and count the axes of the joystick - if (FAILED(IDirectInputDevice_EnumObjects(pdev, EnumAxesCallback, - (VOID*)&JoyInfo.ForceAxises, DIDFT_AXIS))) - { - JoyInfo.ForceAxises = -1; - } - else - { - SetupAllForces(lpDIJA,lpDIE,JoyInfo.ForceAxises); - } - } - } - - // we successfully created an IDirectInputDevice. So stop looking - // for another one. - lpDIJ = pdev; - return DIENUM_STOP; -} - -// -------------- -// I_InitJoystick -// This is called everytime the 'use_joystick' variable changes -// It is normally called at least once at startup when the config is loaded -// -------------- -void I_InitJoystick(void) -{ - HRESULT hr; - - // cleanup - I_ShutdownJoystick(); - - //joystick detection can be skipped by setting use_joystick to 0 - if (M_CheckParm("-nojoy")) - { - CONS_Printf("Joystick disabled\n"); - return; - } - else - // don't do anything at the registration of the joystick cvar, - // until config is loaded - if (!lstrcmpA(cv_usejoystick.string, "0")) - return; - - // acquire the joystick only once - if (!lpDIJ) - { - joystick_detected = false; - - CONS_Printf("Looking for joystick devices:\n"); - iJoyNum = 0; - hr = IDirectInput_EnumDevices(lpDI, DIDEVTYPE_JOYSTICK, DIEnumJoysticks, - (void *)&cv_usejoystick, // our user parameter is joystick number - DIEDFL_ATTACHEDONLY); - if (FAILED(hr)) - { - CONS_Printf("\nI_InitJoystick(): EnumDevices FAILED\n"); - cv_usejoystick.value = 0; - return; - } - - if (!lpDIJ) - { - if (!iJoyNum) - CONS_Printf("none found\n"); - else - { - CONS_Printf("none used\n"); - if (cv_usejoystick.value > 0 && cv_usejoystick.value > iJoyNum) - { - CONS_Printf("\2Set the use_joystick variable to one of the" - " enumerated joystick numbers\n"); - } - } - cv_usejoystick.value = 0; - return; - } - - I_AddExitFunc(I_ShutdownJoystick); - - // set coop level - if (FAILED(IDirectInputDevice_SetCooperativeLevel(lpDIJ, hWndMain, - DISCL_NONEXCLUSIVE|DISCL_FOREGROUND))) - { - I_Error("I_InitJoystick: SetCooperativeLevel FAILED"); - } - } - else - CONS_Printf("Joystick already initialized\n"); - - // we don't unacquire joystick, so let's just pretend we re-acquired it - joystick_detected = true; -} -//Joystick 2 - -// --------------- -// DIEnumJoysticks2 -// There is no such thing as a 'system' joystick, contrary to mouse, -// we must enumerate and choose one joystick device to use -// --------------- -static BOOL CALLBACK DIEnumJoysticks2 (LPCDIDEVICEINSTANCE lpddi, - LPVOID pvRef) //cv_usejoystick -{ - LPDIRECTINPUTDEVICE pdev; - DIPROPRANGE diprg; - DIDEVCAPS caps; - BOOL bUseThisOne = FALSE; - - iJoy2Num++; - - //faB: if cv holds a string description of joystick, the value from atoi() is 0 - // else, the value was probably set by user at console to one of the previsouly - // enumerated joysticks - if (((consvar_t *)pvRef)->value == iJoy2Num -#ifndef _UNICODE - || !lstrcmpA(((consvar_t *)pvRef)->string, lpddi->tszProductName) -#endif - ) - bUseThisOne = TRUE; - - //CONS_Printf(" cv joy2 is %s\n", ((consvar_t *)pvRef)->string); - - // print out device name - CONS_Printf("%c%d: %s\n", - (bUseThisOne) ? '\2' : ' ', // show name in white if this is the one we will use - iJoy2Num, - //(GET_DIDEVICE_SUBTYPE(lpddi->dwDevType) == DIDEVTYPEJOYSTICK_GAMEPAD) ? "Gamepad " : "Joystick", - lpddi->tszProductName); //, lpddi->tszInstanceName); - - // use specified joystick (cv_usejoystick.value in pvRef) - if (!bUseThisOne) - return DIENUM_CONTINUE; - - ((consvar_t *)pvRef)->value = iJoy2Num; - if (IDirectInput_CreateDevice (lpDI, &lpddi->guidInstance, - &pdev, NULL) != DI_OK) - { - // if it failed, then we can't use this joystick for some - // bizarre reason. (Maybe the user unplugged it while we - // were in the middle of enumerating it.) So continue enumerating - CONS_Printf("DIEnumJoysticks2(): CreateDevice FAILED\n"); - return DIENUM_CONTINUE; - } - - - // get the Device capabilities - // - caps.dwSize = sizeof (DIDEVCAPS_DX3); - if (FAILED(IDirectInputDevice_GetCapabilities (pdev, &caps))) - { - CONS_Printf("DIEnumJoysticks2(): GetCapabilities FAILED\n"); - IDirectInputDevice_Release (pdev); - return DIENUM_CONTINUE; - } - if (!(caps.dwFlags & DIDC_ATTACHED)) // should be, since we enumerate only attached devices - return DIENUM_CONTINUE; - - Joystick2.bJoyNeedPoll = ((caps.dwFlags & DIDC_POLLEDDATAFORMAT) != 0); - - if (caps.dwFlags & DIDC_FORCEFEEDBACK) - JoyInfo2.ForceAxises = 0; - else - JoyInfo2.ForceAxises = -1; - - Joystick2.bGamepadStyle = (GET_DIDEVICE_SUBTYPE(caps.dwDevType) == DIDEVTYPEJOYSTICK_GAMEPAD); - //DEBUG CONS_Printf("Gamepad: %d\n", Joystick2.bGamepadStyle); - - - CONS_Printf("Capabilities: %d axes, %d buttons, %d POVs, poll %d, Gamepad %d\n", - caps.dwAxes, caps.dwButtons, caps.dwPOVs, Joystick2.bJoyNeedPoll, Joystick2.bGamepadStyle); - - - // Set the data format to "simple joystick" - a predefined data format - // - // A data format specifies which controls on a device we - // are interested in, and how they should be reported. - // - // This tells DirectInput that we will be passing a - // DIJOYSTATE structure to IDirectInputDevice::GetDeviceState. - if (IDirectInputDevice_SetDataFormat (pdev, &c_dfDIJoystick) != DI_OK) - { - CONS_Printf("DIEnumJoysticks2(): SetDataFormat FAILED\n"); - IDirectInputDevice_Release (pdev); - return DIENUM_CONTINUE; - } - - // Set the cooperativity level to let DirectInput know how - // this device should interact with the system and with other - // DirectInput applications. - if (IDirectInputDevice_SetCooperativeLevel (pdev, hWndMain, - DISCL_EXCLUSIVE | DISCL_FOREGROUND) != DI_OK) - { - CONS_Printf("DIEnumJoysticks2(): SetCooperativeLevel FAILED\n"); - IDirectInputDevice_Release (pdev); - return DIENUM_CONTINUE; - } - - // set the range of the joystick axis - diprg.diph.dwSize = sizeof (DIPROPRANGE); - diprg.diph.dwHeaderSize = sizeof (DIPROPHEADER); - diprg.diph.dwHow = DIPH_BYOFFSET; - diprg.lMin = -JOYAXISRANGE; // value for extreme left - diprg.lMax = +JOYAXISRANGE; // value for extreme right - - diprg.diph.dwObj = DIJOFS_X; // set the x-axis range - if (FAILED(IDirectInputDevice_SetProperty(pdev, DIPROP_RANGE, &diprg.diph))) - { - //goto SetPropFail; - JoyInfo2.X = FALSE; - } - else JoyInfo2.X = TRUE; - - diprg.diph.dwObj = DIJOFS_Y; // set the y-axis range - if (FAILED(IDirectInputDevice_SetProperty(pdev, DIPROP_RANGE, &diprg.diph))) - { -//SetPropFail: -// CONS_Printf("DIEnumJoysticks(): SetProperty FAILED\n"); -// IDirectInputDevice_Release (pdev); -// return DIENUM_CONTINUE; - JoyInfo2.Y = FALSE; - } - else JoyInfo2.Y = TRUE; - - diprg.diph.dwObj = DIJOFS_Z; // set the z-axis range - if (FAILED(IDirectInputDevice_SetProperty(pdev, DIPROP_RANGE, &diprg.diph))) - { - //CONS_Printf("DIJOFS_Z not found\n"); - JoyInfo2.Z = FALSE; - } - else JoyInfo2.Z = TRUE; - - diprg.diph.dwObj = DIJOFS_RX; // set the x-rudder range - if (FAILED(IDirectInputDevice_SetProperty(pdev, DIPROP_RANGE, &diprg.diph))) - { - //CONS_Printf("DIJOFS_RX (x-rudder) not found\n"); - JoyInfo2.Rx = FALSE; - } - else JoyInfo2.Rx = TRUE; - - diprg.diph.dwObj = DIJOFS_RY; // set the y-rudder range - if (FAILED(IDirectInputDevice_SetProperty(pdev, DIPROP_RANGE, &diprg.diph))) - { - //CONS_Printf("DIJOFS_RY (y-rudder) not found\n"); - JoyInfo2.Ry = FALSE; - } - else JoyInfo2.Ry = TRUE; - - diprg.diph.dwObj = DIJOFS_RZ; // set the z-rudder range - if (FAILED(IDirectInputDevice_SetProperty(pdev, DIPROP_RANGE, &diprg.diph))) - { - //CONS_Printf("DIJOFS_RZ (z-rudder) not found\n"); - JoyInfo2.Rz = FALSE; - } - else JoyInfo2.Rz = TRUE; - diprg.diph.dwObj = DIJOFS_SLIDER(0); // set the x-misc range - if (FAILED(IDirectInputDevice_SetProperty(pdev, DIPROP_RANGE, &diprg.diph))) - { - //CONS_Printf("DIJOFS_RZ (x-misc) not found\n"); - JoyInfo2.U = FALSE; - } - else JoyInfo2.U = TRUE; - - diprg.diph.dwObj = DIJOFS_SLIDER(1); // set the y-misc range - if (FAILED(IDirectInputDevice_SetProperty(pdev, DIPROP_RANGE, &diprg.diph))) - { - //CONS_Printf("DIJOFS_RZ (y-misc) not found\n"); - JoyInfo2.V = FALSE; - } - else JoyInfo2.V = TRUE; - - // set X axis dead zone to 25% (to avoid accidental turning) - if (!Joystick2.bGamepadStyle) - { - if (JoyInfo2.X) - if (FAILED(SetDIDwordProperty (pdev, DIPROP_DEADZONE, DIJOFS_X, - DIPH_BYOFFSET, 2500))) - { - CONS_Printf("DIEnumJoysticks2(): couldn't SetProperty for X DEAD ZONE"); - //IDirectInputDevice_Release (pdev); - //return DIENUM_CONTINUE; - } - if (JoyInfo2.Y) - if (FAILED(SetDIDwordProperty (pdev, DIPROP_DEADZONE, DIJOFS_Y, - DIPH_BYOFFSET, 2500))) - { - CONS_Printf("DIEnumJoysticks2(): couldn't SetProperty for Y DEAD ZONE\n"); - //IDirectInputDevice_Release (pdev); - //return DIENUM_CONTINUE; - } - if (JoyInfo2.Z) - if (FAILED(SetDIDwordProperty (pdev, DIPROP_DEADZONE, DIJOFS_Z, - DIPH_BYOFFSET, 2500))) - { - CONS_Printf("DIEnumJoysticks2(): couldn't SetProperty for Z DEAD ZONE\n"); - //IDirectInputDevice_Release (pdev); - //return DIENUM_CONTINUE; - } - if (JoyInfo2.Rx) - if (FAILED(SetDIDwordProperty (pdev, DIPROP_DEADZONE, DIJOFS_RX, - DIPH_BYOFFSET, 2500))) - { - CONS_Printf("DIEnumJoysticks2(): couldn't SetProperty for RX DEAD ZONE\n"); - //IDirectInputDevice_Release (pdev); - //return DIENUM_CONTINUE; - } - if (JoyInfo2.Ry) - if (FAILED(SetDIDwordProperty (pdev, DIPROP_DEADZONE, DIJOFS_RY, - DIPH_BYOFFSET, 2500))) - { - CONS_Printf("DIEnumJoysticks2(): couldn't SetProperty for RY DEAD ZONE\n"); - //IDirectInputDevice_Release (pdev); - //return DIENUM_CONTINUE; - } - if (JoyInfo2.Rz) - if (FAILED(SetDIDwordProperty (pdev, DIPROP_DEADZONE, DIJOFS_RZ, - DIPH_BYOFFSET, 2500))) - { - CONS_Printf("DIEnumJoysticks2(): couldn't SetProperty for RZ DEAD ZONE\n"); - //IDirectInputDevice_Release (pdev); - //return DIENUM_CONTINUE; - } - if (JoyInfo2.U) - if (FAILED(SetDIDwordProperty (pdev, DIPROP_DEADZONE, DIJOFS_SLIDER(0), - DIPH_BYOFFSET, 2500))) - { - CONS_Printf("DIEnumJoysticks2(): couldn't SetProperty for U DEAD ZONE\n"); - //IDirectInputDevice_Release (pdev); - //return DIENUM_CONTINUE; - } - if (JoyInfo2.V) - if (FAILED(SetDIDwordProperty (pdev, DIPROP_DEADZONE, DIJOFS_SLIDER(1), - DIPH_BYOFFSET, 2500))) - { - CONS_Printf("DIEnumJoysticks2(): couldn't SetProperty for V DEAD ZONE\n"); - //IDirectInputDevice_Release (pdev); - //return DIENUM_CONTINUE; - } - } - - // query for IDirectInputDevice2 - we need this to poll the joystick - if (bDX0300) - { - FFType i = EvilForce; - // we won't use the poll - lpDIJA = NULL; - for (i = 0; i > NumberofForces; i++) - lpDIE[i] = NULL; - } - else - { - LPDIRECTINPUTDEVICE2 *rp = &lpDIJ2A; - LPVOID *tp = (LPVOID *)rp; - if (FAILED(IDirectInputDevice_QueryInterface(pdev, &IID_IDirectInputDevice2, tp))) - { - CONS_Printf("DIEnumJoysticks2(): QueryInterface FAILED\n"); - IDirectInputDevice_Release (pdev); - return DIENUM_CONTINUE; - } - - if (lpDIJ2A && JoyInfo2.ForceAxises != -1) - { - // Since we will be playing force feedback effects, we should disable the - // auto-centering spring. - if (FAILED(SetDIDwordProperty(pdev, DIPROP_AUTOCENTER, 0, DIPH_DEVICE, FALSE))) - { - //NOP - } - - // Enumerate and count the axes of the joystick - if (FAILED(IDirectInputDevice_EnumObjects(pdev, EnumAxesCallback, - (VOID*)&JoyInfo2.ForceAxises, DIDFT_AXIS))) - { - JoyInfo2.ForceAxises = -1; - } - else - { - SetupAllForces(lpDIJ2A,lpDIE2,JoyInfo2.ForceAxises); - } - } - } - - // we successfully created an IDirectInputDevice. So stop looking - // for another one. - lpDIJ2 = pdev; - return DIENUM_STOP; -} - - -// -------------- -// I_InitJoystick2 -// This is called everytime the 'use_joystick2' variable changes -// It is normally called at least once at startup when the config is loaded -// -------------- -void I_InitJoystick2 (void) -{ - HRESULT hr; - - // cleanup - I_ShutdownJoystick2 (); - - joystick2_detected = false; - - // joystick detection can be skipped by setting use_joystick to 0 - if (M_CheckParm("-nojoy")) - { - CONS_Printf("Joystick2 disabled\n"); - return; - } - else - // don't do anything at the registration of the joystick cvar, - // until config is loaded - if (!lstrcmpA(cv_usejoystick2.string, "0")) - return; - - // acquire the joystick only once - if (!lpDIJ2) - { - joystick2_detected = false; - - CONS_Printf("Looking for joystick devices:\n"); - iJoy2Num = 0; - hr = IDirectInput_EnumDevices(lpDI, DIDEVTYPE_JOYSTICK, - DIEnumJoysticks2, - (void *)&cv_usejoystick2, // our user parameter is joystick number - DIEDFL_ATTACHEDONLY); - if (FAILED(hr)) - { - CONS_Printf("\nI_InitJoystick2(): EnumDevices FAILED\n"); - cv_usejoystick2.value = 0; - return; - } - - if (!lpDIJ2) - { - if (iJoy2Num == 0) - CONS_Printf("none found\n"); - else - { - CONS_Printf("none used\n"); - if (cv_usejoystick2.value > 0 && - cv_usejoystick2.value > iJoy2Num) - { - CONS_Printf("\2Set the use_joystick2 variable to one of the" - " enumerated joysticks number\n"); - } - } - cv_usejoystick2.value = 0; - return; - } - - I_AddExitFunc (I_ShutdownJoystick2); - - // set coop level - if (FAILED(IDirectInputDevice_SetCooperativeLevel (lpDIJ2, hWndMain, DISCL_NONEXCLUSIVE | DISCL_FOREGROUND))) - I_Error("I_InitJoystick2: SetCooperativeLevel FAILED"); - - // later - //if (FAILED(IDirectInputDevice_Acquire (lpDIJ2))) - // I_Error("Couldn't acquire Joystick2"); - - joystick2_detected = true; - } - else - CONS_Printf("Joystick2 already initialized\n"); - - //faB: we don't unacquire joystick, so let's just pretend we re-acquired it - joystick2_detected = true; -} - -/** \brief Joystick 1 buttons states -*/ -static INT64 lastjoybuttons = 0; - -/** \brief Joystick 1 hats state -*/ -static INT64 lastjoyhats = 0; - -static void I_ShutdownJoystick(void) -{ - int i; - event_t event; - - lastjoybuttons = lastjoyhats = 0; - - event.type = ev_keyup; - - // emulate the up of all joystick buttons - for (i = 0;i < JOYBUTTONS;i++) - { - event.data1 = KEY_JOY1+i; - D_PostEvent(&event); - } - - // emulate the up of all joystick hats - for (i = 0;i < JOYHATS*4;i++) - { - event.data1 = KEY_HAT1+i; - D_PostEvent(&event); - } - - // reset joystick position - event.type = ev_joystick; - for (i = 0;i < JOYAXISSET; i++) - { - event.data1 = i; - D_PostEvent(&event); - } - - if (joystick_detected) - CONS_Printf("I_ShutdownJoystick()\n"); - - for (i = 0; i > NumberofForces; i++) - { - if (lpDIE[i]) - { - IDirectInputEffect_Release(lpDIE[i]); - lpDIE[i] = NULL; - - } - } - if (lpDIJ) - { - IDirectInputDevice_Unacquire(lpDIJ); - IDirectInputDevice_Release(lpDIJ); - lpDIJ = NULL; - } - if (lpDIJA) - { - IDirectInputDevice2_Release(lpDIJA); - lpDIJA = NULL; - } - joystick_detected = false; -} - -/** \brief Joystick 2 buttons states -*/ -static INT64 lastjoy2buttons = 0; - -/** \brief Joystick 2 hats state -*/ -static INT64 lastjoy2hats = 0; - -static void I_ShutdownJoystick2(void) -{ - int i; - event_t event; - - lastjoy2buttons = lastjoy2hats = 0; - - event.type = ev_keyup; - - // emulate the up of all joystick buttons - for (i = 0;i < JOYBUTTONS;i++) - { - event.data1 = KEY_2JOY1+i; - D_PostEvent(&event); - } - - // emulate the up of all joystick hats - for (i = 0;i < JOYHATS*4;i++) - { - event.data1 = KEY_2HAT1+i; - D_PostEvent(&event); - } - - // reset joystick position - event.type = ev_joystick2; - for (i = 0;i < JOYAXISSET; i++) - { - event.data1 = i; - D_PostEvent(&event); - } - - if (joystick2_detected) - CONS_Printf("I_ShutdownJoystick2()\n"); - - for (i = 0; i > NumberofForces; i++) - { - if (lpDIE2[i]) - { - IDirectInputEffect_Release(lpDIE2[i]); - lpDIE2[i] = NULL; - } - } - if (lpDIJ2) - { - IDirectInputDevice_Unacquire(lpDIJ2); - IDirectInputDevice_Release(lpDIJ2); - lpDIJ2 = NULL; - } - if (lpDIJ2A) - { - IDirectInputDevice2_Release(lpDIJ2A); - lpDIJ2A = NULL; - } - joystick2_detected = false; -} - -// ------------------- -// I_GetJoystickEvents -// Get current joystick axis and button states -// ------------------- -void I_GetJoystickEvents(void) -{ - HRESULT hr; - DIJOYSTATE js; // DirectInput joystick state - int i; - INT64 joybuttons = 0; - INT64 joyhats = 0; - event_t event; - - if (!lpDIJ) - return; - - // if input is lost then acquire and keep trying - for (;;) - { - // poll the joystick to read the current state - // if the device doesn't require polling, this function returns almost instantly - if (lpDIJA) - { - hr = IDirectInputDevice2_Poll(lpDIJA); - if (hr == DIERR_INPUTLOST || hr == DIERR_NOTACQUIRED) - goto acquire; - else if (FAILED(hr)) - { - CONS_Printf("I_GetJoystickEvents(): Poll FAILED\n"); - return; - } - } - - // get the input's device state, and put the state in dims - hr = IDirectInputDevice_GetDeviceState(lpDIJ, sizeof (DIJOYSTATE), &js); - - if (hr == DIERR_INPUTLOST || hr == DIERR_NOTACQUIRED) - { - // DirectInput is telling us that the input stream has - // been interrupted. We aren't tracking any state - // between polls, so we don't have any special reset - // that needs to be done. We just re-acquire and - // try again. - goto acquire; - } - else if (FAILED(hr)) - { - CONS_Printf("I_GetJoystickEvents(): GetDeviceState FAILED\n"); - return; - } - - break; -acquire: - if (FAILED(IDirectInputDevice_Acquire(lpDIJ))) - return; - } - - // look for as many buttons as g_input code supports, we don't use the others - for (i = JOYBUTTONS_MIN - 1; i >= 0; i--) - { - joybuttons <<= 1; - if (js.rgbButtons[i]) - joybuttons |= 1; - } - - for (i = JOYHATS_MIN -1; i >=0; i--) - { - if (js.rgdwPOV[i] != 0xffff && js.rgdwPOV[i] != 0xffffffff) - { - if (js.rgdwPOV[i] > 270 * DI_DEGREES || js.rgdwPOV[i] < 90 * DI_DEGREES) - joyhats |= 1<<(0 + 4*i); // UP - else if (js.rgdwPOV[i] > 90 * DI_DEGREES && js.rgdwPOV[i] < 270 * DI_DEGREES) - joyhats |= 1<<(1 + 4*i); // DOWN - if (js.rgdwPOV[i] > 0 * DI_DEGREES && js.rgdwPOV[i] < 180 * DI_DEGREES) - joyhats |= 1<<(3 + 4*i); // LEFT - else if (js.rgdwPOV[i] > 180 * DI_DEGREES && js.rgdwPOV[i] < 360 * DI_DEGREES) - joyhats |= 1<<(2 + 4*i); // RIGHT - } - } - - if (joybuttons != lastjoybuttons) - { - INT64 j = 1; // keep only bits that changed since last time - INT64 newbuttons = joybuttons ^ lastjoybuttons; - lastjoybuttons = joybuttons; - - for (i = 0; i < JOYBUTTONS && i < JOYBUTTONS_MAX; i++, j <<= 1) - { - if (newbuttons & j) // button changed state? - { - if (joybuttons & j) - event.type = ev_keydown; - else - event.type = ev_keyup; - event.data1 = KEY_JOY1 + i; - D_PostEvent(&event); - } - } - } - - if (joyhats != lastjoyhats) - { - INT64 j = 1; // keep only bits that changed since last time - INT64 newhats = joyhats ^ lastjoyhats; - lastjoyhats = joyhats; - - for (i = 0; i < JOYHATS*4 && i < JOYHATS_MAX*4; i++, j <<= 1) - { - if (newhats & j) // button changed state? - { - if (joyhats & j) - event.type = ev_keydown; - else - event.type = ev_keyup; - event.data1 = KEY_HAT1 + i; - D_PostEvent(&event); - } - } - - } - - // send joystick axis positions - event.type = ev_joystick; - event.data1 = event.data2 = event.data3 = 0; - - if (Joystick.bGamepadStyle) - { - // gamepad control type, on or off, live or die - if (JoyInfo.X) - { - if (js.lX < -(JOYAXISRANGE/2)) - event.data2 = -1; - else if (js.lX > JOYAXISRANGE/2) - event.data2 = 1; - } - if (JoyInfo.Y) - { - if (js.lY < -(JOYAXISRANGE/2)) - event.data3 = -1; - else if (js.lY > JOYAXISRANGE/2) - event.data3 = 1; - } - } - else - { - // analog control style, just send the raw data - if (JoyInfo.X) event.data2 = js.lX; // x axis - if (JoyInfo.Y) event.data3 = js.lY; // y axis - } - - D_PostEvent(&event); -#if JOYAXISSET > 1 - event.data1 = 1; - event.data2 = event.data3 = 0; - - if (Joystick.bGamepadStyle) - { - // gamepad control type, on or off, live or die - if (JoyInfo.Z) - { - if (js.lZ < -(JOYAXISRANGE/2)) - event.data2 = -1; - else if (js.lZ > JOYAXISRANGE/2) - event.data2 = 1; - } - if (JoyInfo.Rx) - { - if (js.lRx < -(JOYAXISRANGE/2)) - event.data3 = -1; - else if (js.lRx > JOYAXISRANGE/2) - event.data3 = 1; - } - } - else - { - // analog control style, just send the raw data - if (JoyInfo.Z) event.data2 = js.lZ; // z axis - if (JoyInfo.Rx) event.data3 = js.lRx; // rx axis - } - - D_PostEvent(&event); -#endif -#if JOYAXISSET > 2 - event.data1 = 2; - event.data2 = event.data3 = 0; - - if (Joystick.bGamepadStyle) - { - // gamepad control type, on or off, live or die - if (JoyInfo.Rx) - { - if (js.lRy < -(JOYAXISRANGE/2)) - event.data2 = -1; - else if (js.lRy > JOYAXISRANGE/2) - event.data2 = 1; - } - if (JoyInfo.Rz) - { - if (js.lRz < -(JOYAXISRANGE/2)) - event.data3 = -1; - else if (js.lRz > JOYAXISRANGE/2) - event.data3 = 1; - } - } - else - { - // analog control style, just send the raw data - if (JoyInfo.Ry) event.data2 = js.lRy; // ry axis - if (JoyInfo.Rz) event.data3 = js.lRz; // rz axis - } - - D_PostEvent(&event); -#endif -#if JOYAXISSET > 3 - event.data1 = 3; - event.data2 = event.data3 = 0; - if (Joystick.bGamepadStyle) - { - // gamepad control type, on or off, live or die - if (JoyInfo.U) - { - if (js.rglSlider[0] < -(JOYAXISRANGE/2)) - event.data2 = -1; - else if (js.rglSlider[0] > JOYAXISRANGE/2) - event.data2 = 1; - } - if (JoyInfo.V) - { - if (js.rglSlider[1] < -(JOYAXISRANGE/2)) - event.data3 = -1; - else if (js.rglSlider[1] > JOYAXISRANGE/2) - event.data3 = 1; - } - } - else - { - // analog control style, just send the raw data - if (JoyInfo.U) event.data2 = js.rglSlider[0]; // U axis - if (JoyInfo.V) event.data3 = js.rglSlider[1]; // V axis - } - D_PostEvent(&event); -#endif -} - -// ------------------- -// I_GetJoystickEvents -// Get current joystick axis and button states -// ------------------- -void I_GetJoystick2Events(void) -{ - HRESULT hr; - DIJOYSTATE js; // DirectInput joystick state - int i; - INT64 joybuttons = 0; - INT64 joyhats = 0; - event_t event; - - if (!lpDIJ2) - return; - - // if input is lost then acquire and keep trying - for (;;) - { - // poll the joystick to read the current state - // if the device doesn't require polling, this function returns almost instantly - if (lpDIJ2A) - { - hr = IDirectInputDevice2_Poll(lpDIJ2A); - if (hr == DIERR_INPUTLOST || hr == DIERR_NOTACQUIRED) - goto acquire; - else if (FAILED(hr)) - { - CONS_Printf("I_GetJoystick2Events(): Poll FAILED\n"); - return; - } - } - - // get the input's device state, and put the state in dims - hr = IDirectInputDevice_GetDeviceState(lpDIJ2, sizeof (DIJOYSTATE), &js); - - if (hr == DIERR_INPUTLOST || hr == DIERR_NOTACQUIRED) - { - // DirectInput is telling us that the input stream has - // been interrupted. We aren't tracking any state - // between polls, so we don't have any special reset - // that needs to be done. We just re-acquire and - // try again. - goto acquire; - } - else if (FAILED(hr)) - { - CONS_Printf("I_GetJoystickEvents2(): GetDeviceState FAILED\n"); - return; - } - - break; -acquire: - if (FAILED(IDirectInputDevice_Acquire(lpDIJ2))) - return; - } - - // look for as many buttons as g_input code supports, we don't use the others - for (i = JOYBUTTONS_MIN - 1; i >= 0; i--) - { - joybuttons <<= 1; - if (js.rgbButtons[i]) - joybuttons |= 1; - } - - for (i = JOYHATS_MIN -1; i >=0; i--) - { - if (js.rgdwPOV[i] != 0xffff && js.rgdwPOV[i] != 0xffffffff) - { - if (js.rgdwPOV[i] > 270 * DI_DEGREES || js.rgdwPOV[i] < 90 * DI_DEGREES) - joyhats |= 1<<(0 + 4*i); // UP - else if (js.rgdwPOV[i] > 90 * DI_DEGREES && js.rgdwPOV[i] < 270 * DI_DEGREES) - joyhats |= 1<<(1 + 4*i); // DOWN - if (js.rgdwPOV[i] > 0 * DI_DEGREES && js.rgdwPOV[i] < 180 * DI_DEGREES) - joyhats |= 1<<(3 + 4*i); // LEFT - else if (js.rgdwPOV[i] > 180 * DI_DEGREES && js.rgdwPOV[i] < 360 * DI_DEGREES) - joyhats |= 1<<(2 + 4*i); // RIGHT - } - } - - if (joybuttons != lastjoy2buttons) - { - INT64 j = 1; // keep only bits that changed since last time - INT64 newbuttons = joybuttons ^ lastjoy2buttons; - lastjoy2buttons = joybuttons; - - for (i = 0; i < JOYBUTTONS && i < JOYBUTTONS_MAX; i++, j <<= 1) - { - if (newbuttons & j) // button changed state? - { - if (joybuttons & j) - event.type = ev_keydown; - else - event.type = ev_keyup; - event.data1 = KEY_2JOY1 + i; - D_PostEvent(&event); - } - } - } - - if (joyhats != lastjoy2hats) - { - INT64 j = 1; // keep only bits that changed since last time - INT64 newhats = joyhats ^ lastjoy2hats; - lastjoy2hats = joyhats; - - for (i = 0; i < JOYHATS*4 && i < JOYHATS_MAX*4; i++, j <<= 1) - { - if (newhats & j) // button changed state? - { - if (joyhats & j) - event.type = ev_keydown; - else - event.type = ev_keyup; - event.data1 = KEY_2HAT1 + i; - D_PostEvent(&event); - } - } - - } - - // send joystick axis positions - event.type = ev_joystick2; - event.data1 = event.data2 = event.data3 = 0; - - if (Joystick2.bGamepadStyle) - { - // gamepad control type, on or off, live or die - if (JoyInfo2.X) - { - if (js.lX < -(JOYAXISRANGE/2)) - event.data2 = -1; - else if (js.lX > JOYAXISRANGE/2) - event.data2 = 1; - } - if (JoyInfo2.Y) - { - if (js.lY < -(JOYAXISRANGE/2)) - event.data3 = -1; - else if (js.lY > JOYAXISRANGE/2) - event.data3 = 1; - } - } - else - { - // analog control style, just send the raw data - if (JoyInfo2.X) event.data2 = js.lX; // x axis - if (JoyInfo2.Y) event.data3 = js.lY; // y axis - } - - D_PostEvent(&event); -#if JOYAXISSET > 1 - event.data1 = 1; - event.data2 = event.data3 = 0; - - if (Joystick2.bGamepadStyle) - { - // gamepad control type, on or off, live or die - if (JoyInfo2.Z) - { - if (js.lZ < -(JOYAXISRANGE/2)) - event.data2 = -1; - else if (js.lZ > JOYAXISRANGE/2) - event.data2 = 1; - } - if (JoyInfo2.Rx) - { - if (js.lRx < -(JOYAXISRANGE/2)) - event.data3 = -1; - else if (js.lRx > JOYAXISRANGE/2) - event.data3 = 1; - } - } - else - { - // analog control style, just send the raw data - if (JoyInfo2.Z) event.data2 = js.lZ; // z axis - if (JoyInfo2.Rx) event.data3 = js.lRx; // rx axis - } - - D_PostEvent(&event); -#endif -#if JOYAXISSET > 2 - event.data1 = 2; - event.data2 = event.data3 = 0; - - if (Joystick2.bGamepadStyle) - { - // gamepad control type, on or off, live or die - if (JoyInfo2.Rx) - { - if (js.lRy < -(JOYAXISRANGE/2)) - event.data2 = -1; - else if (js.lRy > JOYAXISRANGE/2) - event.data2 = 1; - } - if (JoyInfo2.Rz) - { - if (js.lRz < -(JOYAXISRANGE/2)) - event.data3 = -1; - else if (js.lRz > JOYAXISRANGE/2) - event.data3 = 1; - } - } - else - { - // analog control style, just send the raw data - if (JoyInfo2.Ry) event.data2 = js.lRy; // ry axis - if (JoyInfo2.Rz) event.data3 = js.lRz; // rz axis - } - - D_PostEvent(&event); -#endif -#if JOYAXISSET > 3 - event.data1 = 3; - event.data2 = event.data3 = 0; - if (Joystick2.bGamepadStyle) - { - // gamepad control type, on or off, live or die - if (JoyInfo2.U) - { - if (js.rglSlider[0] < -(JOYAXISRANGE/2)) - event.data2 = -1; - else if (js.rglSlider[0] > JOYAXISRANGE/2) - event.data2 = 1; - } - if (JoyInfo2.V) - { - if (js.rglSlider[1] < -(JOYAXISRANGE/2)) - event.data3 = -1; - else if (js.rglSlider[1] > JOYAXISRANGE/2) - event.data3 = 1; - } - } - else - { - // analog control style, just send the raw data - if (JoyInfo2.U) event.data2 = js.rglSlider[0]; // U axis - if (JoyInfo2.V) event.data3 = js.rglSlider[1]; // V axis - } - D_PostEvent(&event); -#endif -} - -static int numofjoy = 0; -static char joyname[MAX_PATH]; -static int needjoy = -1; - -static BOOL CALLBACK DIEnumJoysticksCount (LPCDIDEVICEINSTANCE lpddi, - LPVOID pvRef) //joyname -{ - numofjoy++; - if (needjoy == numofjoy && pvRef && pvRef == (void *)joyname && lpddi - && lpddi->tszProductName) - { - sprintf(joyname,"%s",lpddi->tszProductName); - return DIENUM_STOP; - } - //else if (devparm) CONS_Printf("DIEnumJoysticksCount need help!"); - return DIENUM_CONTINUE; -} - -INT32 I_NumJoys(void) -{ - HRESULT hr; - needjoy = -1; - numofjoy = 0; - hr = IDirectInput_EnumDevices(lpDI, DIDEVTYPE_JOYSTICK, - DIEnumJoysticksCount, (void *)&numofjoy, DIEDFL_ATTACHEDONLY); - if (FAILED(hr)) - CONS_Printf("\nI_NumJoys(): EnumDevices FAILED\n"); - return numofjoy; - -} - -const char *I_GetJoyName(INT32 joyindex) -{ - HRESULT hr; - needjoy = joyindex; - numofjoy = 0; - ZeroMemory(joyname,sizeof (joyname)); - hr = IDirectInput_EnumDevices(lpDI, DIDEVTYPE_JOYSTICK, - DIEnumJoysticksCount, (void *)joyname, DIEDFL_ATTACHEDONLY); - if (FAILED(hr)) - CONS_Printf("\nI_GetJoyName(): EnumDevices FAILED\n"); - if (joyname[0] == 0) return NULL; - return joyname; -} - -// =========================================================================================== -// DIRECT INPUT KEYBOARD -// =========================================================================================== - -static UINT8 ASCIINames[256] = -{ - // 0 1 2 3 4 5 6 7 - // 8 9 A B C D E F - 0, 27, '1', '2', '3', '4', '5', '6', - '7', '8', '9', '0', KEY_MINUS,KEY_EQUALS,KEY_BACKSPACE, KEY_TAB, - 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', - 'o', 'p', '[', ']', KEY_ENTER,KEY_CTRL,'a', 's', - 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', - '\'', '`', KEY_SHIFT, '\\', 'z', 'x', 'c', 'v', - 'b', 'n', 'm', ',', '.', '/', KEY_SHIFT, '*', - KEY_ALT,KEY_SPACE,KEY_CAPSLOCK, KEY_F1, KEY_F2, KEY_F3, KEY_F4, KEY_F5, - KEY_F6, KEY_F7, KEY_F8, KEY_F9, KEY_F10,KEY_NUMLOCK,KEY_SCROLLLOCK,KEY_KEYPAD7, - KEY_KEYPAD8,KEY_KEYPAD9,KEY_MINUSPAD,KEY_KEYPAD4,KEY_KEYPAD5,KEY_KEYPAD6,KEY_PLUSPAD,KEY_KEYPAD1, - KEY_KEYPAD2,KEY_KEYPAD3,KEY_KEYPAD0,KEY_KPADDEL,0,0,0, KEY_F11, - KEY_F12,0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - - // 0 1 2 3 4 5 6 7 - // 8 9 A B C D E F - - 0, 0, 0, 0, 0, 0, 0, 0, // 0x80 - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, KEY_ENTER,KEY_CTRL, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, // 0xa0 - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, KEY_KPADDEL, 0,KEY_KPADSLASH,0, 0, - KEY_ALT,0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, KEY_HOME, // 0xc0 - KEY_UPARROW,KEY_PGUP,0,KEY_LEFTARROW,0,KEY_RIGHTARROW,0,KEY_END, - KEY_DOWNARROW,KEY_PGDN, KEY_INS,KEY_DEL,0,0,0,0, - 0, 0, 0,KEY_LEFTWIN,KEY_RIGHTWIN,KEY_MENU, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, // 0xe0 - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -// Return a key that has been pushed, or 0 (replace getchar() at game startup) -// -INT32 I_GetKey(void) -{ - event_t *ev; - - if (eventtail != eventhead) - { - ev = &events[eventtail]; - eventtail = (eventtail+1) & (MAXEVENTS-1); - if (ev->type == ev_keydown || ev->type == ev_console) - return ev->data1; - else - return 0; - } - return 0; -} - -// ----------------- -// I_StartupKeyboard -// Installs DirectInput keyboard -// ----------------- -#define DI_KEYBOARD_BUFFERSIZE 32 // number of data elements in keyboard buffer - -void I_StartupKeyboard(void) -{ - DIPROPDWORD dip; - - if (dedicated) - return; - - // make sure the app window has the focus or DirectInput acquire keyboard won't work - if (hWndMain) - { - SetFocus(hWndMain); - ShowWindow(hWndMain, SW_SHOW); - UpdateWindow(hWndMain); - } - - // detect error - if (lpDIK) - { - CONS_Printf("\2I_StartupKeyboard(): called twice\n"); - return; - } - - CreateDevice2(lpDI, &GUID_SysKeyboard, &lpDIK, NULL); - - if (lpDIK) - { - if (FAILED(IDirectInputDevice_SetDataFormat(lpDIK, &c_dfDIKeyboard))) - I_Error("Couldn't set keyboard data format"); - - // create buffer for buffered data - dip.diph.dwSize = sizeof (dip); - dip.diph.dwHeaderSize = sizeof (dip.diph); - dip.diph.dwObj = 0; - dip.diph.dwHow = DIPH_DEVICE; - dip.dwData = DI_KEYBOARD_BUFFERSIZE; - if (FAILED(IDirectInputDevice_SetProperty(lpDIK, DIPROP_BUFFERSIZE, &dip.diph))) - I_Error("Couldn't set keyboard buffer size"); - - if (FAILED(IDirectInputDevice_SetCooperativeLevel(lpDIK, hWndMain, - DISCL_NONEXCLUSIVE|DISCL_FOREGROUND))) - { - I_Error("Couldn't set keyboard coop level"); - } - } - else - I_Error("Couldn't create keyboard input"); - - I_AddExitFunc(I_ShutdownKeyboard); - hacktics = 0; // see definition - keyboard_started = true; -} - -// ------------------ -// I_ShutdownKeyboard -// Release DirectInput keyboard. -// ------------------ -static void I_ShutdownKeyboard(void) -{ - if (!keyboard_started) - return; - - CONS_Printf("I_ShutdownKeyboard()\n"); - - if (lpDIK) - { - IDirectInputDevice_Unacquire(lpDIK); - IDirectInputDevice_Release(lpDIK); - lpDIK = NULL; - } - - keyboard_started = false; -} - -// ------------------- -// I_GetKeyboardEvents -// Get buffered data from the keyboard -// ------------------- -static void I_GetKeyboardEvents(void) -{ - static boolean KeyboardLost = false; - - // simply repeat the last pushed key every xx tics, - // make more user friendly input for Console and game Menus -#define KEY_REPEAT_DELAY (TICRATE/17) // TICRATE tics, repeat every 1/3 second - static long RepeatKeyTics = 0; - static int RepeatKeyCode; - - DIDEVICEOBJECTDATA rgdod[DI_KEYBOARD_BUFFERSIZE]; - DWORD dwItems, d; - HRESULT hr; - int ch; - - event_t event; - ZeroMemory(&event,sizeof (event)); - - if (!keyboard_started) - return; - - if (!appActive && RepeatKeyCode) // Stop when lost focus - { - event.type = ev_keyup; - event.data1 = RepeatKeyCode; - D_PostEvent(&event); - RepeatKeyCode = 0; - } -getBufferedData: - dwItems = DI_KEYBOARD_BUFFERSIZE; - hr = IDirectInputDevice_GetDeviceData(lpDIK, sizeof (DIDEVICEOBJECTDATA), rgdod, &dwItems, 0); - - // If data stream was interrupted, reacquire the device and try again. - if (hr == DIERR_INPUTLOST || hr == DIERR_NOTACQUIRED) - { - // why it succeeds to acquire just after I don't understand.. so I set the flag BEFORE - KeyboardLost = true; - - hr = IDirectInputDevice_Acquire(lpDIK); - if (SUCCEEDED(hr)) - goto getBufferedData; - return; - } - - // we lost data, get device actual state to recover lost information - if (hr == DI_BUFFEROVERFLOW) - { - /// \note either uncomment or delete block - //I_Error("DI buffer overflow (keyboard)"); - //I_RecoverKeyboardState (); - - //hr = IDirectInputDevice_GetDeviceState (lpDIM, sizeof (keys), &diMouseState); - } - - // We got buffered input, act on it - if (SUCCEEDED(hr)) - { - // if we previously lost keyboard data, recover its current state - if (KeyboardLost) - { - /// \bug hack simply clears the keys so we don't have the last pressed keys - /// still active.. to have to re-trigger it is not much trouble for the user. - ZeroMemory(gamekeydown, NUMKEYS); - KeyboardLost = false; - } - - // dwItems contains number of elements read (could be 0) - for (d = 0; d < dwItems; d++) - { - // dwOfs member is DIK_* value - // dwData member 0x80 bit set press down, clear is release - - if (rgdod[d].dwData & 0x80) - event.type = ev_keydown; - else - event.type = ev_keyup; - - ch = rgdod[d].dwOfs & UINT8_MAX; - if (ASCIINames[ch]) - event.data1 = ASCIINames[ch]; - else - event.data1 = 0x80; - - D_PostEvent(&event); - } - - // Key Repeat - if (dwItems) - { - // new key events, so stop repeating key - RepeatKeyCode = 0; - // delay is tripled for first repeating key - RepeatKeyTics = hacktics + (KEY_REPEAT_DELAY*2); - if (event.type == ev_keydown) // use the last event! - RepeatKeyCode = event.data1; - } - else - { - // no new keys, repeat last pushed key after some time - if (RepeatKeyCode && hacktics - RepeatKeyTics > KEY_REPEAT_DELAY) - { - event.type = ev_keydown; - event.data1 = RepeatKeyCode; - D_PostEvent(&event); - - RepeatKeyTics = hacktics; - } - } - } -} - -// -// Closes DirectInput -// -static void I_ShutdownDirectInput(void) -{ - if (lpDI) - IDirectInput_Release(lpDI); - lpDI = NULL; -} - -// This stuff should get rid of the exception and page faults when -// SRB2 bugs out with an error. Now it should exit cleanly. -// -INT32 I_StartupSystem(void) -{ - HRESULT hr; - - // some 'more global than globals' things to initialize here ? - graphics_started = keyboard_started = sound_started = cdaudio_started = false; - - I_DetectWin9x(); - - // check for OS type and version here? -#ifdef NDEBUG - signal(SIGABRT, signal_handler); - signal(SIGFPE, signal_handler); - signal(SIGILL, signal_handler); - signal(SIGSEGV, signal_handler); - signal(SIGTERM, signal_handler); - signal(SIGINT, signal_handler); -#endif - - // create DirectInput - so that I_StartupKeyboard/Mouse can be called later on - // from D_SRB2Main just like DOS version - hr = DirectInputCreate(myInstance, DIRECTINPUT_VERSION, &lpDI, NULL); - - if (SUCCEEDED(hr)) - bDX0300 = FALSE; - else - { - // try opening DirectX3 interface for NT compatibility - hr = DirectInputCreate(myInstance, DXVERSION_NTCOMPATIBLE, &lpDI, NULL); - - if (FAILED(hr)) - { - const char *sErr; - switch (hr) - { - case DIERR_BETADIRECTINPUTVERSION: - sErr = "DIERR_BETADIRECTINPUTVERSION"; - break; - case DIERR_INVALIDPARAM: - sErr = "DIERR_INVALIDPARAM"; - break; - case DIERR_OLDDIRECTINPUTVERSION : - sErr = "DIERR_OLDDIRECTINPUTVERSION"; - break; - case DIERR_OUTOFMEMORY: - sErr = "DIERR_OUTOFMEMORY"; - break; - default: - sErr = "UNKNOWN"; - break; - } - I_Error("Couldn't create DirectInput (reason: %s)", sErr); - } - else - CONS_Printf("\2Using DirectX3 interface\n"); - - // only use DirectInput3 compatible structures and calls - bDX0300 = TRUE; - } - I_AddExitFunc(I_ShutdownDirectInput); - return 0; -} - -// Closes down everything. This includes restoring the initial -// palette and video mode, and removing whatever mouse, keyboard, and -// timer routines have been installed. -// -/// \bug doesn't restore wave/midi device volume -// -// Shutdown user funcs are effectively called in reverse order. -// -void I_ShutdownSystem(void) -{ - int c; - - for (c = MAX_QUIT_FUNCS - 1; c >= 0; c--) - if (quit_funcs[c]) - (*quit_funcs[c])(); -} - -// --------------- -// I_SaveMemToFile -// Save as much as iLength bytes starting at pData, to -// a new file of given name. The file is overwritten if it is present. -// --------------- -BOOL I_SaveMemToFile(const void *pData, size_t iLength, const char *sFileName) -{ - HANDLE fileHandle; - DWORD bytesWritten; - - fileHandle = CreateFileA(sFileName, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, - FILE_ATTRIBUTE_NORMAL|FILE_FLAG_WRITE_THROUGH, NULL); - if (fileHandle == (HANDLE)-1) - { - CONS_Printf("SaveMemToFile: Error opening file %s",sFileName); - return FALSE; - } - WriteFile(fileHandle, pData, (DWORD)iLength, &bytesWritten, NULL); - CloseHandle(fileHandle); - return TRUE; -} - -// my god how win32 suck -typedef BOOL (WINAPI *MyFunc)(LPCSTR RootName, PULARGE_INTEGER pulA, PULARGE_INTEGER pulB, PULARGE_INTEGER pulFreeBytes); - -void I_GetDiskFreeSpace(INT64* freespace) -{ - static MyFunc pfnGetDiskFreeSpaceEx = NULL; - static boolean testwin95 = false; - ULARGE_INTEGER usedbytes, lfrespace; - - if (!testwin95) - { - HMODULE h = GetModuleHandleA("kernel32.dll"); - - if (h) - pfnGetDiskFreeSpaceEx = (MyFunc)GetProcAddress(h, "GetDiskFreeSpaceExA"); - testwin95 = true; - } - if (pfnGetDiskFreeSpaceEx) - { - if (pfnGetDiskFreeSpaceEx(NULL, &lfreespace, &usedbytes, NULL)) - *freespace = lfreespace.QuadPart; - else - *freespace = INT32_MAX; - } - else - { - DWORD SectorsPerCluster, BytesPerSector, NumberOfFreeClusters, TotalNumberOfClusters; - GetDiskFreeSpace(NULL, &SectorsPerCluster, &BytesPerSector, - &NumberOfFreeClusters, &TotalNumberOfClusters); - *freespace = BytesPerSector * SectorsPerCluster * NumberOfFreeClusters; - } -} - -char *I_GetUserName(void) -{ - static char username[MAXPLAYERNAME+1]; - char *p; - DWORD i = MAXPLAYERNAME; - - if (!GetUserNameA(username, &i)) - { - p = getenv("USER"); - if (!p) - { - p = getenv("user"); - if (!p) - { - p = getenv("USERNAME"); - if (!p) - { - p = getenv("username"); - if (!p) - { - return NULL; - } - } - } - } - strncpy(username, p, MAXPLAYERNAME); - } - - if (!strlen(username)) - return NULL; - return username; -} - -INT32 I_mkdir(const char *dirname, INT32 unixright) -{ - (void)unixright; /// \todo should implement ntright under nt... - return CreateDirectoryA(dirname, NULL); -} - -char * I_GetEnv(const char *name) -{ - return getenv(name); -} - -INT32 I_PutEnv(char *variable) -{ - return putenv(variable); -} - -INT32 I_ClipboardCopy(const char *data, size_t size) -{ - (void)data; - (void)size; - return -1; -} - -char *I_ClipboardPaste(void) -{ - return NULL; -} - -typedef BOOL (WINAPI *MyFunc3) (DWORD); - -UINT64 I_FileSize(const char *filename) -{ - HANDLE fileHandle; - DWORD dwSizeHigh, dwSizeLow; - UINT64 fileSize = (UINT64)-1; - - fileHandle = CreateFileA(filename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, - 0, NULL); - if (fileHandle == (HANDLE)-1) - goto erroropening; - dwSizeLow = GetFileSize(fileHandle,&dwSizeHigh); - if (dwSizeLow == 0xFFFFFFFF && GetLastError() != NO_ERROR) - goto errorsizing; - fileSize = ((UINT64)(dwSizeHigh)<<32) + dwSizeLow; -errorsizing: - CloseHandle(fileHandle); -erroropening: - return fileSize; -} diff --git a/src/win32ce/win_vid.c b/src/win32ce/win_vid.c deleted file mode 100644 index 439103f38..000000000 --- a/src/win32ce/win_vid.c +++ /dev/null @@ -1,781 +0,0 @@ -// Emacs style mode select -*- C++ -*- -//----------------------------------------------------------------------------- -// -// Copyright (C) 1998-2000 by DooM Legacy Team. -// -// 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. -//----------------------------------------------------------------------------- -/// \file -/// \brief win32 video driver for Doom Legacy - -#include "../doomdef.h" - -#include -#include - -#include "../d_clisrv.h" -#include "../i_system.h" -#include "../m_argv.h" -#include "../v_video.h" -#include "../st_stuff.h" -#include "../i_video.h" -#include "../z_zone.h" -#include "fabdxlib.h" - -#include "win_main.h" -#include "../command.h" -#include "../screen.h" - -// ------- -// Globals -// ------- - -// this is the CURRENT rendermode!! very important: used by w_wad, and much other code -rendermode_t rendermode = render_soft; - -// synchronize page flipping with screen refresh -consvar_t cv_vidwait = {"vid_wait", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; -static consvar_t cv_stretch = {"stretch", "On", CV_SAVE|CV_NOSHOWHELP, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; - -boolean highcolor; - -static BOOL bDIBMode; // means we are using DIB instead of DirectDraw surfaces -static BITMAPINFO* bmiMain = NULL; -static HDC hDCMain = NULL; - -// ----------------- -// Video modes stuff -// ----------------- - -#define MAX_EXTRA_MODES 36 -static vmode_t extra_modes[MAX_EXTRA_MODES] = {{NULL, NULL, 0, 0, 0, 0, 0, 0, NULL, NULL, 0}}; -static char names[MAX_EXTRA_MODES][10]; - -static int numvidmodes; // total number of DirectDraw display modes -static vmode_t *pvidmodes; // start of videomodes list. -static vmode_t *pcurrentmode; // the current active videomode. -static BOOL bWinParm; -static int WINAPI VID_SetWindowedDisplayMode(viddef_t *lvid, vmode_t *pcurrentmode); - -// this holds description of the startup video mode, -// the resolution is 320x200, windowed on the desktop -#define NUMSPECIALMODES 1 -static char winmode1[] ="320x200W"; // W to make sure it's the windowed mode -static vmode_t specialmodes[NUMSPECIALMODES] = -{ - { - NULL, - winmode1, // hehe - 320, 200, //(200.0/320.0)*(320.0/240.0), - 320, 1, // rowbytes, bytes per pixel - 1, 2, // windowed (TRUE), numpages - NULL, - VID_SetWindowedDisplayMode, 0 - } -}; - -// ------ -// Protos -// ------ -static void VID_Command_NumModes_f(void); -static void VID_Command_ModeInfo_f(void); -static void VID_Command_ModeList_f(void); -static void VID_Command_Mode_f(void); -static int WINAPI VID_SetDirectDrawMode(viddef_t *lvid, vmode_t *pcurrentmode); -static vmode_t *VID_GetModePtr(int modenum); -static void VID_Init(void); -static BOOL VID_FreeAndAllocVidbuffer(viddef_t *lvid); - -// ----------------- -// I_StartupGraphics -// Initialize video mode, setup dynamic screen size variables, -// and allocate screens. -// ----------------- -void I_StartupGraphics(void) -{ - if (graphics_started) - return; - - if (dedicated) - rendermode = render_none; - else - VID_Init(); - - // register exit code for graphics - I_AddExitFunc(I_ShutdownGraphics); - if (!dedicated) graphics_started = true; -} - -// ------------------ -// I_ShutdownGraphics -// Close the screen, restore previous video mode. -// ------------------ -void I_ShutdownGraphics(void) -{ - if (!graphics_started) - return; - - CONS_Printf("I_ShutdownGraphics()\n"); - - //FreeConsole(); - - // release windowed startup stuff - if (hDCMain) - { - ReleaseDC(hWndMain, hDCMain); - hDCMain = NULL; - } - if (bmiMain) - { - GlobalFree(bmiMain); - bmiMain = NULL; - } - - // free the last video mode screen buffers - if (vid.buffer) - { - GlobalFree(vid.buffer); - vid.buffer = NULL; - } - - CloseDirectDraw(); - - graphics_started = false; -} - -// -------------- -// I_UpdateNoBlit -// -------------- -void I_UpdateNoBlit(void) -{ - // what is this? -} - -// -------------- -// I_FinishUpdate -// -------------- -void I_FinishUpdate(void) -{ - int i; - - if (rendermode == render_none) - return; - - // display a graph of ticrate - if (cv_ticrate.value) - SCR_DisplayTicRate(); - - if (cv_showping.value && netgame && consoleplayer != serverplayer) - SCR_DisplayLocalPing(); - - // - if (bDIBMode) - { - // paranoia - if (!hDCMain || !bmiMain || !vid.buffer) - return; - // main game loop, still in a window (-win parm) - SetDIBitsToDevice(hDCMain, 0, 0, 320, 200, 0, 0, 0, 200, vid.buffer, bmiMain, - DIB_RGB_COLORS); - } - else - { - // DIRECT DRAW - // copy virtual screen to real screen - // can fail when not active (alt-tab) - if (LockScreen()) - { - /// \todo use directX blit here!!? a blit might use hardware with access - /// to main memory on recent hardware, and software blit of directX may be - /// optimized for p2 or mmx?? - VID_BlitLinearScreen(screens[0], ScreenPtr, vid.width*vid.bpp, vid.height, - vid.width*vid.bpp, ScreenPitch); - - UnlockScreen(); - - // swap screens - ScreenFlip(cv_vidwait.value); - } - } -} - -// -// This is meant to be called only by CONS_Printf() while game startup -// -void I_LoadingScreen(LPCSTR msg) -{ - RECT rect; - - // paranoia - if (!hDCMain || !bmiMain || !vid.buffer) - return; - - GetClientRect(vid.WndParent, &rect); - - SetDIBitsToDevice(hDCMain, 0, 0, 320, 200, 0, 0, 0, 200, vid.buffer, bmiMain, DIB_RGB_COLORS); - - if (msg) - { - if (rect.bottom - rect.top > 32) - rect.top = rect.bottom - 32; // put msg on bottom of window - SetBkMode(hDCMain, TRANSPARENT); - SetTextColor(hDCMain, RGB(0x00, 0x00, 0x00)); - DrawTextA(hDCMain, msg, -1, &rect, DT_WORDBREAK|DT_CENTER); - } -} - -// ------------ -// I_ReadScreen -// ------------ -void I_ReadScreen(UINT8 *scr) -{ - // DEBUGGING - if (rendermode != render_soft) - I_Error("I_ReadScreen: called while in non-software mode"); - VID_BlitLinearScreen(screens[0], scr, vid.width*vid.bpp, vid.height, vid.width*vid.bpp, - vid.rowbytes); -} - -// ------------ -// I_SetPalette -// ------------ -void I_SetPalette(RGBA_t *palette) -{ - int i; - - if (bDIBMode) - { - // set palette in RGBQUAD format, NOT THE SAME ORDER as PALETTEENTRY, grmpf! - RGBQUAD *pColors; - pColors = (RGBQUAD *)((char *)bmiMain + bmiMain->bmiHeader.biSize); - ZeroMemory(pColors, sizeof (RGBQUAD)*256); - for (i = 0; i < 256; i++, pColors++, palette++) - { - pColors->rgbRed = palette->s.red; - pColors->rgbGreen = palette->s.green; - pColors->rgbBlue = palette->s.blue; - } - } - else - { - PALETTEENTRY mainpal[256]; - - // this clears the 'flag' for each color in palette - ZeroMemory(mainpal, sizeof mainpal); - - // set palette in PALETTEENTRY format - for (i = 0; i < 256; i++, palette++) - { - mainpal[i].peRed = palette->s.red; - mainpal[i].peGreen = palette->s.green; - mainpal[i].peBlue = palette->s.blue; - } - SetDDPalette(mainpal); // set DirectDraw palette - } -} - -// -// return number of video modes in pvidmodes list -// -INT32 VID_NumModes(void) -{ - return numvidmodes - NUMSPECIALMODES; //faB: dont accept the windowed mode 0 -} - -// return a video mode number from the dimensions -// returns any available video mode if the mode was not found -INT32 VID_GetModeForSize(INT32 w, INT32 h) -{ - vmode_t *pv = pvidmodes; - int modenum = 0; - - // skip the special modes so that it finds only fullscreen modes - for (; pv && modenum < NUMSPECIALMODES; pv = pv->pnext, ++modenum); - for (; pv; pv = pv->pnext, ++modenum) - if (pv->width == (unsigned)w && pv->height == (unsigned)h) - return modenum; - - // if not found, return the first mode available, - // preferably a full screen mode (all modes after the 'specialmodes') - if (numvidmodes > NUMSPECIALMODES) - return NUMSPECIALMODES; // use first full screen mode - - return 0; // no fullscreen mode, use windowed mode -} - -// -// Enumerate DirectDraw modes available -// -static int nummodes = 0; -static BOOL GetExtraModesCallback(int width, int height, int bpp) -{ - CONS_Printf("mode %d x %d x %d bpp\n", width, height, bpp); - - // skip all unwanted modes - if (highcolor && bpp != 15) - goto skip; - if (!highcolor && bpp != 8) - goto skip; - - if (bpp > 16 || width > MAXVIDWIDTH || height > MAXVIDHEIGHT) - goto skip; - - // check if we have space for this mode - if (nummodes >= MAX_EXTRA_MODES) - { - CONS_Printf("mode skipped (too many)\n"); - return FALSE; - } - - // store mode info - extra_modes[nummodes].pnext = &extra_modes[nummodes+1]; - memset(names[nummodes], 0, 10); - snprintf(names[nummodes], 9, "%dx%d", width, height); - - extra_modes[nummodes].name = names[nummodes]; - extra_modes[nummodes].width = width; - extra_modes[nummodes].height = height; - - // exactly, the current FinishUdpate() gets the rowbytes itself after locking the video buffer - // so for now we put anything here - extra_modes[nummodes].rowbytes = width; - extra_modes[nummodes].windowed = false; - extra_modes[nummodes].misc = 0; // unused - extra_modes[nummodes].pextradata = NULL; - extra_modes[nummodes].setmode = VID_SetDirectDrawMode; - - extra_modes[nummodes].numpages = 2; // double-buffer (but this value is unused) - - extra_modes[nummodes].bytesperpixel = (bpp+1)>>3; - - nummodes++; -skip: - return TRUE; -} - -// -// Collect info about DirectDraw display modes we use -// -static inline void VID_GetExtraModes(void) -{ - nummodes = 0; - EnumDirectDrawDisplayModes(GetExtraModesCallback); - - // add the extra modes (not 320x200) at the start of the mode list (if there are any) - if (nummodes) - { - extra_modes[nummodes-1].pnext = NULL; - pvidmodes = &extra_modes[0]; - numvidmodes += nummodes; - } -} - -// --------------- -// WindowMode_Init -// Add windowed modes to the start of the list, -// mode 0 is used for windowed console startup (works on all computers with no DirectX) -// --------------- -static void WindowMode_Init(void) -{ - specialmodes[NUMSPECIALMODES-1].pnext = pvidmodes; - pvidmodes = &specialmodes[0]; - numvidmodes += NUMSPECIALMODES; -} - -// ************************************************************************************* -// VID_Init -// Initialize Video modes subsystem -// ************************************************************************************* -static void VID_Init(void) -{ - vmode_t *pv; - int iMode; - - // if '-win' is specified on the command line, do not add DirectDraw modes - bWinParm = M_CheckParm("-win"); - - COM_AddCommand("vid_nummodes", VID_Command_NumModes_f); - COM_AddCommand("vid_modeinfo", VID_Command_ModeInfo_f); - COM_AddCommand("vid_modelist", VID_Command_ModeList_f); - COM_AddCommand("vid_mode", VID_Command_Mode_f); - - CV_RegisterVar(&cv_vidwait); - CV_RegisterVar(&cv_stretch); - - // setup the videmodes list, - // note that mode 0 must always be VGA mode 0x13 - pvidmodes = pcurrentmode = NULL; - numvidmodes = 0; - - // store the main window handle in viddef struct - SetWindowPos(hWndMain, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE|SWP_NOSENDCHANGING|SWP_NOSIZE|SWP_NOMOVE); - vid.WndParent = hWndMain; - vid.buffer = NULL; - - // we startup in windowed mode using DIB bitmap - // we will use DirectDraw when switching fullScreen and entering main game loop - bDIBMode = TRUE; - bAppFullScreen = FALSE; - - if (!bWinParm) - { - if (!CreateDirectDrawInstance()) - I_Error("Error initializing DirectDraw"); - // get available display modes for the device - VID_GetExtraModes(); - } - - // the game boots in 320x200 standard VGA, but - // we need a highcolor mode to run the game in highcolor - if (highcolor && !numvidmodes) - I_Error("Cannot run in highcolor - No 15bit highcolor DirectX video mode found."); - - // add windowed mode at the start of the list, very important! - WindowMode_Init(); - - if (!numvidmodes) - I_Error("No display modes available."); - - // DEBUG - for (iMode = 0, pv = pvidmodes; pv; pv = pv->pnext, iMode++) - CONS_Printf("#%02d: %dx%dx%dbpp (desc: '%s')\n", iMode, pv->width, pv->height, - pv->bytesperpixel, pv->name); - - // set the startup screen in a window - VID_SetMode(0); -} - -// -------------------------- -// VID_SetWindowedDisplayMode -// Display the startup 320x200 console screen into a window on the desktop, -// switching to fullscreen display only when we will enter the main game loop. -// - we can display error message boxes for startup errors -// - we can set the last used resolution only once, when entering the main game loop -// -------------------------- -static int WINAPI VID_SetWindowedDisplayMode(viddef_t *lvid, vmode_t *pcurrentmode) -{ - int iScrWidth, iScrHeight, iWinWidth, iWinHeight; - - pcurrentmode = NULL; -#ifdef DEBUG - CONS_Printf("VID_SetWindowedDisplayMode()\n"); -#endif - - lvid->u.numpages = 1; // not used - lvid->direct = NULL; // DOS remains - lvid->buffer = NULL; - - // allocate screens - if (!VID_FreeAndAllocVidbuffer(lvid)) - return -1; - - // lvid->buffer should be NULL here! - - bmiMain = (void *)GlobalAlloc(GPTR, sizeof (BITMAPINFO) + (sizeof (RGBQUAD)*256)); - if (!bmiMain) - I_Error("VID_SWDM(): No mem"); - - // setup a BITMAPINFO to allow copying our video buffer to the desktop, - // with color conversion as needed - bmiMain->bmiHeader.biSize = sizeof (BITMAPINFOHEADER); - bmiMain->bmiHeader.biWidth = lvid->width; - bmiMain->bmiHeader.biHeight= -(lvid->height); - bmiMain->bmiHeader.biPlanes = 1; - bmiMain->bmiHeader.biBitCount = 8; - bmiMain->bmiHeader.biCompression = BI_RGB; - - // center window on the desktop - iScrWidth = GetSystemMetrics(SM_CXFULLSCREEN); - iScrHeight = GetSystemMetrics(SM_CYFULLSCREEN); - - iWinWidth = lvid->width; - iWinWidth += GetSystemMetrics(SM_CXFIXEDFRAME) * 2; - - iWinHeight = lvid->height; - iWinHeight += GetSystemMetrics(SM_CYCAPTION); - iWinHeight += GetSystemMetrics(SM_CYFIXEDFRAME) * 2; - - if (devparm) - MoveWindow(hWndMain, (iScrWidth - iWinWidth), (iScrHeight - iWinHeight), iWinWidth, iWinHeight, TRUE); - else - MoveWindow(hWndMain, (iScrWidth - iWinWidth)>>1, (iScrHeight - iWinHeight)>>1, iWinWidth, iWinHeight, TRUE); - - SetFocus(hWndMain); - ShowWindow(hWndMain, SW_SHOW); - - hDCMain = GetDC(hWndMain); - if (!hDCMain) - I_Error("VID_SWDM(): GetDC FAILED"); - - return 1; -} - -// ======================================================================== -// Returns a vmode_t from the video modes list, given a video mode number. -// ======================================================================== -vmode_t *VID_GetModePtr(int modenum) -{ - vmode_t *pv; - - pv = pvidmodes; - if (!pv) - I_Error("VID_error: No video mode found\n"); - - while (modenum--) - { - pv = pv->pnext; - if (!pv) - I_Error("VID_error: Mode not available\n"); - } - return pv; -} - -// -// return the name of a video mode -// -const char *VID_GetModeName(INT32 modenum) -{ - return (VID_GetModePtr(modenum))->name; -} - -// ======================================================================== -// Sets a video mode -// ======================================================================== -INT32 VID_SetMode(INT32 modenum) -{ - int stat; - vmode_t *pnewmode; - vmode_t *poldmode; - - if (dedicated) - return 0; - - CONS_Printf("VID_SetMode(%d)\n", modenum); - - // if mode 0 (windowed) we must not be fullscreen already, - // if other mode, check it is not mode 0 and existing - if (modenum >= numvidmodes) - { - if (!pcurrentmode) - modenum = 0; // revert to the default base vid mode - else - I_Error("Unknown video mode: %d\n", modenum); - } - else if (bAppFullScreen && modenum < NUMSPECIALMODES) - I_Error("Tried to switch from fullscreen back to windowed mode %d\n", modenum); - - pnewmode = VID_GetModePtr(modenum); - - // dont switch to the same display mode - if (pnewmode == pcurrentmode) - return 1; - - // initialize the new mode - poldmode = pcurrentmode; - pcurrentmode = pnewmode; - - // initialize vidbuffer size for setmode - vid.width = pcurrentmode->width; - vid.height = pcurrentmode->height; - vid.rowbytes = pcurrentmode->rowbytes; - vid.bpp = pcurrentmode->bytesperpixel; - if (modenum) // if not 320x200 windowed mode, it's actually a hack - { - if (rendermode == render_opengl) - { - // don't accept depth < 16 for OpenGL mode (too much ugly) - if (cv_scr_depth.value < 16) - CV_SetValue(&cv_scr_depth, 16); - vid.bpp = cv_scr_depth.value/8; - vid.u.windowed = (bWinParm || !cv_fullscreen.value); - pcurrentmode->bytesperpixel = vid.bpp; - pcurrentmode->windowed = vid.u.windowed; - } - } - - stat = (*pcurrentmode->setmode)(&vid, pcurrentmode); - - if (stat == -1) - I_Error("Not enough mem for VID_SetMode\n"); - else if (stat == -2) - I_Error("Couldn't set video mode because it failed the test\n"); - else if (stat == -3) - I_Error("Couldn't set video mode because it failed the change?\n"); - else if (!stat) - I_Error("Couldn't set video mode %d (%dx%d %d bits)\n", modenum, vid.width, vid.height, (vid.bpp*8));// hardware could not setup mode - else - CONS_Printf(M_GetText("Mode changed to %d (%s)\n"), modenum, pcurrentmode->name); - - vid.modenum = modenum; - - // tell game engine to recalc all tables and realloc buffers based on new values - vid.recalc = 1; - - if (modenum < NUMSPECIALMODES) - { - // we are in startup windowed mode - bAppFullScreen = FALSE; - bDIBMode = TRUE; - } - else - { - // we switch to fullscreen - bAppFullScreen = TRUE; - bDIBMode = FALSE; - } - - I_RestartSysMouse(); - return 1; -} - -// ======================================================================== -// Free the video buffer of the last video mode, -// allocate a new buffer for the video mode to set. -// ======================================================================== -static BOOL VID_FreeAndAllocVidbuffer(viddef_t *lvid) -{ - const DWORD vidbuffersize = (lvid->width * lvid->height * lvid->bpp * NUMSCREENS); - - // free allocated buffer for previous video mode - if (lvid->buffer) - GlobalFree(lvid->buffer); - - // allocate & clear the new screen buffer - lvid->buffer = GlobalAlloc(GPTR, vidbuffersize); - if (!lvid->buffer) - return FALSE; - - ZeroMemory(lvid->buffer, vidbuffersize); -#ifdef DEBUG - CONS_Printf("VID_FreeAndAllocVidbuffer done, vidbuffersize: %x\n",vidbuffersize); -#endif - return TRUE; -} - -// ======================================================================== -// Set video mode routine for DirectDraw display modes -// Out: 1 ok, -// 0 hardware could not set mode, -// -1 no mem -// ======================================================================== -static int WINAPI VID_SetDirectDrawMode(viddef_t *lvid, vmode_t *pcurrentmode) -{ - pcurrentmode = NULL; -#ifdef DEBUG - CONS_Printf("VID_SetDirectDrawMode...\n"); -#endif - - // DD modes do double-buffer page flipping, but the game engine doesn't need this.. - lvid->u.numpages = 2; - - // release ddraw surfaces etc.. - ReleaseChtuff(); - - // clean up any old vid buffer lying around, alloc new if needed - if (!VID_FreeAndAllocVidbuffer(lvid)) - return -1; // no mem - - // should clear video mem here - - // note use lvid->bpp instead of 8...will this be needed? will we support other than 256color - // in software ? - if (!InitDirectDrawe(hWndMain, lvid->width, lvid->height, 8, TRUE)) // TRUE currently always full screen - return 0; // could not set mode - - // this is NOT used with DirectDraw modes, game engine should never use this directly - // but rather render to memory bitmap buffer - lvid->direct = NULL; - - if (!cv_stretch.value && (float)vid.width/vid.height != ((float)BASEVIDWIDTH/BASEVIDHEIGHT)) - vid.height = (int)(vid.width * ((float)BASEVIDHEIGHT/BASEVIDWIDTH));// Adjust the height to match - - return 1; -} - -// ======================================================================== -// VIDEO MODE CONSOLE COMMANDS -// ======================================================================== - -// vid_nummodes -// -static void VID_Command_NumModes_f(void) -{ - CONS_Printf(M_GetText("%d video mode(s) available(s)\n"), VID_NumModes()); -} - -// vid_modeinfo -// -static void VID_Command_ModeInfo_f(void) -{ - vmode_t *pv; - int modenum; - - if (COM_Argc() != 2) - modenum = vid.modenum; // describe the current mode - else - modenum = atoi(COM_Argv(1)); // the given mode number - - if (modenum >= VID_NumModes() || modenum < NUMSPECIALMODES) // don't accept the windowed mode 0 - { - CONS_Printf(M_GetText("Video mode not present\n")); - return; - } - - pv = VID_GetModePtr(modenum); - - CONS_Printf("%s\n", VID_GetModeName(modenum)); - CONS_Printf(M_GetText("width: %d\nheight: %d\n"), - pv->width, pv->height); - if (rendermode == render_soft) - CONS_Printf(M_GetText("bytes per scanline: %d\nbytes per pixel: %d\nnumpages: %d\n"), - pv->rowbytes, pv->bytesperpixel, pv->numpages); -} - -// vid_modelist -// -static void VID_Command_ModeList_f(void) -{ - int i, nummodes; - const char *pinfo; - vmode_t *pv; - - nummodes = VID_NumModes(); - for (i = NUMSPECIALMODES; i <= nummodes; i++) - { - pv = VID_GetModePtr(i); - pinfo = VID_GetModeName(i); - - if (pv->bytesperpixel == 1) - CONS_Printf("%d: %s\n", i, pinfo); - else - CONS_Printf("%d: %s (hicolor)\n", i, pinfo); - } -} - -// vid_mode -// -static void VID_Command_Mode_f(void) -{ - int modenum; - - if (COM_Argc() != 2) - { - CONS_Printf(M_GetText("vid_mode : set video mode, current video mode %i\n"), vid.modenum); - return; - } - - modenum = atoi(COM_Argv(1)); - - if (modenum >= VID_NumModes() || modenum < NUMSPECIALMODES) // don't accept the windowed mode 0 - CONS_Printf(M_GetText("Video mode not present\n")); - else - setmodeneeded = modenum + 1; // request vid mode change -} diff --git a/tools/anglechk.c b/tools/anglechk.c new file mode 100644 index 000000000..7f56abff7 --- /dev/null +++ b/tools/anglechk.c @@ -0,0 +1,364 @@ +/* + * anglechk.c + * + * Copyright 2007 Alam Arias + * + * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#ifdef _MSC_VER +#include +#endif +#include "../src/tables.h" +#define NO_M +#include "../src/m_fixed.c" +#define FIXEDPOINTCONV + +// With angle_t, +// 360 deg = 2^32 +// 45 deg = 2^29 +// 1 deg = 2^29 / 45 +// To convert an angle to a fixed-point number of degrees, then, use +// fixed = angle * FRACUNIT / ((1<<29) / 45) +// But, done literally like that, this will overflow. +// It's mathematically equivalent to +// fixed = angle * (1<>(29-FRACBITS)) +// fixed = (angle>>(29-FRACBITS)) * 45 + +#define ANGLE_TO_FIXED(a) (fixed_t)(((a)>>(29-FRACBITS))*45) +#define FIXED_TO_ANGLE(x) (angle_t)(((x)/45)<<(29-FRACBITS)) + +/* +Old code that failed if FRACBITS was not 16. +In particular, the use of FRACUNIT in the definition of ANGLE_F is completely +wrong. The value wanted actually happens to be 65536 due to the definition +of angle_t (it's specified so that 360 degrees = 2^32, to take advantage of +modular arithmetic). That 65536 has nothing whatsoever to do with the setting +of FRACUNIT. + +#define ANGF_D 8192 +#define ANGF_N 45 +#define ANGLE_F (ANGF_N*FRACUNIT/ANGF_D) +#define FIXED_TO_ANGLE(x) (angle_t)FixedDiv(x, ANGLE_F) // angle_t = FixedDiv(fixed_t, ANGLE_F) +#define ANGLE_TO_FIXED(x) FixedMul((fixed_t)(x), ANGLE_F) // fixed_t = FixedMul(angle_t, ANGLE_F) +*/ + +static fixed_t AngleFixed204(angle_t af) +{ + const fixed_t cfn = 180*FRACUNIT; + if (af == 0) + return 0; + else if (af > ANGLE_180) + return cfn + ANGLE_TO_FIXED(af - ANGLE_180); + else if (af < ANGLE_180) + return ANGLE_TO_FIXED(af); + else return cfn; +} + +static inline angle_t FixedAngleC204(fixed_t fa, fixed_t factor) +{ +#if 0 //FixedMod off? + const boolean neqda = da < 0, neqfa = fa < 0; + const fixed_t afactor = abs(factor); + angle_t ra = ANGLE_180; + + if (factor == 0) + return FixedAngle204(fa); + else if (fa == 0) + return 0; + + if (neqfactor) + { + const fixed_t maf = FixedDiv(afactor, ANGLE_F); + const fixed_t cfn = FixedMul(360*FRACUNIT, afactor), hcfn = (cfn/2); + const fixed_t fam = FixedMod(fa, cfn); + + if (fam > hcfn) + ra = ANGLE_180 + (angle_t)FixedMul(fam - hcfn, maf); + else if (fam < hcfn) + ra = (angle_t)FixedMul(fam, maf); + } + else + { + const fixed_t maf = FixedMul(afactor, ANGLE_F); + const fixed_t cfn = FixedDiv(360*FRACUNIT, afactor), hcfn = (cfn/2); + const fixed_t fam = FixedMod(fa, cfn); + + if (fam > hcfn) + ra = ANGLE_180 + (angle_t)FixedDiv(fam - hcfn, maf); + else if (fam < hcfn) + ra = (angle_t)FixedDiv(fam, maf); + } + + if (neqfa) + ra = ANGLE_MAX-ra; + + return ra; +#else + if (factor == 0) + return FixedAngle(fa); + else if (factor > 0) + return (angle_t)((FIXED_TO_FLOAT(fa)/FIXED_TO_FLOAT(factor))*(ANGLE_45/45)); + else + return (angle_t)((FIXED_TO_FLOAT(fa)*FIXED_TO_FLOAT(-factor))*(ANGLE_45/45)); +#endif +} + +angle_t FixedAngle(fixed_t fa) +{ +#if 0 //FixedMod off? + const boolean neqfa = fa < 0; + const fixed_t cfn = 180*FRACUNIT; + const fixed_t fam = FixedMod(fa, 360*FRACUNIT); + angle_t ra = ANGLE_180; + + if (fa == 0) + return 0; + + if (fam > cfn) + ra = ANGLE_180+FIXED_TO_ANGLE(fam-cfn); + else if (fam < cfn) + ra = FIXED_TO_ANGLE(fam); + + if (neqfa) + ra = ANGLE_MAX-ra; + + return ra; +#else + return (angle_t)(FIXED_TO_FLOAT(fa)*(ANGLE_45/45)); +#endif +} + +fixed_t AngleFixed205(angle_t af) +{ +#ifdef FIXEDPOINTCONV + angle_t wa = ANGLE_180; + fixed_t wf = 180*FRACUNIT; + fixed_t rf = 0*FRACUNIT; + //const angle_t adj = 0x2000; + + //if (af < adj) // too small to notice + //return rf; + + while (af) + { + while (af < wa) + { + wa /= 2; + wf /= 2; + } + rf += wf; + af -= wa; + } + + return rf; +#else + const fixed_t cfn = 180*FRACUNIT; + if (af == 0) + return 0; + else if (af > ANGLE_180) + return cfn + ANGLE_TO_FIXED(af - ANGLE_180); + else if (af < ANGLE_180) + return ANGLE_TO_FIXED(af); + else return cfn; +#endif +} + +#ifdef FIXEDPOINTCONV +static FUNCMATH angle_t AngleAdj(const fixed_t fa, const fixed_t wf, + angle_t ra) +{ + const angle_t adj = 0x77; + const boolean fan = fa < 0; + const fixed_t sl = FixedDiv(fa, wf*2); + const fixed_t lb = FixedRem(fa, wf*2); + const fixed_t lo = (wf*2)-lb; + + if (ra == 0) + { + if (lb == 0) + { + ra = FixedMul(FRACUNIT/512, sl); + if (ra > FRACUNIT/64) + return ANGLE_MAX-ra+1; + return ra; + } + else if (lb > 0) + return ANGLE_MAX-FixedMul(lo*FRACUNIT, adj)+1; + else + return ANGLE_MAX-FixedMul(lo*FRACUNIT, adj)+1; + } + + if (fan) + return ANGLE_MAX-ra+1; + else + return ra; +} +#endif + +angle_t FixedAngleC205(fixed_t fa, fixed_t factor) +{ +#ifdef FIXEDPOINTCONV + angle_t wa = ANGLE_180; + fixed_t wf = 180*FRACUNIT; + angle_t ra = 0; + const fixed_t cfa = fa; + fixed_t cwf = wf; + + if (fa == 0) + return 0; + + if (factor == 0) + return FixedAngle(fa); + else if (factor > 0) + cwf = wf = FixedMul(wf, factor); + else if (factor < 0) + cwf = wf = FixedDiv(wf, -factor); + + fa = abs(fa); + + while (fa) + { + while (fa < wf) + { + wa /= 2; + wf /= 2; + } + ra = ra + wa; + fa = fa - wf; + } + + return AngleAdj(cfa, cwf, ra); +#else + if (factor == 0) + return FixedAngle(fa); + + //fa = FixedMod(fa, 360*FRACUNIT); + + if (factor > 0) + return (angle_t)((FIXED_TO_FLOAT(fa)/FIXED_TO_FLOAT(factor))*(ANGLE_45/45)); + else + return (angle_t)((FIXED_TO_FLOAT(fa)*FIXED_TO_FLOAT(-factor))*(ANGLE_45/45)); +#endif +} + +angle_t FixedAngle205(fixed_t fa) +{ +#ifdef FIXEDPOINTCONV + angle_t wa = ANGLE_180; + fixed_t wf = 180*FRACUNIT; + angle_t ra = 0; + const fixed_t cfa = fa; + const fixed_t cwf = wf; + + if (fa == 0) + return 0; + + fa = abs(fa); + + while (fa) + { + while (fa < wf) + { + wa /= 2; + wf /= 2; + } + ra = ra + wa; + fa = fa - wf; + } + + return AngleAdj(cfa, cwf, ra); +#else + //fa = FixedMod(fa, 360*FRACUNIT); + + if (fa == 0) + return 0; + + return (angle_t)(FIXED_TO_FLOAT(fa)*(ANGLE_45/45)); +#endif +} + +int main(int argc, char** argv) +{ + fixed_t f, f204, f205; + INT64 a; + angle_t a204, a205; + fixed_t CF = 40*FRACUNIT; + int err = 0; + (void)argc; + (void)argv; + + err = 0x29; //41 + + if (1) + for (a = 0; a < ANGLE_MAX; a += 0x1) + { + f204 = AngleFixed204((angle_t)a); + f205 = AngleFixed205((angle_t)a); + if (f204 != f205 && (abs(f204-f205) > err || f204 == 0 || f205 == 0)) + { + printf("Angle: %u, %d, %d, %d\n", (angle_t)a, f204, f205, f204-f205); + //err = abs(f204-f205); + } + } + + //err = FixedDiv(FRACUNIT, 120*FRACUNIT); // 547 + err = FixedDiv(FRACUNIT, 62*FRACUNIT); //1059 + + if (1) + for (f = FRACUNIT*-720; f < FRACUNIT*720; f += 1) + { + a204 = FixedAngle(f); + a205 = FixedAngle205(f); + if (a204 != a205 && (abs(a204-a205) > err || a204 == 0 || a205 == 0)) + { + printf("Fixed: %f, %u, %u, %d\n", FIXED_TO_FLOAT(f), a204, a205, a204-a205); + err = abs(a204-a205); + } + } + + //err = FixedDiv(FRACUNIT, 316*FRACUNIT); //207 + err = FixedDiv(FRACUNIT, 125*FRACUNIT); //526 + + if (1) + for (f = FixedMul(FRACUNIT*-720, CF); f < FixedMul(FRACUNIT*720, CF); f += FRACUNIT/16) + { + a204 = FixedAngleC204(f, CF); + a205 = FixedAngleC205(f, CF); + if (a204 != a205 && (abs(a204-a205) > err || a204 == 0 || a205 == 0)) + { + printf("FixedC: %f, %u, %u, %d\n", FIXED_TO_FLOAT(f), a204, a205, a204-a205); + //err = abs(a204-a205); + } + } + + return 0; +} + +static void *cpu_cpy(void *dest, const void *src, size_t n) +{ + return memcpy(dest, src, n); +} + +void *(*M_Memcpy)(void* dest, const void* src, size_t n) = cpu_cpy; + +void I_Error(const char *error, ...) +{ + (void)error; + exit(-1); +}