HUGS in VS 2015
Posted: August 8th, 2016, 4:56 pm
Hello forum!
I was configuring the HUGS code to work with Visual Studio 2015 yesterday and it took me "a lot of time" to make it works. So I decided to post here, what I've changed for all these who want to watch the series and use VS2015.
First thing if we want to compile the code from lessons before 16th episode, you need to change all vectors and one set with const Type. The easiest way to do it is to click Edit->Find and replace->Replace in Files and replace all "vector < const" with "vector < " and "set < const" with "set < ".
Next if you want to compile the lessons after adding sound. You need to have DirectX SDK and put the directory to xaudio.h in Sound.h. For example:
Another thing to change is Direct Input. You need to add following lines to Dinput.h in Public part of Class Event:
The problem was with an anonymous union inside class event, so we need to write a copy constructor by ourselves. If you have any problems with compiling HUGS, post it here. In next days (or weeks) I will push working versions of all branches on GitHub and the DirectX SDK won't be necessary anymore.
I was configuring the HUGS code to work with Visual Studio 2015 yesterday and it took me "a lot of time" to make it works. So I decided to post here, what I've changed for all these who want to watch the series and use VS2015.
First thing if we want to compile the code from lessons before 16th episode, you need to change all vectors and one set with const Type. The easiest way to do it is to click Edit->Find and replace->Replace in Files and replace all "vector < const" with "vector < " and "set < const" with "set < ".
Next if you want to compile the lessons after adding sound. You need to have DirectX SDK and put the directory to xaudio.h in Sound.h. For example:
Code: Select all
#include "C:\Program Files(x86)\Microsoft DirectX SDK (June 2010)\Include\xaudio2.h"
Code: Select all
Event( const Event& e )
:
type( e.type ),
index( e.index ),
pos( e.pos )
{}
Event& operator=( const Event& e )
{
type = e.type;
index = e.index;
pos = e.pos;
return *this;
}