This commit is contained in:
parent
08c732c29a
commit
aefdd396f8
51 changed files with 1467 additions and 682 deletions
|
@ -37,12 +37,13 @@ enum CmdMsg
|
|||
|
||||
// Thing
|
||||
CmdMsg_ThingListDelete, // 23
|
||||
CmdMsg_ThingListSelect, // 24
|
||||
CmdMsg_ThingLevelSelect, // 25
|
||||
CmdMsg_ThingPosSelect, // 26
|
||||
CmdMsg_ThingPosUp, // 27
|
||||
CmdMsg_ThingPosDown, // 28
|
||||
CmdMsg_ThingPosDelete, // 29
|
||||
CmdMsg_ThingListGoto, // 24
|
||||
CmdMsg_ThingListSelect, // 25
|
||||
CmdMsg_ThingLevelSelect, // 26
|
||||
CmdMsg_ThingPosSelect, // 27
|
||||
CmdMsg_ThingPosUp, // 28
|
||||
CmdMsg_ThingPosDown, // 29
|
||||
CmdMsg_ThingPosDelete, // 30
|
||||
};
|
||||
#endif
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -82,18 +82,21 @@ int Width,Height;
|
|||
// Create Tile Layers
|
||||
AddLayer(LAYER_TYPE_TILE,LAYER_SUBTYPE_ACTION, Width, Height);
|
||||
#ifdef _DEBUG
|
||||
AddLayer(LAYER_TYPE_TRIGGER,LAYER_SUBTYPE_NONE, Width, Height);
|
||||
AddLayer(LAYER_TYPE_PLATFORM,LAYER_SUBTYPE_NONE, Width, Height);
|
||||
AddLayer(LAYER_TYPE_FX,LAYER_SUBTYPE_NONE, Width, Height);
|
||||
AddLayer(LAYER_TYPE_ACTOR,LAYER_SUBTYPE_NONE, Width, Height);
|
||||
AddLayer(LAYER_TYPE_ITEM,LAYER_SUBTYPE_NONE, Width, Height);
|
||||
// AddLayer(LAYER_TYPE_ITEM,LAYER_SUBTYPE_NONE, Width, Height);
|
||||
#endif
|
||||
for (int i=0; i<Layer.size(); i++)
|
||||
{
|
||||
Layer[i]->InitSubView(this);
|
||||
}
|
||||
|
||||
|
||||
ActiveLayer=FindLayer(LAYER_TYPE_TILE,LAYER_SUBTYPE_ACTION);
|
||||
#ifdef _DEBUG
|
||||
ActiveLayer=FindLayer(LAYER_TYPE_ACTOR,LAYER_SUBTYPE_NONE);
|
||||
ActiveLayer=FindLayer(LAYER_TYPE_PLATFORM,LAYER_SUBTYPE_NONE);
|
||||
if (ActiveLayer<0) ActiveLayer=0;
|
||||
#endif
|
||||
CurrentLayer=Layer[ActiveLayer];
|
||||
return(TRUE);
|
||||
|
@ -157,6 +160,7 @@ int MapHeight=ActionLayer->GetHeight();
|
|||
{
|
||||
Layer[i]->CheckLayerSize(MapWidth,MapHeight);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -401,7 +405,7 @@ bool RedrawFlag=false;
|
|||
Zoom(+0.1f);
|
||||
break;
|
||||
case CmdMsg_ResetView:
|
||||
ResetView();
|
||||
SetCamPos(DefaultCamPos);
|
||||
break;
|
||||
case CmdMsg_SetLayer:
|
||||
SetLayer(Param0);
|
||||
|
@ -524,31 +528,6 @@ sLayerDef ThisDef;
|
|||
|
||||
Lyr=CLayer::NewLayer(ThisDef);
|
||||
Idx=AddLayer(Lyr);
|
||||
/* switch (Type)
|
||||
{
|
||||
case LAYER_TYPE_TILE:
|
||||
Idx=AddLayer(new CLayerTile(SubType, Width,Height));
|
||||
break;
|
||||
case LAYER_TYPE_COLLISION:
|
||||
Idx=AddLayer(new CLayerCollision(SubType, Width,Height));
|
||||
break;
|
||||
case LAYER_TYPE_SHADE:
|
||||
Idx=AddLayer(new CLayerShade(SubType, Width,Height));
|
||||
break;
|
||||
case LAYER_TYPE_ACTOR:
|
||||
Idx=AddLayer(new CLayerActor(SubType, Width,Height));
|
||||
break;
|
||||
case LAYER_TYPE_ITEM:
|
||||
Idx=AddLayer(new CLayerItem(SubType, Width,Height));
|
||||
break;
|
||||
case LAYER_TYPE_PLATFORM:
|
||||
Idx=AddLayer(new CLayerPlatform(SubType, Width,Height));
|
||||
break;
|
||||
default:
|
||||
ASSERT(!"AddLayer - Invalid Layer Type");
|
||||
break;
|
||||
}
|
||||
*/
|
||||
if (ActionLayer) Layer[Idx]->InitSubView(this);
|
||||
return(Idx);
|
||||
}
|
||||
|
@ -593,10 +572,20 @@ void CCore::DeleteLayer(int ThisLayer)
|
|||
|
||||
if (Layer[ThisLayer]->CanDelete())
|
||||
{
|
||||
// Layer[CurrentLayer]->GUIKill(this);
|
||||
SetLayer(ThisLayer-1,true);
|
||||
Layer[ThisLayer]->GUIKill(this);
|
||||
delete Layer[ThisLayer];
|
||||
Layer.erase(Layer.begin() + ThisLayer);
|
||||
UpdateLayerGUI();
|
||||
|
||||
if (ActiveLayer==ThisLayer)
|
||||
{
|
||||
ActiveLayer--;
|
||||
if (ActiveLayer<0) ActiveLayer=0;
|
||||
CurrentLayer=Layer[ActiveLayer];
|
||||
CurrentLayer->GUIInit(this);
|
||||
GUIUpdate();
|
||||
}
|
||||
|
||||
TRACE1("Deleted Layer %i\n",ThisLayer);
|
||||
}
|
||||
else
|
||||
|
@ -675,11 +664,21 @@ Vector3 &ThisCam=GetCam();
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CCore::ResetView()
|
||||
void CCore::SetCamPos(Vector3 Pos)
|
||||
{
|
||||
Vector3 &ThisCam=GetCam();
|
||||
|
||||
ThisCam=DefaultCamPos;
|
||||
ThisCam=Pos;
|
||||
UpdateView();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CCore::SetCamPos(CPoint &Pos)
|
||||
{
|
||||
Vector3 &ThisCam=GetCam();
|
||||
|
||||
ThisCam.x=Pos.x;
|
||||
ThisCam.y=Pos.y;
|
||||
UpdateView();
|
||||
}
|
||||
|
||||
|
@ -813,9 +812,8 @@ Vector3 ThisCam=Cam;
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CCore::Export(char *Filename)
|
||||
void CCore::Export(const char *Filename)
|
||||
{
|
||||
|
||||
int LayerCount=Layer.size();
|
||||
char ExportName[256];
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "Layer.h"
|
||||
#include "LayerTile.h"
|
||||
|
||||
const s32 FileVersion=6;
|
||||
const s32 FileVersion=8;
|
||||
|
||||
#define SCREEN_MAP_WIDTH 30
|
||||
#define SCREEN_MAP_HEIGHT 20
|
||||
|
@ -44,7 +44,7 @@ public:
|
|||
void Render(bool ForceRender=FALSE);
|
||||
void RenderLayers(bool OneShot=false);
|
||||
void RenderNumber(int No);
|
||||
void Export(char *Filename);
|
||||
void Export(const char *Filename);
|
||||
void RenderToTga(char *Filename);
|
||||
void RenderToTga();
|
||||
|
||||
|
@ -116,7 +116,9 @@ public:
|
|||
void CopySelection();
|
||||
void PasteSelection();
|
||||
|
||||
void ResetView();
|
||||
void SetCamPos(Vector3 Pos);
|
||||
void SetCamPos(CPoint &Pos);
|
||||
|
||||
CElemBank *GetIconBank() {return(IconBank);}
|
||||
|
||||
private:
|
||||
|
|
|
@ -66,12 +66,13 @@ CElem::CElem(int Width,int Height)
|
|||
ElemID=-1;
|
||||
int AW=AlignSize(ElemWidth);
|
||||
int AH=AlignSize(ElemHeight);
|
||||
ElemRGB=0;
|
||||
ElemRGB=(u8*)MemAlloc(AW*AH*3);
|
||||
memset(ElemRGB,0,AW*AH*3);
|
||||
Type=ElemType2d;
|
||||
TexXOfs=0;
|
||||
TexYOfs=0;
|
||||
for (int i=0; i<ElemTypeMax; i++) DrawList[i]=BlankID;
|
||||
BlankFlag=true;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -89,6 +90,7 @@ GFName Path=Filename;
|
|||
Type=ElemType3d;
|
||||
TexXOfs=-1;
|
||||
TexYOfs=-1;
|
||||
ElemRGB=0;
|
||||
Ofs.Zero();
|
||||
Build3dElem(TexCache,ThisScene,Node);
|
||||
Calc3dSize();
|
||||
|
@ -96,11 +98,8 @@ GFName Path=Filename;
|
|||
Ofs.Zero();
|
||||
Create2dTexture(TexCache,Path.File(),Node);
|
||||
Build2dDrawList(TexCache,DrawList[ElemType2d]);
|
||||
if (!ValidFlag)
|
||||
{
|
||||
Purge(); // Clear whatever is already there
|
||||
for (int i=0; i<ElemTypeMax; i++) DrawList[i]=InvalidID;
|
||||
}
|
||||
BlankFlag=false;
|
||||
if (!ValidFlag) SetInvalid();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -115,6 +114,7 @@ GFName Path=Filename;
|
|||
ElemHeight=Height;
|
||||
UnitWidth=ElemWidth/UnitSize;
|
||||
UnitHeight=ElemHeight/UnitSize;
|
||||
ElemRGB=0;
|
||||
|
||||
Type=ElemType2d;
|
||||
TexXOfs=XOfs;
|
||||
|
@ -152,17 +152,28 @@ GFName Path=Filename;
|
|||
Build3dDrawList(TexCache,DrawList[ElemType3d]);
|
||||
Create2dTexture(TexCache,Path.File(),TexID);
|
||||
Build2dDrawList(TexCache,DrawList[ElemType2d]);
|
||||
if (!ValidFlag)
|
||||
{
|
||||
Purge(); // Clear whatever is already there
|
||||
for (int i=0; i<ElemTypeMax; i++) DrawList[i]=InvalidID;
|
||||
}
|
||||
BlankFlag=false;
|
||||
if (!ValidFlag) SetInvalid();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CElem::CleanUp()
|
||||
{
|
||||
MemFree(ElemRGB);
|
||||
if (ElemRGB) MemFree(ElemRGB);
|
||||
ElemRGB=0;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CElem::SetBlank()
|
||||
{
|
||||
for (int i=0; i<ElemTypeMax; i++) DrawList[i]=BlankID;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CElem::SetInvalid()
|
||||
{
|
||||
Purge(); // Clear whatever is already there
|
||||
for (int i=0; i<ElemTypeMax; i++) DrawList[i]=InvalidID;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -402,6 +413,11 @@ float ScaleU,ScaleV;
|
|||
/*****************************************************************************/
|
||||
void CElem::Render(int Flags,bool Render3d)
|
||||
{
|
||||
if (BlankFlag)
|
||||
{
|
||||
glCallList(BlankID);
|
||||
return;
|
||||
}
|
||||
glPushMatrix();
|
||||
|
||||
if (Flags & PC_TILE_FLAG_MIRROR_X)
|
||||
|
@ -452,6 +468,7 @@ void CElem::Purge()
|
|||
{
|
||||
for (int i=0; i<ElemTypeMax; i++)
|
||||
glDeleteLists(DrawList[i],1);
|
||||
CleanUp();
|
||||
TriList.clear();
|
||||
}
|
||||
|
||||
|
@ -646,6 +663,12 @@ GFName FName=Filename;
|
|||
GString Ext=FName.Ext();
|
||||
Ext.Upper();
|
||||
if (!CElem::DefTexFlag) CElem::CreateDefaultTileGfx();
|
||||
|
||||
if (!ElemList.size())
|
||||
{
|
||||
// ElemList[0].SetBlank();
|
||||
}
|
||||
|
||||
if (Ext=="GIN")
|
||||
Load3d(Core);
|
||||
else
|
||||
|
@ -697,13 +720,24 @@ int ChildCount=ThisNode.GetPruneChildCount();
|
|||
/*****************************************************************************/
|
||||
void CElemSet::Purge()
|
||||
{
|
||||
int ListSize=ElemList.size();
|
||||
int i,ListSize=ElemList.size();
|
||||
|
||||
for (int i=0; i<ListSize; i++)
|
||||
for (i=0; i<ListSize; i++)
|
||||
{
|
||||
if (!ElemList[i].IsBlank())
|
||||
{
|
||||
ElemList[i].Purge();
|
||||
}
|
||||
}
|
||||
|
||||
if (ElemList[0].IsBlank())
|
||||
{
|
||||
ElemList.erase(1,ListSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
ElemList.clear();
|
||||
}
|
||||
Loaded=FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -67,6 +67,7 @@ public:
|
|||
|
||||
bool IsValid() {return(ValidFlag);}
|
||||
|
||||
bool IsBlank() {return(BlankFlag);}
|
||||
bool IsElem3d() {return(Type==ElemType3d);}
|
||||
int GetTexXOfs() {return(TexXOfs);}
|
||||
int GetTexYOfs() {return(TexYOfs);}
|
||||
|
@ -78,6 +79,8 @@ static bool DefTexFlag;
|
|||
|
||||
std::vector<sTriFace> &GetTriList() {return(TriList);}
|
||||
|
||||
void SetBlank();
|
||||
void SetInvalid();
|
||||
protected:
|
||||
void Build3dElem(CTexCache &TexCache,CScene &ThisScene,int Node);
|
||||
void Build2dElem(CCore *Core,const char *Filename,int TexId);
|
||||
|
@ -96,7 +99,7 @@ protected:
|
|||
|
||||
GLint DrawList[ElemTypeMax];
|
||||
ElemType Type;
|
||||
bool ValidFlag;
|
||||
bool ValidFlag,BlankFlag;
|
||||
int TexXOfs,TexYOfs;
|
||||
|
||||
int ElemWidth,ElemHeight;
|
||||
|
|
|
@ -110,15 +110,26 @@ BOOL operator==(sExpMapElem const &v1)
|
|||
/*****************************************************************************/
|
||||
/*** Things ******************************************************************/
|
||||
/*****************************************************************************/
|
||||
struct sExpLayerThing
|
||||
struct sLayerThingData
|
||||
{
|
||||
int Health;
|
||||
int AttackStrength;
|
||||
int WaypointCount;
|
||||
|
||||
int Speed;
|
||||
int TurnRate;
|
||||
int Health;
|
||||
int AttackStrength;
|
||||
bool CollisionFlag;
|
||||
bool PlayerFlag;
|
||||
int Spare[8];
|
||||
|
||||
// Platform
|
||||
int MoveType;
|
||||
int PlatformType;
|
||||
// Boxes
|
||||
int Width,Height;
|
||||
// Spare
|
||||
int Spare[4];
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -38,23 +38,13 @@ void CGUILayerActor::DoDataExchange(CDataExchange* pDX)
|
|||
DDX_Control(pDX, IDC_ACTOR_SPEED, m_Speed);
|
||||
DDX_Control(pDX, IDC_ACTOR_ATTACK, m_Attack);
|
||||
DDX_Control(pDX, IDC_ACTOR_HEALTH, m_Health);
|
||||
DDX_Control(pDX, IDC_LEVEL_ACTOR_LIST, m_LevelList);
|
||||
DDX_Control(pDX, IDC_ACTOR_POS_LIST, m_PosList);
|
||||
DDX_Control(pDX, IDC_ACTOR_LIST, m_List);
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CGUILayerActor, CDialog)
|
||||
//{{AFX_MSG_MAP(CGUILayerActor)
|
||||
ON_BN_CLICKED(IDC_ACTOR_DELETE, OnActorDelete)
|
||||
ON_BN_CLICKED(IDC_ACTOR_POS_UP, OnActorPosUp)
|
||||
ON_BN_CLICKED(IDC_ACTOR_POS_DOWN, OnActorPosDown)
|
||||
ON_BN_CLICKED(IDC_ACTOR_POS_DELETE, OnActorPosDelete)
|
||||
ON_EN_CHANGE(IDC_ACTOR_HEALTH, OnChangeParam)
|
||||
ON_CBN_SELCHANGE(IDC_ACTOR_LIST, OnSelchangeActorList)
|
||||
ON_CBN_SELCHANGE(IDC_LEVEL_ACTOR_LIST, OnSelchangeLevelActorList)
|
||||
ON_LBN_SELCHANGE(IDC_ACTOR_POS_LIST, OnSelchangeActorPosList)
|
||||
ON_EN_CHANGE(IDC_ACTOR_ATTACK, OnChangeParam)
|
||||
ON_BN_CLICKED(IDC_ACTOR_COLLISION, OnChangeParam)
|
||||
ON_EN_CHANGE(IDC_ACTOR_SPEED, OnChangeParam)
|
||||
|
@ -88,14 +78,4 @@ int Val=0;
|
|||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CGUILayerActor message handlers
|
||||
|
||||
void CGUILayerActor::OnSelchangeActorList() {theApp.GetCurrent()->Command(CmdMsg_ThingListSelect,m_List.GetCurSel());}
|
||||
void CGUILayerActor::OnActorDelete() {theApp.GetCurrent()->Command(CmdMsg_ThingListDelete,m_List.GetCurSel());}
|
||||
|
||||
void CGUILayerActor::OnSelchangeLevelActorList() {theApp.GetCurrent()->Command(CmdMsg_ThingLevelSelect,m_LevelList.GetCurSel());}
|
||||
|
||||
void CGUILayerActor::OnSelchangeActorPosList() {theApp.GetCurrent()->Command(CmdMsg_ThingPosSelect,m_PosList.GetCurSel());}
|
||||
void CGUILayerActor::OnActorPosUp() {theApp.GetCurrent()->Command(CmdMsg_ThingPosUp,m_PosList.GetCurSel());}
|
||||
void CGUILayerActor::OnActorPosDown() {theApp.GetCurrent()->Command(CmdMsg_ThingPosDown,m_PosList.GetCurSel());}
|
||||
void CGUILayerActor::OnActorPosDelete() {theApp.GetCurrent()->Command(CmdMsg_ThingPosDelete,m_PosList.GetCurSel());}
|
||||
|
||||
void CGUILayerActor::OnChangeParam() {if (!CallbackFlag) theApp.GetCurrent()->GUIChanged();}
|
||||
|
|
|
@ -25,9 +25,6 @@ public:
|
|||
CEdit m_Speed;
|
||||
CEdit m_Attack;
|
||||
CEdit m_Health;
|
||||
CComboBox m_LevelList;
|
||||
CListBox m_PosList;
|
||||
CComboBox m_List;
|
||||
//}}AFX_DATA
|
||||
|
||||
|
||||
|
@ -49,14 +46,7 @@ protected:
|
|||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(CGUILayerActor)
|
||||
afx_msg void OnActorDelete();
|
||||
afx_msg void OnActorPosUp();
|
||||
afx_msg void OnActorPosDown();
|
||||
afx_msg void OnActorPosDelete();
|
||||
afx_msg void OnChangeParam();
|
||||
afx_msg void OnSelchangeActorList();
|
||||
afx_msg void OnSelchangeLevelActorList();
|
||||
afx_msg void OnSelchangeActorPosList();
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
#include "mapedit.h"
|
||||
#include "GUILayerFX.h"
|
||||
|
||||
#include "MapEditDoc.h"
|
||||
#include "MainFrm.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
|
@ -18,9 +21,10 @@ static char THIS_FILE[] = __FILE__;
|
|||
CGUILayerFX::CGUILayerFX(CWnd* pParent /*=NULL*/)
|
||||
: CDialog(CGUILayerFX::IDD, pParent)
|
||||
{
|
||||
DisableCallback(true);
|
||||
//{{AFX_DATA_INIT(CGUILayerFX)
|
||||
// NOTE: the ClassWizard will add member initialization here
|
||||
//}}AFX_DATA_INIT
|
||||
DisableCallback(false);
|
||||
}
|
||||
|
||||
|
||||
|
@ -28,16 +32,45 @@ void CGUILayerFX::DoDataExchange(CDataExchange* pDX)
|
|||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(CGUILayerFX)
|
||||
// NOTE: the ClassWizard will add DDX and DDV calls here
|
||||
DDX_Control(pDX, IDC_FX_WIDTH, m_Width);
|
||||
DDX_Control(pDX, IDC_FX_HEIGHT, m_Height);
|
||||
DDX_Control(pDX, IDC_FX_SPEED, m_Speed);
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CGUILayerFX, CDialog)
|
||||
//{{AFX_MSG_MAP(CGUILayerFX)
|
||||
// NOTE: the ClassWizard will add message map macros here
|
||||
ON_EN_CHANGE(IDC_FX_SPEED, OnParamChange)
|
||||
ON_EN_CHANGE(IDC_FX_HEIGHT, OnParamChange)
|
||||
ON_EN_CHANGE(IDC_FX_WIDTH, OnParamChange)
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
void CGUILayerFX::SetVal(CEdit &Dlg,int Val)
|
||||
{
|
||||
CString Str;
|
||||
if (!Dlg) return;
|
||||
DisableCallback(true);
|
||||
Str.Format("%i",Val);
|
||||
Dlg.SetWindowText(Str);
|
||||
DisableCallback(false);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
int CGUILayerFX::GetVal(CEdit &Dlg)
|
||||
{
|
||||
CString Str;
|
||||
int Val=0;
|
||||
if (!Dlg) return(0);
|
||||
Dlg.GetWindowText(Str);
|
||||
if (Str.GetLength())
|
||||
Val=atoi(Str);
|
||||
return(Val);
|
||||
}
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CGUILayerFX message handlers
|
||||
|
||||
void CGUILayerFX::OnParamChange() {if (!CallbackFlag) theApp.GetCurrent()->GUIChanged();}
|
||||
|
|
|
@ -19,7 +19,9 @@ public:
|
|||
// Dialog Data
|
||||
//{{AFX_DATA(CGUILayerFX)
|
||||
enum { IDD = IDD_LAYER_FX };
|
||||
// NOTE: the ClassWizard will add data members here
|
||||
CEdit m_Width;
|
||||
CEdit m_Height;
|
||||
CEdit m_Speed;
|
||||
//}}AFX_DATA
|
||||
|
||||
|
||||
|
@ -31,11 +33,17 @@ public:
|
|||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
|
||||
public:
|
||||
void DisableCallback(bool f) {CallbackFlag=f;}
|
||||
void SetVal(CEdit &Dlg,int Number);
|
||||
int GetVal(CEdit &Dlg);
|
||||
protected:
|
||||
bool CallbackFlag;
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(CGUILayerFX)
|
||||
// NOTE: the ClassWizard will add member functions here
|
||||
afx_msg void OnParamChange();
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
#include "mapedit.h"
|
||||
#include "GUILayerPlatform.h"
|
||||
|
||||
#include "MapEditDoc.h"
|
||||
#include "MainFrm.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
|
@ -18,9 +21,10 @@ static char THIS_FILE[] = __FILE__;
|
|||
CGUILayerPlatform::CGUILayerPlatform(CWnd* pParent /*=NULL*/)
|
||||
: CDialog(CGUILayerPlatform::IDD, pParent)
|
||||
{
|
||||
DisableCallback(true);
|
||||
//{{AFX_DATA_INIT(CGUILayerPlatform)
|
||||
// NOTE: the ClassWizard will add member initialization here
|
||||
//}}AFX_DATA_INIT
|
||||
DisableCallback(false);
|
||||
}
|
||||
|
||||
|
||||
|
@ -28,16 +32,49 @@ void CGUILayerPlatform::DoDataExchange(CDataExchange* pDX)
|
|||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(CGUILayerPlatform)
|
||||
// NOTE: the ClassWizard will add DDX and DDV calls here
|
||||
DDX_Control(pDX, IDC_PLATFORM_TYPE, m_Type);
|
||||
DDX_Control(pDX, IDC_PLATFORM_MOVE_TYPE, m_MoveList);
|
||||
DDX_Control(pDX, IDC_PLATFORM_COLLISION, m_Collision);
|
||||
DDX_Control(pDX, IDC_PLATFORM_TURNRATE, m_TurnRate);
|
||||
DDX_Control(pDX, IDC_PLATFORM_SPEED, m_Speed);
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CGUILayerPlatform, CDialog)
|
||||
//{{AFX_MSG_MAP(CGUILayerPlatform)
|
||||
// NOTE: the ClassWizard will add message map macros here
|
||||
ON_EN_CHANGE(IDC_PLATFORM_SPEED, OnChangeParam)
|
||||
ON_BN_CLICKED(IDC_PLATFORM_COLLISION, OnChangeParam)
|
||||
ON_EN_CHANGE(IDC_PLATFORM_TURNRATE, OnChangeParam)
|
||||
ON_CBN_SELCHANGE(IDC_PLATFORM_TYPE, OnChangeParam)
|
||||
ON_CBN_SELCHANGE(IDC_PLATFORM_MOVE_TYPE, OnChangeParam)
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
void CGUILayerPlatform::SetVal(CEdit &Dlg,int Val)
|
||||
{
|
||||
CString Str;
|
||||
if (!Dlg) return;
|
||||
DisableCallback(true);
|
||||
Str.Format("%i",Val);
|
||||
Dlg.SetWindowText(Str);
|
||||
DisableCallback(false);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
int CGUILayerPlatform::GetVal(CEdit &Dlg)
|
||||
{
|
||||
CString Str;
|
||||
int Val=0;
|
||||
if (!Dlg) return(0);
|
||||
Dlg.GetWindowText(Str);
|
||||
if (Str.GetLength())
|
||||
Val=atoi(Str);
|
||||
return(Val);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CGUILayerPlatform message handlers
|
||||
|
||||
void CGUILayerPlatform::OnChangeParam() {if (!CallbackFlag) theApp.GetCurrent()->GUIChanged();}
|
||||
|
|
|
@ -19,7 +19,11 @@ public:
|
|||
// Dialog Data
|
||||
//{{AFX_DATA(CGUILayerPlatform)
|
||||
enum { IDD = IDD_LAYER_PLATFORM };
|
||||
// NOTE: the ClassWizard will add data members here
|
||||
CComboBox m_Type;
|
||||
CComboBox m_MoveList;
|
||||
CButton m_Collision;
|
||||
CEdit m_TurnRate;
|
||||
CEdit m_Speed;
|
||||
//}}AFX_DATA
|
||||
|
||||
|
||||
|
@ -31,11 +35,16 @@ public:
|
|||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
public:
|
||||
void DisableCallback(bool f) {CallbackFlag=f;}
|
||||
void SetVal(CEdit &Dlg,int Number);
|
||||
int GetVal(CEdit &Dlg);
|
||||
protected:
|
||||
bool CallbackFlag;
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(CGUILayerPlatform)
|
||||
// NOTE: the ClassWizard will add member functions here
|
||||
afx_msg void OnChangeParam();
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
|
|
@ -36,6 +36,18 @@ void CGUILayerShade::DoDataExchange(CDataExchange* pDX)
|
|||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(CGUILayerShade)
|
||||
DDX_Control(pDX, IDC_LAYERSHADE_SPIN1, m_Spin1);
|
||||
DDX_Control(pDX, IDC_LAYERSHADE_SPIN0, m_Spin0);
|
||||
DDX_Control(pDX, IDC_LAYERSHADE_SCALE1, m_Scale1);
|
||||
DDX_Control(pDX, IDC_LAYERSHADE_SCALE0, m_Scale0);
|
||||
DDX_Control(pDX, IDC_LAYERSHADE_MOVE1, m_Move1);
|
||||
DDX_Control(pDX, IDC_LAYERSHADE_MOVE0, m_Move0);
|
||||
DDX_Control(pDX, IDC_LAYERSHADE_COLOR1, m_Color1);
|
||||
DDX_Control(pDX, IDC_LAYERSHADE_COLOR0, m_Color0);
|
||||
DDX_Control(pDX, IDC_LAYERSHADE_TRANS1, m_Trans1);
|
||||
DDX_Control(pDX, IDC_LAYERSHADE_TRANS0, m_Trans0);
|
||||
DDX_Control(pDX, IDC_LAYERSHADE_BACKGFX1, m_Gfx1);
|
||||
DDX_Control(pDX, IDC_LAYERSHADE_BACKGFX0, m_Gfx0);
|
||||
DDX_Control(pDX, IDC_LAYERSHADE_EDITR0, m_R0);
|
||||
DDX_Control(pDX, IDC_LAYERSHADE_EDITG0, m_G0);
|
||||
DDX_Control(pDX, IDC_LAYERSHADE_EDITB0, m_B0);
|
||||
|
@ -56,6 +68,7 @@ void CGUILayerShade::DoDataExchange(CDataExchange* pDX)
|
|||
BEGIN_MESSAGE_MAP(CGUILayerShade, CDialog)
|
||||
//{{AFX_MSG_MAP(CGUILayerShade)
|
||||
ON_EN_CHANGE(IDC_LAYERSHADE_EDITB0, OnChangeLayershadeEdit)
|
||||
ON_CBN_SELCHANGE(IDC_LAYERSHADE_BACKGFX0, OnChangeParam)
|
||||
ON_EN_CHANGE(IDC_LAYERSHADE_EDITB1, OnChangeLayershadeEdit)
|
||||
ON_EN_CHANGE(IDC_LAYERSHADE_EDITG0, OnChangeLayershadeEdit)
|
||||
ON_EN_CHANGE(IDC_LAYERSHADE_EDITG1, OnChangeLayershadeEdit)
|
||||
|
@ -68,6 +81,17 @@ BEGIN_MESSAGE_MAP(CGUILayerShade, CDialog)
|
|||
ON_EN_CHANGE(IDC_LAYERSHADE_EDITR2, OnChangeLayershadeEdit)
|
||||
ON_EN_CHANGE(IDC_LAYERSHADE_EDITR3, OnChangeLayershadeEdit)
|
||||
ON_EN_CHANGE(IDC_LAYERSHADE_COUNTEDIT, OnChangeLayershadeEdit)
|
||||
ON_CBN_SELCHANGE(IDC_LAYERSHADE_BACKGFX1, OnChangeParam)
|
||||
ON_BN_CLICKED(IDC_LAYERSHADE_COLOR0, OnChangeParam)
|
||||
ON_BN_CLICKED(IDC_LAYERSHADE_COLOR1, OnChangeParam)
|
||||
ON_BN_CLICKED(IDC_LAYERSHADE_MOVE0, OnChangeParam)
|
||||
ON_BN_CLICKED(IDC_LAYERSHADE_MOVE1, OnChangeParam)
|
||||
ON_BN_CLICKED(IDC_LAYERSHADE_SCALE0, OnChangeParam)
|
||||
ON_BN_CLICKED(IDC_LAYERSHADE_SCALE1, OnChangeParam)
|
||||
ON_BN_CLICKED(IDC_LAYERSHADE_SPIN0, OnChangeParam)
|
||||
ON_BN_CLICKED(IDC_LAYERSHADE_SPIN1, OnChangeParam)
|
||||
ON_CBN_SELCHANGE(IDC_LAYERSHADE_TRANS0, OnChangeParam)
|
||||
ON_CBN_SELCHANGE(IDC_LAYERSHADE_TRANS1, OnChangeParam)
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
@ -183,3 +207,6 @@ void CGUILayerShade::OnChangeLayershadeEdit()
|
|||
theApp.GetCurrent()->GUIChanged();
|
||||
}
|
||||
}
|
||||
|
||||
void CGUILayerShade::OnChangeParam() {if (!SetFlag) theApp.GetCurrent()->GUIChanged();}
|
||||
|
||||
|
|
|
@ -34,6 +34,18 @@ public:
|
|||
// Dialog Data
|
||||
//{{AFX_DATA(CGUILayerShade)
|
||||
enum { IDD = IDD_LAYER_SHADE };
|
||||
CButton m_Spin1;
|
||||
CButton m_Spin0;
|
||||
CButton m_Scale1;
|
||||
CButton m_Scale0;
|
||||
CButton m_Move1;
|
||||
CButton m_Move0;
|
||||
CButton m_Color1;
|
||||
CButton m_Color0;
|
||||
CComboBox m_Trans1;
|
||||
CComboBox m_Trans0;
|
||||
CComboBox m_Gfx1;
|
||||
CComboBox m_Gfx0;
|
||||
CEdit m_R0;
|
||||
CEdit m_G0;
|
||||
CEdit m_B0;
|
||||
|
@ -64,6 +76,7 @@ protected:
|
|||
// Generated message map functions
|
||||
//{{AFX_MSG(CGUILayerShade)
|
||||
afx_msg void OnChangeLayershadeEdit();
|
||||
afx_msg void OnChangeParam();
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
bool SetFlag;
|
||||
|
|
|
@ -5,12 +5,16 @@
|
|||
#include "mapedit.h"
|
||||
#include "GUILayerThing.h"
|
||||
|
||||
#include "MapEditDoc.h"
|
||||
#include "MainFrm.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
static char THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CGUILayerThing dialog
|
||||
|
||||
|
@ -28,16 +32,27 @@ void CGUILayerThing::DoDataExchange(CDataExchange* pDX)
|
|||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(CGUILayerThing)
|
||||
// NOTE: the ClassWizard will add DDX and DDV calls here
|
||||
DDX_Control(pDX, IDC_THING_LIST, m_List);
|
||||
DDX_Control(pDX, IDC_DEF_THING_LIST, m_DefList);
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CGUILayerThing, CDialog)
|
||||
//{{AFX_MSG_MAP(CGUILayerThing)
|
||||
// NOTE: the ClassWizard will add message map macros here
|
||||
ON_BN_CLICKED(IDC_THING_DELETE, OnThingDelete)
|
||||
ON_BN_CLICKED(IDC_THING_GOTO, OnThingGoto)
|
||||
ON_CBN_SELCHANGE(IDC_DEF_THING_LIST, OnSelchangeDefThingList)
|
||||
ON_CBN_SELCHANGE(IDC_THING_LIST, OnSelchangeThingList)
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CGUILayerThing message handlers
|
||||
|
||||
void CGUILayerThing::OnThingDelete() {theApp.GetCurrent()->Command(CmdMsg_ThingListDelete,m_List.GetCurSel());}
|
||||
void CGUILayerThing::OnThingGoto() {theApp.GetCurrent()->Command(CmdMsg_ThingListGoto,m_List.GetCurSel());}
|
||||
void CGUILayerThing::OnSelchangeDefThingList() {theApp.GetCurrent()->Command(CmdMsg_ThingListSelect,m_DefList.GetCurSel());}
|
||||
void CGUILayerThing::OnSelchangeThingList() {theApp.GetCurrent()->Command(CmdMsg_ThingLevelSelect,m_List.GetCurSel());}
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#if !defined(AFX_GUILAYERTHING_H__2ADF47A2_1F6C_4AA5_8E36_528C50968C89__INCLUDED_)
|
||||
#define AFX_GUILAYERTHING_H__2ADF47A2_1F6C_4AA5_8E36_528C50968C89__INCLUDED_
|
||||
#if !defined(AFX_GUILAYERTHING_H__BD4306D6_8C84_4589_B8A6_FE1C95C27018__INCLUDED_)
|
||||
#define AFX_GUILAYERTHING_H__BD4306D6_8C84_4589_B8A6_FE1C95C27018__INCLUDED_
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
|
@ -19,7 +19,8 @@ public:
|
|||
// Dialog Data
|
||||
//{{AFX_DATA(CGUILayerThing)
|
||||
enum { IDD = IDD_LAYER_THING };
|
||||
// NOTE: the ClassWizard will add data members here
|
||||
CComboBox m_List;
|
||||
CComboBox m_DefList;
|
||||
//}}AFX_DATA
|
||||
|
||||
|
||||
|
@ -35,12 +36,18 @@ protected:
|
|||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(CGUILayerThing)
|
||||
// NOTE: the ClassWizard will add member functions here
|
||||
afx_msg void OnThingDelete();
|
||||
afx_msg void OnThingGoto();
|
||||
afx_msg void OnSelchangeDefThingList();
|
||||
afx_msg void OnSelchangeThingList();
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
||||
|
||||
#endif // !defined(AFX_GUILAYERTHING_H__2ADF47A2_1F6C_4AA5_8E36_528C50968C89__INCLUDED_)
|
||||
|
||||
|
||||
#endif // !defined(AFX_GUILAYERTHING_H__BD4306D6_8C84_4589_B8A6_FE1C95C27018__INCLUDED_)
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
#include "mapedit.h"
|
||||
#include "GUILayerTrigger.h"
|
||||
|
||||
#include "MapEditDoc.h"
|
||||
#include "MainFrm.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
|
@ -18,9 +21,10 @@ static char THIS_FILE[] = __FILE__;
|
|||
CGUILayerTrigger::CGUILayerTrigger(CWnd* pParent /*=NULL*/)
|
||||
: CDialog(CGUILayerTrigger::IDD, pParent)
|
||||
{
|
||||
DisableCallback(true);
|
||||
//{{AFX_DATA_INIT(CGUILayerTrigger)
|
||||
// NOTE: the ClassWizard will add member initialization here
|
||||
//}}AFX_DATA_INIT
|
||||
DisableCallback(false);
|
||||
}
|
||||
|
||||
|
||||
|
@ -28,16 +32,42 @@ void CGUILayerTrigger::DoDataExchange(CDataExchange* pDX)
|
|||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(CGUILayerTrigger)
|
||||
// NOTE: the ClassWizard will add DDX and DDV calls here
|
||||
DDX_Control(pDX, IDC_TRIGGER_WIDTH, m_Width);
|
||||
DDX_Control(pDX, IDC_TRIGGER_HEIGHT, m_Height);
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CGUILayerTrigger, CDialog)
|
||||
//{{AFX_MSG_MAP(CGUILayerTrigger)
|
||||
// NOTE: the ClassWizard will add message map macros here
|
||||
ON_EN_CHANGE(IDC_TRIGGER_HEIGHT, OnParamChange)
|
||||
ON_EN_CHANGE(IDC_TRIGGER_WIDTH, OnParamChange)
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
void CGUILayerTrigger::SetVal(CEdit &Dlg,int Val)
|
||||
{
|
||||
CString Str;
|
||||
if (!Dlg) return;
|
||||
DisableCallback(true);
|
||||
Str.Format("%i",Val);
|
||||
Dlg.SetWindowText(Str);
|
||||
DisableCallback(false);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
int CGUILayerTrigger::GetVal(CEdit &Dlg)
|
||||
{
|
||||
CString Str;
|
||||
int Val=0;
|
||||
if (!Dlg) return(0);
|
||||
Dlg.GetWindowText(Str);
|
||||
if (Str.GetLength())
|
||||
Val=atoi(Str);
|
||||
return(Val);
|
||||
}
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CGUILayerTrigger message handlers
|
||||
|
||||
void CGUILayerTrigger::OnParamChange() {if (!CallbackFlag) theApp.GetCurrent()->GUIChanged();}
|
||||
|
|
|
@ -19,7 +19,8 @@ public:
|
|||
// Dialog Data
|
||||
//{{AFX_DATA(CGUILayerTrigger)
|
||||
enum { IDD = IDD_LAYER_TRIGGER };
|
||||
// NOTE: the ClassWizard will add data members here
|
||||
CEdit m_Width;
|
||||
CEdit m_Height;
|
||||
//}}AFX_DATA
|
||||
|
||||
|
||||
|
@ -31,11 +32,18 @@ public:
|
|||
//}}AFX_VIRTUAL
|
||||
|
||||
// Implementation
|
||||
|
||||
public:
|
||||
void DisableCallback(bool f) {CallbackFlag=f;}
|
||||
void SetVal(CEdit &Dlg,int Number);
|
||||
int GetVal(CEdit &Dlg);
|
||||
protected:
|
||||
bool CallbackFlag;
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(CGUILayerTrigger)
|
||||
// NOTE: the ClassWizard will add member functions here
|
||||
afx_msg void OnSelchangeTriggerType();
|
||||
afx_msg void OnParamChange();
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
|
|
@ -62,6 +62,7 @@ virtual CSize CalcDynamicLayout( int nLength, DWORD dwMode );
|
|||
|
||||
|
||||
|
||||
|
||||
// Dialog Data
|
||||
//{{AFX_DATA(CGUIMultiBar)
|
||||
enum { IDD = IDD_MULTIBAR };
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
#include "mapedit.h"
|
||||
#include "GuiLayerThingPos.h"
|
||||
|
||||
#include "MapEditDoc.h"
|
||||
#include "MainFrm.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#undef THIS_FILE
|
||||
|
@ -28,16 +31,24 @@ void CGuiLayerThingPos::DoDataExchange(CDataExchange* pDX)
|
|||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
//{{AFX_DATA_MAP(CGuiLayerThingPos)
|
||||
// NOTE: the ClassWizard will add DDX and DDV calls here
|
||||
DDX_Control(pDX, IDC_THING_POS_LIST, m_List);
|
||||
//}}AFX_DATA_MAP
|
||||
}
|
||||
|
||||
|
||||
BEGIN_MESSAGE_MAP(CGuiLayerThingPos, CDialog)
|
||||
//{{AFX_MSG_MAP(CGuiLayerThingPos)
|
||||
// NOTE: the ClassWizard will add message map macros here
|
||||
ON_LBN_SELCHANGE(IDC_THING_POS_LIST, OnSelchangeThingPosList)
|
||||
ON_BN_CLICKED(IDC_THING_POS_UP, OnThingPosUp)
|
||||
ON_BN_CLICKED(IDC_THING_POS_DOWN, OnThingPosDown)
|
||||
ON_BN_CLICKED(IDC_THING_POS_DELETE, OnThingPosDelete)
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CGuiLayerThingPos message handlers
|
||||
|
||||
void CGuiLayerThingPos::OnSelchangeThingPosList() {theApp.GetCurrent()->Command(CmdMsg_ThingPosSelect,m_List.GetCurSel());}
|
||||
void CGuiLayerThingPos::OnThingPosUp() {theApp.GetCurrent()->Command(CmdMsg_ThingPosUp,m_List.GetCurSel());}
|
||||
void CGuiLayerThingPos::OnThingPosDown() {theApp.GetCurrent()->Command(CmdMsg_ThingPosDown,m_List.GetCurSel());}
|
||||
void CGuiLayerThingPos::OnThingPosDelete() {theApp.GetCurrent()->Command(CmdMsg_ThingPosDelete,m_List.GetCurSel());}
|
||||
|
|
|
@ -19,7 +19,7 @@ public:
|
|||
// Dialog Data
|
||||
//{{AFX_DATA(CGuiLayerThingPos)
|
||||
enum { IDD = IDD_LAYER_THING_POS };
|
||||
// NOTE: the ClassWizard will add data members here
|
||||
CListBox m_List;
|
||||
//}}AFX_DATA
|
||||
|
||||
|
||||
|
@ -35,7 +35,10 @@ protected:
|
|||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(CGuiLayerThingPos)
|
||||
// NOTE: the ClassWizard will add member functions here
|
||||
afx_msg void OnSelchangeThingPosList();
|
||||
afx_msg void OnThingPosUp();
|
||||
afx_msg void OnThingPosDown();
|
||||
afx_msg void OnThingPosDelete();
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
#include "LayerActor.h"
|
||||
#include "LayerItem.h"
|
||||
#include "LayerPlatform.h"
|
||||
#include "LayerTrigger.h"
|
||||
#include "LayerFX.h"
|
||||
|
||||
#include "LayerDef.h"
|
||||
#include "Utils.h"
|
||||
|
@ -41,6 +43,8 @@ sLayerInfoTable CLayer::InfoTable[]=
|
|||
{LAYER_TYPE_ACTOR, LAYER_SUBTYPE_NONE, "Actor", true, 1.0f, false, true, true, LAYER_SUBVIEW_NONE,},
|
||||
{LAYER_TYPE_ITEM, LAYER_SUBTYPE_NONE, "Item", true, 1.0f, false, true, true, LAYER_SUBVIEW_NONE,},
|
||||
{LAYER_TYPE_PLATFORM, LAYER_SUBTYPE_NONE, "Platform", true, 1.0f, false, true, true, LAYER_SUBVIEW_NONE,},
|
||||
{LAYER_TYPE_TRIGGER, LAYER_SUBTYPE_NONE, "Trigger", true, 1.0f, false, true, true, LAYER_SUBVIEW_NONE,},
|
||||
{LAYER_TYPE_FX, LAYER_SUBTYPE_NONE, "FX", true, 1.0f, false, true, true, LAYER_SUBVIEW_NONE,},
|
||||
};
|
||||
|
||||
int CLayer::InfoTableSize=sizeof(InfoTable)/sizeof(sLayerInfoTable);
|
||||
|
@ -90,6 +94,12 @@ CLayer *New;
|
|||
case LAYER_TYPE_PLATFORM:
|
||||
New=new CLayerPlatform(Def);
|
||||
break;
|
||||
case LAYER_TYPE_TRIGGER:
|
||||
New=new CLayerTrigger(Def);
|
||||
break;
|
||||
case LAYER_TYPE_FX:
|
||||
New=new CLayerFX(Def);
|
||||
break;
|
||||
default:
|
||||
ASSERT(!"Unknown Layer");
|
||||
}
|
||||
|
@ -124,6 +134,12 @@ CLayer *New;
|
|||
case LAYER_TYPE_PLATFORM:
|
||||
New=new CLayerPlatform(File,Version);
|
||||
break;
|
||||
case LAYER_TYPE_TRIGGER:
|
||||
New=new CLayerTrigger(File,Version);
|
||||
break;
|
||||
case LAYER_TYPE_FX:
|
||||
New=new CLayerFX(File,Version);
|
||||
break;
|
||||
default:
|
||||
ASSERT(!"Unknown Layer");
|
||||
}
|
||||
|
|
|
@ -45,22 +45,26 @@ void CLayerActor::InitSubView(CCore *Core)
|
|||
/*****************************************************************************/
|
||||
void CLayerActor::GUIInit(CCore *Core)
|
||||
{
|
||||
GUI.DisableCallback(true);
|
||||
Core->GUIAdd(GUI,IDD_LAYER_ACTOR);
|
||||
GUI.DisableCallback(false);
|
||||
GUIActor.DisableCallback(true);
|
||||
Core->GUIAdd(GUIThing,IDD_LAYER_THING);
|
||||
Core->GUIAdd(GUIThingPos,IDD_LAYER_THING_POS);
|
||||
Core->GUIAdd(GUIActor,IDD_LAYER_ACTOR);
|
||||
GUIActor.DisableCallback(false);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CLayerActor::GUIKill(CCore *Core)
|
||||
{
|
||||
Core->GUIRemove(GUI,IDD_LAYER_ACTOR);
|
||||
Core->GUIRemove(GUIThing,IDD_LAYER_THING);
|
||||
Core->GUIRemove(GUIThingPos,IDD_LAYER_THING_POS);
|
||||
Core->GUIRemove(GUIActor,IDD_LAYER_ACTOR);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CLayerActor::GUIUpdate(CCore *Core)
|
||||
{
|
||||
int i,ListSize;
|
||||
CComboBox &List=GUI.m_List;
|
||||
CComboBox &List=GUIThing.m_DefList;
|
||||
|
||||
// Setup Def Actor List
|
||||
ListSize=DefList.size();
|
||||
|
@ -77,7 +81,7 @@ CComboBox &List=GUI.m_List;
|
|||
/*****************************************************************************/
|
||||
void CLayerActor::GUIThingDefClear()
|
||||
{
|
||||
CComboBox &List=GUI.m_List;
|
||||
CComboBox &List=GUIThing.m_DefList;
|
||||
CurrentDefThing=-1;
|
||||
List.SetCurSel(CurrentDefThing);
|
||||
}
|
||||
|
@ -85,35 +89,35 @@ CComboBox &List=GUI.m_List;
|
|||
/*****************************************************************************/
|
||||
void CLayerActor::GUIThingUpdate(bool OnlySel)
|
||||
{
|
||||
GUIThingUpdateList(GUI.m_LevelList,false);
|
||||
GUIThingUpdateList(GUIThing.m_List,false);
|
||||
// Params
|
||||
GUI.DisableCallback(true);
|
||||
GUIActor.DisableCallback(true);
|
||||
if (CurrentThing!=-1)
|
||||
{
|
||||
sLayerThing &ThisThing=ThingList[CurrentThing];
|
||||
GUI.SetVal(GUI.m_Speed,ThisThing.Data.Speed);
|
||||
GUI.SetVal(GUI.m_TurnRate,ThisThing.Data.TurnRate);
|
||||
GUI.SetVal(GUI.m_Health,ThisThing.Data.Health);
|
||||
GUI.SetVal(GUI.m_Attack,ThisThing.Data.AttackStrength);
|
||||
GUI.m_Collision.SetCheck(ThisThing.Data.CollisionFlag);
|
||||
GUI.m_Player.SetCheck(ThisThing.Data.PlayerFlag);
|
||||
GUIActor.SetVal(GUIActor.m_Speed,ThisThing.Data.Speed);
|
||||
GUIActor.SetVal(GUIActor.m_TurnRate,ThisThing.Data.TurnRate);
|
||||
GUIActor.SetVal(GUIActor.m_Health,ThisThing.Data.Health);
|
||||
GUIActor.SetVal(GUIActor.m_Attack,ThisThing.Data.AttackStrength);
|
||||
GUIActor.m_Collision.SetCheck(ThisThing.Data.CollisionFlag);
|
||||
GUIActor.m_Player.SetCheck(ThisThing.Data.PlayerFlag);
|
||||
}
|
||||
else
|
||||
{
|
||||
GUI.m_Speed.SetWindowText("");
|
||||
GUI.m_TurnRate.SetWindowText("");
|
||||
GUI.m_Health.SetWindowText("");
|
||||
GUI.m_Attack.SetWindowText("");
|
||||
GUI.m_Collision.SetCheck(false);
|
||||
GUI.m_Player.SetCheck(false);
|
||||
GUIActor.m_Speed.SetWindowText("");
|
||||
GUIActor.m_TurnRate.SetWindowText("");
|
||||
GUIActor.m_Health.SetWindowText("");
|
||||
GUIActor.m_Attack.SetWindowText("");
|
||||
GUIActor.m_Collision.SetCheck(false);
|
||||
GUIActor.m_Player.SetCheck(false);
|
||||
}
|
||||
GUI.DisableCallback(false);
|
||||
GUIActor.DisableCallback(false);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CLayerActor::GUIThingPointUpdate(bool OnlySel)
|
||||
{
|
||||
GUIThingPointUpdateList(GUI.m_PosList,OnlySel);
|
||||
GUIThingPointUpdateList(GUIThingPos.m_List,OnlySel);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -122,12 +126,12 @@ void CLayerActor::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=GUIActor.GetVal(GUIActor.m_Speed);
|
||||
ThisThing.Data.TurnRate=GUIActor.GetVal(GUIActor.m_TurnRate);
|
||||
ThisThing.Data.Health=GUIActor.GetVal(GUIActor.m_Health);
|
||||
ThisThing.Data.AttackStrength=GUIActor.GetVal(GUIActor.m_Attack);
|
||||
ThisThing.Data.CollisionFlag=GUIActor.m_Collision.GetCheck()!=0;
|
||||
ThisThing.Data.PlayerFlag=GUIActor.m_Player.GetCheck()!=0;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ public:
|
|||
void GUIThingPointUpdate(bool OnlySel=false);
|
||||
|
||||
protected:
|
||||
CGUILayerActor GUI;
|
||||
CGUILayerActor GUIActor;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -17,6 +17,8 @@ enum LAYER_TYPE
|
|||
LAYER_TYPE_ACTOR,
|
||||
LAYER_TYPE_ITEM,
|
||||
LAYER_TYPE_PLATFORM,
|
||||
LAYER_TYPE_TRIGGER,
|
||||
LAYER_TYPE_FX,
|
||||
LAYER_TYPE_MAX
|
||||
};
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**********************/
|
||||
/*** Layer Platform ***/
|
||||
/**********************/
|
||||
/****************/
|
||||
/*** Layer FX ***/
|
||||
/****************/
|
||||
|
||||
#include "stdafx.h"
|
||||
#include <Vector3.h>
|
||||
|
@ -15,74 +15,120 @@
|
|||
|
||||
#include "Core.h"
|
||||
#include "LayerThing.h"
|
||||
#include "LayerPlatform.h"
|
||||
#include "LayerFX.h"
|
||||
#include "Utils.h"
|
||||
#include "Export.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
CLayerPlatform::CLayerPlatform(sLayerDef &Def)
|
||||
CLayerFX::CLayerFX(sLayerDef &Def)
|
||||
{
|
||||
InitLayer(Def);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CLayerPlatform::InitLayer(sLayerDef &Def)
|
||||
void CLayerFX::InitLayer(sLayerDef &Def)
|
||||
{
|
||||
ThingBank=new CElemBank(-1,-1,false,CElem::CentreModeLR | CElem::CentreModeB);
|
||||
CLayerThing::InitLayer(Def);
|
||||
LoadThingScript(theApp.GetConfigStr("LayerScript","PlatformScript"));
|
||||
LoadThingScript(theApp.GetConfigStr("LayerScript","FXScript"));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CLayerPlatform::InitSubView(CCore *Core)
|
||||
void CLayerFX::InitSubView(CCore *Core)
|
||||
{
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CLayerFX::RenderThing(CCore *Core,Vector3 &ThisCam,sLayerThing &ThisThing,bool Render3d,bool Selected)
|
||||
{
|
||||
float ZoomW=Core->GetZoomW();
|
||||
float ZoomH=Core->GetZoomH();
|
||||
Vector3 &Scale=Core->GetScaleVector();
|
||||
Vector3 ScrOfs(ZoomW/2,ZoomH/2,0);
|
||||
float Col=0.8f,A=0.8f;
|
||||
|
||||
glColor4f(1,1,1,0.8f);
|
||||
if (Selected)
|
||||
{
|
||||
Col=1.0f;
|
||||
A=0.8f;
|
||||
glColor4f(1,1,1,1.0f); // For number
|
||||
}
|
||||
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glPushMatrix();
|
||||
|
||||
glLoadIdentity();
|
||||
|
||||
glScalef(Scale.x,Scale.y,Scale.z);
|
||||
glTranslatef(-ThisCam.x,ThisCam.y,0); // Set scroll offset
|
||||
glTranslatef(-ScrOfs.x,ScrOfs.y,0); // Bring to top left corner
|
||||
|
||||
glTranslatef(ThisThing.XY[0].x,-ThisThing.XY[0].y,0); // Set Pos
|
||||
|
||||
Core->RenderNumber(0);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
|
||||
float W=(ThisThing.Data.Width);
|
||||
float H=-(ThisThing.Data.Height);
|
||||
// Draw Box
|
||||
glBegin (GL_QUADS);
|
||||
glColor4f(0,0,Col-0.25f,A);
|
||||
glVertex3f(0,0+1,0);
|
||||
glVertex3f(W,0+1,0);
|
||||
glVertex3f(W,H+1,0);
|
||||
glVertex3f(0,H+1,0);
|
||||
glEnd();
|
||||
// Draw OutLine
|
||||
glBegin(GL_LINES);
|
||||
glColor4f(Col,Col,Col,A);
|
||||
|
||||
glVertex3f( 0,0+1,0);
|
||||
glVertex3f( W,0+1,0);
|
||||
|
||||
glVertex3f( W,0+1,0);
|
||||
glVertex3f( W,H+1,0);
|
||||
|
||||
glVertex3f( W,H+1,0);
|
||||
glVertex3f( 0,H+1,0);
|
||||
|
||||
glVertex3f( 0,H+1,0);
|
||||
glVertex3f( 0,0+1,0);
|
||||
|
||||
glEnd();
|
||||
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
|
||||
glPopMatrix();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*** Gui *********************************************************************/
|
||||
/*****************************************************************************/
|
||||
void CLayerPlatform::GUIInit(CCore *Core)
|
||||
void CLayerFX::GUIInit(CCore *Core)
|
||||
{
|
||||
GUIPlatform.DisableCallback(true);
|
||||
GUIFX.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");
|
||||
}
|
||||
|
||||
|
||||
Core->GUIAdd(GUIFX,IDD_LAYER_FX);
|
||||
GUIFX.DisableCallback(false);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CLayerPlatform::GUIKill(CCore *Core)
|
||||
void CLayerFX::GUIKill(CCore *Core)
|
||||
{
|
||||
Core->GUIRemove(GUIThing,IDD_LAYER_THING);
|
||||
Core->GUIRemove(GUIThingPos,IDD_LAYER_THING_POS);
|
||||
Core->GUIRemove(GUIPlatform,IDD_LAYER_PLATFORM);
|
||||
Core->GUIRemove(GUIFX,IDD_LAYER_FX);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CLayerPlatform::GUIUpdate(CCore *Core)
|
||||
void CLayerFX::GUIUpdate(CCore *Core)
|
||||
{
|
||||
int i,ListSize;
|
||||
CComboBox &List=GUIThing.m_DefList;
|
||||
|
||||
// Setup Def Platform List
|
||||
// Setup Def FX List
|
||||
ListSize=DefList.size();
|
||||
List.ResetContent();
|
||||
for (i=0; i<ListSize; i++)
|
||||
|
@ -95,7 +141,7 @@ CComboBox &List=GUIThing.m_DefList;
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CLayerPlatform::GUIThingDefClear()
|
||||
void CLayerFX::GUIThingDefClear()
|
||||
{
|
||||
CComboBox &List=GUIThing.m_DefList;
|
||||
CurrentDefThing=-1;
|
||||
|
@ -103,63 +149,48 @@ CComboBox &List=GUIThing.m_DefList;
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CLayerPlatform::GUIThingUpdate(bool OnlySel)
|
||||
void CLayerFX::GUIThingUpdate(bool OnlySel)
|
||||
{
|
||||
GUIThingUpdateList(GUIThing.m_List,false);
|
||||
// Params
|
||||
GUIPlatform.DisableCallback(true);
|
||||
GUIFX.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);
|
||||
GUIFX.SetVal(GUIFX.m_Speed,ThisThing.Data.Speed);
|
||||
GUIFX.SetVal(GUIFX.m_Width,ThisThing.Data.Width);
|
||||
GUIFX.SetVal(GUIFX.m_Height,ThisThing.Data.Height);
|
||||
}
|
||||
else
|
||||
{
|
||||
GUIPlatform.m_Speed.SetWindowText("");
|
||||
GUIPlatform.m_TurnRate.SetWindowText("");
|
||||
GUIPlatform.m_Collision.SetCheck(false);
|
||||
GUIPlatform.m_MoveList.SetCurSel(-1);
|
||||
GUIPlatform.m_Type.SetCurSel(-1);
|
||||
GUIFX.m_Speed.SetWindowText("");
|
||||
GUIFX.m_Width.SetWindowText("");
|
||||
GUIFX.m_Height.SetWindowText("");
|
||||
}
|
||||
GUIPlatform.DisableCallback(false);
|
||||
GUIFX.DisableCallback(false);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CLayerPlatform::GUIThingPointUpdate(bool OnlySel)
|
||||
void CLayerFX::GUIThingPointUpdate(bool OnlySel)
|
||||
{
|
||||
GUIThingPointUpdateList(GUIThingPos.m_List,OnlySel);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CLayerPlatform::GUIChanged(CCore *Core)
|
||||
void CLayerFX::GUIChanged(CCore *Core)
|
||||
{
|
||||
if (CurrentThing!=-1)
|
||||
{
|
||||
sLayerThing &ThisThing=ThingList[CurrentThing];
|
||||
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);
|
||||
ThisThing.Data.Speed=GUIFX.GetVal(GUIFX.m_Speed);
|
||||
ThisThing.Data.Width=GUIFX.GetVal(GUIFX.m_Width);
|
||||
ThisThing.Data.Height=GUIFX.GetVal(GUIFX.m_Height);
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CLayerPlatform::SetThingParams(sLayerThing &Thing)
|
||||
void CLayerFX::SetThingParams(sLayerThing &Thing)
|
||||
{
|
||||
switch(Thing.Data.MoveType)
|
||||
{
|
||||
case MoveTypeLinear:
|
||||
Thing.Data.WaypointCount=16;
|
||||
break;
|
||||
case MoveTypeCirular:
|
||||
Thing.Data.WaypointCount=1;
|
||||
Thing.XY.resize(1);
|
||||
break;
|
||||
}
|
||||
if (Thing.Data.Width<1) Thing.Data.Width=1;
|
||||
if (Thing.Data.Height<1) Thing.Data.Height=1;
|
||||
}
|
|
@ -1,29 +1,23 @@
|
|||
/*******************/
|
||||
/*** Layer Platform ***/
|
||||
/*******************/
|
||||
/****************/
|
||||
/*** Layer FX ***/
|
||||
/****************/
|
||||
|
||||
#ifndef __LAYER_PLATFORM_HEADER__
|
||||
#define __LAYER_PLATFORM_HEADER__
|
||||
#ifndef __LAYER_FX_HEADER__
|
||||
#define __LAYER_FX_HEADER__
|
||||
|
||||
#include "LayerThing.h"
|
||||
#include "Layer.h"
|
||||
#include "MapEdit.h"
|
||||
#include "GUILayerPlatform.h"
|
||||
#include "GUILayerFX.h"
|
||||
#include "Elem.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
class CLayerPlatform : public CLayerThing
|
||||
class CLayerFX : public CLayerThing
|
||||
{
|
||||
public:
|
||||
enum
|
||||
{
|
||||
MoveTypeLinear=0,
|
||||
MoveTypeCirular
|
||||
|
||||
};
|
||||
|
||||
CLayerPlatform(sLayerDef &Def);
|
||||
CLayerPlatform(CFile *File,int Version) {Load(File,Version);}
|
||||
CLayerFX(sLayerDef &Def);
|
||||
CLayerFX(CFile *File,int Version) {Load(File,Version);}
|
||||
|
||||
void InitLayer(sLayerDef &Def);
|
||||
void InitSubView(CCore *Core);
|
||||
|
@ -40,9 +34,10 @@ public:
|
|||
|
||||
|
||||
protected:
|
||||
void RenderThing(CCore *Core,Vector3 &CamPos,sLayerThing &ThisThing,bool Render3d,bool Selected);
|
||||
void SetThingParams(sLayerThing &Thing);
|
||||
|
||||
CGUILayerPlatform GUIPlatform;
|
||||
CGUILayerFX GUIFX;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -47,22 +47,20 @@ void CLayerItem::InitSubView(CCore *Core)
|
|||
/*****************************************************************************/
|
||||
void CLayerItem::GUIInit(CCore *Core)
|
||||
{
|
||||
// GUI.DisableCallback(true);
|
||||
Core->GUIAdd(GUI,IDD_LAYER_ITEM);
|
||||
// GUI.DisableCallback(false);
|
||||
Core->GUIAdd(GUIThing,IDD_LAYER_THING);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CLayerItem::GUIKill(CCore *Core)
|
||||
{
|
||||
Core->GUIRemove(GUI,IDD_LAYER_ITEM);
|
||||
Core->GUIRemove(GUIThing,IDD_LAYER_THING);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CLayerItem::GUIUpdate(CCore *Core)
|
||||
{
|
||||
int i,ListSize;
|
||||
CComboBox &List=GUI.m_List;
|
||||
CComboBox &List=GUIThing.m_DefList;
|
||||
|
||||
// Setup Def Item List
|
||||
ListSize=DefList.size();
|
||||
|
@ -74,21 +72,24 @@ CComboBox &List=GUI.m_List;
|
|||
List.SetCurSel(CurrentDefThing);
|
||||
|
||||
// GUIThingUpdate();
|
||||
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CLayerItem::GUIThingDefClear()
|
||||
{
|
||||
CComboBox &List=GUI.m_List;
|
||||
|
||||
CComboBox &List=GUIThing.m_DefList;
|
||||
CurrentDefThing=-1;
|
||||
List.SetCurSel(CurrentDefThing);
|
||||
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CLayerItem::GUIThingUpdate(bool OnlySel)
|
||||
{
|
||||
int i,ListSize;
|
||||
CComboBox &List=GUI.m_LevelList;
|
||||
CComboBox &List=GUIThing.m_List;
|
||||
|
||||
if (OnlySel)
|
||||
{
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include "LayerThing.h"
|
||||
#include "Layer.h"
|
||||
#include "MapEdit.h"
|
||||
#include "GUILayerItem.h"
|
||||
#include "Elem.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -31,7 +30,6 @@ public:
|
|||
void GUIThingUpdate(bool OnlySel=false);
|
||||
|
||||
protected:
|
||||
CGUILayerItem GUI;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,13 +8,20 @@
|
|||
#include "LayerThing.h"
|
||||
#include "Layer.h"
|
||||
#include "MapEdit.h"
|
||||
//#include "GUILayerPlatform.h"
|
||||
#include "GUILayerPlatform.h"
|
||||
#include "Elem.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
class CLayerPlatform : public CLayerThing
|
||||
{
|
||||
public:
|
||||
enum
|
||||
{
|
||||
MoveTypeLinear=0,
|
||||
MoveTypeCirular
|
||||
|
||||
};
|
||||
|
||||
CLayerPlatform(sLayerDef &Def);
|
||||
CLayerPlatform(CFile *File,int Version) {Load(File,Version);}
|
||||
|
||||
|
@ -31,8 +38,11 @@ public:
|
|||
void GUIThingUpdate(bool OnlySel=false);
|
||||
void GUIThingPointUpdate(bool OnlySel=false);
|
||||
|
||||
|
||||
protected:
|
||||
// CGUILayerPlatform GUI;
|
||||
void SetThingParams(sLayerThing &Thing);
|
||||
|
||||
CGUILayerPlatform GUIPlatform;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -30,6 +30,25 @@
|
|||
CLayerShade::CLayerShade(sLayerDef &Def)
|
||||
{
|
||||
InitLayer(Def);
|
||||
// Load script (messy)
|
||||
GString ExecPath;
|
||||
GString ScriptName;
|
||||
|
||||
GetExecPath(ExecPath);
|
||||
ScriptName=ExecPath+theApp.GetConfigStr("LayerScript","BackGfxScript");
|
||||
Script.LoadAndImport(ScriptName);
|
||||
|
||||
int i,ListSize=Script.GetGroupCount();
|
||||
BackGfx.resize(ListSize);
|
||||
|
||||
for (i=0; i<ListSize; i++)
|
||||
{
|
||||
BackGfx[i]=Script.GetGroupName(i);
|
||||
TRACE1("%s\n",BackGfx[i]);
|
||||
}
|
||||
Back0=Back1=-1;
|
||||
TransMode0=TransMode1=0;
|
||||
Flags0=Flags1=-1;
|
||||
}
|
||||
|
||||
|
||||
|
@ -75,6 +94,18 @@ void CLayerShade::Load(CFile *File,int Version)
|
|||
File->Read(&Pos[i],sizeof(int));
|
||||
File->Read(&RGB[i],sizeof(RGBQUAD));
|
||||
}
|
||||
if (Version>=7)
|
||||
{
|
||||
File->Read(&Back0,sizeof(int));
|
||||
File->Read(&Back1,sizeof(int));
|
||||
}
|
||||
if (Version>=8)
|
||||
{
|
||||
File->Read(&TransMode0,sizeof(int));
|
||||
File->Read(&Flags0,sizeof(int));
|
||||
File->Read(&TransMode1,sizeof(int));
|
||||
File->Read(&Flags1,sizeof(int));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -88,7 +119,12 @@ void CLayerShade::Save(CFile *File)
|
|||
File->Write(&Pos[i],sizeof(int));
|
||||
File->Write(&RGB[i],sizeof(RGBQUAD));
|
||||
}
|
||||
|
||||
File->Write(&Back0,sizeof(int));
|
||||
File->Write(&Back1,sizeof(int));
|
||||
File->Write(&TransMode0,sizeof(int));
|
||||
File->Write(&Flags0,sizeof(int));
|
||||
File->Write(&TransMode1,sizeof(int));
|
||||
File->Write(&Flags1,sizeof(int));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -152,6 +188,50 @@ void CLayerShade::GUIInit(CCore *Core)
|
|||
GUI.SetRGB(RGB[i],i);
|
||||
}
|
||||
GUI.SetCount(Count);
|
||||
InitGfxList();
|
||||
|
||||
if (Flags0 & SpinFlag) GUI.m_Spin0.SetCheck(true);
|
||||
if (Flags0 & ScaleFlag) GUI.m_Scale0.SetCheck(true);
|
||||
if (Flags0 & MoveFlag) GUI.m_Move0.SetCheck(true);
|
||||
if (Flags0 & ColorFlag) GUI.m_Color0.SetCheck(true);
|
||||
|
||||
if (Flags1 & SpinFlag) GUI.m_Spin1.SetCheck(true);
|
||||
if (Flags1 & ScaleFlag) GUI.m_Scale1.SetCheck(true);
|
||||
if (Flags1 & MoveFlag) GUI.m_Move1.SetCheck(true);
|
||||
if (Flags1 & ColorFlag) GUI.m_Color1.SetCheck(true);
|
||||
|
||||
GUI.m_Trans0.ResetContent();
|
||||
GUI.m_Trans0.AddString("Normal");
|
||||
GUI.m_Trans0.AddString("50%");
|
||||
GUI.m_Trans0.AddString("Subtractive");
|
||||
GUI.m_Trans0.AddString("Another one");
|
||||
GUI.m_Trans0.SetCurSel(TransMode0);
|
||||
|
||||
GUI.m_Trans1.ResetContent();
|
||||
GUI.m_Trans1.AddString("Normal");
|
||||
GUI.m_Trans1.AddString("50%");
|
||||
GUI.m_Trans1.AddString("Subtractive");
|
||||
GUI.m_Trans1.AddString("Another one");
|
||||
GUI.m_Trans1.SetCurSel(TransMode1);
|
||||
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CLayerShade::InitGfxList()
|
||||
{
|
||||
int i,ListSize=BackGfx.size();
|
||||
CComboBox &List0=GUI.m_Gfx0;
|
||||
CComboBox &List1=GUI.m_Gfx1;
|
||||
|
||||
List0.ResetContent();
|
||||
List1.ResetContent();
|
||||
for (i=0; i<ListSize; i++)
|
||||
{
|
||||
List0.AddString(BackGfx[i]);
|
||||
List1.AddString(BackGfx[i]);
|
||||
}
|
||||
List0.SetCurSel(Back0);
|
||||
List1.SetCurSel(Back1);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -174,6 +254,23 @@ void CLayerShade::GUIChanged(CCore *Core)
|
|||
GUI.GetRGB(RGB[i],i);
|
||||
}
|
||||
GUI.GetCount(Count);
|
||||
Back0=GUI.m_Gfx0.GetCurSel();
|
||||
Back1=GUI.m_Gfx1.GetCurSel();
|
||||
|
||||
Flags0=0;
|
||||
if (GUI.m_Spin0.GetCheck()) Flags0|=SpinFlag;
|
||||
if (GUI.m_Scale0.GetCheck()) Flags0|=ScaleFlag;
|
||||
if (GUI.m_Move0.GetCheck()) Flags0|=MoveFlag;
|
||||
if (GUI.m_Color0.GetCheck()) Flags0|=ColorFlag;
|
||||
TransMode0=GUI.m_Trans0.GetCurSel();
|
||||
|
||||
Flags1=0;
|
||||
if (GUI.m_Spin1.GetCheck()) Flags1|=SpinFlag;
|
||||
if (GUI.m_Scale1.GetCheck()) Flags1|=ScaleFlag;
|
||||
if (GUI.m_Move1.GetCheck()) Flags1|=MoveFlag;
|
||||
if (GUI.m_Color1.GetCheck()) Flags1|=ColorFlag;
|
||||
TransMode1=GUI.m_Trans1.GetCurSel();
|
||||
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -191,4 +288,21 @@ void CLayerShade::Export(CCore *Core,CExport &Exp)
|
|||
Exp.Write(&RGB[i].rgbBlue,sizeof(u8));
|
||||
Exp.Write(&RGB[i].rgbRed,sizeof(u8)); // Pad
|
||||
}
|
||||
|
||||
Exp.Write(&TransMode0,sizeof(int));
|
||||
Exp.Write(&Flags0,sizeof(int));
|
||||
Exp.Write(&TransMode1,sizeof(int));
|
||||
Exp.Write(&Flags1,sizeof(int));
|
||||
|
||||
// Back Gfx
|
||||
char Txt[256];
|
||||
|
||||
Txt[0]=0;
|
||||
if (Back0!=-1) sprintf(Txt,BackGfx[Back0]);
|
||||
Exp.Write(Txt,strlen(Txt)+1);
|
||||
|
||||
Txt[0]=0;
|
||||
if (Back1!=-1) sprintf(Txt,BackGfx[Back1]);
|
||||
Exp.Write(Txt,strlen(Txt)+1);
|
||||
|
||||
}
|
||||
|
|
|
@ -18,17 +18,19 @@ public:
|
|||
enum
|
||||
{
|
||||
LAYER_SHADE_RGB_MAX=4,
|
||||
|
||||
SpinFlag=1<<0,
|
||||
ScaleFlag=1<<1,
|
||||
MoveFlag=1<<2,
|
||||
ColorFlag=1<<3,
|
||||
};
|
||||
// CLayerShade(){};
|
||||
|
||||
CLayerShade(sLayerDef &Def);
|
||||
CLayerShade(CFile *File,int Version) {Load(File,Version);}
|
||||
~CLayerShade();
|
||||
|
||||
void InitLayer(sLayerDef &Def);
|
||||
|
||||
// int GetType() {return(LAYER_TYPE_SHADE);}
|
||||
// int GetSubType() {return(SubType);}
|
||||
|
||||
void Render(CCore *Core,Vector3 &CamPos,bool Is3d);
|
||||
void RenderGrid(CCore *Core,Vector3 &CamPos,bool Active){};
|
||||
void RenderSelection(CCore *Core,Vector3 &ThisCam){};
|
||||
|
@ -51,12 +53,19 @@ public:
|
|||
|
||||
protected:
|
||||
void Render(CCore *Core,Vector3 &CamPos,CMap &ThisMap,bool Render3d,float Alpha=1.0f,Vector3 *Ofs=0);
|
||||
void InitGfxList();
|
||||
|
||||
CGUILayerShade GUI;
|
||||
CIni Script;
|
||||
CList<GString> BackGfx;
|
||||
int Back0,Back1;
|
||||
int TransMode0,TransMode1;
|
||||
int Flags0,Flags1;
|
||||
|
||||
int Count;
|
||||
int Pos[LAYER_SHADE_RGB_MAX];
|
||||
RGBQUAD RGB[LAYER_SHADE_RGB_MAX];
|
||||
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -70,10 +70,6 @@ int i,ListSize;
|
|||
}
|
||||
LoadThingNames(File,Version);
|
||||
|
||||
// CurrentDefThing=-1;
|
||||
// CurrentThing=-1;
|
||||
// CurrentThingPoint=-1;
|
||||
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -180,8 +176,9 @@ int i,ListSize=ThingScript.GetGroupCount();
|
|||
char *Name=ThingScript.GetGroupName(i);
|
||||
char *Gfx=ThingScript.GetStr(Name,"gfx");
|
||||
|
||||
memset(&ThisDef.Data,0,sizeof(sLayerThingData));
|
||||
ThisDef.Name=Name;
|
||||
ThisDef.Data.WaypointFlag=ThingScript.GetInt(Name,"WayPoints")==1;
|
||||
ThisDef.Data.WaypointCount=ThingScript.GetInt(Name,"WayPoints");
|
||||
ThisDef.Data.Speed=ThingScript.GetInt(Name,"Speed");
|
||||
ThisDef.Data.TurnRate=ThingScript.GetInt(Name,"TurnRate");
|
||||
ThisDef.Data.Health=ThingScript.GetInt(Name,"Health");
|
||||
|
@ -197,10 +194,6 @@ int i,ListSize=ThingScript.GetGroupCount();
|
|||
GFName::makeabsolute(ExecPath,Gfx,Filename);
|
||||
ThisDef.ElemID=ThingBank->AddSet(Filename);
|
||||
}
|
||||
else
|
||||
{
|
||||
TRACE1("BAD %s\n",Name);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -429,6 +422,9 @@ bool Ret=false;
|
|||
case CmdMsg_ThingListDelete:
|
||||
DeleteThing();
|
||||
break;
|
||||
case CmdMsg_ThingListGoto:
|
||||
GotoThing(Core);
|
||||
break;
|
||||
case CmdMsg_ThingListSelect:
|
||||
CurrentDefThing=Param0;
|
||||
SetCursor(DefList[CurrentDefThing].Name);
|
||||
|
@ -535,6 +531,7 @@ void CLayerThing::AddThing(CPoint &Pos)
|
|||
|
||||
sLayerThing &ThisThing=ThingList[CurrentThing];
|
||||
ThisThing=Cursor;
|
||||
SetThingParams(ThisThing);
|
||||
SelectThing(CurrentThing);
|
||||
GUIThingDefClear();
|
||||
}
|
||||
|
@ -553,16 +550,8 @@ int CLayerThing::SelectThing(int Idx)
|
|||
CurrentThing=Idx;
|
||||
CurrentThingPoint=0;
|
||||
if (CurrentThing!=-1)
|
||||
{
|
||||
sLayerThing &ThisThing=ThingList[CurrentThing];
|
||||
if (ThisThing.Data.WaypointFlag)
|
||||
{
|
||||
Mode=MouseModePoints;
|
||||
}
|
||||
else
|
||||
{
|
||||
Mode=MouseModeNormal;
|
||||
}
|
||||
GUIThingUpdate();
|
||||
GUIThingPointUpdate();
|
||||
}
|
||||
|
@ -579,6 +568,14 @@ void CLayerThing::DeleteThing()
|
|||
GUIThingUpdate();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CLayerThing::GotoThing(CCore *Core)
|
||||
{
|
||||
if (CurrentThing==-1) return;
|
||||
sLayerThing &ThisThing=ThingList[CurrentThing];
|
||||
|
||||
Core->SetCamPos(ThisThing.XY[0]);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
|
@ -614,6 +611,7 @@ void CLayerThing::AddThingPoint(CPoint &Pos)
|
|||
{
|
||||
TRACE1("ADDTHINGPOINT %i\n",CurrentThingPoint);
|
||||
if (Pos.x==-1 || Pos.y==-1) return; // Off Map?
|
||||
|
||||
CurrentThingPoint=SelectThingPoint(Pos);
|
||||
|
||||
if (CurrentThingPoint!=-1)
|
||||
|
@ -623,11 +621,16 @@ void CLayerThing::AddThingPoint(CPoint &Pos)
|
|||
}
|
||||
sLayerThing &ThisThing=ThingList[CurrentThing];
|
||||
|
||||
int PntCount=ThisThing.XY.size();
|
||||
if (PntCount<ThisThing.Data.WaypointCount+1)
|
||||
{
|
||||
CurrentThingPoint=ThisThing.XY.size();
|
||||
ThisThing.XY.resize(CurrentThingPoint+1);
|
||||
ThisThing.XY[CurrentThingPoint]=Pos;
|
||||
TRACE0("Add Point\n");
|
||||
GUIThingPointUpdate();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
@ -714,21 +717,16 @@ int i,ListSize=ThingList.size();
|
|||
void CLayerThing::ExportThing(CExport &Exp,sLayerThing &ThisThing)
|
||||
{
|
||||
int i,ListSize=ThisThing.XY.size();
|
||||
sExpLayerThing OutThing;
|
||||
sLayerThingData OutThing=ThisThing.Data;
|
||||
|
||||
OutThing.WaypointCount=ListSize;
|
||||
Exp.Write(&OutThing,sizeof(sLayerThingData));
|
||||
|
||||
// Point List
|
||||
Exp.Write(&ListSize,sizeof(int));
|
||||
for (i=0 ;i<ListSize; i++)
|
||||
{
|
||||
Exp.Write(&ThisThing.XY[i],sizeof(CPoint));
|
||||
}
|
||||
// Thing
|
||||
OutThing.Health=ThisThing.Data.Health;
|
||||
OutThing.AttackStrength=ThisThing.Data.AttackStrength;
|
||||
OutThing.Speed=ThisThing.Data.Speed;
|
||||
OutThing.TurnRate=ThisThing.Data.TurnRate;
|
||||
OutThing.CollisionFlag=ThisThing.Data.CollisionFlag;
|
||||
OutThing.PlayerFlag=ThisThing.Data.PlayerFlag;
|
||||
Exp.Write(&OutThing,sizeof(sExpLayerThing));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -8,22 +8,12 @@
|
|||
#include "Layer.h"
|
||||
#include "MapEdit.h"
|
||||
#include "GUIToolbar.h"
|
||||
#include "GUILayerThing.h"
|
||||
#include "GUILayerThingPos.h"
|
||||
#include "Elem.h"
|
||||
#include "ExportHdr.h" // For thing data struct
|
||||
|
||||
/*****************************************************************************/
|
||||
struct sLayerThingData
|
||||
{
|
||||
bool WaypointFlag;
|
||||
|
||||
int Speed;
|
||||
int TurnRate;
|
||||
int Health;
|
||||
int AttackStrength;
|
||||
bool CollisionFlag;
|
||||
bool PlayerFlag;
|
||||
int Spare[8];
|
||||
|
||||
};
|
||||
struct sLayerThing
|
||||
{
|
||||
GString Name;
|
||||
|
@ -91,12 +81,13 @@ protected:
|
|||
virtual int FindDefThing(const char *Name);
|
||||
virtual void SetCursor(const char *Name);
|
||||
|
||||
void RenderThing(CCore *Core,Vector3 &CamPos,sLayerThing &ThisThing,bool Render3d,bool Selected);
|
||||
virtual void RenderThing(CCore *Core,Vector3 &CamPos,sLayerThing &ThisThing,bool Render3d,bool Selected);
|
||||
int CheckThing(CPoint &Pos);
|
||||
void AddThing(CPoint &Pos);
|
||||
int SelectThing(CPoint &Pos);
|
||||
int SelectThing(int Idx);
|
||||
void DeleteThing();
|
||||
void GotoThing(CCore *Core);
|
||||
int CheckThingPoint(CPoint &Pos);
|
||||
void AddThingPoint(CPoint &Pos);
|
||||
int SelectThingPoint(CPoint &Pos);
|
||||
|
@ -105,6 +96,7 @@ virtual void SetCursor(const char *Name);
|
|||
void MovePoint(int Dir);
|
||||
void DeletePoint();
|
||||
void Cancel();
|
||||
virtual void SetThingParams(sLayerThing &Thing){}
|
||||
|
||||
CIni ThingScript;
|
||||
CElemBank *ThingBank;
|
||||
|
@ -115,6 +107,10 @@ virtual void SetCursor(const char *Name);
|
|||
MouseMode Mode;
|
||||
sLayerThing Cursor;
|
||||
bool DrawPoints;
|
||||
|
||||
CGUILayerThing GUIThing;
|
||||
CGuiLayerThingPos GUIThingPos;
|
||||
|
||||
};
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**********************/
|
||||
/*** Layer Platform ***/
|
||||
/**********************/
|
||||
/*********************/
|
||||
/*** Layer Trigger ***/
|
||||
/*********************/
|
||||
|
||||
#include "stdafx.h"
|
||||
#include <Vector3.h>
|
||||
|
@ -15,74 +15,120 @@
|
|||
|
||||
#include "Core.h"
|
||||
#include "LayerThing.h"
|
||||
#include "LayerPlatform.h"
|
||||
#include "LayerTrigger.h"
|
||||
#include "Utils.h"
|
||||
#include "Export.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
/*****************************************************************************/
|
||||
CLayerPlatform::CLayerPlatform(sLayerDef &Def)
|
||||
CLayerTrigger::CLayerTrigger(sLayerDef &Def)
|
||||
{
|
||||
InitLayer(Def);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CLayerPlatform::InitLayer(sLayerDef &Def)
|
||||
void CLayerTrigger::InitLayer(sLayerDef &Def)
|
||||
{
|
||||
ThingBank=new CElemBank(-1,-1,false,CElem::CentreModeLR | CElem::CentreModeB);
|
||||
CLayerThing::InitLayer(Def);
|
||||
LoadThingScript(theApp.GetConfigStr("LayerScript","PlatformScript"));
|
||||
LoadThingScript(theApp.GetConfigStr("LayerScript","TriggerScript"));
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CLayerPlatform::InitSubView(CCore *Core)
|
||||
void CLayerTrigger::InitSubView(CCore *Core)
|
||||
{
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CLayerTrigger::RenderThing(CCore *Core,Vector3 &ThisCam,sLayerThing &ThisThing,bool Render3d,bool Selected)
|
||||
{
|
||||
float ZoomW=Core->GetZoomW();
|
||||
float ZoomH=Core->GetZoomH();
|
||||
Vector3 &Scale=Core->GetScaleVector();
|
||||
Vector3 ScrOfs(ZoomW/2,ZoomH/2,0);
|
||||
float Col=0.8f,A=0.8f;
|
||||
|
||||
glColor4f(1,1,1,0.8f);
|
||||
if (Selected)
|
||||
{
|
||||
Col=1.0f;
|
||||
A=0.8f;
|
||||
glColor4f(1,1,1,1.0f); // For number
|
||||
}
|
||||
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glPushMatrix();
|
||||
|
||||
glLoadIdentity();
|
||||
|
||||
glScalef(Scale.x,Scale.y,Scale.z);
|
||||
glTranslatef(-ThisCam.x,ThisCam.y,0); // Set scroll offset
|
||||
glTranslatef(-ScrOfs.x,ScrOfs.y,0); // Bring to top left corner
|
||||
|
||||
glTranslatef(ThisThing.XY[0].x,-ThisThing.XY[0].y,0); // Set Pos
|
||||
|
||||
Core->RenderNumber(0);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
|
||||
float W=(ThisThing.Data.Width);
|
||||
float H=-(ThisThing.Data.Height);
|
||||
// Draw Box
|
||||
glBegin (GL_QUADS);
|
||||
glColor4f(0,Col-0.25f,0,A);
|
||||
glVertex3f(0,0+1,0);
|
||||
glVertex3f(W,0+1,0);
|
||||
glVertex3f(W,H+1,0);
|
||||
glVertex3f(0,H+1,0);
|
||||
glEnd();
|
||||
// Draw OutLine
|
||||
glBegin(GL_LINES);
|
||||
glColor4f(Col,Col,Col,A);
|
||||
|
||||
glVertex3f( 0,0+1,0);
|
||||
glVertex3f( W,0+1,0);
|
||||
|
||||
glVertex3f( W,0+1,0);
|
||||
glVertex3f( W,H+1,0);
|
||||
|
||||
glVertex3f( W,H+1,0);
|
||||
glVertex3f( 0,H+1,0);
|
||||
|
||||
glVertex3f( 0,H+1,0);
|
||||
glVertex3f( 0,0+1,0);
|
||||
|
||||
glEnd();
|
||||
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
|
||||
glPopMatrix();
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
/*** Gui *********************************************************************/
|
||||
/*****************************************************************************/
|
||||
void CLayerPlatform::GUIInit(CCore *Core)
|
||||
void CLayerTrigger::GUIInit(CCore *Core)
|
||||
{
|
||||
GUIPlatform.DisableCallback(true);
|
||||
GUITrigger.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");
|
||||
}
|
||||
|
||||
|
||||
Core->GUIAdd(GUITrigger,IDD_LAYER_TRIGGER);
|
||||
GUITrigger.DisableCallback(false);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CLayerPlatform::GUIKill(CCore *Core)
|
||||
void CLayerTrigger::GUIKill(CCore *Core)
|
||||
{
|
||||
Core->GUIRemove(GUIThing,IDD_LAYER_THING);
|
||||
Core->GUIRemove(GUIThingPos,IDD_LAYER_THING_POS);
|
||||
Core->GUIRemove(GUIPlatform,IDD_LAYER_PLATFORM);
|
||||
Core->GUIRemove(GUITrigger,IDD_LAYER_TRIGGER);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CLayerPlatform::GUIUpdate(CCore *Core)
|
||||
void CLayerTrigger::GUIUpdate(CCore *Core)
|
||||
{
|
||||
int i,ListSize;
|
||||
CComboBox &List=GUIThing.m_DefList;
|
||||
|
||||
// Setup Def Platform List
|
||||
// Setup Def Trigger List
|
||||
ListSize=DefList.size();
|
||||
List.ResetContent();
|
||||
for (i=0; i<ListSize; i++)
|
||||
|
@ -95,7 +141,7 @@ CComboBox &List=GUIThing.m_DefList;
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CLayerPlatform::GUIThingDefClear()
|
||||
void CLayerTrigger::GUIThingDefClear()
|
||||
{
|
||||
CComboBox &List=GUIThing.m_DefList;
|
||||
CurrentDefThing=-1;
|
||||
|
@ -103,63 +149,47 @@ CComboBox &List=GUIThing.m_DefList;
|
|||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CLayerPlatform::GUIThingUpdate(bool OnlySel)
|
||||
void CLayerTrigger::GUIThingUpdate(bool OnlySel)
|
||||
{
|
||||
GUIThingUpdateList(GUIThing.m_List,false);
|
||||
// Params
|
||||
GUIPlatform.DisableCallback(true);
|
||||
GUITrigger.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);
|
||||
GUITrigger.SetVal(GUITrigger.m_Width,ThisThing.Data.Width);
|
||||
GUITrigger.SetVal(GUITrigger.m_Height,ThisThing.Data.Height);
|
||||
}
|
||||
else
|
||||
{
|
||||
GUIPlatform.m_Speed.SetWindowText("");
|
||||
GUIPlatform.m_TurnRate.SetWindowText("");
|
||||
GUIPlatform.m_Collision.SetCheck(false);
|
||||
GUIPlatform.m_MoveList.SetCurSel(-1);
|
||||
GUIPlatform.m_Type.SetCurSel(-1);
|
||||
GUITrigger.m_Width.SetWindowText("");
|
||||
GUITrigger.m_Height.SetWindowText("");
|
||||
}
|
||||
GUIPlatform.DisableCallback(false);
|
||||
GUITrigger.DisableCallback(false);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CLayerPlatform::GUIThingPointUpdate(bool OnlySel)
|
||||
void CLayerTrigger::GUIThingPointUpdate(bool OnlySel)
|
||||
{
|
||||
GUIThingPointUpdateList(GUIThingPos.m_List,OnlySel);
|
||||
// GUIThingPointUpdateList(GUIThingPos.m_List,OnlySel);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CLayerPlatform::GUIChanged(CCore *Core)
|
||||
void CLayerTrigger::GUIChanged(CCore *Core)
|
||||
{
|
||||
if (CurrentThing!=-1)
|
||||
{
|
||||
sLayerThing &ThisThing=ThingList[CurrentThing];
|
||||
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);
|
||||
ThisThing.Data.Width=GUITrigger.GetVal(GUITrigger.m_Width);
|
||||
ThisThing.Data.Height=GUITrigger.GetVal(GUITrigger.m_Height);
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
void CLayerPlatform::SetThingParams(sLayerThing &Thing)
|
||||
void CLayerTrigger::SetThingParams(sLayerThing &Thing)
|
||||
{
|
||||
switch(Thing.Data.MoveType)
|
||||
{
|
||||
case MoveTypeLinear:
|
||||
Thing.Data.WaypointCount=16;
|
||||
break;
|
||||
case MoveTypeCirular:
|
||||
Thing.Data.WaypointCount=1;
|
||||
Thing.XY.resize(1);
|
||||
break;
|
||||
}
|
||||
if (Thing.Data.Width<1) Thing.Data.Width=1;
|
||||
if (Thing.Data.Height<1) Thing.Data.Height=1;
|
||||
// Thing.XY.resize(1);
|
||||
}
|
|
@ -1,29 +1,23 @@
|
|||
/*******************/
|
||||
/*** Layer Platform ***/
|
||||
/*******************/
|
||||
/*********************/
|
||||
/*** Layer Trigger ***/
|
||||
/*********************/
|
||||
|
||||
#ifndef __LAYER_PLATFORM_HEADER__
|
||||
#define __LAYER_PLATFORM_HEADER__
|
||||
#ifndef __LAYER_TRIGGER_HEADER__
|
||||
#define __LAYER_TRIGGER_HEADER__
|
||||
|
||||
#include "LayerThing.h"
|
||||
#include "Layer.h"
|
||||
#include "MapEdit.h"
|
||||
#include "GUILayerPlatform.h"
|
||||
#include "GUILayerTrigger.h"
|
||||
#include "Elem.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
class CLayerPlatform : public CLayerThing
|
||||
class CLayerTrigger : public CLayerThing
|
||||
{
|
||||
public:
|
||||
enum
|
||||
{
|
||||
MoveTypeLinear=0,
|
||||
MoveTypeCirular
|
||||
|
||||
};
|
||||
|
||||
CLayerPlatform(sLayerDef &Def);
|
||||
CLayerPlatform(CFile *File,int Version) {Load(File,Version);}
|
||||
CLayerTrigger(sLayerDef &Def);
|
||||
CLayerTrigger(CFile *File,int Version) {Load(File,Version);}
|
||||
|
||||
void InitLayer(sLayerDef &Def);
|
||||
void InitSubView(CCore *Core);
|
||||
|
@ -40,9 +34,10 @@ public:
|
|||
|
||||
|
||||
protected:
|
||||
void RenderThing(CCore *Core,Vector3 &CamPos,sLayerThing &ThisThing,bool Render3d,bool Selected);
|
||||
void SetThingParams(sLayerThing &Thing);
|
||||
|
||||
CGUILayerPlatform GUIPlatform;
|
||||
CGUILayerTrigger GUITrigger;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -2,53 +2,59 @@
|
|||
|
||||
[General Info]
|
||||
Version=1
|
||||
LastClass=CMapEditDoc
|
||||
LastClass=CGUILayerShade
|
||||
LastTemplate=CDialog
|
||||
NewFileInclude1=#include "stdafx.h"
|
||||
NewFileInclude2=#include "mapedit.h"
|
||||
LastPage=0
|
||||
|
||||
ClassCount=20
|
||||
ClassCount=24
|
||||
Class1=CChildFrame
|
||||
Class2=CGLEnabledView
|
||||
Class3=CGUIAddLayer
|
||||
Class4=CGUIElemList
|
||||
Class5=GUILayerCollision
|
||||
Class6=CGUILayerList
|
||||
Class7=CGUIMultiBar
|
||||
Class8=CGUINewMap
|
||||
Class9=CGUIResize
|
||||
Class10=CGUITileBank
|
||||
Class11=GUIToolBar
|
||||
Class12=CLayerShadeGUI
|
||||
Class13=CLayerTileCollision
|
||||
Class14=CMainFrame
|
||||
Class15=CMapEditApp
|
||||
Class16=CAboutDlg
|
||||
Class17=CMapEditDoc
|
||||
Class18=CMapEditView
|
||||
Class5=CGUILayerActor
|
||||
Class6=GUILayerCollision
|
||||
Class7=CGUILayerList
|
||||
Class8=CGUILayerPlatform
|
||||
Class9=CGUILayerShade
|
||||
Class10=CGUILayerThing
|
||||
Class11=CGuiLayerThingPos
|
||||
Class12=CGUIMultiBar
|
||||
Class13=CGUINewMap
|
||||
Class14=CGUIResize
|
||||
Class15=CGUITileBank
|
||||
Class16=GUIToolBar
|
||||
Class17=CLayerTileCollision
|
||||
Class18=CMainFrame
|
||||
Class19=CMapEditApp
|
||||
Class20=CAboutDlg
|
||||
Class21=CMapEditDoc
|
||||
Class22=CMapEditView
|
||||
|
||||
ResourceCount=18
|
||||
ResourceCount=20
|
||||
Resource1=IDD_RESIZE
|
||||
Resource2=IDR_MAPEDITYPE (English (U.S.))
|
||||
Resource3=IDR_TOOLBAR (English (U.S.))
|
||||
Resource4=IDD_NEWMAP
|
||||
Resource5=IDD_ADDLAYER
|
||||
Resource2=IDD_NEWMAP
|
||||
Resource3=IDD_TOOLBAR
|
||||
Resource4=IDR_MAPEDITYPE (English (U.S.))
|
||||
Resource5=IDD_LAYER_THING_POS
|
||||
Resource6=IDD_LAYER_SHADE
|
||||
Resource7=IDD_MULTIBAR (English (U.S.))
|
||||
Resource8=xxxx
|
||||
Resource9=IDD_LAYER_ACTOR
|
||||
Resource10=IDD_ABOUTBOX (English (U.S.))
|
||||
Resource11=IDD_ELEMLIST
|
||||
Resource12=IDD_TILEBANK
|
||||
Resource13=IDD_LAYER_LIST
|
||||
Resource14=IDD_TOOLBAR
|
||||
Resource15=IDD_LAYER_ACTOR2
|
||||
Class19=CGUILayerActor
|
||||
Resource7=IDD_LAYER_ACTOR
|
||||
Resource8=IDD_LAYER_LIST
|
||||
Resource9=IDD_MULTIBAR (English (U.S.))
|
||||
Resource10=IDD_LAYER_THING
|
||||
Resource11=IDD_LAYER_TRIGGER
|
||||
Resource12=IDD_ADDLAYER
|
||||
Resource13=IDD_TILEBANK
|
||||
Resource14=IDR_MAINFRAME (English (U.S.))
|
||||
Resource15=IDD_ABOUTBOX (English (U.S.))
|
||||
Resource16=IDD_LAYER_COLLISION
|
||||
Resource17=IDR_MAINFRAME (English (U.S.))
|
||||
Class20=CGUILayerItem
|
||||
Resource18=IDD_LAYER_ITEM
|
||||
Resource17=IDD_ELEMLIST
|
||||
Resource18=IDR_TOOLBAR (English (U.S.))
|
||||
Class23=CGUILayerTrigger
|
||||
Resource19=IDD_LAYER_PLATFORM
|
||||
Class24=CGUILayerFX
|
||||
Resource20=IDD_LAYER_FX
|
||||
|
||||
[CLS:CChildFrame]
|
||||
Type=0
|
||||
|
@ -74,6 +80,12 @@ BaseClass=CDialog
|
|||
HeaderFile=GUIElemList.h
|
||||
ImplementationFile=GUIElemList.cpp
|
||||
|
||||
[CLS:CGUILayerActor]
|
||||
Type=0
|
||||
BaseClass=CDialog
|
||||
HeaderFile=GUILayerActor.h
|
||||
ImplementationFile=GUILayerActor.cpp
|
||||
|
||||
[CLS:GUILayerCollision]
|
||||
Type=0
|
||||
BaseClass=CDialog
|
||||
|
@ -85,7 +97,36 @@ Type=0
|
|||
BaseClass=CDialog
|
||||
HeaderFile=GUILayerList.h
|
||||
ImplementationFile=GUILayerList.cpp
|
||||
LastObject=IDC_LAYERLIST_LIST
|
||||
|
||||
[CLS:CGUILayerPlatform]
|
||||
Type=0
|
||||
BaseClass=CDialog
|
||||
HeaderFile=GUILayerPlatform.h
|
||||
ImplementationFile=GUILayerPlatform.cpp
|
||||
Filter=D
|
||||
VirtualFilter=dWC
|
||||
LastObject=CGUILayerPlatform
|
||||
|
||||
[CLS:CGUILayerShade]
|
||||
Type=0
|
||||
BaseClass=CDialog
|
||||
HeaderFile=GUILayerShade.h
|
||||
ImplementationFile=GUILayerShade.cpp
|
||||
Filter=D
|
||||
VirtualFilter=dWC
|
||||
LastObject=IDC_LAYERSHADE_TRANS1
|
||||
|
||||
[CLS:CGUILayerThing]
|
||||
Type=0
|
||||
BaseClass=CDialog
|
||||
HeaderFile=GUILayerThing.h
|
||||
ImplementationFile=GUILayerThing.cpp
|
||||
|
||||
[CLS:CGuiLayerThingPos]
|
||||
Type=0
|
||||
BaseClass=CDialog
|
||||
HeaderFile=GuiLayerThingPos.h
|
||||
ImplementationFile=GuiLayerThingPos.cpp
|
||||
|
||||
[CLS:CGUIMultiBar]
|
||||
Type=0
|
||||
|
@ -98,9 +139,6 @@ Type=0
|
|||
BaseClass=CDialog
|
||||
HeaderFile=GUINewMap.h
|
||||
ImplementationFile=GUINewMap.cpp
|
||||
Filter=D
|
||||
VirtualFilter=dWC
|
||||
LastObject=CGUINewMap
|
||||
|
||||
[CLS:CGUIResize]
|
||||
Type=0
|
||||
|
@ -119,12 +157,6 @@ Type=0
|
|||
HeaderFile=GUIToolBar.h
|
||||
ImplementationFile=GUIToolBar.cpp
|
||||
|
||||
[CLS:CLayerShadeGUI]
|
||||
Type=0
|
||||
BaseClass=CDialog
|
||||
HeaderFile=LayerShadeGUI.h
|
||||
ImplementationFile=LayerShadeGUI.cpp
|
||||
|
||||
[CLS:CLayerTileCollision]
|
||||
Type=0
|
||||
BaseClass=CDialog
|
||||
|
@ -148,16 +180,12 @@ Type=0
|
|||
BaseClass=CDialog
|
||||
HeaderFile=MapEdit.cpp
|
||||
ImplementationFile=MapEdit.cpp
|
||||
LastObject=CAboutDlg
|
||||
|
||||
[CLS:CMapEditDoc]
|
||||
Type=0
|
||||
BaseClass=CDocument
|
||||
HeaderFile=MapEditDoc.h
|
||||
ImplementationFile=MapEditDoc.cpp
|
||||
Filter=N
|
||||
VirtualFilter=DC
|
||||
LastObject=ID_RENDER_TO_TGA
|
||||
|
||||
[CLS:CMapEditView]
|
||||
Type=0
|
||||
|
@ -179,6 +207,38 @@ Class=CGUIElemList
|
|||
ControlCount=1
|
||||
Control1=IDD_ELEM_LIST,combobox,1344339971
|
||||
|
||||
[DLG:IDD_LAYER_ACTOR]
|
||||
Type=1
|
||||
Class=CGUILayerActor
|
||||
ControlCount=14
|
||||
Control1=IDC_ACTOR_SPEED_TEXT,static,1342308354
|
||||
Control2=IDC_ACTOR_SPEED,edit,1350633600
|
||||
Control3=IDC_ACTOR_SPEED_SPIN,msctls_updown32,1342177334
|
||||
Control4=IDC_ACTOR_TURNRATE_TEXT,static,1342308354
|
||||
Control5=IDC_ACTOR_TURNRATE,edit,1350633600
|
||||
Control6=IDC_ACTOR_TURNRATE_SPIN,msctls_updown32,1342177334
|
||||
Control7=IDC_ACTOR_HEALTH_TEXT,static,1342308354
|
||||
Control8=IDC_ACTOR_HEALTH,edit,1350633600
|
||||
Control9=IDC_ACTOR_HEALTH_SPIN,msctls_updown32,1342177334
|
||||
Control10=IDC_ACTOR_ATTACK_TEXT,static,1342308354
|
||||
Control11=IDC_ACTOR_ATTACK,edit,1350633600
|
||||
Control12=IDC_ACTOR_ATTACK_SPIN,msctls_updown32,1342177334
|
||||
Control13=IDC_ACTOR_PLAYER,button,1476461091
|
||||
Control14=IDC_ACTOR_COLLISION,button,1342243363
|
||||
|
||||
[DLG:IDD_LAYER_COLLISION]
|
||||
Type=1
|
||||
Class=GUILayerCollision
|
||||
ControlCount=8
|
||||
Control1=IDC_LAYERCOLLISION_NORMAL,button,1342242816
|
||||
Control2=IDC_LAYERCOLLISION_DAMAGE,button,1342242816
|
||||
Control3=IDC_LAYERCOLLISION_SLIPPERY,button,1342242816
|
||||
Control4=IDC_LAYERCOLLISION_ELECTRIC,button,1342242816
|
||||
Control5=IDC_LAYERCOLLISION_STICKY,button,1342242816
|
||||
Control6=IDC_LAYERCOLLISION_WATER,button,1342242816
|
||||
Control7=IDC_LAYERCOLLISION_SOLID,button,1342242816
|
||||
Control8=IDC_LAYERCOLLISION_DEATH,button,1342242816
|
||||
|
||||
[DLG:IDD_LAYER_LIST]
|
||||
Type=1
|
||||
Class=CGUILayerList
|
||||
|
@ -187,6 +247,71 @@ Control1=IDC_LAYERLIST_LIST,listbox,1352728913
|
|||
Control2=IDC_LAYERLIST_ADD,button,1342242816
|
||||
Control3=IDC_LAYERLIST_DELETE,button,1342242816
|
||||
|
||||
[DLG:IDD_LAYER_PLATFORM]
|
||||
Type=1
|
||||
Class=CGUILayerPlatform
|
||||
ControlCount=9
|
||||
Control1=IDC_PLATFORM_SPEED_TEXT,static,1342308354
|
||||
Control2=IDC_PLATFORM_SPEED,edit,1350633600
|
||||
Control3=IDC_PLATFORM_SPEED_SPIN,msctls_updown32,1342177334
|
||||
Control4=IDC_PLATFORM_TURNRATE_TEXT,static,1342308354
|
||||
Control5=IDC_PLATFORM_TURNRATE,edit,1350633600
|
||||
Control6=IDC_PLATFORM_TURNRATE_SPIN,msctls_updown32,1342177334
|
||||
Control7=IDC_PLATFORM_COLLISION,button,1342243363
|
||||
Control8=IDC_PLATFORM_MOVE_TYPE,combobox,1344339971
|
||||
Control9=IDC_PLATFORM_TYPE,combobox,1344339971
|
||||
|
||||
[DLG:IDD_LAYER_SHADE]
|
||||
Type=1
|
||||
Class=CGUILayerShade
|
||||
ControlCount=28
|
||||
Control1=IDC_LAYERSHADE_EDITR0,edit,1350770688
|
||||
Control2=IDC_LAYERSHADE_EDITG0,edit,1350770816
|
||||
Control3=IDC_LAYERSHADE_EDITB0,edit,1350770816
|
||||
Control4=IDC_LAYERSHADE_COUNTTEXT,static,1342312449
|
||||
Control5=IDC_LAYERSHADE_EDITR1,edit,1350770688
|
||||
Control6=IDC_LAYERSHADE_EDITG1,edit,1350770816
|
||||
Control7=IDC_LAYERSHADE_EDITB1,edit,1350770816
|
||||
Control8=IDC_LAYERSHADE_EDITR2,edit,1350770688
|
||||
Control9=IDC_LAYERSHADE_EDITG2,edit,1350770816
|
||||
Control10=IDC_LAYERSHADE_EDITB2,edit,1350770816
|
||||
Control11=IDC_LAYERSHADE_TEXT7,static,1342312449
|
||||
Control12=IDC_LAYERSHADE_EDITR3,edit,1350770688
|
||||
Control13=IDC_LAYERSHADE_EDITG3,edit,1350770816
|
||||
Control14=IDC_LAYERSHADE_EDITB3,edit,1350770816
|
||||
Control15=IDC_LAYERSHADE_COUNTEDIT,edit,1350576256
|
||||
Control16=IDC_SPIN2,msctls_updown32,1342177302
|
||||
Control17=IDC_LAYERSHADE_BACKGFX0,combobox,1344339971
|
||||
Control18=IDC_LAYERSHADE_BACKGFX1,combobox,1344339971
|
||||
Control19=IDC_LAYERSHADE_SPIN0,button,1342242851
|
||||
Control20=IDC_LAYERSHADE_MOVE0,button,1342242851
|
||||
Control21=IDC_LAYERSHADE_SCALE0,button,1342242851
|
||||
Control22=IDC_LAYERSHADE_COLOR0,button,1342242851
|
||||
Control23=IDC_LAYERSHADE_TRANS0,combobox,1344339971
|
||||
Control24=IDC_LAYERSHADE_SPIN1,button,1342242851
|
||||
Control25=IDC_LAYERSHADE_MOVE1,button,1342242851
|
||||
Control26=IDC_LAYERSHADE_SCALE1,button,1342242851
|
||||
Control27=IDC_LAYERSHADE_COLOR1,button,1342242851
|
||||
Control28=IDC_LAYERSHADE_TRANS1,combobox,1344339971
|
||||
|
||||
[DLG:IDD_LAYER_THING]
|
||||
Type=1
|
||||
Class=CGUILayerThing
|
||||
ControlCount=4
|
||||
Control1=IDC_THING_LIST,combobox,1344339971
|
||||
Control2=IDC_DEF_THING_LIST,combobox,1344339971
|
||||
Control3=IDC_THING_GOTO,button,1342242816
|
||||
Control4=IDC_THING_DELETE,button,1342242816
|
||||
|
||||
[DLG:IDD_LAYER_THING_POS]
|
||||
Type=1
|
||||
Class=CGuiLayerThingPos
|
||||
ControlCount=4
|
||||
Control1=IDC_THING_POS_LIST,listbox,1352728833
|
||||
Control2=IDC_THING_POS_UP,button,1342242816
|
||||
Control3=IDC_THING_POS_DOWN,button,1342242816
|
||||
Control4=IDC_THING_POS_DELETE,button,1342242816
|
||||
|
||||
[DLG:IDD_MULTIBAR]
|
||||
Type=1
|
||||
Class=CGUIMultiBar
|
||||
|
@ -218,13 +343,16 @@ Control7=IDC_MAPSIZE_WARNING,static,1342308352
|
|||
Type=1
|
||||
Class=CGUITileBank
|
||||
ControlCount=3
|
||||
Control1=IDD_TILEBANK_UPDATE,button,1476460544
|
||||
Control1=IDD_TILEBANK_UPDATE,button,1342242816
|
||||
Control2=IDD_TILEBANK_LOAD,button,1342242816
|
||||
Control3=IDD_TILEBANK_DELETE,button,1342242816
|
||||
|
||||
[DLG:IDD_LAYERSHADE_GUI]
|
||||
[DLG:IDD_TOOLBAR]
|
||||
Type=1
|
||||
Class=CLayerShadeGUI
|
||||
Class=GUIToolBar
|
||||
ControlCount=2
|
||||
Control1=IDD_LAYERTILE_BTN_PAINT,button,1342177344
|
||||
Control2=IDD_LAYERTILE_BTN_SELECT,button,1342177344
|
||||
|
||||
[DLG:IDD_LAYERCOLLISION_GUI]
|
||||
Type=1
|
||||
|
@ -336,117 +464,44 @@ Type=1
|
|||
Class=?
|
||||
ControlCount=0
|
||||
|
||||
[DLG:IDD_LAYER_SHADE]
|
||||
[DLG:IDD_LAYER_TRIGGER]
|
||||
Type=1
|
||||
Class=?
|
||||
ControlCount=16
|
||||
Control1=IDC_LAYERSHADE_EDITR0,edit,1350770688
|
||||
Control2=IDC_LAYERSHADE_EDITG0,edit,1350770816
|
||||
Control3=IDC_LAYERSHADE_EDITB0,edit,1350770816
|
||||
Control4=IDC_LAYERSHADE_COUNTTEXT,static,1342312449
|
||||
Control5=IDC_LAYERSHADE_EDITR1,edit,1350770688
|
||||
Control6=IDC_LAYERSHADE_EDITG1,edit,1350770816
|
||||
Control7=IDC_LAYERSHADE_EDITB1,edit,1350770816
|
||||
Control8=IDC_LAYERSHADE_EDITR2,edit,1350770688
|
||||
Control9=IDC_LAYERSHADE_EDITG2,edit,1350770816
|
||||
Control10=IDC_LAYERSHADE_EDITB2,edit,1350770816
|
||||
Control11=IDC_LAYERSHADE_TEXT7,static,1342312449
|
||||
Control12=IDC_LAYERSHADE_EDITR3,edit,1350770688
|
||||
Control13=IDC_LAYERSHADE_EDITG3,edit,1350770816
|
||||
Control14=IDC_LAYERSHADE_EDITB3,edit,1350770816
|
||||
Control15=IDC_LAYERSHADE_COUNTEDIT,edit,1350576256
|
||||
Control16=IDC_SPIN2,msctls_updown32,1342177302
|
||||
Class=CGUILayerTrigger
|
||||
ControlCount=5
|
||||
Control1=IDC_TRIGGER_SIZE,static,1342308354
|
||||
Control2=IDC_TRIGGER_WIDTH,edit,1350633600
|
||||
Control3=IDC_TRIGGER_WIDTH_SPIN,msctls_updown32,1342177334
|
||||
Control4=IDC_TRIGGER_HEIGHT,edit,1350633600
|
||||
Control5=IDC_PLATFORM_TURNRATE_SPIN,msctls_updown32,1342177334
|
||||
|
||||
[DLG:IDD_TOOLBAR]
|
||||
Type=1
|
||||
Class=GUIToolBar
|
||||
ControlCount=2
|
||||
Control1=IDD_LAYERTILE_BTN_PAINT,button,1342177344
|
||||
Control2=IDD_LAYERTILE_BTN_SELECT,button,1342177344
|
||||
|
||||
[DLG:IDD_LAYER_ACTOR2]
|
||||
Type=1
|
||||
Class=GUILayerCollision
|
||||
ControlCount=8
|
||||
Control1=IDC_LAYERCOLLISION_NORMAL,button,1342242816
|
||||
Control2=IDC_LAYERCOLLISION_DAMAGE,button,1342242816
|
||||
Control3=IDC_LAYERCOLLISION_SLIPPERY,button,1342242816
|
||||
Control4=IDC_LAYERCOLLISION_ELECTRIC,button,1342242816
|
||||
Control5=IDC_LAYERCOLLISION_STICKY,button,1342242816
|
||||
Control6=IDC_LAYERCOLLISION_WATER,button,1342242816
|
||||
Control7=IDC_LAYERCOLLISION_SOLID,button,1342242816
|
||||
Control8=IDC_LAYERCOLLISION_DEATH,button,1342242816
|
||||
|
||||
[DLG:xxxx]
|
||||
Type=1
|
||||
Class=?
|
||||
ControlCount=1
|
||||
Control1=IDC_COMBO1,combobox,1344340226
|
||||
|
||||
[DLG:IDD_LAYER_COLLISION]
|
||||
Type=1
|
||||
Class=?
|
||||
ControlCount=8
|
||||
Control1=IDC_LAYERCOLLISION_NORMAL,button,1342242816
|
||||
Control2=IDC_LAYERCOLLISION_DAMAGE,button,1342242816
|
||||
Control3=IDC_LAYERCOLLISION_SLIPPERY,button,1342242816
|
||||
Control4=IDC_LAYERCOLLISION_ELECTRIC,button,1342242816
|
||||
Control5=IDC_LAYERCOLLISION_STICKY,button,1342242816
|
||||
Control6=IDC_LAYERCOLLISION_WATER,button,1342242816
|
||||
Control7=IDC_LAYERCOLLISION_SOLID,button,1342242816
|
||||
Control8=IDC_LAYERCOLLISION_DEATH,button,1342242816
|
||||
|
||||
[CLS:CGUILayerActor]
|
||||
[CLS:CGUILayerTrigger]
|
||||
Type=0
|
||||
HeaderFile=GUILayerActor.h
|
||||
ImplementationFile=GUILayerActor.cpp
|
||||
HeaderFile=GUILayerTrigger.h
|
||||
ImplementationFile=GUILayerTrigger.cpp
|
||||
BaseClass=CDialog
|
||||
Filter=D
|
||||
VirtualFilter=dWC
|
||||
LastObject=IDC_ACTOR_POS_LIST
|
||||
LastObject=CGUILayerTrigger
|
||||
|
||||
[DLG:IDD_LAYER_ACTOR]
|
||||
[DLG:IDD_LAYER_FX]
|
||||
Type=1
|
||||
Class=?
|
||||
ControlCount=22
|
||||
Control1=IDC_LEVEL_ACTOR_LIST,combobox,1344339971
|
||||
Control2=IDC_ACTOR_POS_LIST,listbox,1352728833
|
||||
Control3=IDC_ACTOR_POS_UP,button,1342242816
|
||||
Control4=IDC_ACTOR_POS_DOWN,button,1342242816
|
||||
Control5=IDC_ACTOR_POS_DELETE,button,1342242816
|
||||
Control6=IDC_ACTOR_SPEED_TEXT,static,1342308354
|
||||
Control7=IDC_ACTOR_SPEED,edit,1350633600
|
||||
Control8=IDC_ACTOR_SPEED_SPIN,msctls_updown32,1342177334
|
||||
Control9=IDC_ACTOR_TURNRATE_TEXT,static,1342308354
|
||||
Control10=IDC_ACTOR_TURNRATE,edit,1350633600
|
||||
Control11=IDC_ACTOR_TURNRATE_SPIN,msctls_updown32,1342177334
|
||||
Control12=IDC_ACTOR_HEALTH_TEXT,static,1342308354
|
||||
Control13=IDC_ACTOR_HEALTH,edit,1350633600
|
||||
Control14=IDC_ACTOR_HEALTH_SPIN,msctls_updown32,1342177334
|
||||
Control15=IDC_ACTOR_ATTACK_TEXT,static,1342308354
|
||||
Control16=IDC_ACTOR_ATTACK,edit,1350633600
|
||||
Control17=IDC_ACTOR_ATTACK_SPIN,msctls_updown32,1342177334
|
||||
Control18=IDC_ACTOR_PLAYER,button,1476461091
|
||||
Control19=IDC_ACTOR_COLLISION,button,1342243363
|
||||
Control20=IDC_LAYER_ACTOR_GROUP,button,1342177287
|
||||
Control21=IDC_ACTOR_LIST,combobox,1344339971
|
||||
Control22=IDC_ACTOR_DELETE,button,1342242816
|
||||
Class=CGUILayerFX
|
||||
ControlCount=8
|
||||
Control1=IDC_FX_SPEED_TEXT,static,1342308354
|
||||
Control2=IDC_FX_SIZE_TEXT,static,1342308354
|
||||
Control3=IDC_FX_WIDTH,edit,1350633600
|
||||
Control4=IDC_FX_WIDTH_SPIN,msctls_updown32,1342177334
|
||||
Control5=IDC_FX_HEIGHT,edit,1350633600
|
||||
Control6=IDC_FX_TURNRATE_SPIN,msctls_updown32,1342177334
|
||||
Control7=IDC_FX_SPEED,edit,1350633600
|
||||
Control8=IDC_FX_SPEED_SPIN,msctls_updown32,1342177462
|
||||
|
||||
[DLG:IDD_LAYER_ITEM]
|
||||
Type=1
|
||||
Class=CGUILayerItem
|
||||
ControlCount=4
|
||||
Control1=IDC_LEVEL_ITEM_LIST,combobox,1344339971
|
||||
Control2=IDC_LAYER_ACTOR_GROUP,button,1342177287
|
||||
Control3=IDC_ITEM_LIST,combobox,1344339971
|
||||
Control4=IDC_ITEM_DELETE,button,1342242816
|
||||
|
||||
[CLS:CGUILayerItem]
|
||||
[CLS:CGUILayerFX]
|
||||
Type=0
|
||||
HeaderFile=GUILayerItem.h
|
||||
ImplementationFile=GUILayerItem.cpp
|
||||
HeaderFile=GUILayerFX.h
|
||||
ImplementationFile=GUILayerFX.cpp
|
||||
BaseClass=CDialog
|
||||
Filter=D
|
||||
VirtualFilter=dWC
|
||||
LastObject=ID_MIRRORX
|
||||
LastObject=IDC_FX_WIDTH
|
||||
|
||||
|
|
|
@ -123,6 +123,14 @@ SOURCE=.\LayerDef.h
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\LayerFX.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\LayerFX.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\LayerItem.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -161,6 +169,14 @@ SOURCE=.\LayerTile.cpp
|
|||
|
||||
SOURCE=.\LayerTile.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\LayerTrigger.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\LayerTrigger.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Export"
|
||||
|
||||
|
@ -401,11 +417,11 @@ SOURCE=.\GUILayerCollision.h
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\GUILayerItem.cpp
|
||||
SOURCE=.\GUILayerFX.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\GUILayerItem.h
|
||||
SOURCE=.\GUILayerFX.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
|
@ -417,6 +433,14 @@ SOURCE=.\GUILayerList.h
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\GUILayerPlatform.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\GUILayerPlatform.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\GUILayerShade.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -425,6 +449,30 @@ SOURCE=.\GUILayerShade.h
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\GUILayerThing.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\GUILayerThing.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\GuiLayerThingPos.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\GuiLayerThingPos.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\GUILayerTrigger.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\GUILayerTrigger.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\GUIMultibar.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -464,5 +512,29 @@ SOURCE=.\GUIToolBar.cpp
|
|||
SOURCE=.\GUIToolBar.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\tools\MapEdit\actor.ini
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\tools\MapEdit\fx.ini
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\tools\MapEdit\Item.ini
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\tools\MapEdit\MapEdit.ini
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\tools\MapEdit\platform.ini
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\tools\MapEdit\trigger.ini
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
|
|
|
@ -517,7 +517,7 @@ IDD_TILEBANK DIALOG DISCARDABLE 0, 0, 156, 26
|
|||
STYLE WS_CHILD
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
PUSHBUTTON "Update",IDD_TILEBANK_UPDATE,95,5,50,15,WS_DISABLED
|
||||
PUSHBUTTON "Update",IDD_TILEBANK_UPDATE,95,5,50,15
|
||||
PUSHBUTTON "Load",IDD_TILEBANK_LOAD,5,5,45,15
|
||||
PUSHBUTTON "Delete",IDD_TILEBANK_DELETE,50,5,45,15
|
||||
END
|
||||
|
@ -532,7 +532,7 @@ BEGIN
|
|||
WS_TABSTOP
|
||||
END
|
||||
|
||||
IDD_LAYER_SHADE DIALOG DISCARDABLE 0, 0, 156, 76
|
||||
IDD_LAYER_SHADE DIALOG DISCARDABLE 0, 0, 156, 166
|
||||
STYLE WS_CHILD
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
|
@ -562,6 +562,30 @@ BEGIN
|
|||
ES_READONLY | ES_NUMBER | NOT WS_TABSTOP
|
||||
CONTROL "Spin2",IDC_SPIN2,"msctls_updown32",UDS_SETBUDDYINT |
|
||||
UDS_ALIGNRIGHT | UDS_AUTOBUDDY,31,10,11,20
|
||||
COMBOBOX IDC_LAYERSHADE_BACKGFX0,5,75,140,220,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDC_LAYERSHADE_BACKGFX1,5,120,140,220,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "Spin",IDC_LAYERSHADE_SPIN0,"Button",BS_AUTOCHECKBOX |
|
||||
BS_LEFTTEXT | WS_TABSTOP,5,90,30,10
|
||||
CONTROL "Move",IDC_LAYERSHADE_MOVE0,"Button",BS_AUTOCHECKBOX |
|
||||
BS_LEFTTEXT | WS_TABSTOP,65,90,30,10
|
||||
CONTROL "Scale",IDC_LAYERSHADE_SCALE0,"Button",BS_AUTOCHECKBOX |
|
||||
BS_LEFTTEXT | WS_TABSTOP,35,90,30,10
|
||||
CONTROL "Color",IDC_LAYERSHADE_COLOR0,"Button",BS_AUTOCHECKBOX |
|
||||
BS_LEFTTEXT | WS_TABSTOP,95,90,30,10
|
||||
COMBOBOX IDC_LAYERSHADE_TRANS0,5,100,140,81,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
CONTROL "Spin",IDC_LAYERSHADE_SPIN1,"Button",BS_AUTOCHECKBOX |
|
||||
BS_LEFTTEXT | WS_TABSTOP,5,135,30,10
|
||||
CONTROL "Move",IDC_LAYERSHADE_MOVE1,"Button",BS_AUTOCHECKBOX |
|
||||
BS_LEFTTEXT | WS_TABSTOP,65,135,30,10
|
||||
CONTROL "Scale",IDC_LAYERSHADE_SCALE1,"Button",BS_AUTOCHECKBOX |
|
||||
BS_LEFTTEXT | WS_TABSTOP,35,135,30,10
|
||||
CONTROL "Color",IDC_LAYERSHADE_COLOR1,"Button",BS_AUTOCHECKBOX |
|
||||
BS_LEFTTEXT | WS_TABSTOP,95,135,30,10
|
||||
COMBOBOX IDC_LAYERSHADE_TRANS1,5,146,140,81,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
END
|
||||
|
||||
IDD_LAYER_COLLISION DIALOG DISCARDABLE 0, 0, 156, 41
|
||||
|
@ -586,62 +610,123 @@ BEGIN
|
|||
WS_TABSTOP
|
||||
END
|
||||
|
||||
IDD_LAYER_ACTOR DIALOG DISCARDABLE 0, 0, 156, 256
|
||||
IDD_LAYER_ACTOR DIALOG DISCARDABLE 0, 0, 156, 76
|
||||
STYLE WS_CHILD
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
COMBOBOX IDC_LEVEL_ACTOR_LIST,5,25,145,185,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
LISTBOX IDC_ACTOR_POS_LIST,5,55,145,55,LBS_NOINTEGRALHEIGHT |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "Pos Up",IDC_ACTOR_POS_UP,10,110,45,15
|
||||
PUSHBUTTON "Pos Down",IDC_ACTOR_POS_DOWN,55,110,45,15
|
||||
PUSHBUTTON "Pos Delete",IDC_ACTOR_POS_DELETE,100,110,45,15
|
||||
RTEXT "Speed",IDC_ACTOR_SPEED_TEXT,10,130,32,8
|
||||
EDITTEXT IDC_ACTOR_SPEED,45,130,35,12,ES_AUTOHSCROLL |
|
||||
ES_READONLY
|
||||
RTEXT "Speed",IDC_ACTOR_SPEED_TEXT,5,5,32,8
|
||||
EDITTEXT IDC_ACTOR_SPEED,41,5,35,12,ES_AUTOHSCROLL | ES_READONLY
|
||||
CONTROL "Spin1",IDC_ACTOR_SPEED_SPIN,"msctls_updown32",
|
||||
UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY |
|
||||
UDS_ARROWKEYS,80,130,11,10
|
||||
RTEXT "TurnRate",IDC_ACTOR_TURNRATE_TEXT,10,145,31,8
|
||||
EDITTEXT IDC_ACTOR_TURNRATE,45,145,35,12,ES_AUTOHSCROLL |
|
||||
UDS_ARROWKEYS,75,5,11,10
|
||||
RTEXT "TurnRate",IDC_ACTOR_TURNRATE_TEXT,5,20,31,8
|
||||
EDITTEXT IDC_ACTOR_TURNRATE,41,20,35,12,ES_AUTOHSCROLL |
|
||||
ES_READONLY
|
||||
CONTROL "Spin1",IDC_ACTOR_TURNRATE_SPIN,"msctls_updown32",
|
||||
UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY |
|
||||
UDS_ARROWKEYS,80,145,11,10
|
||||
RTEXT "Health",IDC_ACTOR_HEALTH_TEXT,10,164,32,8
|
||||
EDITTEXT IDC_ACTOR_HEALTH,45,164,35,12,ES_AUTOHSCROLL |
|
||||
UDS_ARROWKEYS,75,20,11,10
|
||||
RTEXT "Health",IDC_ACTOR_HEALTH_TEXT,5,39,32,8
|
||||
EDITTEXT IDC_ACTOR_HEALTH,41,39,35,12,ES_AUTOHSCROLL |
|
||||
ES_READONLY
|
||||
CONTROL "Spin1",IDC_ACTOR_HEALTH_SPIN,"msctls_updown32",
|
||||
UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY |
|
||||
UDS_ARROWKEYS,80,164,11,10
|
||||
RTEXT "Attack",IDC_ACTOR_ATTACK_TEXT,10,180,31,8
|
||||
EDITTEXT IDC_ACTOR_ATTACK,45,180,35,12,ES_AUTOHSCROLL |
|
||||
UDS_ARROWKEYS,75,39,11,10
|
||||
RTEXT "Attack",IDC_ACTOR_ATTACK_TEXT,5,55,31,8
|
||||
EDITTEXT IDC_ACTOR_ATTACK,41,55,35,12,ES_AUTOHSCROLL |
|
||||
ES_READONLY
|
||||
CONTROL "Spin1",IDC_ACTOR_ATTACK_SPIN,"msctls_updown32",
|
||||
UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY |
|
||||
UDS_ARROWKEYS,80,180,11,10
|
||||
UDS_ARROWKEYS,75,55,11,10
|
||||
CONTROL "Player",IDC_ACTOR_PLAYER,"Button",BS_AUTOCHECKBOX |
|
||||
BS_LEFTTEXT | BS_RIGHT | WS_DISABLED | WS_TABSTOP,95,130,
|
||||
BS_LEFTTEXT | BS_RIGHT | WS_DISABLED | WS_TABSTOP,91,5,
|
||||
50,10
|
||||
CONTROL "Collision",IDC_ACTOR_COLLISION,"Button",BS_AUTOCHECKBOX |
|
||||
BS_LEFTTEXT | BS_RIGHT | WS_TABSTOP,95,145,50,10
|
||||
GROUPBOX "",IDC_LAYER_ACTOR_GROUP,0,20,155,175
|
||||
COMBOBOX IDC_ACTOR_LIST,5,5,145,185,CBS_DROPDOWNLIST | WS_VSCROLL |
|
||||
WS_TABSTOP
|
||||
PUSHBUTTON "Delete Actor",IDC_ACTOR_DELETE,5,40,75,15
|
||||
BS_LEFTTEXT | BS_RIGHT | WS_TABSTOP,91,20,50,10
|
||||
END
|
||||
|
||||
IDD_LAYER_ITEM DIALOG DISCARDABLE 0, 0, 156, 66
|
||||
IDD_LAYER_THING DIALOG DISCARDABLE 0, 0, 156, 61
|
||||
STYLE WS_CHILD
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
COMBOBOX IDC_LEVEL_ITEM_LIST,5,25,145,185,CBS_DROPDOWNLIST |
|
||||
COMBOBOX IDC_THING_LIST,5,25,145,185,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
GROUPBOX "",IDC_LAYER_ACTOR_GROUP,0,20,155,40
|
||||
COMBOBOX IDC_ITEM_LIST,5,5,145,185,CBS_DROPDOWNLIST | WS_VSCROLL |
|
||||
WS_TABSTOP
|
||||
PUSHBUTTON "Delete Item",IDC_ITEM_DELETE,5,40,75,15
|
||||
COMBOBOX IDC_DEF_THING_LIST,5,5,145,185,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "Goto",IDC_THING_GOTO,5,40,75,15
|
||||
PUSHBUTTON "Delete",IDC_THING_DELETE,80,40,75,15
|
||||
END
|
||||
|
||||
IDD_LAYER_THING_POS DIALOG DISCARDABLE 0, 0, 156, 81
|
||||
STYLE WS_CHILD
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
LISTBOX IDC_THING_POS_LIST,5,5,145,55,LBS_NOINTEGRALHEIGHT |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "Pos Up",IDC_THING_POS_UP,10,60,45,15
|
||||
PUSHBUTTON "Pos Down",IDC_THING_POS_DOWN,55,60,45,15
|
||||
PUSHBUTTON "Pos Delete",IDC_THING_POS_DELETE,100,60,45,15
|
||||
END
|
||||
|
||||
IDD_LAYER_PLATFORM DIALOG DISCARDABLE 0, 0, 156, 76
|
||||
STYLE WS_CHILD
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
RTEXT "Speed",IDC_PLATFORM_SPEED_TEXT,5,40,32,8
|
||||
EDITTEXT IDC_PLATFORM_SPEED,41,40,35,12,ES_AUTOHSCROLL |
|
||||
ES_READONLY
|
||||
CONTROL "Spin1",IDC_PLATFORM_SPEED_SPIN,"msctls_updown32",
|
||||
UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY |
|
||||
UDS_ARROWKEYS,75,40,11,10
|
||||
RTEXT "TurnRate",IDC_PLATFORM_TURNRATE_TEXT,5,55,31,8
|
||||
EDITTEXT IDC_PLATFORM_TURNRATE,41,55,35,12,ES_AUTOHSCROLL |
|
||||
ES_READONLY
|
||||
CONTROL "Spin1",IDC_PLATFORM_TURNRATE_SPIN,"msctls_updown32",
|
||||
UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY |
|
||||
UDS_ARROWKEYS,75,55,11,10
|
||||
CONTROL "Collision",IDC_PLATFORM_COLLISION,"Button",
|
||||
BS_AUTOCHECKBOX | BS_LEFTTEXT | BS_RIGHT | WS_TABSTOP,91,
|
||||
42,50,10
|
||||
COMBOBOX IDC_PLATFORM_MOVE_TYPE,5,0,145,70,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDC_PLATFORM_TYPE,5,15,145,60,CBS_DROPDOWNLIST |
|
||||
WS_VSCROLL | WS_TABSTOP
|
||||
END
|
||||
|
||||
IDD_LAYER_TRIGGER DIALOG DISCARDABLE 0, 0, 156, 26
|
||||
STYLE WS_CHILD
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
RTEXT "Size",IDC_TRIGGER_SIZE,5,5,17,8
|
||||
EDITTEXT IDC_TRIGGER_WIDTH,25,5,24,12,ES_AUTOHSCROLL |
|
||||
ES_READONLY
|
||||
CONTROL "Spin1",IDC_TRIGGER_WIDTH_SPIN,"msctls_updown32",
|
||||
UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY |
|
||||
UDS_ARROWKEYS,90,5,11,10
|
||||
EDITTEXT IDC_TRIGGER_HEIGHT,50,5,25,12,ES_AUTOHSCROLL |
|
||||
ES_READONLY
|
||||
CONTROL "Spin1",IDC_PLATFORM_TURNRATE_SPIN,"msctls_updown32",
|
||||
UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY |
|
||||
UDS_ARROWKEYS,100,5,11,10
|
||||
END
|
||||
|
||||
IDD_LAYER_FX DIALOG DISCARDABLE 0, 0, 156, 56
|
||||
STYLE WS_CHILD
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
RTEXT "Speed",IDC_FX_SPEED_TEXT,5,25,20,8
|
||||
RTEXT "Size",IDC_FX_SIZE_TEXT,5,5,17,8
|
||||
EDITTEXT IDC_FX_WIDTH,25,5,24,12,ES_AUTOHSCROLL | ES_READONLY
|
||||
CONTROL "Spin1",IDC_FX_WIDTH_SPIN,"msctls_updown32",
|
||||
UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY |
|
||||
UDS_ARROWKEYS,90,5,11,10
|
||||
EDITTEXT IDC_FX_HEIGHT,50,5,25,12,ES_AUTOHSCROLL | ES_READONLY
|
||||
CONTROL "Spin1",IDC_FX_TURNRATE_SPIN,"msctls_updown32",
|
||||
UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY |
|
||||
UDS_ARROWKEYS,100,5,11,10
|
||||
EDITTEXT IDC_FX_SPEED,25,25,24,12,ES_AUTOHSCROLL | ES_READONLY
|
||||
CONTROL "Spin2",IDC_FX_SPEED_SPIN,"msctls_updown32",
|
||||
UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY |
|
||||
UDS_ARROWKEYS | UDS_NOTHOUSANDS,50,25,11,13
|
||||
END
|
||||
|
||||
|
||||
|
@ -706,7 +791,7 @@ BEGIN
|
|||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 149
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 69
|
||||
BOTTOMMARGIN, 159
|
||||
END
|
||||
|
||||
IDD_LAYER_COLLISION, DIALOG
|
||||
|
@ -730,15 +815,47 @@ BEGIN
|
|||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 149
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 249
|
||||
BOTTOMMARGIN, 69
|
||||
END
|
||||
|
||||
IDD_LAYER_ITEM, DIALOG
|
||||
IDD_LAYER_THING, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 5
|
||||
RIGHTMARGIN, 149
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 54
|
||||
END
|
||||
|
||||
IDD_LAYER_THING_POS, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 149
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 59
|
||||
BOTTOMMARGIN, 74
|
||||
END
|
||||
|
||||
IDD_LAYER_PLATFORM, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 149
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 69
|
||||
END
|
||||
|
||||
IDD_LAYER_TRIGGER, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 149
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 19
|
||||
END
|
||||
|
||||
IDD_LAYER_FX, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 149
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 49
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
|
|
@ -84,6 +84,9 @@ void CMapEditDoc::Serialize(CArchive& ar)
|
|||
if (ar.IsStoring())
|
||||
{
|
||||
Core.Save(ar.GetFile());
|
||||
//#if _DEBUG && 1
|
||||
// Core.Export(ar.GetFile()->GetFilePath());
|
||||
//#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -191,23 +191,15 @@ u8 *Src,*Dst;
|
|||
ThisTex.TexH=RGBData->TexH;
|
||||
ThisTex.ScaleU=RGBData->ScaleU;
|
||||
ThisTex.ScaleV=RGBData->ScaleV;
|
||||
int Err;
|
||||
|
||||
glGenTextures(1, &ThisTex.TexID);
|
||||
Err=glGetError();ASSERT(Err==0);
|
||||
glBindTexture(GL_TEXTURE_2D, ThisTex.TexID);
|
||||
Err=glGetError();ASSERT(Err==0);
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, 4, RGBData->TexW, RGBData->TexH, 0, GL_RGBA, GL_UNSIGNED_BYTE, Buffer);
|
||||
Err=glGetError();ASSERT(Err==0);
|
||||
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST);
|
||||
Err=glGetError();ASSERT(Err==0);
|
||||
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST);
|
||||
Err=glGetError();ASSERT(Err==0);
|
||||
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_CLAMP);
|
||||
Err=glGetError();ASSERT(Err==0);
|
||||
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_CLAMP);
|
||||
Err=glGetError();ASSERT(Err==0);
|
||||
glBindTexture(GL_TEXTURE_2D, 0);
|
||||
Err=glGetError();ASSERT(Err==0);
|
||||
MemFree(Buffer);
|
||||
}
|
||||
|
||||
|
|
|
@ -417,6 +417,8 @@ bool CTileBank::SelectCancel()
|
|||
/*****************************************************************************/
|
||||
void CTileBank::DeleteSet(CCore *Core)
|
||||
{
|
||||
if (GUIElemList.m_List.GetCurSel()==-1) return;
|
||||
|
||||
if (Core->Question("Delete Current Tile Bank\n\nAll used tiles in current set will be set to blank\nAre you sure?"))
|
||||
{
|
||||
int SetCount=GetSetCount();
|
||||
|
@ -446,6 +448,7 @@ void CTileBank::DeleteSet(CCore *Core)
|
|||
}
|
||||
}
|
||||
CurrentSet--;
|
||||
|
||||
GUIUpdate(Core);
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,11 @@
|
|||
#define IDD_LAYER_COLLISION 177
|
||||
#define IDD_ELEMLIST 178
|
||||
#define IDD_LAYER_ACTOR 179
|
||||
#define IDD_LAYER_ITEM 180
|
||||
#define IDD_LAYER_THING 181
|
||||
#define IDD_LAYER_THING_POS 182
|
||||
#define IDD_LAYER_PLATFORM 183
|
||||
#define IDD_LAYER_TRIGGER 184
|
||||
#define IDD_LAYER_FX 185
|
||||
#define IDC_TOOLBAR_COMBO 1018
|
||||
#define IDC_LAYERLIST_LIST 1019
|
||||
#define IDD_TILEBANK_UPDATE 1029
|
||||
|
@ -47,17 +51,12 @@
|
|||
#define IDC_LAYERCOLLISION_NORMAL 1078
|
||||
#define IDD_ELEM_LIST 1080
|
||||
#define IDC_LAYERSHADE_EDITR2 1081
|
||||
#define IDC_LEVEL_ACTOR_LIST 1081
|
||||
#define IDC_LAYERSHADE_EDITG2 1082
|
||||
#define IDC_LAYERCOLLISION_DAMAGE 1082
|
||||
#define IDC_ACTOR_POS_LIST 1082
|
||||
#define IDC_LAYERSHADE_EDITB2 1083
|
||||
#define IDC_LAYERCOLLISION_SLIPPERY 1083
|
||||
#define IDC_ACTOR_POS_UP 1083
|
||||
#define IDC_LAYERCOLLISION_ELECTRIC 1084
|
||||
#define IDC_ACTOR_POS_DOWN 1084
|
||||
#define IDC_LAYERCOLLISION_STICKY 1085
|
||||
#define IDC_ACTOR_POS_DELETE 1085
|
||||
#define IDC_LAYERSHADE_TEXT7 1086
|
||||
#define IDC_LAYERCOLLISION_WATER 1086
|
||||
#define IDC_ACTOR_SPEED_TEXT 1086
|
||||
|
@ -67,17 +66,11 @@
|
|||
#define IDC_LAYERSHADE_EDITG3 1088
|
||||
#define IDC_LAYERCOLLISION_DEATH 1088
|
||||
#define IDC_LAYERSHADE_EDITB3 1089
|
||||
#define IDC_ACTOR_LIST 1089
|
||||
#define IDC_ACTOR_DELETE 1091
|
||||
#define IDC_ACTOR_SPEED_SPIN 1092
|
||||
#define IDC_ACTOR_PLAYER 1094
|
||||
#define IDC_LAYER_ACTOR_GROUP 1095
|
||||
#define IDC_ACTOR_TURNRATE_TEXT 1097
|
||||
#define IDC_ACTOR_TURNRATE 1098
|
||||
#define IDC_ACTOR_TURNRATE_SPIN 1099
|
||||
#define IDC_ITEM_DELETE 1100
|
||||
#define IDC_ITEM_LIST 1101
|
||||
#define IDC_LEVEL_ITEM_LIST 1102
|
||||
#define IDC_ACTOR_HEALTH_TEXT 1112
|
||||
#define IDC_ACTOR_HEALTH 1113
|
||||
#define IDC_ACTOR_HEALTH_SPIN 1114
|
||||
|
@ -85,6 +78,47 @@
|
|||
#define IDC_ACTOR_ATTACK 1116
|
||||
#define IDC_ACTOR_ATTACK_SPIN 1117
|
||||
#define IDC_ACTOR_COLLISION 1118
|
||||
#define IDC_DEF_THING_LIST 1124
|
||||
#define IDC_THING_LIST 1125
|
||||
#define IDC_THING_GOTO 1126
|
||||
#define IDC_THING_DELETE 1127
|
||||
#define IDC_THING_POS_LIST 1127
|
||||
#define IDC_THING_POS_UP 1128
|
||||
#define IDC_THING_POS_DOWN 1129
|
||||
#define IDC_THING_POS_DELETE 1130
|
||||
#define IDC_PLATFORM_SPEED 1131
|
||||
#define IDC_PLATFORM_SPEED_TEXT 1132
|
||||
#define IDC_PLATFORM_TURNRATE_TEXT 1133
|
||||
#define IDC_PLATFORM_SPEED_SPIN 1134
|
||||
#define IDC_PLATFORM_TURNRATE_SPIN 1135
|
||||
#define IDC_PLATFORM_TURNRATE 1136
|
||||
#define IDC_PLATFORM_COLLISION 1137
|
||||
#define IDC_PLATFORM_MOVE_TYPE 1138
|
||||
#define IDC_PLATFORM_TYPE 1139
|
||||
#define IDC_TRIGGER_SIZE 1140
|
||||
#define IDC_TRIGGER_WIDTH 1141
|
||||
#define IDC_TRIGGER_HEIGHT 1142
|
||||
#define IDC_TRIGGER_WIDTH_SPIN 1143
|
||||
#define IDC_FX_SPEED_TEXT 1144
|
||||
#define IDC_FX_SIZE_TEXT 1146
|
||||
#define IDC_FX_WIDTH 1147
|
||||
#define IDC_FX_HEIGHT 1148
|
||||
#define IDC_FX_WIDTH_SPIN 1149
|
||||
#define IDC_FX_TURNRATE_SPIN 1150
|
||||
#define IDC_FX_SPEED 1151
|
||||
#define IDC_FX_SPEED_SPIN 1152
|
||||
#define IDC_LAYERSHADE_BACKGFX0 1153
|
||||
#define IDC_LAYERSHADE_SPIN0 1154
|
||||
#define IDC_LAYERSHADE_BACKGFX1 1155
|
||||
#define IDC_LAYERSHADE_MOVE0 1156
|
||||
#define IDC_LAYERSHADE_SCALE0 1157
|
||||
#define IDC_LAYERSHADE_COLOR0 1158
|
||||
#define IDC_LAYERSHADE_SPIN1 1159
|
||||
#define IDC_LAYERSHADE_MOVE1 1160
|
||||
#define IDC_LAYERSHADE_SCALE1 1161
|
||||
#define IDC_LAYERSHADE_TRANS0 1162
|
||||
#define IDC_LAYERSHADE_COLOR1 1163
|
||||
#define IDC_LAYERSHADE_TRANS1 1164
|
||||
#define ID_TOOLBAR_TILEPALETTE 32774
|
||||
#define ID_TOOLBAR_PARAMBAR 32783
|
||||
#define ID_TOGGLE_SUBVIEW 32785
|
||||
|
@ -110,7 +144,7 @@
|
|||
#define _APS_3D_CONTROLS 1
|
||||
#define _APS_NEXT_RESOURCE_VALUE 180
|
||||
#define _APS_NEXT_COMMAND_VALUE 32801
|
||||
#define _APS_NEXT_CONTROL_VALUE 1103
|
||||
#define _APS_NEXT_CONTROL_VALUE 1163
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -269,7 +269,7 @@ int PaletteSize,ImageSize;
|
|||
}
|
||||
|
||||
/**************************************************************************************/
|
||||
void SetFileExt(char *InName,char *OutName,char *Ext)
|
||||
void SetFileExt(const char *InName,char *OutName,char *Ext)
|
||||
{
|
||||
char Drive[_MAX_DRIVE];
|
||||
char Path[_MAX_DIR];
|
||||
|
@ -414,3 +414,4 @@ GFName Exe;
|
|||
Path="\\SpongeBob\\tools\\MapEdit\\";
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ void SaveBmp(char *Filename,int Width,int Height,RGBQUAD *Pal,u8 *Image);
|
|||
|
||||
void BGR2RGB(int W,int H,u8 *Data);
|
||||
|
||||
void SetFileExt(char *InName,char *OutName,char *Ext);
|
||||
void SetFileExt(const char *InName,char *OutName,char *Ext);
|
||||
|
||||
void MakeFullFilename(const char *RelName,GString &Out);
|
||||
void MakePathRel2App(const char* In,char *Out);
|
||||
|
@ -63,13 +63,13 @@ void *_MemAlloc(size_t Size);
|
|||
void _MemFree(void *Ptr);
|
||||
void CheckMem();
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define MemAlloc(v) _MemAlloc(v)
|
||||
#define MemFree(v) _MemFree(v)
|
||||
#else
|
||||
//#ifdef _DEBUG
|
||||
//#define MemAlloc(v) _MemAlloc(v)
|
||||
//#define MemFree(v) _MemFree(v)
|
||||
//#else
|
||||
#define MemAlloc(v) malloc(v)
|
||||
#define MemFree(v) free(v)
|
||||
#endif
|
||||
//#endif
|
||||
|
||||
void GetExecPath(GString &Path);
|
||||
|
||||
|
|
|
@ -42,8 +42,6 @@ loadingscreens/pizza.gfx
|
|||
loadingscreens/teenage.gfx
|
||||
memcard/memhead.bin
|
||||
|
||||
levels/levelBackGfx.spr
|
||||
|
||||
levels/CHAPTER01_LEVEL01.Inf
|
||||
levels/CHAPTER01_LEVEL01.TBK
|
||||
levels/chapter01_level01.tex
|
||||
|
|
11
makefile.gfx
11
makefile.gfx
|
@ -42,8 +42,6 @@ LEVELS_OPTS := -t:8,4,1 -s:16
|
|||
LEVELS_IN_DIR := $(GRAF_DIR)/levels
|
||||
LEVELS_OUT_DIR := $(DATA_OUT)/levels
|
||||
LEVELS_MAKEFILE_DIR := $(TEMP_BUILD_DIR)/levels
|
||||
LEVELS_BACK_DIR := $(LEVELS_IN_DIR)/backgfx
|
||||
LEVELS_BACK_OPTS := -t:12,1,1
|
||||
LEVELS_DIRS_TO_MAKE := $(LEVELS_MAKEFILE_DIR) $(LEVELS_OUT_DIR)
|
||||
|
||||
LEVELS_CHAPTERS := CHAPTER01 CHAPTER02 CHAPTER03 CHAPTER04 CHAPTER05 CHAPTER06
|
||||
|
@ -93,15 +91,8 @@ $(LEVELS_MAKEFILES): $(LEVELS_DIRS_TO_MAKE) makefile.gfx $(BUILD_DIR)/mklevel.pl
|
|||
|
||||
include $(LEVELS_MAKEFILES)
|
||||
|
||||
# Levels Back Sprites
|
||||
LEVELS_BACK_IN := $(LEVELS_BACK_DIR)/*.bmp
|
||||
LEVELS_BACK_OUT := $(LEVELS_OUT_DIR)/LevelBackGfx.spr
|
||||
|
||||
$(LEVELS_BACK_OUT) : $(LEVELS_BACK_IN)
|
||||
@parkgrab -c+ -z+ $(LEVELS_BACK_IN) -b+ $(LEVELS_BACK_OPTS) -l:$(LEVELS_OUT_DIR)/LevelBackGfx.lbm -o:$(LEVELS_BACK_OUT)
|
||||
@$(MV) -f $(LEVELS_OUT_DIR)/LevelBackGfx.h $(INC_DIR)
|
||||
|
||||
LEVELS_ALL_OUT := $(foreach CHAPTER,$(LEVELS_CHAPTERS),$(foreach LEVEL,$(LEVELS_$(CHAPTER)),$($(CHAPTER)_$(LEVEL)_OUT))) $(LEVELS_BACK_OUT)
|
||||
LEVELS_ALL_OUT := $(foreach CHAPTER,$(LEVELS_CHAPTERS),$(foreach LEVEL,$(LEVELS_$(CHAPTER)),$($(CHAPTER)_$(LEVEL)_OUT)))
|
||||
|
||||
GFX_DATA_OUT += $(LEVELS_ALL_OUT)
|
||||
|
||||
|
|
Binary file not shown.
|
@ -104,21 +104,11 @@ struct sQuad
|
|||
u8 uv3[2]; // 2
|
||||
}; // 20
|
||||
|
||||
|
||||
//***************************************************************************
|
||||
//*** Game Types and Headers ************************************************
|
||||
//***************************************************************************
|
||||
// Level Info
|
||||
struct sLevelInfo
|
||||
{
|
||||
u32 MaxPakSize;
|
||||
u32 MaxLvlSize;
|
||||
u16 ActorCount;
|
||||
u16 Pad;
|
||||
// u16 ActorTypeList.....
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Maps
|
||||
// Tiles
|
||||
typedef u16 sTileMapElem; // Tile or Tri Start
|
||||
|
||||
struct sTile
|
||||
|
@ -131,6 +121,58 @@ struct sTile
|
|||
|
||||
}; // 8
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
struct sTileTri
|
||||
{
|
||||
u16 P0; // 2
|
||||
u16 P1; // 2
|
||||
u16 P2; // 2
|
||||
u16 Mat; // 2
|
||||
}; // 8
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
struct sTileTriMat
|
||||
{
|
||||
u8 uv0[2]; // 2
|
||||
u16 Clut; // 2
|
||||
u8 uv1[2]; // 2
|
||||
u16 TPage; // 2
|
||||
u8 uv2[2]; // 2
|
||||
}; // 10
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
struct sTileQuad
|
||||
{
|
||||
u16 P0; // 2
|
||||
u16 P1; // 2
|
||||
u16 P2; // 2
|
||||
u16 P3; // 2
|
||||
u16 Mat; // 2
|
||||
}; // 10
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
struct sTileQuadMat
|
||||
{
|
||||
u8 uv0[2]; // 2
|
||||
u16 Clut; // 2
|
||||
u8 uv1[2]; // 2
|
||||
u16 TPage; // 2
|
||||
u8 uv2[2]; // 2
|
||||
u8 uv3[2]; // 2
|
||||
}; // 12
|
||||
|
||||
//***************************************************************************
|
||||
// Level Info
|
||||
|
||||
struct sLevelInfo
|
||||
{
|
||||
u32 MaxPakSize;
|
||||
u32 MaxLvlSize;
|
||||
u16 ActorCount;
|
||||
u16 Pad;
|
||||
// u16 ActorTypeList.....
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Layers
|
||||
struct sLayerHdr
|
||||
|
@ -163,10 +205,21 @@ struct sLayerShade
|
|||
u32 Ofs;
|
||||
u8 RGB[4];
|
||||
};
|
||||
|
||||
struct sLayerShadeGfx
|
||||
{
|
||||
u16 TPage;
|
||||
u16 Clut;
|
||||
u8 U,V;
|
||||
u8 W,H;
|
||||
u16 Flags;
|
||||
};
|
||||
|
||||
struct sLayerShadeHdr
|
||||
{
|
||||
u16 Count;
|
||||
sLayerShade Data[4];
|
||||
sLayerShade Data[LAYER_SHADE_RGB_MAX];
|
||||
sLayerShadeGfx BackGfx[2];
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -181,11 +234,11 @@ struct sLvlHdr
|
|||
u32 ActorList;
|
||||
u32 ItemList;
|
||||
u32 PlatformList;
|
||||
u32 Pad4;
|
||||
u32 Pad5;
|
||||
u32 TriggerList;
|
||||
u32 FXList;
|
||||
u32 Pad6;
|
||||
u32 Pad7;
|
||||
|
||||
u16 PlayerStartX,PlayerStartY;
|
||||
};
|
||||
|
||||
//***************************************************************************
|
||||
|
@ -263,5 +316,19 @@ struct sThingPlatform
|
|||
// Point List...
|
||||
}; // 10
|
||||
|
||||
struct sThingFX
|
||||
{
|
||||
u16 Type;
|
||||
u16 Speed;
|
||||
sThingPoint Pos,Size;
|
||||
}; // 8
|
||||
|
||||
struct sThingTrigger
|
||||
{
|
||||
u16 Type;
|
||||
sThingPoint Pos;
|
||||
u8 Width,Height;
|
||||
}; // 8
|
||||
|
||||
//***************************************************************************
|
||||
#endif
|
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue