Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Velaron committed Nov 18, 2019
2 parents c40d9ed + 52b067f commit 9a6db3e
Show file tree
Hide file tree
Showing 108 changed files with 3,022 additions and 2,080 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,8 @@ cmake_install.cmake
*.user
.waf-*
waf-*
.waf3-*
waf3-*
.lock*
*.pyc
.vscode/
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ if(64BIT AND CMAKE_SIZEOF_VOID_P EQUAL 4)
message(FATAL_ERROR "You enabled XASH_64BIT, but compiler can't create 64 bit code!")
endif()

# Xash3D FWGS Library Naming Scheme compliance
# see documentation: https://github.com/FWGS/xash3d-fwgs/blob/master/Documentation/library-naming.md
include(LibraryNaming)

if(64BIT)
message(STATUS "Building for 64 Bit")
else()
Expand All @@ -89,10 +93,11 @@ if(${CMAKE_VERSION} VERSION_LESS "3.0.2")
endif()

if(NOT MSVC)
add_compile_options(-Wempty-body) # GCC/Clang flag
#add_compile_options(-Wempty-body) # GCC/Clang flag
add_compile_options(-Wreturn-type) # GCC/Clang flag
endif()


if(BUILD_CLIENT)
add_subdirectory(cl_dll)
endif()
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# TF15-Client [![Build Status](https://travis-ci.com/Aimless-Wanderer/tf15-client.svg)](https://travis-ci.com/Aimless-Wanderer/tf15-client)
Team Fortress Classic 1.5 client rewrite.
Team Fortress Classic 1.5 client rewrite.
13 changes: 9 additions & 4 deletions cl_dll/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ project (CLDLL)

set (CLDLL_LIBRARY client)

include(CheckIncludeFile)
check_include_file("tgmath.h" HAVE_TGMATH_H)
if(HAVE_TGMATH_H)
add_definitions(-DHAVE_TGMATH_H)
endif()

add_definitions(-DCLIENT_WEAPONS -DCLIENT_DLL)

Expand Down Expand Up @@ -125,15 +130,15 @@ if (GOLDSOURCE_SUPPORT)
target_link_libraries( ${CLDLL_LIBRARY} ${CMAKE_DL_LIBS} )
endif()

if(WIN32)
target_link_libraries( ${CLDLL_LIBRARY} user32.lib )
endif()

set_target_properties (${CLDLL_LIBRARY} PROPERTIES
POSITION_INDEPENDENT_CODE 1)

if(APPLE OR WIN32 OR ${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
set(CLDLL_NAME "client")
if(64BIT)
set(CLDLL_NAME "client64")
endif()

set_target_properties(${CLDLL_LIBRARY} PROPERTIES
OUTPUT_NAME ${CLDLL_NAME}
PREFIX "")
Expand Down
2 changes: 1 addition & 1 deletion cl_dll/GameStudioModelRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <stdio.h>
#include <string.h>
#include <memory.h>
#include <math.h>
#include <cmath>

#include "studio_util.h"
#include "r_studioint.h"
Expand Down
2 changes: 1 addition & 1 deletion cl_dll/GameStudioModelRenderer_Sample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <stdio.h>
#include <string.h>
#include <memory.h>
#include <math.h>
#include <cmath>

#include "studio_util.h"
#include "r_studioint.h"
Expand Down
13 changes: 0 additions & 13 deletions cl_dll/IGameClientExports.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,8 @@
#ifndef IGAMECLIENTEXPORTS_H
#define IGAMECLIENTEXPORTS_H

#ifdef _WIN32
#pragma once
#endif

#include "../common/interface.h"

#ifdef _WIN32
#define CLIENT_DLLNAME "cl_dlls/client.dll"
#elif defined(OSX)
#define CLIENT_DLLNAME "cl_dlls/client.dylib"
#elif defined(LINUX)
#define CLIENT_DLLNAME "cl_dlls/client.so"
#endif

class IGameClientExports : public IBaseInterface
{
public:
Expand All @@ -39,5 +27,4 @@ class IGameClientExports : public IBaseInterface

#define GAMECLIENTEXPORTS_INTERFACE_VERSION "GameClientExports001"


#endif
3 changes: 0 additions & 3 deletions cl_dll/IGameMenuExports.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
#define MAINUI_DLLNAME "cl_dlls/menu.so"
#endif

#define MENU_TEAM 2
#define MENU_CLASS 3

class IGameMenuExports : public IBaseInterface
{
public:
Expand Down
8 changes: 4 additions & 4 deletions cl_dll/MOTD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@ int CHudMOTD::Draw( float fTime )
{
ypos = ROW_RANGE_MIN + 7 + scroll;
if( ypos > ROW_RANGE_MIN + 4 )
scroll-= ( ypos - ( ROW_RANGE_MIN + 4 ) ) / 3.0;
scroll-= ( ypos - ( ROW_RANGE_MIN + 4 ) ) / 3.0f;
if( ypos + height < ROW_RANGE_MAX )
scroll+= ( ROW_RANGE_MAX - ( ypos + height ) ) / 3.0;
scroll+= ( ROW_RANGE_MAX - ( ypos + height ) ) / 3.0f;
ypos_r = ROW_RANGE_MIN;
height = ROW_RANGE_MAX;
}
int ymax = ypos + height;
// int ymax = ypos + height;
if( xmax > ScreenWidth - 30 ) xmax = ScreenWidth - 30;
gHUD.DrawDarkRectangle( xpos - 5, ypos_r - 5, xmax - xpos + 10, height + 10 );
while( *ch )
Expand Down Expand Up @@ -157,7 +157,7 @@ int CHudMOTD::MsgFunc_MOTD( const char *pszName, int iSize, void *pbuf )
if( length > m_iMaxLength )
{
m_iMaxLength = length;
length = 0;
// length = 0;
}
m_bShow = true;
}
Expand Down
3 changes: 2 additions & 1 deletion cl_dll/Makefile.MinGW
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ INCLUDES = \
DEFINES = \
-Wno-write-strings \
-DCLIENT_WEAPONS \
-DCLIENT_DLL
-DCLIENT_DLL \
-DNO_VOICEGAMEMGR

FLAGS = -m32 -g
OBJS = $(CPP_SOURCES:.cpp=.o) $(C_SOURCES:.c=.o)
Expand Down
Loading

0 comments on commit 9a6db3e

Please sign in to comment.