-
[TUT]Howto use Visual Studio 2013 instead 2008 crap
Hey, im bored, so here we go; (Atm it's only working for older TerrainV2 sources)
Search for;
(r3dLib.cpp)
PHP Code:
// def to 0 to disable license key check
Add above or below (doesn't matter)
PHP Code:
/* aLca Visual Studio 2013 Workaround */
#include <functional>
namespace std
{
class _String_base
{
public:
static void _cdecl _Xlen(void);
static void _cdecl _Xran(void);
};
};
void _cdecl std::_String_base::_Xlen(void)
{ // report a length_error
_Xlength_error("string too long");
}
void _cdecl std::_String_base::_Xran(void)
{ // report an out_of_range error
_Xout_of_range("invalid string position");
}
/* */
Search for LevelEditor.cpp, add below #include "r3dPCH.h"
PHP Code:
#include <functional>
NEWER SOURCES ONLY!
Replace r3dSTLAllocators.h
PHP Code:
//=========================================================================// Module: r3dSTLAllocators.h
// Copyright (C) Online Warmongers Group Inc. 2013.
//=========================================================================
#if _MSC_VER > 1000 /*IFSTRIP=IGN*/
#pragma once
#endif
#ifdef _MSC_VER
#pragma pack(push,8)
#endif /* _MSC_VER */
#include <limits>
#ifndef _FARQ /* specify standard memory model */
#define _FARQ
#define _PDFT ptrdiff_t
#define _SIZT size_t
#endif
#define _POINTER_X(T, A) T _FARQ *
#define _REFERENCE_X(T, A) T _FARQ &
//////////////////////////////////////////////////////////////////////////
template <typename T, int AT>
class r3dSTLCustomAllocator
{
public:
//type definitions
typedef size_t size_type;
typedef ptrdiff_t difference_type;
typedef T* pointer;
typedef const T* const_pointer;
typedef T& reference;
typedef const T& const_reference;
typedef T value_type;
//rebind allocator to type U
template <class U>
struct rebind
{
typedef r3dSTLCustomAllocator<U, AT> other;
};
//return address of values
pointer address (reference value) const
{
return &value;
}
const_pointer address (const_reference value) const
{
return &value;
}
/*constructors and destructor
*-nothing to do because the allocator has no state
*/
r3dSTLCustomAllocator() throw() {}
r3dSTLCustomAllocator(const r3dSTLCustomAllocator&) throw() {}
template <class U>
r3dSTLCustomAllocator (const r3dSTLCustomAllocator<U, AT>&) throw() {}
~r3dSTLCustomAllocator() throw() {}
//return maximum number of elements that can be allocated
size_type max_size () const throw()
{
//for numeric_limits see Section 4.3, page 59
return std::numeric_limits<size_t>::max() / sizeof(T);
}
//allocate but don't initialize num elements of type T
pointer allocate (size_type num, typename r3dSTLCustomAllocator<void, AT>::const_pointer hint = 0)
{
//allocate memory with global new
return (pointer) r3dAllocateMemory(num * sizeof(T), 1, static_cast<r3dAllocationTypes>(AT));
}
//initialize elements of allocated storage p with value value
void construct (pointer p, const T& value)
{
//initialize memory with placement new
new((void*)p)T(value);
}
//destroy elements of initialized storage p
void destroy (pointer p)
{
// destroy objects by calling their destructor
p->~T();
}
//deallocate storage p of deleted elements
void deallocate (pointer p, size_type num)
{
//deallocate memory with global delete
r3dDeallocateMemory(p, 1, static_cast<r3dAllocationTypes>(AT));
}
};
//return that all specializations of this allocator are interchangeable
template <class T1, class T2, int AT>
bool operator== (const r3dSTLCustomAllocator<T1, AT>&,
const r3dSTLCustomAllocator<T2, AT>&) throw()
{
return true;
}
template <class T1, class T2, int AT>
bool operator!= (const r3dSTLCustomAllocator<T1, AT>&,
const r3dSTLCustomAllocator<T2, AT>&) throw()
{
return false;
}
//////////////////////////////////////////////////////////////////////////
template<int AT>
class r3dSTLCustomAllocator<void, AT>
{ // allocator for type void
public:
typedef void _Ty;
typedef _Ty _FARQ *pointer;
typedef const _Ty _FARQ *const_pointer;
typedef _Ty value_type;
template<class _Other>
struct rebind
{ // convert an allocator<void> to an allocator <_Other>
typedef r3dSTLCustomAllocator<_Other, AT> other;
};
r3dSTLCustomAllocator() _THROW0()
{ // construct default allocator (do nothing)
}
r3dSTLCustomAllocator(const r3dSTLCustomAllocator<_Ty, AT>&) _THROW0()
{ // construct by copying (do nothing)
}
template<class _Other>
r3dSTLCustomAllocator(const r3dSTLCustomAllocator<_Other, AT>&) _THROW0()
{ // construct from related allocator (do nothing)
}
template<class _Other>
r3dSTLCustomAllocator<_Ty, AT>& operator=(const r3dSTLCustomAllocator<_Other, AT>&)
{ // assign from a related allocator (do nothing)
return (*this);
}
};
Replace r3dCompileAssert.h
PHP Code:
#pragma once
// compile time assert
#ifdef __cplusplus
#define JOIN( X, Y ) JOIN2(X,Y)
#define JOIN2( X, Y ) X##Y
namespace assert_static
template <bool> struct STATIC_ASSERT_FAILURE;
template <> struct STATIC_ASSERT_FAILURE<true> { enum { value = 1 }; };
template<int x> struct static_assert_test{};
}
#define COMPILE_ASSERT(x) \
typedef ::assert_static::static_assert_test<\
sizeof(::assert_static::STATIC_ASSERT_FAILURE< (bool)( x ) >)>\
JOIN(_static_assert_typedef, __LINE__)
#else // __cplusplus
#define COMPILE_ASSERT(x) extern int __dummy[(int)x]
#endif // __cplusplus
#define VERIFY_EXPLICIT_CAST(from, to) COMPILE_ASSERT(sizeof(from) == sizeof(to))
Search for;
PHP Code:
vbData->ranges.push_back(std::make_pair<int, int>(0, MaxInstancesToDraw));
Replace with;
PHP Code:
vbData->ranges.push_back(std::make_pair(0, MaxInstancesToDraw));
Edit;
Supported operating systems
Windows 8.1 (x86 and x64)
Windows 7 SP1 (x86 and x64)
Windows Server 2012 R2 (x64)
Windows Server 2012 (x64)
Windows Server 2008 R2 SP1 (x64)
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
VS13 version Ultimate, Profissional, premium???
have a problem using any version?
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
I will do all you have said, and here is the result.
how to run Visual Studio Ultimate 2013?
http://puu.sh/hwKv6/1ec8d18308.png
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
For the newest Source it need's a little bit more. Alot shit has changed on the STL Allocator stuff.
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
Quote:
Originally Posted by
aLca
For the newest Source it need's a little bit more. Alot shit has changed on the STL Allocator stuff.
Ok Thanks for info. There is a possibility to help me? Or not?
Update:
https://forum.ragezone.com/cache.php...de23dc6010.png
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
Add this to the top of the files giving the error
#include <functional>
And see if that fixes the issue
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
Quote:
Originally Posted by
m70b1jr
Add this to the top of the files giving the error
#include <functional>
And see if that fixes the issue
It's already done. But there still is the error.
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
Okay, so in the errors, I see that there is Re-definition errors, meaning you could try commentin out the line of code with errors. When I get home, I will try it out.
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
Quote:
Originally Posted by
m70b1jr
Okay, so in the errors, I see that there is Re-definition errors, meaning you could try commentin out the line of code with errors. When I get home, I will try it out.
Ok Good day and thx you
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
Quote:
Originally Posted by
askmyleg
Well guys how it works?
ever heard of reading?
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
Thinking about to extend it for the TerrainV3 Source (yea, also after all the drama in that thread before!) any thoughts?
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
Extend what to Terrain 3?
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
Quote:
Originally Posted by
GigaToni
Extend what to Terrain 3?
This doesn't work out of the Box on the newest src, thats why.
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
V3 code works fine on Microsoft Visual Studio 2013 Community
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
Then try it with Ultimate, or any other. :P But it's fine when it's working.
Edit; I believe u might still using 2008 as Platform Toolset?!
Example
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
use the platform in 2008? Why?
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
If u're using 2008 as Platform, there is no profit from the newer compiler etc.
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
yes to, then why use 2008? : D
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
Or you can just compile it in 2013...
r3dCompileAssert.h
Code:
#pragma once
// compile time assert
#ifdef __cplusplus
#define JOIN( X, Y ) JOIN2(X,Y)
#define JOIN2( X, Y ) X##Y
namespace assert_static
{
template <bool> struct STATIC_ASSERT_FAILURE;
template <> struct STATIC_ASSERT_FAILURE<true> { enum { value = 1 }; };
template<int x> struct static_assert_test{};
}
#define COMPILE_ASSERT(x) \
typedef ::assert_static::static_assert_test<\
sizeof(::assert_static::STATIC_ASSERT_FAILURE< (bool)( x ) >)>\
JOIN(_static_assert_typedef, __LINE__)
#else // __cplusplus
#define COMPILE_ASSERT(x) extern int __dummy[(int)x]
#endif // __cplusplus
#define VERIFY_EXPLICIT_CAST(from, to) COMPILE_ASSERT(sizeof(from) == sizeof(to))
r3dSTLAllocators.h
Code:
//=========================================================================
// Module: r3dSTLAllocators.h
//=========================================================================
#if _MSC_VER > 1000 /*IFSTRIP=IGN*/
#pragma once
#endif
#ifdef _MSC_VER
#pragma pack(push,8)
#endif /* _MSC_VER */
#include <limits>
#ifndef _FARQ /* specify standard memory model */
#define _FARQ
#define _PDFT ptrdiff_t
#define _SIZT size_t
#endif
#define _POINTER_X(T, A) T _FARQ *
#define _REFERENCE_X(T, A) T _FARQ &
//////////////////////////////////////////////////////////////////////////
template <typename T, int AT>
class r3dSTLCustomAllocator
{
public:
//type definitions
typedef size_t size_type;
typedef ptrdiff_t difference_type;
typedef T* pointer;
typedef const T* const_pointer;
typedef T& reference;
typedef const T& const_reference;
typedef T value_type;
//rebind allocator to type U
template <class U>
struct rebind
{
typedef r3dSTLCustomAllocator<U, AT> other;
};
//return address of values
pointer address (reference value) const
{
return &value;
}
const_pointer address (const_reference value) const
{
return &value;
}
/*constructors and destructor
*-nothing to do because the allocator has no state
*/
r3dSTLCustomAllocator() throw() {}
r3dSTLCustomAllocator(const r3dSTLCustomAllocator&) throw() {}
template <class U>
r3dSTLCustomAllocator (const r3dSTLCustomAllocator<U, AT>&) throw() {}
~r3dSTLCustomAllocator() throw() {}
//return maximum number of elements that can be allocated
size_type max_size () const throw()
{
//for numeric_limits see Section 4.3, page 59
return std::numeric_limits<size_t>::max() / sizeof(T);
}
//allocate but don't initialize num elements of type T
pointer allocate (size_type num, typename r3dSTLCustomAllocator<void, AT>::const_pointer hint = 0)
{
//allocate memory with global new
return (pointer) r3dAllocateMemory(num * sizeof(T), 1, static_cast<r3dAllocationTypes>(AT));
}
//initialize elements of allocated storage p with value value
void construct (pointer p, const T& value)
{
//initialize memory with placement new
new((void*)p)T(value);
}
//destroy elements of initialized storage p
void destroy (pointer p)
{
// destroy objects by calling their destructor
p->~T();
}
//deallocate storage p of deleted elements
void deallocate (pointer p, size_type num)
{
//deallocate memory with global delete
r3dDeallocateMemory(p, 1, static_cast<r3dAllocationTypes>(AT));
}
};
//return that all specializations of this allocator are interchangeable
template <class T1, class T2, int AT>
bool operator== (const r3dSTLCustomAllocator<T1, AT>&,
const r3dSTLCustomAllocator<T2, AT>&) throw()
{
return true;
}
template <class T1, class T2, int AT>
bool operator!= (const r3dSTLCustomAllocator<T1, AT>&,
const r3dSTLCustomAllocator<T2, AT>&) throw()
{
return false;
}
//////////////////////////////////////////////////////////////////////////
template<int AT>
class r3dSTLCustomAllocator<void, AT>
{ // allocator for type void
public:
typedef void _Ty;
typedef _Ty _FARQ *pointer;
typedef const _Ty _FARQ *const_pointer;
typedef _Ty value_type;
template<class _Other>
struct rebind
{ // convert an allocator<void> to an allocator <_Other>
typedef r3dSTLCustomAllocator<_Other, AT> other;
};
r3dSTLCustomAllocator() _THROW0()
{ // construct default allocator (do nothing)
}
r3dSTLCustomAllocator(const r3dSTLCustomAllocator<_Ty, AT>&) _THROW0()
{ // construct by copying (do nothing)
}
template<class _Other>
r3dSTLCustomAllocator(const r3dSTLCustomAllocator<_Other, AT>&) _THROW0()
{ // construct from related allocator (do nothing)
}
template<class _Other>
r3dSTLCustomAllocator<_Ty, AT>& operator=(const r3dSTLCustomAllocator<_Other, AT>&)
{ // assign from a related allocator (do nothing)
return (*this);
}
};
still will have issues with AutodeskNav\lib as they where compiled with vs2008....
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
Quote:
Originally Posted by
jonnybravo
still will have issues with AutodeskNav\lib as they where compiled with vs2008....
Thats weird. I have the identical stuff, and it's working as intended for me. Using VS2013 Ultimate with Update4.
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
Quote:
Originally Posted by
aLca
If u're using 2008 as Platform, there is no profit from the newer compiler etc.
Not having to use the ugly buggy slow turtle piece of crap is already a valid reason for me.
Aswell as Remote Debugging.
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
I'm trying it with Visual Studio 2015, I'll let you know if it works.
- - - Updated - - -
Quote:
Originally Posted by
aLca
If u're using 2008 as Platform, there is no profit from the newer compiler etc.
True, but the development environment is clean and it's alot nicer to use.
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
Quote:
Originally Posted by
Sinfulxx
I'm trying it with Visual Studio 2015, I'll let you know if it works.
I doesn't work with VS2015. The main big problem would be Scaleform.
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
Just a note, for who want to try, it works on VS2012.
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
Quote:
Originally Posted by
fdrgamer
Just a note, for who want to try, it works on VS2012.
Can someone make a small tutorial because we have some code here and I wanna convert the solution to VS2012.
Thanks.
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
Just convert the project and do this tutorial here and it should work.
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
Updated first post for newer (terrainV3) sources. Even when this leeching clown colleague community doesnt deserve it.
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
Read the OP again ..... use the v3 stuff aswell.
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
i need help
i get this error:
https://ibb.co/b9PR8e
i use vs 2013 Ultimate with Update 5
i get this error on Windows 10 and 8.1
I have already changed the "handle alert as error" to no
i need help with this too
https://ibb.co/ccz4uK
i use the afterlifemmo source and the codex src
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
Delete Eternity/lib folder, try again.
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
not working...
EDIT
i change std::make_pair to std::pair and now its work
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
I have clean Eternity/Lib and some errors, i back lib and errors
https://i.imgur.com/Cwbbryb.png
https://i.imgur.com/qAa8OOd.png
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
Stop threating warnings as errors. Come on guys, show some self-initiative, it isn't that hard.
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
https://i.imgur.com/40IWXTd.png
- - - Updated - - -
I`m very sorry, I'm still in the beginner course to Visual Studio IDE.
I work and become available to study Udemy only in the evenings. sorry for me being very dumb.
But I thank you from the bottom of my heart for this wonderful code
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
Yea well, we all start somewhere. ;)
https://i.imgur.com/a6GPvQH.png
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
Same error, but I open Eternity and build with VS12.
Now I open WarZ.sln and build get this errors list
http://forum.ragezone.com/image/png;...AAAElFTkSuQmCC
- - - Updated - - -
https://i.imgur.com/FmUHvt1.png
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
U are just totaly fucked up ur Project files. Restore ur backup .sln files, on the question to overwrite ur Solution press NO.
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
Yes, I have restored (and set to NO) now is OK, but with the 2008 version of VS.
http://forum.ragezone.com/image/png;...AASUVORK5CYII=
- - - Updated - - -
https://i.imgur.com/iDtE7Tc.png
Now, I'll back to the start code again.
-Change codes with the tutorial
-Clear Eternity/Lib files
-Open and Build Eternity.sln
-Open and build WarZ.sln
Right ?
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
Dont touch eternity.sln in any way. Ever.
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
Ok, I do not touch in Eternity.
I made like your tutorial, and clean Lib of Eternity folder, right ?
and later make overwrite to NO ,Clean Build and Build WarZ.sln to Final.
When finish, have 1 error.
https://i.imgur.com/40IWXTd.png
Thank you give your time for help, one day I make a contribute something done by me in this forum and its members. for helping me.
I hope you succeed in life, alca.
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
Yes, i made this in Eclipse Studio, and set to NO and Build.
Game working.
Now I repeat codes tutorials to Visual studio 2012 and build again with this (post of the #40), and will need work.
Thanks, I'll test.
- - - Updated - - -
If I clean of the Libs of Eternity / Lib, when compiling WarZ.sln it will not generate new Lib and will give error.
I should build Eternity.sln (I know I should not move, and I will not)
- - - Updated - - -
And with your code have many errors, I used parts of the
http://forum.ragezone.com/f791/tut-howto-visual-studio-2013-a-1041017-post8422762/#post8422762
r3dCompileAssert.h
r3dSTLAllocators.h
- - - Updated - - -
Nothing. Maybe I should give up.
Sorry for your time lost here.
https://i.imgur.com/FRZ49GQ.png
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuild.targets(1137,5): warning MSB8012: TargetPath(G:\Source\src\EclipseStudio\Final\Eclipse Studio.exe) does not match the Linker's OutputFile property value (G:\Source\bin\Infestation.exe). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
3>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppBuild.targets(1139,5): warning MSB8012: TargetName(Eclipse Studio) does not match the Linker's OutputFile property value (Infestation). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Link.OutputFile).
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
Well, do the same for the eternity solution too.
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
@aLca
I understand, make to set NO in Eclipse Studio, Eternity;
I do not know if I should worry about the 70 warnings.
But it worked.
I must thank you very much.
I hope to learn these tools in the Udemy course.
I will send you Gift subscribe, reply private.
https://i.imgur.com/YtvXGJL.png
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
Stupid but valid question...
When someone talks about the untouched version is it V3Terrain? So i would use the "New Sources Only" Option?
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
Quote:
Originally Posted by
aLca
U are just totaly fucked up ur Project files. Restore ur backup .sln files, on the question to overwrite ur Solution press NO.
What do you mean as overwrite solution?
You mean upgrading it?
=================================
nvm found it.
-
Re: [TUT]Howto use Visual Studio 2013 instead 2008 crap
when open colorado server auto-crash (not have details about error in log).I open studio and add a zombie and re-open server, join map, spawn zombie, when i kill the zombie the server crash again. have you ever had this problem ?