Game Development Community

Mini Map for TGEA 1.7.1 and 1.8.1

by Dennis Trevillyan · 03/28/2009 (5:48 pm) · 32 comments

This MiniMap is based on two existing resources, both of which were posted before TGEA 1.7.x. Code updates to the 1.7.1 are included and the intended function is slightly different. See further down in the comments for changes to make this code work with TGEA 1.8.1. These are:

Ultimate Compass by Xavier "eXoDus": www.garagegames.com/community/resource/view/2779/2#comments

Trying to Implement drawBitmapRotated in TGEA by Jorge Luis Gandulfo: www.garagegames.com/community/forums/viewthread/75414

Screenshot:

i40.photobucket.com/albums/e216/zedd10/minimap.jpg

Download Source Code:

Script files are not included since you will create that in the dialog editor and add one line to map a key stroke.
TGEA v1.7.1:www.2shared.com/file/5413830/e8aad6b3/mini_Map_TGEA_171.html
TGEA v1.8.1:www.2shared.com/file/5413800/c3878570/Minimap_TGEA_181.html


Terrain Graphic: You will need a jpeg or png graphic of your terrain. This can be anything you wish but needs to be to scale. (Edit: see first and second comments)

Pointer: a jpeg or png graphic of an arrow shaped pointer. Used to show the players position and direction.

Script Code:


Add the C code listed below (yes, it's out of order. Sorry) and compile it. Then in the dialog editor create a new dialog with the types shown below:
//--- OBJECT WRITE BEGIN ---
new GuiControl(MiniMap) {
   profile = "GuiModelessDialogProfile";
   horizSizing = "right";
   vertSizing = "bottom";
   position = "0 0";
   extent = "640 480";
   minExtent = "8 8";
   visible = "1";
   helpTag = "0";
   noCursor = "1";

   new GuiMiniMap() {
      profile = "HudScrollProfile";
      canSaveDynamicFields = "0";
      Enabled = "1";
      isContainer = "1";
      HorizSizing = "right";
      VertSizing = "bottom";
      Position = "0 0";
      Extent = "130 130";
      MinExtent = "8 8";
      canSave = "0";
      Visible = "1";
      hovertime = "1000";
      wrap = "0";
      };
};
//--- OBJECT WRITE END ---
function MiniMap::toggle(%this)
{
   if (%this.isAwake())
      Canvas.popDialog(%this);
   else
      Canvas.pushDialog(%this);
}

Add a line to the default.bind.cs in scriptsAndAssets/client/scripts to bind the dialog to a key as follows:
moveMap.bindcmd(keyboard, "Q", "", "MiniMap.toggle();");

C++ Code:

Add the following code to guiMiniMap.cc:
#include "console/console.h"
#include "console/consoleTypes.h"
#include "app/game.h"
#include "T3D/gameconnection.h"
#include "T3D/gameFunctions.h"
#include "gfx/gfxTextureHandle.h"
#include "gfx/gfxDrawUtil.h"
#include "gui/guiCompass/guiMiniMap.h"
#include "atlas/runtime/atlasInstance2.h"

IMPLEMENT_CONOBJECT(GuiMiniMap);

GuiMiniMap::GuiMiniMap(void)
{
	terrain_size = 4096;		//terrain size in pixels
	mpp = (F32)3.66;			//grid spacing in meters  --> overall terrain size in meters is terrain_size * mpp
}

void GuiMiniMap::initPersistFields()
{
   Parent::initPersistFields();
   removeField("wrap");
   removeField("autosize");
   removeField("command");
   removeField("altcommand");
}

bool GuiMiniMap::onWake()
{
   if (! Parent::onWake())
      return false;
   setActive(true);
   mOuterTextureHandle  = GFXTexHandle("scriptsAndAssets/client/ui/Adsquare1", &GFXDefaultGUIProfile);
   mTextureHandle = GFXTexHandle("scriptsAndAssets/client/ui/Arrow", &GFXDefaultGUIProfile);
   return true;
}

void GuiMiniMap::onSleep()
{
   mTextureHandle = NULL;
   mOuterTextureHandle = NULL;
   Parent::onSleep();
}

float Vector2dToDegree(Point3F vector)
{
    float angle;
	if (vector.x == 0.0F)
    {
        if (vector.y > 0.0F)
            return 0.0F;
        else if (vector.y == 0.0F)
            return -1.0F;		//oops!  shouldn't happen!
        else
            return 180.0F;
    }
    if (vector.y == 0.0F)
    {
        if (vector.x < 0.0F)
            return 270.0F;
        else
            return 90.0F;
    }
    angle = atanf((1.0F * vector.x) / (-1.0F * vector.y)) * (180.0F / M_PI);
    if ((-1.0F * vector.y) < 0.0F)		// y is positive
        return angle + 180.0F;		
    else								// y is negative
    {
        if (vector.x > 0.0F)
            return angle;
        else
            return angle + 360.0F;
    }
}

void GuiMiniMap::onRender(Point2I offset, const RectI &updateRect)
{
   if(mOuterTextureHandle)		//terrain map
   {
	   GFXTextureObject* texture = (GFXTextureObject*) mOuterTextureHandle;
	   setExtent(texture->getWidth(), texture->getHeight());
	   terrain_tex_size.x = texture->getWidth();
	   terrain_tex_size.y = texture->getHeight();
	   
	   RectI outerRect(offset, getExtent());
	   GFX->getDrawUtil()->drawBitmapStretch(mOuterTextureHandle, outerRect, GFXBitmapFlip_None);
	   
   }

   if (mTextureHandle)		//pointer
   {
      GFX->getDrawUtil()->clearBitmapModulation();
	  GFXTextureObject* texture = (GFXTextureObject*) mTextureHandle;

	  CameraQuery query;
	  GameProcessCameraQuery(&query);

  	  MatrixF cameraMatrix = query.cameraMatrix;
	  Point3F cameraRot;
	  cameraMatrix.getColumn(1, &cameraRot); // get camera rotation
      cameraMatrix.getColumn(3, &mMyCoords); // get camera position
	  cameraRot.neg();						// change the sign of the rotation vector, makes it easier to interpret
	  cameraRot.z = 0;						// not really needed since z isn't used here

	  RectI srcRect(0, 0, texture->getBitmapWidth(), texture->getBitmapHeight());
	  RectI dstRect(0, 0, texture->getBitmapWidth(), texture->getBitmapHeight());

	  Point3F coords = AtlasInstance::startCoords;		//get the terrain offset from the mission file

	  //Map the terrain coordinates to the dialog window
	  F32 x = ((mMyCoords.x-coords.x)*terrain_tex_size.x)/(mpp*terrain_size);
	  F32 y = ((mMyCoords.y-coords.y)*terrain_tex_size.y)/(mpp*terrain_size);
	
	  mAngle = Vector2dToDegree(cameraRot)+(F32)90;		//get the pointer angle.  Zero degres is our typical "-X" direction.

	  GFX->getDrawUtil()->drawBitmapRotCtr(texture,
											dstRect,
											srcRect,
											GFXBitmapFlip_None,
											mAngle, 
											Point2F(0,0),
											y,
											x);
   }

   if (mProfile->mBorder || !mTextureHandle && !mOuterTextureHandle )   
   {
      RectI rect(offset.x, offset.y, getExtent().x, getExtent().y);
      GFX->getDrawUtil()->drawRect( rect, mProfile->mBorderColor );
   }

   renderChildControls(offset, updateRect);
}
bool GuiMiniMap::onAdd()
{
if (!Parent::onAdd())
return false;

mOuterTextureHandle  = GFXTexHandle("scriptsAndAssets/client/ui/Adsquare1", &GFXDefaultGUIProfile);
mTextureHandle = GFXTexHandle("scriptsAndAssets/client/ui/Arrow", &GFXDefaultGUIProfile);

return true;
}

Add the following code to guiMiniMap.h:
#ifndef _GUICOMPASSCTRL_H_
#define _GUICOMPASSCTRL_H_

#ifndef _GUIBITMAPCTRL_H_
#include "gui/controls/guiBitmapCtrl.h"
#endif

struct CameraQuery
{
   SimObject*  object;
   F32         nearPlane;
   F32         farPlane;
   F32         fov;
   bool        ortho;
   MatrixF     cameraMatrix;
};

class GuiMiniMap : public GuiBitmapCtrl
{
private:
	typedef GuiBitmapCtrl Parent;
	F32 mAngle;
	GFXTexHandle mOuterBitmapName;
	GFXTexHandle mBitmapName;
	Point3F mMyCoords;
	F32 terrain_size;
	Point2F terrain_tex_size;
	F32 mpp;

protected:

   GFXTexHandle mOuterTextureHandle;
   GFXTexHandle mTextureHandle;

public:
	//creation methods
	DECLARE_CONOBJECT(GuiMiniMap);
	GuiMiniMap();
    static void initPersistFields();
   	bool onAdd(); 


   //Parental methods
   bool onWake();
   void onSleep();

   void setOuterBitmap(const char *name);
   void setOuterBitmap(const GFXTexHandle &handle);
   void setNeedleBitmap(const char *name);
   void setNeedleBitmap(const GFXTexHandle &handle);

   void onRender(Point2I offset, const RectI &updateRect);
};

#endif

Add the following line to the public section of class AtlasInstance in atlasInstance2.h. This code makes the terrain position defined in the mission file so that all is displayed correctly. There may be a better way to do this.:
static Point3F startCoords

In AtlasInstance2.cpp add:
bool AtlasInstance::smNoUpdate = false;
Point3F AtlasInstance::startCoords(0, 0, 0);  <== add this line

void AtlasInstance::consoleInit()

and further down in atlasInstance2.cpp add:
// Do general render initialization stuff.
   mObjToWorld.getColumn(3, &startCoords);     <==  add this line
   setRenderTransform(mObjToWorld);
   resetWorldBox();
   addToScene();

Add to gfxDrawUtil.cpp the following code:
void GFXDrawUtil::drawBitmapRotCtr(GFXTextureObject *texture,const RectI& dstRect,const RectI& srcRect,const GFXBitmapFlip in_flip,F32 spinAngle, const Point2F spinOffset, F32 X, F32 Y)
{
	if(!texture)
      return;

   mDevice->setBaseRenderState();

   GFXVertexBufferHandle<GFXVertexPCT> verts(mDevice, 4, GFXBufferTypeVolatile );
   verts.lock();

   F32 texLeft   = F32(srcRect.point.x)                    / F32(texture->mTextureSize.x);
   F32 texRight  = F32(srcRect.point.x + srcRect.extent.x) / F32(texture->mTextureSize.x);
   F32 texTop    = F32(srcRect.point.y)                    / F32(texture->mTextureSize.y);
   F32 texBottom = F32(srcRect.point.y + srcRect.extent.y) / F32(texture->mTextureSize.y);

   F32 screenLeft   = dstRect.point.x;
   F32 screenRight  = dstRect.point.x + dstRect.extent.x;
   F32 screenTop    = dstRect.point.y;
   F32 screenBottom = dstRect.point.y + dstRect.extent.y;

	if(in_flip & GFXBitmapFlip_X)
   {
      F32 temp = texLeft;
      texLeft = texRight;
      texRight = temp;
   }
   if(in_flip & GFXBitmapFlip_Y)
   {
      F32 temp = texTop;
      texTop = texBottom;
      texBottom = temp;
   }

   // spin angle is in degree's so convert to radians..radians = degrees * pi /180
   spinAngle = spinAngle * 3.14 / 180.0f;

   Point2F screenPoint(X,Y); 

   F32 width = dstRect.extent.x;
   width *= 0.5;

   MatrixF rotMatrix( EulerF( 0.0, 0.0, spinAngle ) );

   Point3F offset( screenPoint.x, screenPoint.y, 0.0 );

	//const F32 fillConv = mDevice->getFillConventionOffset();
   verts[0].point.set( -width + spinOffset.x, -width + spinOffset.y, 0.0 );
   verts[1].point.set( -width + spinOffset.x,  width + spinOffset.y, 0.0 );
   verts[2].point.set( width + spinOffset.x,  width + spinOffset.y, 0.0 );
   verts[3].point.set( width + spinOffset.x, -width + spinOffset.y, 0.0 );

   verts[0].color = verts[1].color = verts[2].color = verts[3].color = mBitmapModulation;

   verts[0].texCoord.set( texLeft,  texTop );
   verts[1].texCoord.set( texLeft, texBottom );
   verts[2].texCoord.set( texRight,  texBottom );
   verts[3].texCoord.set( texRight, texTop );

	for( int i=0; i<4; i++ )
   {
      rotMatrix.mulP( verts[i].point );
      verts[i].point += offset;
   }

   verts.unlock();
  
   mDevice->setVertexBuffer( verts );

   mDevice->setCullMode( GFXCullNone );
   mDevice->setLightingEnable( false );
   mDevice->setAlphaBlendEnable( true );
   mDevice->setSrcBlend( GFXBlendSrcAlpha );
   mDevice->setDestBlend( GFXBlendInvSrcAlpha );
   mDevice->setTextureStageColorOp( 0, GFXTOPModulate );
   mDevice->setTextureStageColorOp( 1, GFXTOPDisable );
   mDevice->setTexture( 0, texture );
   mDevice->setupGenericShaders( GFXDevice::GSModColorTexture );

   mDevice->drawPrimitive(GFXTriangleFan, 0, 2 );

   mDevice->setAlphaBlendEnable( false );
}

and add to gfxDrawUtil.h in the public section of class GFXDrawUtil:
void drawBitmapRotCtr( GFXTextureObject *texture, const RectI &dstRect, const RectI &srcRect, const GFXBitmapFlip in_flip, F32 spinAngle, const Point2F spinOffset, F32 X, F32 Y );

You may need to adjust the path definitions for the graphics and the orientation of your pointer to get the proper behavior.

Page «Previous 1 2
#1
03/28/2009 (7:00 pm)
How are you getting a map of the terrain? What method are you using?
#2
03/29/2009 (8:15 am)
Using L3DT I exported a jpeg of the textured terrain at the desired size. You could also use a screen capture too I suppose since the loss of resolution shouldn't be a problem. Both of these would provide the scaling that I mentioned. If you are artistically capable (which doesn't include me...) you could create a more meaningful map with towns, rivers, etc using Photoshop or the like.

Keep in mind that the code assumes that if you are positioned, for example, 25% in from an edge of the terrain then the pointer on the map will be positioned 25% in from the corresponding edge of the map graphic. So you want the map graphic to be at least reasonably to scale.

#3
03/29/2009 (12:15 pm)
You should put this all together with the changed files in a downloadable zip file. Add your changes above in the readme file.

If you don't have a place to upload them (that isn't one of those free sites) you can register and upload them at 3dcentral.net and there is another place as well. (someone started a site just for this type of thing here on GG. Search the blogs)
#4
03/29/2009 (1:27 pm)
Mike, I was looking into that last night but haven't had a chance to do it yet. I'll take a look at the sites that you recommended. Hopefully I can get this done tonight. Good suggestion. Thanks.
#5
03/30/2009 (5:28 pm)
Will this work in TGEA 1.8.x, or does 1.8.x have something built-in? I haven't had a chance to look into it myself...
#6
03/31/2009 (11:38 am)
Screenshots?
#7
03/31/2009 (12:00 pm)
Ok I went ahead and tried this with TGEA 1.8.1 and got a small list of errors all related to one thing:

gfxDevice.cpp
..\..\..\..\..\engine\source\gfx\gfxDrawUtil.cpp(1264) : error C2039: 'setBaseRenderState' : is not a member of 'GFXDevice'
        c:\Torque\TGEA_1_8_1\engine\source\gfx/gfxDevice.h(163) : see declaration of 'GFXDevice'
..\..\..\..\..\engine\source\gfx\gfxDrawUtil.cpp(1327) : error C2039: 'setCullMode' : is not a member of 'GFXDevice'
        c:\Torque\TGEA_1_8_1\engine\source\gfx/gfxDevice.h(163) : see declaration of 'GFXDevice'
..\..\..\..\..\engine\source\gfx\gfxDrawUtil.cpp(1328) : error C2039: 'setLightingEnable' : is not a member of 'GFXDevice'
        c:\Torque\TGEA_1_8_1\engine\source\gfx/gfxDevice.h(163) : see declaration of 'GFXDevice'
..\..\..\..\..\engine\source\gfx\gfxDrawUtil.cpp(1329) : error C2039: 'setAlphaBlendEnable' : is not a member of 'GFXDevice'
        c:\Torque\TGEA_1_8_1\engine\source\gfx/gfxDevice.h(163) : see declaration of 'GFXDevice'
..\..\..\..\..\engine\source\gfx\gfxDrawUtil.cpp(1330) : error C2039: 'setSrcBlend' : is not a member of 'GFXDevice'
        c:\Torque\TGEA_1_8_1\engine\source\gfx/gfxDevice.h(163) : see declaration of 'GFXDevice'
..\..\..\..\..\engine\source\gfx\gfxDrawUtil.cpp(1331) : error C2039: 'setDestBlend' : is not a member of 'GFXDevice'
        c:\Torque\TGEA_1_8_1\engine\source\gfx/gfxDevice.h(163) : see declaration of 'GFXDevice'
..\..\..\..\..\engine\source\gfx\gfxDrawUtil.cpp(1332) : error C2039: 'setTextureStageColorOp' : is not a member of 'GFXDevice'
        c:\Torque\TGEA_1_8_1\engine\source\gfx/gfxDevice.h(163) : see declaration of 'GFXDevice'
..\..\..\..\..\engine\source\gfx\gfxDrawUtil.cpp(1333) : error C2039: 'setTextureStageColorOp' : is not a member of 'GFXDevice'
        c:\Torque\TGEA_1_8_1\engine\source\gfx/gfxDevice.h(163) : see declaration of 'GFXDevice'
..\..\..\..\..\engine\source\gfx\gfxDrawUtil.cpp(1339) : error C2039: 'setAlphaBlendEnable' : is not a member of 'GFXDevice'
        c:\Torque\TGEA_1_8_1\engine\source\gfx/gfxDevice.h(163) : see declaration of 'GFXDevice'

I'm not really a programmer, so could someone help me get this working?
#8
04/02/2009 (4:57 pm)
Nicolai, we are not using 1.8.x for our game so I did not try this code on that version. As for screen shots and code I haven't had a chance to upload that yet. Perhaps early next week. It's sort of busy around the house this week and I just returned from travel.

However you might try a global code search within the solution to see if the missing items show up in other classes etc. Otherwise look in the forums. Most likely something like this has already been commented on there.
#9
04/03/2009 (6:16 pm)
UPDATED - Revised code to include TGEA 1.8.1 GFX commands as suggested by Afan in the comments.

Nicolai, you made me curious so I took a quick look at how to make this work in TGEA 1.8.1. There are changes in the gfxDrawUtil.cpp and guiMiniMap.cc. I can't guarantee that this is absolutely correct or proper but it works. Everything else should be acceptable as is.

gfxDrawUtil.cpp for TGEA 1.8.1:

void GFXDrawUtil::drawBitmapRotCtr(GFXTextureObject *texture,const RectI& dstRect,const RectI& srcRect,const GFXBitmapFlip in_flip,F32 spinAngle, const Point2F spinOffset, F32 X, F32 Y)
{
	if(!texture)
      return;

   GFXVertexBufferHandle<GFXVertexPCT> verts(mDevice, 4, GFXBufferTypeVolatile );
   verts.lock();

   F32 texLeft   = F32(srcRect.point.x)                    / F32(texture->mTextureSize.x);
   F32 texRight  = F32(srcRect.point.x + srcRect.extent.x) / F32(texture->mTextureSize.x);
   F32 texTop    = F32(srcRect.point.y)                    / F32(texture->mTextureSize.y);
   F32 texBottom = F32(srcRect.point.y + srcRect.extent.y) / F32(texture->mTextureSize.y);

	if(in_flip & GFXBitmapFlip_X)
   {
      F32 temp = texLeft;
      texLeft = texRight;
      texRight = temp;
   }
   if(in_flip & GFXBitmapFlip_Y)
   {
      F32 temp = texTop;
      texTop = texBottom;
      texBottom = temp;
   }

   // spin angle is in degree's so convert to radians..radians = degrees * pi /180
   spinAngle = spinAngle * 3.14 / 180.0f;

   Point2F screenPoint(X,Y); 

   F32 width = dstRect.extent.x;
   width *= 0.5;

   MatrixF rotMatrix( EulerF( 0.0, 0.0, spinAngle ) );

   Point3F offset( screenPoint.x, screenPoint.y, 0.0 );

	//const F32 fillConv = mDevice->getFillConventionOffset();
   verts[0].point.set( -width + spinOffset.x, -width + spinOffset.y, 0.0 );
   verts[1].point.set( -width + spinOffset.x,  width + spinOffset.y, 0.0 );
   verts[2].point.set( width + spinOffset.x,  width + spinOffset.y, 0.0 );
   verts[3].point.set( width + spinOffset.x, -width + spinOffset.y, 0.0 );

   verts[0].color = verts[1].color = verts[2].color = verts[3].color = mBitmapModulation;

   verts[0].texCoord.set( texLeft,  texTop );
   verts[1].texCoord.set( texLeft, texBottom );
   verts[2].texCoord.set( texRight,  texBottom );
   verts[3].texCoord.set( texRight, texTop );

	for( int i=0; i<4; i++ )
   {
      rotMatrix.mulP( verts[i].point );
      verts[i].point += offset;
   }

   verts.unlock(); 
   mDevice->setVertexBuffer( verts );

   GFXStateBlockDesc desc;
   desc.ffLighting = false;
   desc.setCullMode( GFXCullNone );
   desc.setBlend(true, GFXBlendSrcAlpha, GFXBlendInvSrcAlpha);
   desc.samplers[0].textureColorOp = GFXTOPModulate;
   desc.samplers[1].textureColorOp = GFXTOPDisable;

   GFXStateBlockRef myState = GFX->createStateBlock(desc);

   // Render time code
   GFX->setStateBlock(myState);

   mDevice->setTexture( 0, texture );
   mDevice->setupGenericShaders( GFXDevice::GSModColorTexture );
   mDevice->drawPrimitive(GFXTriangleFan, 0, 2 );
}

Updates for guiMiniMap.cc

Change the GFXTexHandle() function arguments as shown below:
.
.
.

bool GuiMiniMap::onWake()
{
   if (! Parent::onWake())
      return false;
   setActive(true);
   mOuterTextureHandle  = GFXTexHandle("scriptsAndAssets/client/ui/Adsquare1", &GFXDefaultGUIProfile, "Terrain");
   mTextureHandle = GFXTexHandle("scriptsAndAssets/client/ui/Arrow", &GFXDefaultGUIProfile, "Pointer");
   return true;
}
.
.
.


.
.
.
bool GuiMiniMap::onAdd()
{
if (!Parent::onAdd())
return false;

mOuterTextureHandle  = GFXTexHandle("scriptsAndAssets/client/ui/Adsquare1", &GFXDefaultGUIProfile, "Terrain");
mTextureHandle = GFXTexHandle("scriptsAndAssets/client/ui/Arrow", &GFXDefaultGUIProfile, "Pointer");

return true;
}

Hope that helps.
#10
04/04/2009 (7:02 pm)
The main difference in TGEA 1.8.x is that state changes are done through GFXStateBlockDesc structure instead of method calls like
mDevice->setCullMode( GFXCullNone );
you do it like this now
GFXStateBlockDesc desc;
  desc.cullMode = GFXCullNone;  
  .
  . //other state changes here
  .
  GFXStateBlockRef someState = GFX->createStateBlock(desc);

and you call GFX->setState before the draw command is submitted.
#11
04/05/2009 (7:58 am)
Afan, good information. I will update the resource using this information. Thanks.

UPDATE - the code for v1.8.1 has been updated.
#12
04/06/2009 (9:26 am)
Glad to help. Very nice resource though, will definitely use it :).
#13
04/07/2009 (4:48 pm)
Sweet, got it down to just 1 error:
Compiling...
guiMiniMap.cpp
Linking...
LINK : fatal error LNK1181: cannot open input file 'x3daudio.lib'
#14
04/07/2009 (5:52 pm)
That's a DirectX library. Make sure you have directx installed and properly setup in the directories definition for the linker.
#15
04/07/2009 (6:23 pm)
I've done successful compiles with my current setup before trying to apply these changes...
#16
04/16/2009 (1:49 am)
i was tried to use this MiniMap for Tgea1.8.1 but i got 2 Linker errors. i tried to rectify it but i was unable. so can anyone of you expkain how to rectify??????
the following are the Eroors which i got.........

guiMiniMap.obj : error LNK2019: unresolved external symbol "public: __thiscall AtlasRequestHeader::~AtlasRequestHeader(void)" (??1AtlasRequestHeader@@QAE@XZ) referenced in function "public: __thiscall AtlasResourceStub<class AtlasGeomChunk>::~AtlasResourceStub<class AtlasGeomChunk>(void)" (??1?$AtlasResourceStub@VAtlasGeomChunk@@@@QAE@XZ)
12>guiMiniMap.obj : error LNK2001: unresolved external symbol "public: static class Point3F AtlasInstance::startCoords" (?startCoords@AtlasInstance@@2VPoint3F@@A)
12>../../../game/Stronghold.exe : fatal error LNK1120: 2 unresolved externals
#17
04/16/2009 (6:12 pm)
Adithyaa Srikkanth, in TGEA 1.8.1 Atlas may be disabled. Read up on that here: tdn.garagegames.com/wiki/TorqueGameEngineAdvanced/1_8_Beta/Porting/Gotchas#Atlas.... Not sure if this is your problem but it would appear that the atlas files are not present in the solution.

Have you been able to build your solution and then load an atlas terrain before trying this? This is key... If you can build and then load an atlas terrain in 1.8.1 then the above isn't your problem.
#18
04/22/2009 (4:21 am)
archived the downloads:
181
171
#19
04/22/2009 (4:00 pm)
Great idea! Thanks.
#20
08/26/2009 (3:37 pm)
Hey!

I'm getting the following compilation errors with TGEA 1.7.1:

1>guiMiniMap.obj : error LNK2005: "float __cdecl Vector2dToDegree(class Point3F)" (?Vector2dToDegree@@YAMVPoint3F@@@Z) already defined in guiCompassCtrl.obj
1>guiMiniMap.obj : error LNK2001: unresolved external symbol "public: static class Point3F AtlasInstance::startCoords" (?startCoords@AtlasInstance@@2VPoint3F@@A)
1>../../../game/Stronghold.exe : fatal error LNK1120: 1 unresolved externals

I have the compass and fuel meter GUI resources working without problems, so I'm not sure what's causing this...

Any ideas ?
Page «Previous 1 2