Skip to content

Commit

Permalink
Merge branch 'master' into connectionless_packet
Browse files Browse the repository at this point in the history
  • Loading branch information
mbasaglia committed Feb 13, 2016
2 parents befeb3e + 157baa5 commit 038f0cb
Show file tree
Hide file tree
Showing 50 changed files with 251 additions and 1,984 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -46,7 +46,7 @@ script:
- mkdir -p build
- cd build
- cmake --version
- CXXFLAGS="-D__extern_always_inline=inline" cmake
- CXXFLAGS="-D__extern_always_inline=inline" cmake -DUSE_PRECOMPILED_HEADER=0
-DBUILD_CLIENT=$(($MODE == 0)) -DBUILD_TTY_CLIENT=$(($MODE == 0)) -DBUILD_SERVER=$(($MODE == 0))
-DBUILD_CGAME=$(($MODE >= 1)) -DBUILD_SGAME=$(($MODE >= 1))
-DBUILD_GAME_NATIVE_DLL=$(($MODE == 1)) -DBUILD_GAME_NATIVE_EXE=$(($MODE == 1))
Expand Down
16 changes: 8 additions & 8 deletions appveyor.yml
Expand Up @@ -17,18 +17,18 @@ environment:
# COMPILER_VERSION: "5.1.0"
# MINGW_VERSION: "v4-rev0"
# GENERATOR: "MinGW Makefiles"
- COMPILER: msvc
COMPILER_VERSION: "12.0"
TARGET: x86
GENERATOR: "NMake Makefiles"
# - COMPILER: msvc
# COMPILER_VERSION: "12.0"
# TARGET: x86_amd64
# TARGET: x86
# GENERATOR: "NMake Makefiles"
# - COMPILER: msvc
# COMPILER_VERSION: "14.0"
# TARGET: x86
# COMPILER_VERSION: "12.0"
# TARGET: x86_amd64
# GENERATOR: "NMake Makefiles"
- COMPILER: msvc
COMPILER_VERSION: "14.0"
TARGET: x86
GENERATOR: "NMake Makefiles"
# - COMPILER: msvc
# TARGET: x86_amd64
# COMPILER_VERSION: "14.0"
Expand Down Expand Up @@ -80,5 +80,5 @@ build_script:
$env:CC="gcc"
$env:CXX="g++"
}
cmake -DUSE_WERROR=1 -DBE_VERBOSE=1 -G "${env:GENERATOR}" -DBUILD_GAME_NACL=0 -DCMAKE_BUILD_TYPE=Debug ..
cmake -DUSE_PRECOMPILED_HEADER=0 -DUSE_WERROR=1 -DBE_VERBOSE=1 -G "${env:GENERATOR}" -DBUILD_GAME_NACL=0 -DCMAKE_BUILD_TYPE=Debug ..
cmake --build .
5 changes: 3 additions & 2 deletions daemon/CMakeLists.txt
Expand Up @@ -24,7 +24,7 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

cmake_minimum_required (VERSION 3.0)
cmake_minimum_required (VERSION 2.8.12)
if (POLICY CMP0017)
cmake_policy(SET CMP0017 NEW)
endif()
Expand Down Expand Up @@ -567,7 +567,8 @@ if (USE_BREAKPAD)
endif()
endforeach(breaklib)

add_executable(crash_server src/engine/crash_server/crash_server_windows.cpp)
# WIN32 option prevents a console from being created for the process
add_executable(crash_server WIN32 src/engine/crash_server/crash_server_windows.cpp)
target_link_libraries(crash_server
srclibs-breakpad-crash_generation_server srclibs-breakpad-common)
target_compile_definitions(crash_server PRIVATE UNICODE)
Expand Down
6 changes: 6 additions & 0 deletions daemon/src/common/Color.h
Expand Up @@ -31,6 +31,12 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef COMMON_COLOR_H_
#define COMMON_COLOR_H_

#include <limits>
#include <type_traits>

#include "Compiler.h"
#include "Math.h"

namespace Color {

/*
Expand Down
2 changes: 2 additions & 0 deletions daemon/src/common/Command.h
Expand Up @@ -31,6 +31,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef COMMON_COMMAND_H_
#define COMMON_COMMAND_H_

#include <engine/qcommon/q_shared.h>

namespace Cmd {

/**
Expand Down
1 change: 0 additions & 1 deletion daemon/src/common/Common.h
Expand Up @@ -46,7 +46,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "Color.h"
#include "System.h"
#include "Serialize.h"
#include "FileSystem.h"
#include "DisjointSets.h"

using Math::Vec2;
Expand Down
2 changes: 2 additions & 0 deletions daemon/src/common/FileSystem.h
Expand Up @@ -31,6 +31,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef COMMON_FILESYSTEM_H_
#define COMMON_FILESYSTEM_H_

#include "Command.h"

#ifdef BUILD_ENGINE
#include "IPC/Channel.h"
#endif
Expand Down
1 change: 1 addition & 0 deletions daemon/src/common/IPC/CommonSyscalls.h
Expand Up @@ -32,6 +32,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define COMMON_COMMON_SYSCALLS_H_

#include "Primitives.h"
#include <common/FileSystem.h>

namespace VM {

Expand Down
2 changes: 2 additions & 0 deletions daemon/src/common/Math.h
Expand Up @@ -31,6 +31,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef COMMON_MATH_H_
#define COMMON_MATH_H_

#include <algorithm>

namespace Math {

template<typename T> static inline T Clamp(T value, T min, T max)
Expand Down
2 changes: 2 additions & 0 deletions daemon/src/common/String.h
Expand Up @@ -31,6 +31,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef COMMON_STRING_H_
#define COMMON_STRING_H_

#include <algorithm>

#include "tinyformat/tinyformat.h"

namespace Str {
Expand Down
3 changes: 3 additions & 0 deletions daemon/src/common/Util.h
Expand Up @@ -31,6 +31,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef COMMON_UTIL_H_
#define COMMON_UTIL_H_

#include <algorithm>
#include <tuple>

// Various utilities

// Workaround for broken tuples in GCC 4.6
Expand Down
2 changes: 2 additions & 0 deletions daemon/src/common/cm/cm_load.cpp
Expand Up @@ -34,6 +34,8 @@ Maryland 20850 USA.

#include "cm_local.h"

#include <common/FileSystem.h>

// to allow boxes to be treated as brush models, we allocate
// some extra indexes along with those needed by the map
#define BOX_LEAF_BRUSHES 1 // ydnar
Expand Down
1 change: 1 addition & 0 deletions daemon/src/engine/audio/Audio.cpp
Expand Up @@ -28,6 +28,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
===========================================================================
*/

#include <common/FileSystem.h>
#include "AudioPrivate.h"
#include "AudioData.h"

Expand Down
1 change: 1 addition & 0 deletions daemon/src/engine/audio/OggCodec.cpp
Expand Up @@ -30,6 +30,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include "SoundCodec.h"
#include "AudioPrivate.h"
#include <common/FileSystem.h>

#include <errno.h>
#define OV_EXCLUDE_STATIC_CALLBACKS
Expand Down
1 change: 1 addition & 0 deletions daemon/src/engine/audio/OpusCodec.cpp
Expand Up @@ -30,6 +30,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include "SoundCodec.h"
#include "AudioPrivate.h"
#include <common/FileSystem.h>

#include <errno.h>
#include <opusfile.h>
Expand Down
1 change: 1 addition & 0 deletions daemon/src/engine/audio/SoundCodec.cpp
Expand Up @@ -29,6 +29,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "SoundCodec.h"
#include "AudioPrivate.h"
#include <common/FileSystem.h>

namespace Audio {

Expand Down
1 change: 1 addition & 0 deletions daemon/src/engine/audio/WavCodec.cpp
Expand Up @@ -30,6 +30,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include "SoundCodec.h"
#include "AudioPrivate.h"
#include <common/FileSystem.h>

/*
*The following assumptions made:
Expand Down
5 changes: 0 additions & 5 deletions daemon/src/engine/client/cg_api.h
Expand Up @@ -220,11 +220,6 @@ void trap_Key_ClearStates( void );
std::vector<int> trap_Key_KeysDown( const std::vector<int>& keys );
void trap_SetMouseMode( MouseMode mode );
void trap_S_StopBackgroundTrack();
int trap_CIN_PlayCinematic( const char *arg0, int xpos, int ypos, int width, int height, int bits );
e_status trap_CIN_StopCinematic( int handle );
e_status trap_CIN_RunCinematic( int handle );
void trap_CIN_DrawCinematic( int handle );
void trap_CIN_SetExtents( int handle, int x, int y, int w, int h );
void trap_R_RemapShader( const char *oldShader, const char *newShader, const char *timeOffset );
bool trap_GetEntityToken( char *buffer, int bufferSize );
void trap_UI_Popup( int arg0 );
Expand Down
25 changes: 0 additions & 25 deletions daemon/src/engine/client/cin_ogm.cpp
Expand Up @@ -359,30 +359,6 @@ static int loadVideoFrameTheora()
g_ogm.th_yuvbuffer.uv_stride, yWShift, uvWShift, yHShift, uvHShift,
( unsigned int * ) g_ogm.outputBuffer );

/* unsigned char* pixelPtr = g_ogm.outputBuffer;
unsigned int* pixPtr;
pixPtr = (unsigned int*)g_ogm.outputBuffer;
//TODO: use one yuv->rgb function for the whole frame (large amount of stack movement (yuv->rgb calls) can't be good ;))
for(j=0;j<g_ogm.th_info.height;++j) {
for(i=0;i<g_ogm.th_info.width;++i) {
#if 1
// simple grayscale-output ^^
pixelPtr[0] =
pixelPtr[1] =
pixelPtr[2] = g_ogm.th_yuvbuffer.y[i+j*g_ogm.th_yuvbuffer.y_stride];
pixelPtr+=4;
#else
// using RoQ yuv->rgb code
*pixPtr++ = yuv_to_rgb24( g_ogm.th_yuvbuffer.y[(i>>yWShift)+(j>>yHShift)*g_ogm.th_yuvbuffer.y_stride],
g_ogm.th_yuvbuffer.u[(i>>uvWShift)+(j>>uvHShift)*g_ogm.th_yuvbuffer.uv_stride],
g_ogm.th_yuvbuffer.v[(i>>uvWShift)+(j>>uvHShift)*g_ogm.th_yuvbuffer.uv_stride]);
#endif
}
}
*/

r = 1;
g_ogm.VFrameCount = th_frame;
}
Expand Down Expand Up @@ -458,7 +434,6 @@ static bool loadFrame()
}
}

// if needPage
if ( needVOutputData || audioWantsMoreData )
{
// try to transfer Pages to the audio- and video-Stream
Expand Down
2 changes: 1 addition & 1 deletion daemon/src/engine/client/cl_cgame.cpp
Expand Up @@ -1303,7 +1303,7 @@ void CGameVM::QVMSyscall(int index, Util::Reader& reader, IPC::Channel& channel)

case CG_CRASH_DUMP:
IPC::HandleMsg<CrashDumpMsg>(channel, std::move(reader), [this](std::vector<uint8_t> dump) {
Sys::NaclCrashDump(dump);
Sys::NaclCrashDump(dump, "cgame");
});
break;

Expand Down

0 comments on commit 038f0cb

Please sign in to comment.