Skip to content

Commit

Permalink
Windows: Updated to VS2013 and fixed building
Browse files Browse the repository at this point in the history
  • Loading branch information
ptitSeb committed Jan 3, 2017
1 parent 89a713d commit 5d82485
Show file tree
Hide file tree
Showing 13 changed files with 533 additions and 47 deletions.
4 changes: 0 additions & 4 deletions 3D_Engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@
/* ============= */
/* Include files */
/* ============= */
#ifdef linux
#include "dx_linux.h"
#else
#include "dxstdafx.h"
#endif

#include "StuntCarRacer.h"
#include "3D_Engine.h"
Expand Down
4 changes: 0 additions & 4 deletions Backdrop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@
/* ============= */
/* Include files */
/* ============= */
#ifdef linux
#include "dx_linux.h"
#else
#include "dxstdafx.h"
#endif

#include "StuntCarRacer.h"
#include "Backdrop.h"
Expand Down
4 changes: 0 additions & 4 deletions Car.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@
/* ============= */
/* Include files */
/* ============= */
#ifdef linux
#include "dx_linux.h"
#else
#include "dxstdafx.h"
#endif

#include "Car.h"
#include "StuntCarRacer.h"
Expand Down
4 changes: 0 additions & 4 deletions Car_Behaviour.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,7 @@
/* ============= */
/* Include files */
/* ============= */
#ifdef linux
#include "dx_linux.h"
#else
#include "dxstdafx.h"
#endif

#include <stdlib.h>

Expand Down
5 changes: 5 additions & 0 deletions Common/dxstdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
//--------------------------------------------------------------------------------------
#pragma once
#ifdef linux
#include "dx_linux.h"
#else
#ifndef DXSDK_STDAFX_H
#define DXSDK_STDAFX_H

Expand Down Expand Up @@ -132,3 +135,5 @@
#endif

#endif // !defined(DXSDK_STDAFX_H)

#endif
4 changes: 0 additions & 4 deletions Opponent_Behaviour.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@
/* ============= */
/* Include files */
/* ============= */
#ifdef linux
#include "dx_linux.h"
#else
#include "dxstdafx.h"
#endif

#include <stdlib.h>

Expand Down
13 changes: 5 additions & 8 deletions StuntCarRacer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
//--------------------------------------------------------------------------------------

#ifdef linux
#include "dx_linux.h"
#else
#include "dxstdafx.h"
#endif

#include "resource.h"

#include "StuntCarRacer.h"
Expand All @@ -26,7 +23,7 @@
#ifdef linux
#define STRING "%S"
#else
#define STRING "%s"
#define STRING L"%s"
#endif


Expand Down Expand Up @@ -1096,7 +1093,7 @@ static void HandleTrackMenu( CDXUTTextHelper &txtHelper )
// output instructions
const D3DSURFACE_DESC *pd3dsdBackBuffer = DXUTGetBackBufferSurfaceDesc();
txtHelper.SetInsertionPos( 2, pd3dsdBackBuffer->Height-15*8 );
txtHelper.DrawFormattedTextLine( L"Current track - " STRING ". Press 'S' to select, Escape to quit", (TrackID == NO_TRACK ? L"None" : GetTrackName(TrackID)));
txtHelper.DrawFormattedTextLine( L"Current track - " STRING L". Press 'S' to select, Escape to quit", (TrackID == NO_TRACK ? L"None" : GetTrackName(TrackID)));

if ((keyPress >= firstMenuOption) && (keyPress <= lastMenuOption))
{
Expand Down Expand Up @@ -1147,7 +1144,7 @@ static void HandleTrackPreview( CDXUTTextHelper &txtHelper )
// output instructions
const D3DSURFACE_DESC *pd3dsdBackBuffer = DXUTGetBackBufferSurfaceDesc();
txtHelper.SetInsertionPos( 2, pd3dsdBackBuffer->Height-15*9 );
txtHelper.DrawFormattedTextLine( L"Selected track - " STRING ". Press 'S' to start game, 'M' for track menu, Escape to quit", (TrackID == NO_TRACK ? L"None" : GetTrackName(TrackID)));
txtHelper.DrawFormattedTextLine( L"Selected track - " STRING L". Press 'S' to start game, 'M' for track menu, Escape to quit", (TrackID == NO_TRACK ? L"None" : GetTrackName(TrackID)));
txtHelper.DrawTextLine( L"(Press F4 to change scenery, F9 / F10 to adjust frame rate)" );

txtHelper.SetInsertionPos( 2, pd3dsdBackBuffer->Height-15*6 );
Expand Down Expand Up @@ -1244,7 +1241,7 @@ void RenderText( double fTime )
txtHelper.SetInsertionPos( 2, pd3dsdBackBuffer->Height-15*2 );
if (lapNumber[PLAYER] > 0)
StringCchPrintf( lapText, 3, L"%d", lapNumber[PLAYER] );
txtHelper.DrawFormattedTextLine( L"Lap: " STRING " Boost: %d", lapText, boostReserve );
txtHelper.DrawFormattedTextLine( L"Lap: " STRING L" Boost: %d", lapText, boostReserve );
txtHelper.DrawFormattedTextLine( L"Opponent Distance: %d", CalculateOpponentsDistance() );
txtHelper.SetInsertionPos( 280, pd3dsdBackBuffer->Height-15*2 );
txtHelper.DrawFormattedTextLine( L"Speed: %d", CalculateDisplaySpeed() );
Expand Down
8 changes: 5 additions & 3 deletions StuntCarRacer_2008.sln
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StuntCarRacer", "StuntCarRacer_2008.vcproj", "{D3D09108-96D0-4629-88B8-122C0256058C}"
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.40629.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "StuntCarRacer", "StuntCarRacer_2008.vcxproj", "{D3D09108-96D0-4629-88B8-122C0256058C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
Loading

0 comments on commit 5d82485

Please sign in to comment.