Home » MODDING HQ 1.13 » v1.13 General Development Talk » SVN 1.13 Compile with VS 2005, 2008 & 2015
Re: SVN 1.13 Compile with VS 2005, 2008 & 2015[message #357423 is a reply to message #357421] Sun, 26 May 2019 17:23 Go to previous message
Marty2Life is currently offline Marty2Life

 
Messages:7
Registered:May 2019
I give up. I stay with the v1.12 and the old mods.

My Source Changes:

For Visual Studio 2005 and 2008

GameSource\ja2_v1.13\Build\TileEngine\Explosion Control.cpp #Line 11

#include <string.h>

#if _MSC_VER <= 1500
	#include <math.h>
#endif

#include "stdlib.h"
Why: it can't compile this line because it can't find sqrt
DrawTraitRadius( pSoldier->sFocusGridNo, pSoldier->pathing.bLevel, sqrt( 0.5 ) * (20 + 40 * radius), 8, 0 );



GameSource\ja2_v1.13\Build\Tactical\Turn Based Input.cpp #Line 6730

#if _MSC_VER <= 1500
    for (std::vector<OBJECTTYPE>::iterator lbeInvIter = lbePtr->inv.begin(); lbeInvIter != lbePtr->inv.end(); lbeInvIter++) {
#else
    for (auto lbeInvIter = lbePtr->inv.begin(); lbeInvIter != lbePtr->inv.end(); lbeInvIter++) {
#endif	

#if _MSC_VER <= 1500
     OBJECTTYPE * LBEStack = lbeInvIter._Myptr;
#else
     OBJECTTYPE * LBEStack = lbeInvIter._Ptr;
#endif
Why: VS2005/2008 interpret "auto" as default int. Give an Error and can't compile. _Ptr doesn't exists in the include vector file but instead _Myptr.



GameSource\ja2_v1.13\Build\Tactical\Interface Items.cpp #Line 5726

#if _MSC_VER <= 1500
    for (std::vector<PopupAttachmentInfo *>::iterator iter = gPopupAttachmentInfos.begin(); iter != gPopupAttachmentInfos.end(); iter++) {	
#else
    for (auto iter = gPopupAttachmentInfos.begin(); iter != gPopupAttachmentInfos.end(); iter++) {
#endif

Why: VS2005/2008 interpret "auto" as default int. Give an Error and can't compile


GameSource\ja2_v1.13\Build\Strategic\Town Militia.cpp #Line 7

#ifdef PRECOMPILEDHEADERS
	#include "Strategic All.h"
	#include "GameSettings.h"
#else
	#if _MSC_VER <= 1500
		#include <math.h>	
	#endif	

	#include "Town Militia.h"

#include "stdlib.h"
Why: it can't compile this line because it can't find log
FLOAT hourlygain = log( 1.0 + loyalpopulation * populationmodifier * gGameExternalOptions.dMilitiaVolunteerGainFactorHourly);



GameSource\ja2_v1.13\Build\Strategic\mapscreen.cpp #Line 5164

#if _MSC_VER <= 1500
    for (std::vector<WORLDITEM>::iterator itemIterator  = pInventoryPoolList.begin(); itemIterator != pInventoryPoolList.end(); itemIterator++) {
#else
    for (auto itemIterator = pInventoryPoolList.begin(); itemIterator != pInventoryPoolList.end(); itemIterator++) {
#endif	
Why: VS2005/2008 interpret "auto" as default int. Give an Error and can't compile



GameSource\ja2_v1.13\Build\Strategic\Map Screen Interface.cpp #Line 17004

#if _MSC_VER <= 1500
    for (std::vector<OBJECTTYPE>::iterator lbeInvIter = lbePtr->inv.begin(); lbeInvIter != lbePtr->inv.end(); lbeInvIter++) {
#else
    for (auto lbeInvIter = lbePtr->inv.begin(); lbeInvIter != lbePtr->inv.end(); lbeInvIter++) {
#endif					

	#if _MSC_VER <= 1500
		OBJECTTYPE * LBEStack = lbeInvIter._Myptr;
	#else
		OBJECTTYPE * LBEStack = lbeInvIter._Ptr;
	#endif
	dropCnt += LBEStack->ubNumberOfObjects;
	AutoPlaceObjectToWorld(pSoldier, LBEStack, true);
	if (LBEStack != NULL)
	{
	        #if _MSC_VER <= 1500
		    DeleteObj(lbeInvIter._Myptr);
		#else
                    DeleteObj(lbeInvIter._Ptr);
		#endif
	}
						}
Why: VS2005/2008 interpret "auto" as default int. Give an Error and can't compile. _Ptr doesn't exists in the include vector file but instead _Myptr.



GameSource\ja2_v1.13\Build\Standard Gaming Platform\vobject.cpp #Line #21
#if _MSC_VER <= 1400
	#include <hash_map>
#else
	#include <unordered_map>
#endif

 ........

#if _MSC_VER <= 1400
	typedef stdext::hash_map<UINT32, VOBJECT_NODE_PTR> VOBJECT_MAP;
#else
	typedef std::tr1::unordered_map<UINT32, VOBJECT_NODE_PTR> VOBJECT_MAP;
#endif

In Visual Studio 2005. unordered_map doesn'nt exists. It came with VS 2008. Use Instead hash_map. In Visula Studio 2008 it cant find in namesapce unordered_map. Need to use tr1


After all the Research and final compiles in VS2005/ VS2008 and VS 2015 it doenst work.

My Problems with a VS2005 compiled Exe.
It can't load the External Game XML files On Windows 7 and Windows 98 and show a Runtime Error. "eq: items\Armours.xml" I think the Xml load file parser is not compatible.

My Problems with a VS2008 compiled Exe.
Show no Error but after popup with the Version number it crashed to desktop. On Windows 7 and Win98

My Problems with a VS2015 compiled Exe.
It Crashed Randmly at the click on the "Laptop close button" or "View Emails" oder give a runtime Error Message. Sad, runs only on Windows 7


I have no idea how you compiled this under vs2005 or vs2008?
- Is Vs2005, vs2008 supportet?
- Is Windows 98 really still Supportet?

I have the suspicion that the code is a total 9x / Nt mix?

In Fullscreen is needed a 32Bit and in window mode is needed 16Bit? Really? This is crazy.
Actually, the whole dx render code would need a total revision.


I would like to play a highly accurate version 1.13 under Windows 98, but that's not all that useful. angry



[Updated on: Sun, 26 May 2019 17:32]

Report message to a moderator

Private
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Extracting merc portraits
Next Topic: Q: Item 1 + Item 2 = Item 3 graphics
Goto Forum:
  


Current Time: Wed Feb 12 07:56:59 GMT+2 2025

Total time taken to generate the page: 0.00619 seconds