Skip to content
This repository has been archived by the owner on Jan 11, 2019. It is now read-only.

Commit

Permalink
SetSequence 1.0
Browse files Browse the repository at this point in the history
Removed references to PortalSTV, updated README, included LICENSE, removed unused code
  • Loading branch information
Matthew McNamara committed Sep 15, 2013
1 parent 678ba3f commit 2c143c2
Show file tree
Hide file tree
Showing 10 changed files with 251 additions and 548 deletions.
77 changes: 30 additions & 47 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
cmake_minimum_required(VERSION 2.6)

project(PortalSTV)
project(SetSequence)

set(PACKAGE "PortalSTV")
set(PACKAGE_VERSION "a1")
set(PACKAGE_BUGREPORT "https://github.com/SBlue/portalstv/issues")
set(PACKAGE "SetSequence")
set(PACKAGE_VERSION "1.0")
set(PACKAGE_BUGREPORT "https://github.com/MattMcNam/SetSequence/issues")
set(PACKAGE_NAME "${PACKAGE}")
set(PACKAGE_STRING "${PACKAGE} ${PACKAGE_VERSION}")
set(PACKAGE_TARNAME "${PACKAGE}_${PACKAGE_VERSION}")
set(PACKAGE_URL "https://github.com/SBlue/portalstv")
set(PACKAGE_URL "https://github.com/MattMcNam/SetSequence")
set(VERSION "${PACKAGE_VERSION}")

include_directories(${PROJECT_BINARY_DIR})
Expand All @@ -21,68 +21,51 @@ include_directories(${HL2SDK}/common)
include_directories(${HL2SDK}/public)
include_directories(${HL2SDK}/public/tier0)
include_directories(${HL2SDK}/public/tier1)
include_directories(${HL2SDK}/game/server)
include_directories(${HL2SDK}/game/client)
include_directories(${HL2SDK}/game/shared)

set(HDR_PUBLIC
src/portalstv.h
src/sequence.h
src/vfuncs.h
src/stdafx.h
)

set(SOURCES
src/portalstv.cpp
src/sequence.cpp
src/vfuncs.cpp
)

source_group("Header Files" FILES ${HDR_PUBLIC})
source_group("Source FIles" FILES ${SOURCES})

# Setup defines, compiler options and linker options for each platform
#if(UNIX) # Common Unix settings
# add_definitions(-Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_snprintf=snprintf -D_vsnprintf=vsnprintf -DHAVE_STDINT_H -DGNUC -DNDEBUG)
# add_definitions(-Usprintf -Ustrncpy -UPROTECTED_THINGS_ENABLE)
# set(COMPILER_FLAGS "-fno-strict-aliasing -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Werror -Wno-uninitialized -Wno-unused -Wno-switch -msse -m32 -fno-exceptions -fno-threadsafe-statics -Wno-non-virtual-dtor -Wno-overloaded-virtual")
# set(LINKER_FLAGS "-m32")
# if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
# add_definitions(-DOSX -D_OSX)
# set(LINKER_FLAGS "${LINKER_FLAGS} -mmacosx-version-min=10.5 -arch i386 -dynamiclib")
# else() # Assume Linux
# add_definitions(-DLINUX -D_LINUX)
# set(COMPILER_FLAGS "${COMPILER_FLAGS} -mfpmath=sse")
# set(LINKER_FLAGS "${LINKER_FLAGS} -shared")
# endif()
#else() # Windows
# Force use of static libs
# Credit SteveL & brofield on StackOverflow
foreach(flag_var CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINOFO)
string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
endforeach()

add_definitions(/D_CRT_SECURE_NO_DEPRECATE /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_DEPRECATE)
set(COMPILER_FLAGS "/EHsc /DR- /W3 /nologo /Zi /TP")
set(LINKER_FLAGS "/MACHINE:X86 /subsystem:windows /NODEFAULTLIB:libc /NODEFAULTLIB:libcd")
set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:libcmt")
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /NODEFAULTLIB:libcmtd")
#endif()
# Unix not yet supported
if(UNIX)
message( FATAL_ERROR "Mac and Linux are not yet supported" )
endif()

# Force use of static libs
# Credit SteveL & brofield on StackOverflow
foreach(flag_var CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINOFO)
string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
endforeach()

add_definitions(/D_CRT_SECURE_NO_DEPRECATE /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_DEPRECATE)
set(COMPILER_FLAGS "/EHsc /DR- /W3 /nologo /Zi /TP")
set(LINKER_FLAGS "/MACHINE:X86 /subsystem:windows /NODEFAULTLIB:libc /NODEFAULTLIB:libcd")
set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:libcmt")
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /NODEFAULTLIB:libcmtd")

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILER_FLAGS}")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${LINKER_FLAGS}")

# Create the plugin
add_library(PortalSTV SHARED
add_library(SetSequence SHARED
${HDR_PUBLIC}
${SOURCES})

# Remove 'lib' prefix
set_target_properties(PortalSTV PROPERTIES PREFIX "")
set_target_properties(SetSequence PROPERTIES PREFIX "")

# Link sdk libraries
#if(WIN32)
target_link_libraries(PortalSTV ${HL2SDK}/lib/public/tier0.lib)
target_link_libraries(PortalSTV ${HL2SDK}/lib/public/tier1.lib)
#else()
# if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
# target_link_libraries(PortalSTV ${HL2SDK}/lib/osx32/libtier0.dylib)
# else()
# target_link_libraries(PortalSTV ${HL2SDK}/lib/public/linux32/libtier0.so)
# endif()
#endif()
target_link_libraries(SetSequence ${HL2SDK}/lib/public/tier0.lib)
target_link_libraries(SetSequence ${HL2SDK}/lib/public/tier1.lib)
23 changes: 23 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
AdvSpec
Copyright (c) 2013, Matthew McNamara
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 changes: 28 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,31 @@
SetSequence
===========

things
About
-
SetSequence is a plugin for Portal which allows you to override Chell's animation sequences. This can be used to fix the T-pose sequence which will sometimes occur when leaving a portal.
It is used in an upcoming Portal video to fix the above issue, and will be linked to here upon release.

Usage
-
`tpose_hook_set_sequence`
This command is required in order to use any of the other plugin commands. Make sure you run it while in a map or viewing a demo. It only needs to be run once until you close Portal.

`tpose_use_sequence [0-18]`
The sequence to use in place of sequence 0 (T-pose). A list will be of IDs will be made available shortly, until then use the logging command below.

`tpose_enable_console_logging [0-1]`
This will cause the plugin to print a console message when Chell's sequence is changed. Useful with `developer 1` to see the messages in the upper-left of your screen.

`tpose_force_sequence [0-1]`
This will cause the plugin to override *all* sequences, not just the T-pose.

Building
-
Requires hl2sdk-ob-valve.
`cmake -DHL2SDK=<path-to-hl2sdk...> -G "Visual Studio 10" ..`
Then open in Visual Studio/C++ Express and build.

License
-
SetSequence is provided under the BSD 2-Clause License, which is available in full in LICENSE.md
224 changes: 0 additions & 224 deletions src/offsets.cpp

This file was deleted.

Loading

0 comments on commit 2c143c2

Please sign in to comment.