Skip to content

Commit

Permalink
Sync with upstream (Issue #30).
Browse files Browse the repository at this point in the history
Recompiled tier1 and mathlib  for all platforms will come in next commit.
  • Loading branch information
psychonic committed Nov 30, 2016
1 parent 98fe5b5 commit 3957adf
Show file tree
Hide file tree
Showing 491 changed files with 29,798 additions and 10,650 deletions.
1 change: 1 addition & 0 deletions common/language.cpp
Expand Up @@ -56,6 +56,7 @@ static const Language_t s_LanguageNames[] =
{ "Brazilian", "brazilian", "#GameUI_Language_Brazilian", "pt_BR", k_Lang_Brazilian, 1046 } ,
{ "Bulgarian", "bulgarian", "#GameUI_Language_Bulgarian", "bg_BG", k_Lang_Bulgarian, 1026 } ,
{ "Greek", "greek", "#GameUI_Language_Greek", "el_GR", k_Lang_Greek, 1032 },
{ "Ukrainian", "ukrainian", "#GameUI_Language_Ukrainian", "uk_UA", k_Lang_Ukrainian, 1058 },
};

//-----------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions common/language.h
Expand Up @@ -40,6 +40,7 @@ enum ELanguage
k_Lang_Brazilian,
k_Lang_Bulgarian,
k_Lang_Greek,
k_Lang_Ukrainian,
k_Lang_MAX
};

Expand Down
53 changes: 53 additions & 0 deletions common/lzma/lzma.h
@@ -0,0 +1,53 @@
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: LZMA Glue. Designed for Tool time Encoding/Decoding.
//
// LZMA Codec interface for engine. Based largely on LzmaUtil.c in SDK
//
// LZMA SDK 9.38 beta
// 2015-01-03 : Igor Pavlov : Public domain
// http://www.7-zip.org/
//
//====================================================================================//

#ifndef LZMA_H
#define LZMA_H

#ifdef _WIN32
#pragma once
#endif

//-----------------------------------------------------------------------------
// These routines are designed for TOOL TIME encoding/decoding on the PC!
// They have not been made to encode/decode on the PPC and lack big endian awarnesss.
// Lightweight GAME TIME Decoding is part of tier1.lib, via CLZMA.
//-----------------------------------------------------------------------------

//-----------------------------------------------------------------------------
// Encoding glue. Returns non-null Compressed buffer if successful.
// Caller must free.
//-----------------------------------------------------------------------------
unsigned char *LZMA_Compress(
unsigned char *pInput,
unsigned int inputSize,
unsigned int *pOutputSize );

//-----------------------------------------------------------------------------
// Decoding glue. Returns TRUE if succesful.
//-----------------------------------------------------------------------------
bool LZMA_Uncompress(
unsigned char *pInput,
unsigned char **ppOutput,
unsigned int *pOutputSize );

//-----------------------------------------------------------------------------
// Decoding helper, returns TRUE if buffer is LZMA compressed.
//-----------------------------------------------------------------------------
bool LZMA_IsCompressed( unsigned char *pInput );

//-----------------------------------------------------------------------------
// Decoding helper, returns non-zero size of data when uncompressed, otherwise 0.
//-----------------------------------------------------------------------------
unsigned int LZMA_GetActualSize( unsigned char *pInput );

#endif
13 changes: 12 additions & 1 deletion common/studiobyteswap.cpp
Expand Up @@ -1681,6 +1681,11 @@ int ByteswapMDLFile( void *pDestBase, void *pSrcBase, const int fileSize )

SET_INDEX_POINTERS( pData, pSequence, keyvalueindex )
WriteBuffer<char>( pDataDest, pDataSrc, SrcNative( &pSequence->keyvaluesize ) );

/** ACTIVITY MODIFIERS **/

SET_INDEX_POINTERS( pData, pSequence, activitymodifierindex )
WriteObjects<mstudioactivitymodifier_t>( pDataDest, pDataSrc, SrcNative( &pSequence->numactivitymodifiers ) );
}

/** TRANSITION GRAPH **/
Expand Down Expand Up @@ -2805,6 +2810,10 @@ BEGIN_BYTESWAP_DATADESC( mstudiomovement_t )
DEFINE_FIELD( position, FIELD_VECTOR ),
END_BYTESWAP_DATADESC()

BEGIN_BYTESWAP_DATADESC( mstudioactivitymodifier_t )
DEFINE_INDEX( sznameindex, FIELD_INTEGER ),
END_BYTESWAP_DATADESC()

BEGIN_BYTESWAP_DATADESC( mstudioseqdesc_t )
DEFINE_INDEX( baseptr, FIELD_INTEGER ),
DEFINE_INDEX( szlabelindex, FIELD_INTEGER ),
Expand Down Expand Up @@ -2844,7 +2853,9 @@ BEGIN_BYTESWAP_DATADESC( mstudioseqdesc_t )
DEFINE_INDEX( keyvalueindex, FIELD_INTEGER ),
DEFINE_FIELD( keyvaluesize, FIELD_INTEGER ),
DEFINE_INDEX( cycleposeindex, FIELD_INTEGER ),
DEFINE_ARRAY( unused, FIELD_INTEGER, 7 ), // remove/add as appropriate (grow back to 8 ints on version change!)
DEFINE_INDEX( activitymodifierindex, FIELD_INTEGER ),
DEFINE_FIELD( numactivitymodifiers, FIELD_INTEGER ),
DEFINE_ARRAY( unused, FIELD_INTEGER, 5 ), // remove/add as appropriate (grow back to 8 ints on version change!)
END_BYTESWAP_DATADESC()

BEGIN_BYTESWAP_DATADESC( mstudioevent_t )
Expand Down
Binary file modified devtools/bin/vpc_linux
Binary file not shown.
Binary file modified devtools/bin/vpc_osx
Binary file not shown.
88 changes: 44 additions & 44 deletions devtools/gendbg.sh
@@ -1,44 +1,44 @@
#!/bin/bash

OBJCOPY=objcopy

function usage {
echo "$0 /path/to/input/file [-o /path/to/output/file ]"
echo ""
}

if [ $# == 0 ]; then
usage
exit 2
fi

if [ $(basename $1) == $1 ]; then
INFILEDIR=$PWD
else
INFILEDIR=$(cd ${1%/*} && echo $PWD)
fi
INFILE=$(basename $1)

OUTFILEDIR=$INFILEDIR
OUTFILE=$INFILE.dbg

while getopts "o:" opt; do
case $opt in
o)
OUTFILEDIR=$(cd ${OPTARG%/*} && echo $PWD)
OUTFILE=$(basename $OPTARG)
;;
esac
done

if [ "$OUTFILEDIR" != "$INFILEDIR" ]; then
INFILE=${INFILEDIR}/${INFILE}
OUTFILE=${OUTFILEDIR}/${OUTFILE}
fi

pushd "$INFILEDIR"
$OBJCOPY "$INFILE" "$OUTFILE"
$OBJCOPY --add-gnu-debuglink="$OUTFILE" "$INFILE"
popd


#!/bin/bash

OBJCOPY=$STEAM_RUNTIME_PATH/bin/objcopy

function usage {
echo "$0 /path/to/input/file [-o /path/to/output/file ]"
echo ""
}

if [ $# == 0 ]; then
usage
exit 2
fi

if [ $(basename $1) == $1 ]; then
INFILEDIR=$PWD
else
INFILEDIR=$(cd ${1%/*} && echo $PWD)
fi
INFILE=$(basename $1)

OUTFILEDIR=$INFILEDIR
OUTFILE=$INFILE.dbg

while getopts "o:" opt; do
case $opt in
o)
OUTFILEDIR=$(cd ${OPTARG%/*} && echo $PWD)
OUTFILE=$(basename $OPTARG)
;;
esac
done

if [ "$OUTFILEDIR" != "$INFILEDIR" ]; then
INFILE=${INFILEDIR}/${INFILE}
OUTFILE=${OUTFILEDIR}/${OUTFILE}
fi

pushd "$INFILEDIR"
$OBJCOPY "$INFILE" "$OUTFILE"
$OBJCOPY --add-gnu-debuglink="$OUTFILE" "$INFILE"
popd


0 comments on commit 3957adf

Please sign in to comment.