SBSPSS/Utils/MapEdit/LayerPlatform.cpp

139 lines
3.5 KiB
C++
Raw Normal View History

2001-03-26 23:29:09 +02:00
/**********************/
/*** Layer Platform ***/
/**********************/
2001-03-26 17:34:29 +02:00
#include "stdafx.h"
#include <Vector3.h>
#include <gl\gl.h>
#include <gl\glu.h>
#include "GLEnabledView.h"
#include "MapEdit.h"
#include "MapEditDoc.h"
#include "MapEditView.h"
#include "MainFrm.h"
#include "Core.h"
#include "LayerThing.h"
2001-03-26 23:29:09 +02:00
#include "LayerPlatform.h"
2001-03-26 17:34:29 +02:00
#include "Utils.h"
#include "Export.h"
/*****************************************************************************/
/*****************************************************************************/
/*****************************************************************************/
2001-03-29 19:59:01 +02:00
CLayerPlatform::CLayerPlatform(sLayerDef &Def)
2001-03-26 17:34:29 +02:00
{
2001-03-29 19:59:01 +02:00
InitLayer(Def);
2001-03-26 17:34:29 +02:00
}
/*****************************************************************************/
2001-03-29 19:59:01 +02:00
void CLayerPlatform::InitLayer(sLayerDef &Def)
{
2001-03-31 17:40:20 +02:00
ThingBank=new CElemBank(-1,-1,false,0);
2001-03-29 19:59:01 +02:00
CLayerThing::InitLayer(Def);
LoadThingScript(theApp.GetConfigStr("LayerScript","PlatformScript"));
}
2001-03-26 23:29:09 +02:00
/*****************************************************************************/
2001-03-29 19:59:01 +02:00
void CLayerPlatform::InitSubView(CCore *Core)
2001-03-26 17:34:29 +02:00
{
}
/*****************************************************************************/
2001-03-29 19:59:01 +02:00
/*** Gui *********************************************************************/
/*****************************************************************************/
void CLayerPlatform::GUIInit(CCore *Core)
2001-03-26 17:34:29 +02:00
{
2001-03-29 19:59:01 +02:00
// GUI.DisableCallback(true);
// Core->GUIAdd(GUI,IDD_LAYER_Platform);
// GUI.DisableCallback(false);
2001-03-26 17:34:29 +02:00
}
/*****************************************************************************/
2001-03-29 19:59:01 +02:00
void CLayerPlatform::GUIKill(CCore *Core)
2001-03-26 17:34:29 +02:00
{
2001-03-29 19:59:01 +02:00
// Core->GUIRemove(GUI,IDD_LAYER_Platform);
2001-03-26 17:34:29 +02:00
}
/*****************************************************************************/
2001-03-29 19:59:01 +02:00
void CLayerPlatform::GUIUpdate(CCore *Core)
2001-03-26 17:34:29 +02:00
{
2001-03-29 19:59:01 +02:00
/*
int i,ListSize;
CComboBox &List=GUI.m_List;
// Setup Def Platform List
ListSize=DefList.size();
List.ResetContent();
for (i=0; i<ListSize; i++)
2001-03-26 17:34:29 +02:00
{
2001-03-29 19:59:01 +02:00
List.AddString(DefList[i].Name);
2001-03-26 17:34:29 +02:00
}
2001-03-29 19:59:01 +02:00
List.SetCurSel(CurrentDefThing);
GUIThingUpdate();
*/
2001-03-26 17:34:29 +02:00
}
/*****************************************************************************/
2001-03-29 19:59:01 +02:00
void CLayerPlatform::GUIThingDefClear()
2001-03-26 17:34:29 +02:00
{
2001-03-29 19:59:01 +02:00
/*
CComboBox &List=GUI.m_List;
CurrentDefThing=-1;
List.SetCurSel(CurrentDefThing);
*/
2001-03-26 17:34:29 +02:00
}
/*****************************************************************************/
2001-03-31 17:40:20 +02:00
void CLayerPlatform::GUIThingUpdate(bool OnlySel)
2001-03-26 17:34:29 +02:00
{
2001-03-31 17:40:20 +02:00
// CLayerThing::GUIThingUpdateList(GUI.
2001-03-26 17:34:29 +02:00
}
/*****************************************************************************/
2001-03-31 17:40:20 +02:00
void CLayerPlatform::GUIThingPointUpdate(bool OnlySel)
2001-03-26 17:34:29 +02:00
{
2001-03-29 19:59:01 +02:00
/*
int i,ListSize;
sLayerThing &ThisThing=ThingList[CurrentThing];
CListBox &List=GUI.m_PosList;
List.ResetContent();
if (CurrentThing==-1)
{
}
else
{
// Setup ThingPointList
ListSize=ThisThing.XY.size();
for (i=0; i<ListSize; i++)
{
CString Str;
Str.Format("%i: %i, %i",i,ThisThing.XY[i].x,ThisThing.XY[i].y);
List.AddString(Str);
}
List.SetCurSel(CurrentThingPoint);
}
*/
2001-03-26 17:34:29 +02:00
}
/*****************************************************************************/
2001-03-26 23:29:09 +02:00
void CLayerPlatform::GUIChanged(CCore *Core)
2001-03-26 17:34:29 +02:00
{
2001-03-29 19:59:01 +02:00
/*
if (CurrentThing!=-1)
{
sLayerThing &ThisThing=ThingList[CurrentThing];
ThisThing.Data.Speed=GUI.GetVal(GUI.m_Speed);
ThisThing.Data.TurnRate=GUI.GetVal(GUI.m_TurnRate);
ThisThing.Data.Health=GUI.GetVal(GUI.m_Health);
ThisThing.Data.AttackStrength=GUI.GetVal(GUI.m_Attack);
ThisThing.Data.CollisionFlag=GUI.m_Collision.GetCheck()!=0;
ThisThing.Data.PlayerFlag=GUI.m_Player.GetCheck()!=0;
}
*/
2001-03-26 17:34:29 +02:00
}