diff --git a/.gitignore b/.gitignore deleted file mode 100644 index e6add1bf..00000000 --- a/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -build - -# Game data dirs -data -c3data -c2data -c1data -cadata - -# Misc debris -.*.sw? -*~ - -# Convenient symlinks -openc2e diff --git a/AUTHORS b/AUTHORS deleted file mode 100644 index 9965ccc6..00000000 --- a/AUTHORS +++ /dev/null @@ -1,20 +0,0 @@ -Alyssa Milburn (fuzzie) -- lead developer - -Bryan Donlan (bdonlan) -- virtual machine and core developer - -Eric Goodwin (muffin) -- Windows builds, documentation and bugfixes - -Jeremy Apthorp (nornagon) -- core developer - -Bertram Bourdrez (bbz) - -Dylan William Hardison (dylan) - -Sven Eckelmann - -Michael Maltese - diff --git a/BUILDING b/BUILDING deleted file mode 100644 index 04503233..00000000 --- a/BUILDING +++ /dev/null @@ -1,10 +0,0 @@ -* building is done using cmake - * 'mkdir build', 'cd build', 'cmake ..' to construct a Makefile - * then run 'make' in the build directory to compile - * you can run 'ccmake ..' in the build directory to change compile options - -* if you add a CAOS function, you need to: - * add prototype to caosVM.h - * add implementation in a caosVM_category.cpp file - * make sure you add documentation before the implementation in the same format as everything else - * make sure it works, and add a %status done diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index 350f807e..00000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,366 +0,0 @@ -PROJECT (OPENC2E CXX C) - -SET(SRC "${OPENC2E_SOURCE_DIR}") -SET(BIN "${OPENC2E_BINARY_DIR}") -SET(GEN "${BIN}/generated") -EXECUTE_PROCESS(COMMAND mkdir -p "${GEN}") - -SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS 1) -SET(CMAKE_MODULE_PATH "${SRC}/cmake") - -SET(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "The type of build to perform. Valid values are: RelWithDebInfo (default), Debug, Release, MinSizeRel") -IF (CMAKE_BUILD_TYPE STREQUAL "") - SET(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "The type of build to perform. Valid values are: RelWithDebInfo (default), Debug, Release, MinSizeRel" FORCE) -ENDIF (CMAKE_BUILD_TYPE STREQUAL "") - -SET(OPENC2E_USE_QT "TRUE" CACHE BOOL "Build the qt GUI") -SET(OPENC2E_USE_OPENAL "AUTO" CACHE STRING "Use OpenAL (YES/NO/AUTO)") -IF (OPENC2E_USE_OPENAL MATCHES "^(YES|NO|AUTO)$") -ELSE (OPENC2E_USE_OPENAL MATCHES "^(YES|NO|AUTO)$") - MESSAGE(SEND_ERROR "The value of OPENC2E_USE_OPENAL must be YES, NO, or AUTO.") -ENDIF (OPENC2E_USE_OPENAL MATCHES "^(YES|NO|AUTO)$") - -SET(OPENC2E_USE_SERIALIZATION "FALSE" CACHE BOOL "Build the experimental serialization code") -MARK_AS_ADVANCED(FORCE OPENC2E_USE_SERIALIZATION) -IF (OPENC2E_USE_SERIALIZATION) - SET(SER_SRCS src/caos/caosVM_ser_real.cpp) -ELSE (OPENC2E_USE_SERIALIZATION) - SET(SER_SRCS src/caos/caosVM_ser_stub.cpp) -ENDIF (OPENC2E_USE_SERIALIZATION) - -SET(OPENC2E_PROFILE_ALLOCATION "FALSE" CACHE BOOL "Collect allocation profile stats for DBG: SIZO") -MARK_AS_ADVANCED(FORCE OPENC2E_PROFILE_ALLOCATION) -IF (OPENC2E_PROFILE_ALLOCATION) - ADD_DEFINITIONS("-DPROFILE_ALLOCATION_COUNT -DPROFILE_ALLOCATION_THREAD_SAFE") -ENDIF (OPENC2E_PROFILE_ALLOCATION) - -SET(OPENC2E_CORE - src/Agent.cpp - src/AgentHelpers.cpp - src/AgentRef.cpp - src/alloc_count.cpp - src/creatures/attFile.cpp - src/Backend.cpp - src/creatures/Biochemistry.cpp - src/Blackboard.cpp - src/images/blkImage.cpp - src/images/bmpImage.cpp - src/Bubble.cpp - src/bytecode.cpp - src/images/c16Image.cpp - src/creatures/c2eBrain.cpp - src/CallButton.cpp - src/Camera.cpp - src/caosScript.cpp - src/caosVar.cpp - src/caos/caosVM_agent.cpp - src/caos/caosVM_camera.cpp - src/caos/caosVM_compound.cpp - src/caos/caosVM_core.cpp - src/caos/caosVM_creatures.cpp - src/caos/caosVM_debug.cpp - src/caos/caosVM_files.cpp - src/caos/caosVM_flow.cpp - src/caos/caosVM_genetics.cpp - src/caos/caosVM_history.cpp - src/caos/caosVM_input.cpp - src/caos/caosVM_map.cpp - src/caos/caosVM_motion.cpp - src/caos/caosVM_net.cpp - src/caosVM.cpp - src/caos/caosVM_ports.cpp - src/caos/caosVM_resources.cpp - src/caos/caosVM_scripts.cpp - src/caos/caosVM_sounds.cpp - src/caos/caosVM_time.cpp - src/caos/caosVM_variables.cpp - src/caos/caosVM_vectors.cpp - src/caos/caosVM_vehicles.cpp - src/caos/caosVM_world.cpp - ${GEN}/cataloglexer.cpp - src/Catalogue.cpp - ${GEN}/catalogue.tab.cpp - ${GEN}/cmddata.cpp - src/cobFile.cpp - src/CompoundAgent.cpp - src/creatures/CompoundCreature.cpp - src/CompoundPart.cpp - src/creatures/Creature.cpp - src/creatures/CreatureAgent.cpp - src/creatures/CreatureAI.cpp - src/creaturesImage.cpp - src/dialect.cpp - src/Engine.cpp - src/exceptions.cpp - src/fileSwapper.cpp - src/creatures/genomeFile.cpp - src/historyManager.cpp - src/imageManager.cpp - ${GEN}/mnglexer.cpp - ${GEN}/caoslexer.cpp - src/Lift.cpp - src/Map.cpp - src/MetaRoom.cpp - src/mmapifstream.cpp - src/music/mngfile.cpp - ${GEN}/mngparser.tab.cpp - src/MusicManager.cpp - src/creatures/oldBrain.cpp - src/PathResolver.cpp - src/peFile.cpp - src/physics.cpp - src/PointerAgent.cpp - src/Port.cpp - src/pray.cpp - src/prayManager.cpp - src/renderable.cpp - src/Room.cpp - src/Scriptorium.cpp - src/SFCFile.cpp - src/SimpleAgent.cpp - src/creatures/SkeletalCreature.cpp - src/images/sprImage.cpp - src/streamutils.cpp - src/Vehicle.cpp - src/VoiceData.cpp - src/World.cpp - src/main.cpp - src/util.cpp -) - -SET(OPENC2E_SDL - src/backends/SDLBackend.cpp -) - -SET(OPENC2E_QT - src/backends/qtgui/qtopenc2e.cpp - src/backends/qtgui/openc2eview.cpp - src/backends/qtgui/AgentInjector.cpp - src/backends/qtgui/BrainViewer.cpp - src/backends/qtgui/imagepreview.cpp - src/backends/qtgui/c1cobfile.cpp - src/backends/qtgui/QtBackend.cpp - src/backends/qtgui/GraphWidget.cpp - src/backends/qtgui/CreatureGrapher.cpp - src/backends/qtgui/ChemicalSelector.cpp - src/backends/qtgui/Hatchery.cpp - src/tools/braininavat/brainview.cpp) - -SET(OPENC2E_QT_MOC_HDRS - src/backends/qtgui/qtopenc2e.h - src/backends/qtgui/openc2eview.h - src/backends/qtgui/AgentInjector.h - src/backends/qtgui/BrainViewer.h - src/backends/qtgui/imagepreview.h - src/backends/qtgui/GraphWidget.h - src/backends/qtgui/CreatureGrapher.h - src/backends/qtgui/ChemicalSelector.h - src/backends/qtgui/Hatchery.h - src/tools/braininavat/brainview.h) - -SET(OPENC2E_QT_UIS - src/backends/qtgui/agents.ui) -# - - -cmake_minimum_required(VERSION 2.4.0) -INCLUDE(TestBigEndian) -INCLUDE(CheckIncludeFile) -TEST_BIG_ENDIAN(BIG_ENDIAN) -IF(BIG_ENDIAN) - ADD_DEFINITIONS("-DOC2E_BIG_ENDIAN=1") - CHECK_INCLUDE_FILE(byteswap.h HAVE_BYTESWAP_H) - IF(HAVE_BYTESWAP_H) - ADD_DEFINITIONS("-DHAVE_BYTESWAP_H=1") - ELSE(HAVE_BYTESWAP_H) - ADD_DEFINITIONS("-DHAVE_BYTESWAP_H=0") - ENDIF(HAVE_BYTESWAP_H) -ELSE(BIG_ENDIAN) - ADD_DEFINITIONS("-DOC2E_BIG_ENDIAN=0") -ENDIF(BIG_ENDIAN) -CHECK_INCLUDE_FILE(stdint.h HAVE_STDINT_H) -IF(HAVE_STDINT_H) - ADD_DEFINITIONS("-DHAVE_STDINT_H=1") -ELSE(HAVE_STDINT_H) -ENDIF(HAVE_STDINT_H) - -FIND_PACKAGE(SDL REQUIRED) -FIND_PACKAGE(SDL_mixer) -FIND_PACKAGE(SDL_net REQUIRED) -FIND_PACKAGE(SDL_gfx REQUIRED) -FIND_PACKAGE(SDL_ttf REQUIRED) -IF(OPENC2E_USE_OPENAL MATCHES "^(YES|AUTO)$") - FIND_PACKAGE(OpenAL) -ELSE(OPENC2E_USE_OPENAL MATCHES "^(YES|AUTO)$") - SET(OPENAL_FOUND "NO") -ENDIF(OPENC2E_USE_OPENAL MATCHES "^(YES|AUTO)$") -FIND_PACKAGE(ALUT) - -FIND_PACKAGE(Boost 1.34.0 COMPONENTS program_options filesystem thread regex serialization REQUIRED) -FIND_LIBRARY(BOOST_SYSTEM_LIBRARY NAMES boost_system-mt) -IF(OPENC2E_USE_QT) - find_package(Qt4 REQUIRED) -ENDIF(OPENC2E_USE_QT) - -SET(USE_OPENAL "NO") - -IF(OPENAL_FOUND STREQUAL "YES") - IF(ALUT_FOUND STREQUAL "YES") - SET(USE_OPENAL "YES") - ENDIF(ALUT_FOUND STREQUAL "YES") -ENDIF(OPENAL_FOUND STREQUAL "YES") - -IF(USE_OPENAL STREQUAL "NO") - IF (OPENC2E_USE_OPENAL MATCHES "^YES") - MESSAGE(FATAL_ERROR "OpenAL not found.") - ENDIF (OPENC2E_USE_OPENAL MATCHES "^YES") - - SET(ALUT_INCLUDE_DIR "") - SET(OPENAL_INCLUDE_DIR "") - SET(ALUT_LIBRARY "") - SET(OPENAL_LIBRARY "") - SET(OPENAL_SRC "") - SET(OPENAL_DEF "") -ELSE(USE_OPENAL STREQUAL "NO") - SET(OPENAL_SRC "src/backends/OpenALBackend.cpp") - SET(OPENAL_DEF "-DOPENAL_SUPPORT") -ENDIF(USE_OPENAL STREQUAL "NO") - -IF(SDLMIXER_FOUND) - SET(SDLMIXER_SRC "src/backends/SDLMixerBackend.cpp") - SET(SDLMIXER_DEF "-DSDLMIXER_SUPPORT") -ELSE(SDLMIXER_FOUND) - SET(SDLMIXER_INCLUDE_DIR "") - SET(SDLMIXER_LIBRARY "") - SET(SDLMIXER_SRC "") - SET(SDLMIXER_DEF "") -ENDIF(SDLMIXER_FOUND) - -IF(OPENC2E_USE_QT) - include(${QT_USE_FILE}) - SET(SAVED_CMAKE_CURRENT_BINARY_DIR CMAKE_CURRENT_BINARY_DIR) - SET(CMAKE_CURRENT_BINARY_DIR ${GEN}) - QT4_WRAP_UI(OPENC2E_QT_UIS_H ${OPENC2E_QT_UIS}) - QT4_WRAP_CPP(OPENC2E_QT_MOC_SRCS ${OPENC2E_QT_MOC_HDRS}) - SET(CMAKE_CURRENT_BINARY_DIR SAVED_CMAKE_CURRENT_BINARY_DIR) - SET(QT_DEF "-DQT_SUPPORT") -ENDIF(OPENC2E_USE_QT) - -# Pass flags to the compiler -ADD_DEFINITIONS("-W -Wall -Wno-conversion -Wno-unused -D_REENTRANT -DYYERROR_VERBOSE ${OPENAL_DEF} ${QT_DEF} ${SDLMIXER_DEF}") - -IF(OPENC2E_USE_QT) - SET(FRONTEND_SRCS ${OPENC2E_SDL} ${OPENC2E_QT} ${OPENC2E_QT_UIS_H} ${OPENC2E_QT_MOC_SRCS}) - SET(FRONTEND_LIBS ${QT_LIBRARIES}) -ELSE(OPENC2E_USE_QT) - SET(FRONTEND_SRCS ${OPENC2E_SDL}) - SET(FRONTEND_LIBS) -ENDIF(OPENC2E_USE_QT) -ADD_EXECUTABLE(openc2e ${OPENC2E_CORE} ${FRONTEND_SRCS} ${OPENAL_SRC} ${SDLMIXER_SRC} ${SER_SRCS}) - -TARGET_LINK_LIBRARIES(openc2e z m pthread - ${SDL_LIBRARY} - ${SDLNET_LIBRARY} - ${SDLTTF_LIBRARY} - ${SDLGFX_LIBRARY} - ${SDLMIXER_LIBRARY} - ${OPENAL_LIBRARY} - ${ALUT_LIBRARY} - ${FRONTEND_LIBS} - boost_program_options-mt - boost_serialization-mt - boost_filesystem-mt - boost_thread-mt - boost_regex-mt - ) -IF(BOOST_SYSTEM_LIBRARY) -TARGET_LINK_LIBRARIES(openc2e boost_system-mt) -ENDIF(BOOST_SYSTEM_LIBRARY) - -LINK_DIRECTORIES(${Boost_LIBRARY_DIRS}) - -INCLUDE_DIRECTORIES(BEFORE - ${GEN} - ${SRC}/src - ${SDL_INCLUDE_DIR} - ${SDLNET_INCLUDE_DIR} - ${SDLTTF_INCLUDE_DIR} - ${SDLGFX_INCLUDE_DIR} - ${SDLMIXER_INCLUDE_DIR} - ${OPENAL_INCLUDE_DIR} - ${ALUT_INCLUDE_DIR} - ${Boost_INCLUDE_DIR} - ) - -FILE(GLOB CAOSVM_FILES ${SRC}/src/caos/caosVM_*.cpp) -ADD_CUSTOM_COMMAND( - OUTPUT ${GEN}/commandinfo.yml - COMMAND perl parsedocs.pl ${CAOSVM_FILES} > ${GEN}/commandinfo.yml - DEPENDS parsedocs.pl ${CAOSVM_FILES} - WORKING_DIRECTORY ${SRC}) - -ADD_CUSTOM_COMMAND( - OUTPUT ${BIN}/caosdocs.html - COMMAND perl docs/writehtml.pl ${GEN}/commandinfo.yml > ${BIN}/caosdocs.html - DEPENDS docs/writehtml.pl ${GEN}/commandinfo.yml - WORKING_DIRECTORY ${SRC}) -ADD_CUSTOM_COMMAND( - OUTPUT ${BIN}/docs.css - COMMAND cp docs/docs.css ${BIN}/docs.css - DEPENDS docs/docs.css - WORKING_DIRECTORY ${SRC}) -ADD_CUSTOM_COMMAND( - OUTPUT ${BIN}/openc2e.6 - COMMAND pod2man --center="Openc2e Documentation" --section=6 ${SRC}/docs/openc2e.pod ${BIN}/openc2e.6 - DEPENDS docs/openc2e.pod - ) -# it seems these ADD_CUSTOM_COMMANDS for flex and bison could be made -# into a macro... e.g. FLEX(file1) FLEX(file2) etc... -ADD_CUSTOM_COMMAND( - OUTPUT ${GEN}/cataloglexer.cpp - COMMAND re2c -o ${GEN}/cataloglexer.cpp ${SRC}/src/cataloglexer.re2c - DEPENDS ${SRC}/src/cataloglexer.re2c - WORKING_DIRECTORY ${SRC}) - -ADD_CUSTOM_COMMAND( - OUTPUT ${GEN}/catalogue.tab.cpp ${GEN}/catalogue.tab.hpp - COMMAND bison -d --name-prefix=cata --file-prefix="${GEN}/catalogue" src/catalogue.ypp - DEPENDS src/catalogue.ypp - WORKING_DIRECTORY ${SRC}) - -ADD_CUSTOM_COMMAND( - OUTPUT ${GEN}/cmddata.cpp - COMMAND perl writecmds.pl ${GEN}/commandinfo.yml > ${GEN}/cmddata.cpp - DEPENDS ${GEN}/commandinfo.yml writecmds.pl - WORKING_DIRECTORY ${SRC}) - -ADD_CUSTOM_COMMAND( - OUTPUT ${GEN}/caoslexer.cpp - COMMAND re2c -o ${GEN}/caoslexer.cpp ${SRC}/src/caoslexer.re2c - DEPENDS ${SRC}/src/caoslexer.re2c - WORKING_DIRECTORY ${SRC}) - -ADD_CUSTOM_COMMAND( - OUTPUT ${GEN}/mnglexer.cpp - COMMAND re2c -o ${GEN}/mnglexer.cpp ${SRC}/src/music/mnglexer.re2c - DEPENDS ${SRC}/src/music/mnglexer.re2c - WORKING_DIRECTORY ${SRC}) - -ADD_CUSTOM_COMMAND( - OUTPUT ${GEN}/mngparser.tab.cpp ${GEN}/mngparser.tab.hpp - COMMAND bison -d --name-prefix=mng --file-prefix="${GEN}/mngparser" src/music/mngparser.ypp - DEPENDS src/music/mngparser.ypp - WORKING_DIRECTORY ${SRC}) - -ADD_CUSTOM_TARGET(test DEPENDS openc2e - COMMAND perl ${SRC}/runtests.pl ${SRC}/tests) -ADD_CUSTOM_TARGET(docs ALL DEPENDS ${BIN}/caosdocs.html ${BIN}/docs.css ${BIN}/openc2e.6) -ADD_CUSTOM_TARGET(generated DEPENDS - ${GEN}/catalogue.tab.cpp ${GEN}/catalogue.tab.hpp - ${GEN}/caoslexer.cpp - ${GEN}/mngparser.tab.cpp ${GEN}/mngparser.tab.hpp - ${GEN}/mnglexer.cpp - ${GEN}/cataloglexer.cpp - ${GEN}/cmddata.cpp -) - diff --git a/COPYING b/COPYING deleted file mode 100644 index 8add30ad..00000000 --- a/COPYING +++ /dev/null @@ -1,504 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -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 and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, 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 library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete 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 distribute a copy of this License along with the -Library. - - 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 Library or any portion -of it, thus forming a work based on the Library, 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) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -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 Library, 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 Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you 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. - - If distribution of 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 satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be 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. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library 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. - - 9. 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 Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -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 with -this License. - - 11. 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 Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library 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 Library. - -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. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library 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. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser 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 Library -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 Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -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 - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "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 -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. 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 LIBRARY 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 -LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. 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) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - diff --git a/README.md b/README.md new file mode 100644 index 00000000..0d4765fc --- /dev/null +++ b/README.md @@ -0,0 +1,13 @@ +# New development at [openc2e/openc2e](https://github.com/openc2e) + +After chatting with fuzzie, bdonlan, nornagon, and diagonalfish, it seems there's no longer any way to access this repository. + +I've created a new GitHub Organization and repository at [openc2e/openc2e](https://github.com/openc2e) for new development. + +At the time of writing, changes include: +- Making it build on modern systems, with SDL2, Qt5, Python instead of Perl, and no more Boost +- Simple builds on Windows (just open in Visual Studio!) +- New dev tools (praybuilder, etc) built on file format code +- Other updates + +If you're interested in contributing or running openc2e, please join me there! diff --git a/VeraSe.ttf b/VeraSe.ttf deleted file mode 100755 index 4b4ecc66..00000000 Binary files a/VeraSe.ttf and /dev/null differ diff --git a/cmake/FindALUT.cmake b/cmake/FindALUT.cmake deleted file mode 100644 index 67e2de73..00000000 --- a/cmake/FindALUT.cmake +++ /dev/null @@ -1,79 +0,0 @@ -# - Locate ALUT -# This module defines -# ALUT_LIBRARY -# ALUT_FOUND, if false, do not try to link to OpenAL -# ALUT_INCLUDE_DIR, where to find the headers -# -# $OPENALDIR is an environment variable that would -# correspond to the ./configure --prefix=$OPENALDIR -# used in building OpenAL. -# -# Created by Bryan Donlan, based on the FindOpenAL.cmake module by Eric Wang. - -FIND_PATH(ALUT_INCLUDE_DIR alut.h - $ENV{OPENALDIR}/include - ~/Library/Frameworks/OpenAL.framework/Headers - /Library/Frameworks/OpenAL.framework/Headers - /System/Library/Frameworks/OpenAL.framework/Headers # Tiger - /usr/local/include/AL - /usr/local/include/OpenAL - /usr/local/include - /usr/include/AL - /usr/include/OpenAL - /usr/include - /sw/include/AL # Fink - /sw/include/OpenAL - /sw/include - /opt/local/include/AL # DarwinPorts - /opt/local/include/OpenAL - /opt/local/include - /opt/csw/include/AL # Blastwave - /opt/csw/include/OpenAL - /opt/csw/include - /opt/include/AL - /opt/include/OpenAL - /opt/include - ) -# I'm not sure if I should do a special casing for Apple. It is -# unlikely that other Unix systems will find the framework path. -# But if they do ([Next|Open|GNU]Step?), -# do they want the -framework option also? -IF(${ALUT_INCLUDE_DIR} MATCHES ".framework") - STRING(REGEX REPLACE "(.*)/.*\\.framework/.*" "\\1" ALUT_FRAMEWORK_PATH_TMP ${ALUT_INCLUDE_DIR}) - IF("${ALUT_FRAMEWORK_PATH_TMP}" STREQUAL "/Library/Frameworks" - OR "${ALUT_FRAMEWORK_PATH_TMP}" STREQUAL "/System/Library/Frameworks" - ) - # String is in default search path, don't need to use -F - SET (ALUT_LIBRARY "-framework OpenAL" CACHE STRING "OpenAL framework for OSX") - ELSE("${ALUT_FRAMEWORK_PATH_TMP}" STREQUAL "/Library/Frameworks" - OR "${ALUT_FRAMEWORK_PATH_TMP}" STREQUAL "/System/Library/Frameworks" - ) - # String is not /Library/Frameworks, need to use -F - SET(ALUT_LIBRARY "-F${ALUT_FRAMEWORK_PATH_TMP} -framework OpenAL" CACHE STRING "OpenAL framework for OSX") - ENDIF("${ALUT_FRAMEWORK_PATH_TMP}" STREQUAL "/Library/Frameworks" - OR "${ALUT_FRAMEWORK_PATH_TMP}" STREQUAL "/System/Library/Frameworks" - ) - # Clear the temp variable so nobody can see it - SET(ALUT_FRAMEWORK_PATH_TMP "" CACHE INTERNAL "") - -ELSE(${ALUT_INCLUDE_DIR} MATCHES ".framework") - FIND_LIBRARY(ALUT_LIBRARY - NAMES alut - PATHS - $ENV{OPENALDIR}/lib - $ENV{OPENALDIR}/libs - /usr/local/lib - /usr/lib - /sw/lib - /opt/local/lib - /opt/csw/lib - /opt/lib - ) -ENDIF(${ALUT_INCLUDE_DIR} MATCHES ".framework") - -SET(ALUT_FOUND "NO") -IF(ALUT_LIBRARY) - SET(ALUT_FOUND "YES") -ENDIF(ALUT_LIBRARY) - - diff --git a/cmake/FindSDL_gfx.cmake b/cmake/FindSDL_gfx.cmake deleted file mode 100644 index 79da860d..00000000 --- a/cmake/FindSDL_gfx.cmake +++ /dev/null @@ -1,96 +0,0 @@ -# *************************************************************************** -# * Copyright (C) 2007 The OpenAnno team * -# * team@openanno.org * -# * * -# * This program is free software; you can redistribute it and/or modify * -# * it under the terms of the GNU General Public License as published by * -# * the Free Software Foundation; either version 2 of the License, or * -# * (at your option) any later version. * -# * * -# * This program is distributed in the hope that it will be useful, * -# * but WITHOUT ANY WARRANTY; without even the implied warranty of * -# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -# * GNU General Public License for more details. * -# * * -# * You should have received a copy of the GNU General Public License * -# * along with this program; if not, write to the * -# * Free Software Foundation, Inc., * -# * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * -# *************************************************************************** - -# - Locate SDL_gfx library -# This module defines -# SDLGFX_LIBRARY, the library to link against -# SDLGFX_FOUND, if false, do not try to link to SDL_gfx -# SDLGFX_INCLUDE_DIR, where to find e.g. SDL/SDL_rotozoom.h -# -# $SDLDIR is an environment variable that would -# correspond to the ./configure --prefix=$SDLDIR -# used in building SDL. -# Created by Philipp Kerling. This was influenced by the FindSDL_ttf.cmake -# module. -FIND_PATH(SDLGFX_INCLUDE_DIR SDL_rotozoom.h - $ENV{SDLGFXDIR}/include - $ENV{SDLDIR}/include - ~/Library/Frameworks/SDL_gfx.framework/Headers - /Library/Frameworks/SDL_gfx.framework/Headers - /usr/local/include/SDL - /usr/include/SDL - /usr/local/include/SDL12 - /usr/local/include/SDL11 # FreeBSD ports - /usr/include/SDL12 - /usr/include/SDL11 - /usr/local/include - /usr/include - /sw/include/SDL # Fink - /sw/include - /opt/local/include/SDL # DarwinPorts - /opt/local/include - /opt/csw/include/SDL # Blastwave - /opt/csw/include - /opt/include/SDL - /opt/include - ) -# I'm not sure if I should do a special casing for Apple. It is -# unlikely that other Unix systems will find the framework path. -# But if they do ([Next|Open|GNU]Step?), -# do they want the -framework option also? -IF(${SDLGFX_INCLUDE_DIR} MATCHES ".framework") - # Extract the path the framework resides in so we can use it for the -F flag - STRING(REGEX REPLACE "(.*)/.*\\.framework/.*" "\\1" SDLGFX_FRAMEWORK_PATH_TEMP ${SDLGFX_INCLUDE_DIR}) - IF("${SDLGFX_FRAMEWORK_PATH_TEMP}" STREQUAL "/Library/Frameworks" - OR "${SDLGFX_FRAMEWORK_PATH_TEMP}" STREQUAL "/System/Library/Frameworks" - ) - # String is in default search path, don't need to use -F - SET(SDLGFX_LIBRARY "-framework SDL_gfx" CACHE STRING "SDL_gfx framework for OSX") - ELSE("${SDLGFX_FRAMEWORK_PATH_TEMP}" STREQUAL "/Library/Frameworks" - OR "${SDLGFX_FRAMEWORK_PATH_TEMP}" STREQUAL "/System/Library/Frameworks" - ) - # String is not /Library/Frameworks, need to use -F - SET(SDLGFX_LIBRARY "-F${SDLGFX_FRAMEWORK_PATH_TEMP} -framework SDL_gfx" CACHE STRING "SDL_gfx framework for OSX") - ENDIF("${SDLGFX_FRAMEWORK_PATH_TEMP}" STREQUAL "/Library/Frameworks" - OR "${SDLGFX_FRAMEWORK_PATH_TEMP}" STREQUAL "/System/Library/Frameworks" - ) - # Clear the temp variable so nobody can see it - SET(SDLGFX_FRAMEWORK_PATH_TEMP "" CACHE INTERNAL "") - -ELSE(${SDLGFX_INCLUDE_DIR} MATCHES ".framework") - FIND_LIBRARY(SDLGFX_LIBRARY - NAMES SDL_gfx - PATHS - $ENV{SDLGFXDIR}/lib - $ENV{SDLDIR}/lib - /usr/local/lib - /usr/lib - /sw/lib - /opt/local/lib - /opt/csw/lib - /opt/lib - ) -ENDIF(${SDLGFX_INCLUDE_DIR} MATCHES ".framework") - -SET(SDLGFX_FOUND "NO") -IF(SDLGFX_LIBRARY) - SET(SDLGFX_FOUND "YES") -ENDIF(SDLGFX_LIBRARY) - diff --git a/debian/changelog b/debian/changelog deleted file mode 100644 index e6d10d86..00000000 --- a/debian/changelog +++ /dev/null @@ -1,5 +0,0 @@ -openc2e (0.0) unstable; urgency=low - - * Initial debianization. Not yet released. - - -- Bryan Donlan Mon, 8 May 2006 10:59:29 -0400 diff --git a/debian/compat b/debian/compat deleted file mode 100644 index 7ed6ff82..00000000 --- a/debian/compat +++ /dev/null @@ -1 +0,0 @@ -5 diff --git a/debian/control b/debian/control deleted file mode 100644 index 04a2ad5a..00000000 --- a/debian/control +++ /dev/null @@ -1,18 +0,0 @@ -Source: openc2e -Section: games -Priority: optional -Maintainer: Bryan Donlan -Build-Depends: debhelper (>= 5.0.0), perl, libyaml-perl, libsdl1.2debian, libsdl1.2-dev, libboost-filesystem-dev, libsdl-net1.2-dev, bison, zlib1g-dev, libboost-iostreams-dev, libboost-thread-dev, libboost-serialization-dev, libboost-program-options-dev, libsdl-gfx1.2-dev, libqt4-dev, libboost-regex-dev, cmake, libopenal-dev, libalut-dev, re2c, libsdl-ttf2.0-dev, libxext-dev -Standards-Version: 3.8.0.0 -Homepage: http://www.openc2e.org/ -Vcs-Git: git://github.com/ccdevnet/openc2e.git -Vcs-Browser: http://github.com/ccdevnet/openc2e/ - -Package: openc2e -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} -Recommends: ttf-bitstream-vera -Description: Creatures-style game engine - openc2e is a cross-platform open-source game engine designed to be compatible - with the various game engines of the Creatures artificial-life game series. - diff --git a/debian/copyright b/debian/copyright deleted file mode 100644 index 100d122d..00000000 --- a/debian/copyright +++ /dev/null @@ -1,15 +0,0 @@ -Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat -Upstream-Name: openc2e -Upstream-Source: http://openc2e.org/download -Upstream-Maintainer: Alyssa Milburn - -Files: * -Copyright: Copyright 2004-2008 Alyssa Milburn - Copyright 2005-2008 Bryan Donlan - Copyright 2005-2008 Eric Goodwin - Copyright 2005-2008 Jeremy Apthorp - Copyright 2004 Bertram Bourdrez - Copyright 2006-2007 Dylan William Hardison -License: GPL-2+ - On Debian systems the full text of the GNU General Public License can be found - in the `/usr/share/common-licenses/GPL-2' file. diff --git a/debian/dirs b/debian/dirs deleted file mode 100644 index 33359b87..00000000 --- a/debian/dirs +++ /dev/null @@ -1 +0,0 @@ -usr/games diff --git a/debian/docs b/debian/docs deleted file mode 100644 index c261898c..00000000 --- a/debian/docs +++ /dev/null @@ -1,2 +0,0 @@ -docs.html -docs.css diff --git a/debian/dput.cf b/debian/dput.cf deleted file mode 100644 index 7c06be42..00000000 --- a/debian/dput.cf +++ /dev/null @@ -1,6 +0,0 @@ -[ccdevnet-ppa] -fqdn = ppa.launchpad.net -method = ftp -incoming = ~ccdevnet/ppa/ubuntu/SUITE -login = anonymous -allow_unsigned_uploads = 0 diff --git a/debian/openc2e.doc-base b/debian/openc2e.doc-base deleted file mode 100644 index db21926d..00000000 --- a/debian/openc2e.doc-base +++ /dev/null @@ -1,8 +0,0 @@ -Document: openc2e-caos-docs -Title: openc2e CAOS documentation -Abstract: Documentation of the CAOS commands supported by openc2e. -Section: Apps/Programming - -Format: HTML -Files: /usr/share/doc/openc2e/caosdocs.html -Index: /usr/share/doc/openc2e/caosdocs.html diff --git a/debian/openc2e.docs b/debian/openc2e.docs deleted file mode 100644 index f6a7e0a1..00000000 --- a/debian/openc2e.docs +++ /dev/null @@ -1,2 +0,0 @@ -build/docs.css -build/caosdocs.html diff --git a/debian/openc2e.install b/debian/openc2e.install deleted file mode 100644 index e9198ae6..00000000 --- a/debian/openc2e.install +++ /dev/null @@ -1 +0,0 @@ -usr/games/openc2e diff --git a/debian/ppabuild b/debian/ppabuild deleted file mode 100755 index 0f12e1d9..00000000 --- a/debian/ppabuild +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/zsh -# vim: set ft=zsh : - -set -e -set -u - -default_git_base="git://github.com/ccdevnet/openc2e.git" -default_ppasuffix=ppa0 -set -A suites jaunty karmic lucid - -### You shouldn't need to modify anything below here - -git_root="$(D="$(git rev-parse --git-dir)"; test -n "$D" && cd "$D" && echo "$PWD")" - -git_base="${git_base:-$default_git_base}" -ppasuffix="${default_ppasuffix:-ppa0}" - -echo "=== Preparing git checkout ===" -tempdir=`mktemp -d` -echo "Using $tempdir for temporary work." -pushd $tempdir - -if test -z "$tempdir"; then - echo "Starting directory doesn't look like an openc2e checkout." - echo "Will check out from scratch." - mkdir openc2e - pushd openc2e - git init - popd -else - echo "Cloning original repository." - git clone -s $git_root openc2e -fi - -echo "=== Updating git checkout ===" -pushd openc2e -git remote add src $git_base -git fetch src -git checkout -q refs/remotes/src/master - -describe_ver="$(git describe --tags)-$ppasuffix" -raw_ver="$(git log -1 --pretty=format:\%H)" -echo "=== Checked out version $describe_ver ===" - -echo "=== Building orig.tar.gz ===" -git archive --format=tar --prefix="openc2e-$describe_ver/" HEAD | gzip -9c > "$tempdir/openc2e_$describe_ver.orig.tar.gz" -popd - -echo "=== Building package ===" -checkout=openc2e-$describe_ver -mv openc2e $checkout -rm "$checkout/.git" -rf - -cp $checkout/debian/changelog $tempdir/changelog.orig - - -suiteidx=0 -for suite in $suites; do - suiteidx=$(($suiteidx + 1)) - pushd $checkout/debian - cp -f $tempdir/changelog.orig changelog - debversion="$describe_ver""-1~$suiteidx$suite" - debchange -v $debversion -D UNRELEASED -b "Automatic checkout of commit $raw_ver" - cd .. - dpkg-buildpackage -sa -rfakeroot -S -us -uc - popd - debsign openc2e_${debversion}_source.changes - - sed "s/SUITE/$suite/" < $tempdir/$checkout/debian/dput.cf > $tempdir/dput.cf - dput -c $tempdir/dput.cf ccdevnet-ppa openc2e_${debversion}_source.changes -done - -rm -rf $tempdir diff --git a/debian/rules b/debian/rules deleted file mode 100755 index 7cccc411..00000000 --- a/debian/rules +++ /dev/null @@ -1,96 +0,0 @@ -#!/usr/bin/make -f -# -*- makefile -*- -# Sample debian/rules that uses debhelper. -# This file was originally written by Joey Hess and Craig Small. -# As a special exception, when this file is copied by dh-make into a -# dh-make output file, you may use that output file without restriction. -# This special exception was added by Craig Small in version 0.37 of dh-make. - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - - - -CMAKE_FLAGS += -DCMAKE_EXE_LINKER_FLAGS:STRING=-Wl,--as-needed - -## Since debian does not support plain 386 anymore, try to get a bit of an edge here -ifeq (i386,$(DEB_BUILD_ARCH)) - CMAKE_FLAGS += -DCMAKE_CXX_FLAGS:STRING='-g -march=i486 -O2' - CMAKE_FLAGS += -DCMAKE_C_FLAGS:STRING='-g -march=i486 -O2' -endif - -CMAKE_FLAGS += -DCMAKE_CXX_FLAGS_RELEASE:STRING='-O2 -NDEBUG' -CMAKE_FLAGS += -DCMAKE_C_FLAGS_RELEASE:STRING='-O2 -NDEBUG' - -CMAKE_FLAGS += -DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING='-O2 -ggdb3' -CMAKE_FLAGS += -DCMAKE_C_FLAGS_RELWITHDEBINFO:STRING='-O2 -ggdb3' - -CMAKE_FLAGS += -DCMAKE_CXX_FLAGS_DEBUG:STRING='-O2 -ggdb3' -CMAKE_FLAGS += -DCMAKE_C_FLAGS_DEBUG:STRING='-O2 -ggdb3' - -ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) - BUILD_TYPE = Debug -else - BUILD_TYPE = RelWithDebInfo -endif -CMAKE_FLAGS += -DCMAKE_BUILD_TYPE:STRING=$(BUILD_TYPE) - -configure: configure-stamp -configure-stamp: - dh_testdir - mkdir $(CURDIR)/build - cd $(CURDIR)/build; cmake $(CMAKE_FLAGS) .. - - touch configure-stamp - - -build: build-stamp - -build-stamp: configure-stamp - dh_testdir - - cd $(CURDIR)/build; make - - touch build-stamp - -clean: - dh_testdir - dh_testroot - rm -f build-stamp configure-stamp - - rm -rf build - - dh_clean - -install: build - dh_testdir - dh_testroot - dh_clean -k - dh_installdirs - - install -d debian/tmp/usr/games - install build/openc2e debian/tmp/usr/games - - -binary-indep: build install - -binary-arch: build install - dh_testdir - dh_testroot - dh_installchangelogs - dh_installdocs - dh_installexamples - dh_install --fail-missing --sourcedir=debian/tmp - dh_installman build/openc2e.6 - dh_link - dh_strip - dh_compress -X.css -X.html - dh_fixperms - dh_installdeb - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/docs/docs.css b/docs/docs.css deleted file mode 100644 index ebbffdd6..00000000 --- a/docs/docs.css +++ /dev/null @@ -1,111 +0,0 @@ -body { - font-family: verdana, arial, helvetica, sans-serif; -} - -#index li { - /* try to fit it all in one line */ - display: inline; -} - -#sidebar { - float: left; - clear: left; - font-size: x-small; - border: 1px black solid; - width: 10em; - background: #cee6f8; -} - -#sidebar h6 { - font-size: small; - margin: 1em 0em 1em 0em; - text-align: center; -} - -#content { -} - -.category hr { - margin-left: 1em; -} - -.category h2 { - margin-left: 5em; -} - -.command { - border-style: groove; - margin-bottom: 1em; - margin-left: 8em; -} - -.header { - border-bottom: groove; - background: #f8f8ff; -} - -.cmdname { - color: navy; - font-size: larger -} - -.cmdtype { - font-size: smaller; - font-style: italic; -} - -.argname { - text-transform: uppercase; -} - -.argtype { - font-size: smaller; - font-style: italic; -} - -.nodocs { - font-size: smaller; - font-style: italic; -} - -.description { - border-bottom: groove; - background-color: #f8f8f8; -} - -.administrivia { - font-size: smaller; - margin: 0; - padding: 0; -} - -.administrivia ul { - margin: 0; - padding: 0; -} - -.administrivia li { - list-style-type: none; -} - -.administrivia li li { - list-style-type: disc; -} - -.status { - border-bottom: groove; - font-size: smaller; -} - - -.st_ok { - background-color: #88ff88; -} - -.st_todo { - background-color: #ff8888; -} - -.st_maybe { - background-color: #8888ff; -} diff --git a/docs/openc2e.pod b/docs/openc2e.pod deleted file mode 100644 index eea5c5ac..00000000 --- a/docs/openc2e.pod +++ /dev/null @@ -1,122 +0,0 @@ -=head1 NAME - -openc2e - Open source creatures engine - -=head1 SYNOPSIS - -openc2e [B<-d> I] [B<-g> I] [other arguments...] - -=head1 DESCRIPTION - -Openc2e is a cross-platform open-source game engine designed to be compatible -with the various game engines of the Creatures artificial-life game series. - -=head1 OPTIONS - -=over 4 - -=item B<-h>, B<--help> - -Show a brief summary of options - -=item B<-V>, B<--version> - -Show version string and exit - -=item B<-s>, B<--silent> - -Disable audio subsystem. It will not be possible to unmute from the UI. - -=item B<-k> I, B<--backend>=I - -Selects the graphics backend. Use B<--help> to get a listing of available -backends. - -=item B<-o> I, B<--audiobackend>=I - -Selects the audio backend. Use B<--help> to get a listing of available -backends. - -=item B<-d> I, B<--data-path>=I - -Adds a directory to the search path for game data. If none are provided, a -somewhat unhelpful default will be selected. - -=item B<-b> I, B<--bootstrap>=I - -Adds a directory or file to the list of scripts to be run at world initialization. -If not provided, a default depending on gametype will be selected. - -=item B<-g> I, B<--gametype>=I - -Selects the game type to use. (c1, c2, cv, or c3) - -=item B<-m> I, B<--gamename>=I - -Sets the game name - -=item B<-n>, B<--norun> - -Stop running after executing the initial scripts - -=item B<-a>, B<--autokill> - -Enables autokill - -=item B<--autostop> - -Enables autostop (disables on CV) - -=back - -=head1 BUGS - -Lots. File some at L - -=head1 NOTES - -You will need a copy of one of the commercial creatures games in order to -use openc2e. Docking station can be downloaded for free from -L. - -=head1 AUTHOR - -=over 4 - - -=item Alyssa Milburn (fuzzie) - -lead developer - -=item Bryan Donlan (bdonlan) - -virtual machine and core developer - -=item Eric Goodwin (muffin) - -Windows builds, documentation and bugfixes - -=item Jeremy Apthorp (nornagon) - -core developer - -=item Bertram Bourdrez (bbz) - -misc developer - -=item Dylan William Hardison (dylan) - -misc developer - -=back - -=head1 COPYRIGHT AND LICENSE - -Copyright 2008 by the above. - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU Lesser General Public -License as published by the Free Software Foundation; either -version 2 of the License, or (at your option) any later version. - -=end diff --git a/docs/writehtml.pl b/docs/writehtml.pl deleted file mode 100755 index 5bc490b9..00000000 --- a/docs/writehtml.pl +++ /dev/null @@ -1,184 +0,0 @@ -#!/usr/bin/perl -# vim: set noet: -use strict; -use warnings; - -use YAML; - -# this may also appear as something like openc2e/mirror/trunk/writehtml.pl 43539 2005-08-15T00:44:28.013173Z bdonlan (between dollar-sign Id dollar-sign) -my $id = '$Id$'; - -sub captext ($); - -BEGIN { - eval { - require Text::Capitalize; - import Text::Capitalize; - }; - if ($@) { - *captext = sub ($) { - my $t = shift; - $t =~ s/^([a-z])/uc $1/e; - return $t; - }; - } else { - *captext = sub ($) { - return capitalize_title($_[0]); - }; - } -} - -sub esc ($) { - my $t = shift; - $t =~ s/\W/_/g; - return $t; -} - -my $data = YAML::LoadFile($ARGV[0]); - -# XXX -$data = { ops => $data->{variants}{c3} }; - -my %catsort; -foreach my $key (sort keys %{$data->{ops}}) { - $data->{ops}{$key}{key} = $key; - push @{$catsort{$data->{ops}{$key}{category}}}, $data->{ops}{$key}; -} - -foreach my $key (keys %catsort) { - $catsort{$key} = [ - map { $_->[0] } - sort { $a->[1] cmp $b->[1] } - map { [ $_, $_->{name} ] } - @{$catsort{$key}} - ]; -} - -my @catl = map { { name => captext($_), ents => $catsort{$_}, anchor => esc($_) } } sort keys %catsort; -my $time = scalar gmtime; -print < - - - - CAOS command reference - openc2e - - - -

CAOS command reference - openc2e dev build

- Last updated $time (UTC) -END - - -my %st_insert = ( - todo => ['st_todo', 'This command is not yet implemented.', 'stubs', 0], - probablyok => ['st_maybe', 'This command probably works, but it has not been annotated with its status.', 'unknown', 0], - maybe => ['st_maybe', 'This command is believed to work, but has not yet been thoroughly tested.', 'untested', 0], - broken => ['st_todo', 'This command is partially implemented but missing large amounts of functionality, or is nonconformant in some vital way.', 'broken', 0], - ok => ['st_ok', 'This command works properly.', 'done', 0], -); - -$st_insert{stub} = $st_insert{todo}; -$st_insert{done} = $st_insert{ok}; - -foreach my $op (values %{$data->{ops}}) { - $st_insert{$op->{status}}[3]++; -} - -my @cstat; -foreach my $clas (qw(ok broken maybe probablyok todo)) { - if ($st_insert{$clas}[3] != 0) { - push @cstat, "$st_insert{$clas}[3] $st_insert{$clas}[2]"; - } -} - -print '
'; -print scalar keys %{$data->{ops}}, " commands in total; "; -print join ", ", @cstat; -print ".
"; -print '
\n"; - - - - - -print < -
Commands
-
    -END - -foreach my $key (grep { /^c_/ } sort keys %{$data->{ops}}) { - my $class = $st_insert{$data->{ops}{$key}{status}}[0] || 'st_wtf'; - print qq{
  • $data->{ops}{$key}{name}
  • }; -} - -print <
    -
    Expressions
    -
      -END - -foreach my $key (grep { /^v_/ } sort keys %{$data->{ops}}) { - my $class = $st_insert{$data->{ops}{$key}{status}}[0] || 'st_wtf'; - print qq{
    • $data->{ops}{$key}{name}
    • }; -} - -print '
    '; -foreach my $cat (@catl) { - print qq{
    \n}; - print qq{

    $cat->{name}


    \n}; - foreach my $op (@{$cat->{ents}}) { - print qq{
    \n}; - print qq{
    \n}; - print qq{$op->{name}\n}; - print qq{($op->{type})\n}; - foreach my $arg (@{$op->{arguments}}) { - print qq{$arg->{name}\n}; - print qq{($arg->{type})\n}; - } - print qq{
    }; - unless (defined $op->{description}) { - print qq{
    This command is currently undocumented.
    \n}; - } else { - print qq{
    $op->{description}
    \n}; - } - print qq{
    }; - if (defined $st_insert{$op->{status}}[0]) { - print qq{
    }; - print $st_insert{$op->{status}}[1]; - print qq{
    }; - } else { - print qq{
    This command has an unknown status tag of: $op->{status}.}; - print qq{Please beat whoever set that status with a shovel or some other heavy object.}; - print qq{
    }; - } - print qq{
    }; - print qq{
      }; - print qq{
    • Implemented in: $op->{filename}
    • }; - print qq{
    • Implementation functions (may be wrong): $op->{implementation}
    • }; - if ($op->{pragma}) { - print qq{
    • Pragmas:
        }; - foreach my $pk (sort keys %{$op->{pragma}}) { - print qq{
      • $pk => $op->{pragma}{$pk}
      • }; - } - print qq{
    • }; - } - print qq{
    }; - print qq{
    }; - } - print qq{
    }; -} - -print qq{
    }; - - - - - - - diff --git a/parsedocs.pl b/parsedocs.pl deleted file mode 100755 index a71e0bee..00000000 --- a/parsedocs.pl +++ /dev/null @@ -1,273 +0,0 @@ -#!/usr/bin/perl - -use strict; -use warnings; - -use YAML; - -my @variants = qw(c3 cv sm); - -$SIG{__WARN__} = sub { die $_[0] }; - -my %fnmap = ( # default category mappings - 'caosVM_agent.cpp' => 'Agents', - 'caosVM_camera.cpp' => 'Cameras', - 'caosVM_core.cpp' => 'Core functions', - 'caosVM_creatures.cpp' => 'Creatures', - 'caosVM_compound.cpp' => 'Compound agents', - 'caosVM_debug.cpp' => 'Debugging', - 'caosVM_files.cpp' => 'Files', - 'caosVM_flow.cpp' => 'Flow control', - 'caosVM_genetics.cpp' => 'Genetics', - 'caosVM_history.cpp' => 'History', - 'caosVM_input.cpp' => 'Input', - 'caosVM_map.cpp' => 'Map', - 'caosVM_motion.cpp' => 'Motion', - 'caosVM_net.cpp' => 'Networking', - 'caosVM_ports.cpp' => 'Ports', - 'caosVM_resources.cpp' => 'Resources', - 'caosVM_scripts.cpp' => 'Scripts', - 'caosVM_sounds.cpp' => 'Sound', - 'caosVM_time.cpp' => 'Time', - 'caosVM_variables.cpp' => 'Variables', - 'caosVM_vectors.cpp' => 'Vectors', - 'caosVM_vehicles.cpp' => 'Vehicles', - 'caosVM_world.cpp' => 'World', -); - -my %data; -my %ns; - -my $prev; - -my $missing_status = 0; - -while (<>) { - my $file = $ARGV; - $file =~ s{.*/}{}; - - unless (m{/\*\*}) { - if (m/STUB|TODO/ && defined $prev && !defined $prev->{status}) { - $prev->{status} = 'stub'; - } - next; - } - $_ = <>; - defined $_ or exit; - $_ =~ s/^\s* \** \s*//x; # accept leading * etc - next unless m{ - ^\s* - # DBG: and the like - ( \S+ \s+ )? - # eg MOWS (command), LAWN (agent) - (\S+) \s* \((\w+)\) \s* - ( (?: - # argument bit - # we parse this in more detail later - (?:\w+) \s* - (?:\([^)]+\)) \s* - )* ) - \s*$ - }x; - my $firstline = $_; - - my ($cns, $cname, $ctype, $argdata) = ($1, $2, $3, $4); - if (defined $cns) { - $cns =~ s/\s//g; - } - - my $fullname = ($cns ? "$cns " : "") . $cname; - - my $impl; - my $saveimpl; - if ($ctype eq 'command') { - $impl = 'c_'; - } else { - $impl = 'v_'; - } - if ($cns && $cns ne '') { - $_ = $cns . "_"; - $_ =~ s/[^a-zA-Z0-9_]//g; - $impl .= uc $_; - } - $_ = $cname; - $_ =~ s/[^a-zA-Z0-9_]//g; - $impl .= $_; - my $key = $impl; - $impl = "caosVM::$impl"; - my $stackdelta = ($ctype eq 'command' ? 0 : 1); - - - - my @args; - while ($argdata =~ s/.*?(\w+)\s*\(([^)]+)\)\s*//) { - my ($argname, $argtype) = ($1, $2); - push @args, { - name => $argname, - type => $argtype, - }; - $stackdelta-- unless $argtype =~ /variable/; - } - - my @lines; - DOCLINE: while (<>) { - last DOCLINE if m{\*/}; - $_ =~ m{^\s* (?: \* \s* )* (.*?) \s*$}x; - push @lines, $1; - } - shift @lines while (@lines && $lines[0] eq ''); - pop @lines while (@lines && $lines[-1] eq ''); - - my %pragma; - my %evalcost; - my $status; - my $cat; - - if ($ctype eq 'command') { - $evalcost{default} = 1; - } else { - $evalcost{default} = 0; - } - - while (@lines && ($lines[0] =~ s{^\%([a-zA-Z]+)\s+}{} || $lines[0] =~ m{^\s*$})) { - my $l = shift @lines; - chomp $l; - next unless $1; - if ($1 eq 'pragma') { - unless ($l =~ m{(\w+)\s*(.*)}) { - warn "bad pragma"; - } - $pragma{$1} = $2; - chomp $pragma{$1}; - if ($pragma{$1} eq '') { - $pragma{$1} = 1; - } - } elsif ($1 eq 'status') { - if ($status) { - die "Set status twice"; - } - $status = $l; - chomp $status; - } elsif ($1 eq 'category') { - if ($cat) { - die "set category twice"; - } - $cat = $l; - } elsif ($1 eq 'cost') { - if ($l =~ m{^\s*(-?\d+)\s*$}) { - $evalcost{default} = $1; - } elsif ($l =~ m{(\S+)\s+(-?\d+)\s*$}) { - my $cost = $2; - my @variants = split ',', $1; - for my $v (@variants) { - $evalcost{$v} = $cost; - } - } else { - die "malformed cost directive"; - } - } else { - die "Unrecognized directive: $1"; - } - } - - if (!$status) { - $missing_status++; - print STDERR "Missing \%status for $fullname\n"; - } - - if (!$cat) { - $cat = lc $fnmap{$file} || 'unknown'; - } - - $stackdelta = $pragma{stackdelta} if defined $pragma{stackdelta}; - $stackdelta = "INT_MAX" if lc $pragma{stackdelta} eq "any"; - die "Deprecated use of pragma retc for $fullname" if defined $pragma{retc}; - - - if ($pragma{implementation}) { - $impl = $pragma{implementation}; - } - if ($pragma{saveimpl}) { - $saveimpl = $pragma{saveimpl}; - } else { - if ($ctype eq 'variable') { - $saveimpl = $impl; - $saveimpl =~ s/caosVM::v/caosVM::s/; - } else { - $saveimpl = "caosVM::dummy_cmd"; - } - } - $firstline =~ s/^\s*//; - my $desc = join("\n", @lines); - $desc .= "\n"; - - my $cd = { - type => $ctype, - name => $fullname, - match => $cname, - arguments => \@args, - syntaxstring => $firstline, - description => @lines ? $desc : undef, - filename => $file, - implementation => $impl, - saveimpl => $saveimpl, - status => $status, - category => $cat, - evalcost => \%evalcost, - stackdelta => $stackdelta, - }; - if (%pragma) { - $cd->{pragma} = \%pragma; - } - if ($cns && $cns ne '') { - $cd->{namespace} = lc $cns; - } - unless ($cd->{status}) { - $cd->{status} = 'probablyok'; - } - $prev = $cd; - - my @v = @variants; - if ($pragma{variants}) { - @v = grep { $_ ne ''; } split ' ', $pragma{variants}; - } - - for my $v (@v) { - if ($v eq 'all') { - @v = qw(all); - last; - } - } - - for my $v (@v) { - if (exists $data{$v}{$key}) { - print STDERR "Name collision for ($key) in variant $v\n"; - exit 1; - } - $data{$v}{$key} = $cd; - } -} - -if ($missing_status) { - print STDERR "$missing_status commands are missing \%status, fixit.\n"; - exit 1; -} - -for my $key (keys %{$data{all}}) { - for my $variant (keys %data) { - next if $variant eq 'all'; - if (exists $data{$variant}{$key}) { - print STDERR "Name collision for ($key) in variant $variant\n"; - exit 1; - } - $data{$variant}{$key} = $data{all}{$key}; - } -} - -delete $data{all}; - -print Dump { - variants => \%data, - namespaces => [keys %ns], -}; -# vim: set noet: diff --git a/runtests.pl b/runtests.pl deleted file mode 100755 index c882e87a..00000000 --- a/runtests.pl +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/perl -use strict; -use warnings; -use Test::Harness qw(&runtests $verbose); - -my $testpath = $ARGV[0] || "tests"; - -my @tests = glob("$testpath/*.cos"); -my @testfiles = (); - -for my $test (@tests) { - my @variants = (); - if ($test =~ /\.((c[123av])(,c[123av])*)\.cos$/) { - for my $v (split /,/, $1) { - push @variants,$v; - } - } - if (@variants == 0) { - @variants = ('c3'); - } - - #my $varr = '("'.join("\",\"",@variants).'")'; - for my $v (@variants) { - my $wrapper = $test; - $wrapper =~ s/(\.[c123av,]*)?\.cos$/.$v.pl/; - open FILE, ">$wrapper"; - print FILE < -#include "caosVM.h" -#include "AudioBackend.h" -#include -#include "Room.h" -#include "Vehicle.h" -#include "AgentHelpers.h" -#include "creaturesImage.h" -#include "Camera.h" -#include "VoiceData.h" - -void Agent::core_init() { - initialized = false; - lifecount = 0; -} - -Agent::Agent(unsigned char f, unsigned char g, unsigned short s, unsigned int p) : - vm(0), zorder(p), timerrate(0), attr(0), visible(true) { - core_init(); - - setClassifier(f, g, s); - - lastScript = -1; - - x = 0; y = 0; // note that c2e agents are moved in finishInit - - has_custom_core_size = false; - - velx.setFloat(0.0f); - vely.setFloat(0.0f); - - avel = 0.0f; fvel = 0.0f; svel = 0.0f; - admp = 0.0f; fdmp = 0.0f; sdmp = 0.0f; - spin = 0.0f; - - spritesperrotation = 0; - numberrotations = 0; - - wasmoved = false; - - if (engine.version == 2) { - accg = 10; - aero = 20; - rest = 40; - - size = 127; // TODO: correct default? - thrt = 0; - falling = false; // TODO: it looks like grav should be 0, but make sure! - } else if (engine.version > 2) { - accg = 0.3f; - aero = 0; - elas = 0; - - perm = 50; // TODO: correct default? - falling = true; - } - - moved_last_tick = false; - - range = 500; - - // TODO: is this the correct default? - clac[0] = 0; // message# for activate 1 - if (engine.version < 3) { - // TODO: is this the correct default? (this is equivalent to bhvr click == 0) - clac[0] = -1; clac[1] = -1; clac[2] = -1; - } - clik = -1; - - dying = false; - unid = -1; - - paused = displaycore = false; - - cr_can_push = cr_can_pull = cr_can_stop = cr_can_hit = cr_can_eat = cr_can_pickup = false; // TODO: check this - imsk_key_down = imsk_key_up = imsk_mouse_move = imsk_mouse_down = imsk_mouse_up = imsk_mouse_wheel = imsk_translated_char = false; - - emitca_index = -1; emitca_amount = 0.0f; - - objp.setAgent(0); // not strictly necessary -} - -void Agent::finishInit() { - // lc2e, at least, seems to position agents centered on (-9876,-9876) to begin with - // TODO: where should we place agents in other games? is this code right at all anyway? - // (bear in mind that there are no parts present for some C1/C2 agents when finishInit is called, atm) - if (engine.version > 2 && !engine.bmprenderer) { // TODO: need to think about bmp-specific code some more - x = -9876.0f + (getWidth() / 2.0f); y = -9876.0f + (getHeight() / 2.0f); - } - - // shared_from_this() can only be used if these is at least one extant - // shared_ptr which owns this - world.agents.push_front(boost::shared_ptr(this)); - agents_iter = world.agents.begin(); - - if (engine.version > 2 && findScript(10)) - queueScript(10); // constructor - - if (!voice && engine.version == 3) { - setVoice("DefaultVoice"); - } - - initialized = true; -} - -void Agent::zotstack() { - // Zap the VM stack. - for (std::list::iterator i = vmstack.begin(); i != vmstack.end(); i++) { - world.freeVM(*i); - } - vmstack.clear(); -} - -void Agent::moveTo(float _x, float _y, bool force) { - // Move ourselves to the specified location. - wasmoved = true; - - // if we're being carried and aren't being forced to move (prbly by our carrier), forget it - if (carriedby && !force) return; - - // TODO: what if we move while being carried? doomy explosions ensue, that's what! - float xoffset = _x - x; - float yoffset = _y - y; - - x = _x; y = _y; - - // handle wraparound - // TODO: this is perhaps non-ideal - if (engine.version < 3 && xoffset != 0.0f) { - // TODO: it'd be nice to handle multiple metarooms - MetaRoom *m = world.map.getFallbackMetaroom(); - assert(m); - - if (x < m->x()) { - x += m->width(); - } else if (x > m->x() + m->width()) { - x -= m->width(); - } - } - - for (std::vector::iterator i = floated.begin(); i != floated.end(); i++) { - assert(*i); - (*i)->moveTo((*i)->x + xoffset, (*i)->y + yoffset); - } - - adjustCarried(xoffset, yoffset); -} - -void Agent::floatTo(AgentRef a) { - std::vector::iterator i = std::find(floated.begin(), floated.end(), a); - assert(i == floated.end()); // loops are bad, mmkay - - if (floatable()) floatRelease(); - floatingagent = a; - if (floatable()) floatSetup(); -} - -void Agent::floatTo(float x, float y) { - if (floatingagent) { - moveTo(floatingagent->x + x, floatingagent->y + y); - } else { - moveTo(world.camera->getX() + x, world.camera->getY() + y); - } -} - -void Agent::floatSetup() { - if (floatingagent) - floatingagent->addFloated(this); - else - world.camera->addFloated(this); -} - -void Agent::floatRelease() { - if (floatingagent) { - floatingagent->delFloated(this); - } else - world.camera->delFloated(this); -} - -void Agent::addFloated(AgentRef a) { - assert(a); - assert(a != floatingagent); // loops are bad, mmkay - floated.push_back(a); -} - -void Agent::delFloated(AgentRef a) { - assert(a); - std::vector::iterator i = std::find(floated.begin(), floated.end(), a); - //if (i == floated.end()) return; - assert(i != floated.end()); - floated.erase(i); -} - -shared_ptr