Skip to content

Commit 9586dc9

Browse files
authored
Merge pull request #186 from nillerusr/win64
Win64
2 parents 17ff01c + c69afba commit 9586dc9

File tree

16 files changed

+66
-34
lines changed

16 files changed

+66
-34
lines changed

.github/workflows/build.yml

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
name: Build
22

3-
on:
4-
push:
5-
branches:
6-
- "*"
7-
pull_request:
8-
branches:
9-
- "*"
3+
on: [push, pull_request]
104

115
jobs:
126
build-linux-i386:
@@ -47,6 +41,17 @@ jobs:
4741
./waf.bat configure -T debug
4842
./waf.bat build
4943
44+
build-windows-amd64:
45+
runs-on: windows-2019
46+
47+
steps:
48+
- uses: actions/checkout@v2
49+
- name: Build windows-amd64
50+
run: |
51+
git submodule init && git submodule update
52+
./waf.bat configure -T debug -8
53+
./waf.bat build
54+
5055
build-dedicated-windows-i386:
5156
runs-on: windows-2019
5257

@@ -58,6 +63,17 @@ jobs:
5863
./waf.bat configure -T debug -d
5964
./waf.bat build
6065
66+
build-dedicated-windows-amd64:
67+
runs-on: windows-2019
68+
69+
steps:
70+
- uses: actions/checkout@v2
71+
- name: Build dedicated windows-amd64
72+
run: |
73+
git submodule init && git submodule update
74+
./waf.bat configure -T debug -d -8
75+
./waf.bat build
76+
6177
build-dedicated-linux-i386:
6278
runs-on: ubuntu-18.04
6379

.github/workflows/tests.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
name: Tests
22

3-
on:
4-
push:
5-
branches:
6-
- "*"
7-
pull_request:
8-
branches:
9-
- "*"
3+
on: [push, pull_request]
104

115
jobs:
126
tests-linux-i386:
@@ -40,3 +34,17 @@ jobs:
4034
cd out
4135
$env:Path = "bin";
4236
./unittest.exe
37+
38+
tests-windows-amd64:
39+
runs-on: windows-2019
40+
41+
steps:
42+
- uses: actions/checkout@v2
43+
- name: Run tests windows-amd64
44+
run: |
45+
git submodule init && git submodule update
46+
./waf.bat configure -T release --tests --prefix=out/ -8
47+
./waf.bat install
48+
cd out
49+
$env:Path = "bin";
50+
./unittest.exe

dedicated/sys_ded.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ bool CDedicatedSteamApplication::Create( )
470470
//-----------------------------------------------------------------------------
471471
int main(int argc, char **argv)
472472
{
473-
#ifndef POSIX
473+
#if !defined( POSIX ) && !defined( PLATFORM_64BITS )
474474
_asm
475475
{
476476
fninit

engine/downloadthread.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ DWORD __stdcall DownloadThread( void *voidPtr )
425425
//Thread_DPrintf( "Requesting full download\n%s", headers );
426426
}
427427

428-
rc.hDataResource = InternetOpenUrl(rc.hOpenResource, fullURL, headerPtr, headerLen, flags,(DWORD)(&rc) );
428+
rc.hDataResource = InternetOpenUrl(rc.hOpenResource, fullURL, headerPtr, headerLen, flags, (DWORD_PTR)(&rc) );
429429

430430
// send the request off
431431
if ( !rc.hDataResource )

engine/tmessage.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,10 +322,17 @@ int ParseDirective( const char *pText )
322322
{
323323
if ( ParseFloats( pText, tempFloat, 4 ) )
324324
{
325-
for ( int i = 0; i < 4; ++i )
325+
// that's original code, msvc2015 generates illegal instruction on amd64 architecture
326+
/*for ( int i = 0; i < 4; ++i )
326327
{
327328
gMessageParms.boxcolor[ i ] = (byte)(int)tempFloat[ i ];
328-
}
329+
}*/
330+
331+
// workaround
332+
gMessageParms.boxcolor[0] = (int)tempFloat[0];
333+
gMessageParms.boxcolor[1] = (int)tempFloat[1];
334+
gMessageParms.boxcolor[2] = (int)tempFloat[2];
335+
gMessageParms.boxcolor[3] = (int)tempFloat[3];
329336
}
330337
}
331338
else if ( IsToken( pText, "clearmessage" ) )

filesystem/filesystem_stdio.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1413,7 +1413,7 @@ size_t CWin32ReadOnlyFile::FS_fread( void *dest, size_t destSize, size_t size )
14131413
if ( m_hFileUnbuffered != INVALID_HANDLE_VALUE )
14141414
{
14151415
const int destBaseAlign = ( IsX360() ) ? 4 : m_SectorSize;
1416-
bool bDestBaseIsAligned = ( (DWORD)dest % destBaseAlign == 0 );
1416+
bool bDestBaseIsAligned = ( (DWORD_PTR)dest % destBaseAlign == 0 );
14171417
bool bCanReadUnbufferedDirect = ( bDestBaseIsAligned && ( destSize % m_SectorSize == 0 ) && ( m_ReadPos % m_SectorSize == 0 ) );
14181418

14191419
if ( bCanReadUnbufferedDirect )

game/client/client_thinklist.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ void CClientThinkList::RemoveThinkable( ClientThinkHandle_t hThink )
158158
{
159159
pThink->SetThinkHandle( INVALID_THINK_HANDLE );
160160
}
161-
m_ThinkEntries.Remove( (unsigned long)hThink );
161+
m_ThinkEntries.Remove( (uintp)hThink );
162162
}
163163

164164

@@ -304,7 +304,7 @@ void CClientThinkList::PerformThinkFunctions()
304304
if ( hThink != INVALID_THINK_HANDLE )
305305
{
306306
// This can happen if the same think handle was removed twice
307-
if ( !m_ThinkEntries.IsInList( (unsigned long)hThink ) )
307+
if ( !m_ThinkEntries.IsInList( (uintp)hThink ) )
308308
continue;
309309

310310
// NOTE: This is necessary for the case where the client entity handle

game/client/client_thinklist.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ inline ClientThinkHandle_t CClientThinkList::GetInvalidThinkHandle()
121121

122122
inline CClientThinkList::ThinkEntry_t* CClientThinkList::GetThinkEntry( ClientThinkHandle_t hThink )
123123
{
124-
return &m_ThinkEntries[ (unsigned long)hThink ];
124+
return &m_ThinkEntries[ (uintp)hThink ];
125125
}
126126

127127

game/client/clientleafsystem.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1337,7 +1337,7 @@ void CClientLeafSystem::ComputeTranslucentRenderLeaf( int count, const LeafIndex
13371337

13381338
static CUtlVector<RenderableInfo_t *> orderedList; // @MULTICORE (toml 8/30/2006): will need to make non-static if thread this function
13391339
static CUtlVector<IClientRenderable *> renderablesToUpdate;
1340-
int leaf = 0;
1340+
intp leaf = 0;
13411341
for ( i = 0; i < count; ++i )
13421342
{
13431343
leaf = pLeafList[i];

game/server/ai_navigator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1222,7 +1222,7 @@ float CAI_Navigator::GetPathTimeToGoal()
12221222
AI_PathNode_t CAI_Navigator::GetNearestNode()
12231223
{
12241224
#ifdef WIN32
1225-
COMPILE_TIME_ASSERT( (int)AIN_NO_NODE == NO_NODE );
1225+
COMPILE_TIME_ASSERT( (intp)AIN_NO_NODE == NO_NODE );
12261226
#endif
12271227
return (AI_PathNode_t)(intp)( GetPathfinder()->NearestNodeToNPC() );
12281228
}

0 commit comments

Comments
 (0)