This commit is contained in:
parent
08c732c29a
commit
aefdd396f8
51 changed files with 1467 additions and 682 deletions
|
@ -30,7 +30,7 @@ CLayerPlatform::CLayerPlatform(sLayerDef &Def)
|
|||
/*****************************************************************************/
|
||||
void CLayerPlatform::InitLayer(sLayerDef &Def)
|
||||
{
|
||||
ThingBank=new CElemBank(-1,-1,false,0);
|
||||
ThingBank=new CElemBank(-1,-1,false,CElem::CentreModeLR /*| CElem::CentreModeB*/);
|
||||
CLayerThing::InitLayer(Def);
|
||||
LoadThingScript(theApp.GetConfigStr("LayerScript","PlatformScript"));
|
||||
}
|
||||
|
@ -45,23 +45,42 @@ void CLayerPlatform::InitSubView(CCore *Core)
|
|||
/*****************************************************************************/
|
||||
void CLayerPlatform::GUIInit(CCore *Core)
|
||||
{
|
||||
// GUI.DisableCallback(true);
|
||||
// Core->GUIAdd(GUI,IDD_LAYER_Platform);
|
||||
// GUI.DisableCallback(false);
|
||||
GUIPlatform.DisableCallback(true);
|
||||
Core->GUIAdd(GUIThing,IDD_LAYER_THING);
|
||||
Core->GUIAdd(GUIThingPos,IDD_LAYER_THING_POS);
|
||||
Core->GUIAdd(GUIPlatform,IDD_LAYER_PLATFORM);
|
||||
GUIPlatform.DisableCallback(false);
|
||||
|
||||
// Init type lists
|
||||
{
|
||||
CComboBox &List=GUIPlatform.m_MoveList;
|
||||
List.AddString("Linear");
|
||||
List.AddString("Circular");
|
||||
}
|
||||
|
||||
{
|
||||
CComboBox &List=GUIPlatform.m_Type;
|
||||
List.AddString("Normal");
|
||||
List.AddString("Weighted");
|
||||
List.AddString("Rotating");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CLayerPlatform::GUIKill(CCore *Core)
|
||||
{
|
||||
// Core->GUIRemove(GUI,IDD_LAYER_Platform);
|
||||
Core->GUIRemove(GUIThing,IDD_LAYER_THING);
|
||||
Core->GUIRemove(GUIThingPos,IDD_LAYER_THING_POS);
|
||||
Core->GUIRemove(GUIPlatform,IDD_LAYER_PLATFORM);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CLayerPlatform::GUIUpdate(CCore *Core)
|
||||
{
|
||||
/*
|
||||
int i,ListSize;
|
||||
CComboBox &List=GUI.m_List;
|
||||
CComboBox &List=GUIThing.m_DefList;
|
||||
|
||||
// Setup Def Platform List
|
||||
ListSize=DefList.size();
|
||||
|
@ -73,66 +92,79 @@ CComboBox &List=GUI.m_List;
|
|||
List.SetCurSel(CurrentDefThing);
|
||||
|
||||
GUIThingUpdate();
|
||||
*/
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CLayerPlatform::GUIThingDefClear()
|
||||
{
|
||||
/*
|
||||
CComboBox &List=GUI.m_List;
|
||||
CComboBox &List=GUIThing.m_DefList;
|
||||
CurrentDefThing=-1;
|
||||
List.SetCurSel(CurrentDefThing);
|
||||
*/
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CLayerPlatform::GUIThingUpdate(bool OnlySel)
|
||||
{
|
||||
// CLayerThing::GUIThingUpdateList(GUI.
|
||||
GUIThingUpdateList(GUIThing.m_List,false);
|
||||
// Params
|
||||
GUIPlatform.DisableCallback(true);
|
||||
if (CurrentThing!=-1)
|
||||
{
|
||||
sLayerThing &ThisThing=ThingList[CurrentThing];
|
||||
GUIPlatform.SetVal(GUIPlatform.m_Speed,ThisThing.Data.Speed);
|
||||
GUIPlatform.SetVal(GUIPlatform.m_TurnRate,ThisThing.Data.TurnRate);
|
||||
GUIPlatform.m_Collision.SetCheck(ThisThing.Data.CollisionFlag);
|
||||
GUIPlatform.m_MoveList.SetCurSel(ThisThing.Data.MoveType);
|
||||
GUIPlatform.m_Type.SetCurSel(ThisThing.Data.PlatformType);
|
||||
}
|
||||
else
|
||||
{
|
||||
GUIPlatform.m_Speed.SetWindowText("");
|
||||
GUIPlatform.m_TurnRate.SetWindowText("");
|
||||
GUIPlatform.m_Collision.SetCheck(false);
|
||||
GUIPlatform.m_MoveList.SetCurSel(-1);
|
||||
GUIPlatform.m_Type.SetCurSel(-1);
|
||||
}
|
||||
GUIPlatform.DisableCallback(false);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CLayerPlatform::GUIThingPointUpdate(bool OnlySel)
|
||||
{
|
||||
/*
|
||||
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);
|
||||
}
|
||||
*/
|
||||
GUIThingPointUpdateList(GUIThingPos.m_List,OnlySel);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CLayerPlatform::GUIChanged(CCore *Core)
|
||||
{
|
||||
/*
|
||||
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;
|
||||
ThisThing.Data.Speed=GUIPlatform.GetVal(GUIPlatform.m_Speed);
|
||||
ThisThing.Data.TurnRate=GUIPlatform.GetVal(GUIPlatform.m_TurnRate);
|
||||
ThisThing.Data.CollisionFlag=GUIPlatform.m_Collision.GetCheck()!=0;
|
||||
ThisThing.Data.MoveType=GUIPlatform.m_MoveList.GetCurSel();
|
||||
ThisThing.Data.PlatformType=GUIPlatform.m_Type.GetCurSel();
|
||||
SetThingParams(ThisThing);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CLayerPlatform::SetThingParams(sLayerThing &Thing)
|
||||
{
|
||||
switch(Thing.Data.MoveType)
|
||||
{
|
||||
case MoveTypeLinear:
|
||||
Thing.Data.WaypointCount=16;
|
||||
break;
|
||||
case MoveTypeCirular:
|
||||
Thing.Data.WaypointCount=1;
|
||||
if (Thing.XY.size()>2)
|
||||
{
|
||||
Thing.XY.resize(2);
|
||||
GUIThingPointUpdate();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue