This commit is contained in:
parent
6be41872bf
commit
5b944146d8
24 changed files with 1107 additions and 219 deletions
|
@ -33,8 +33,6 @@
|
||||||
|
|
||||||
#include <IniClass.h>
|
#include <IniClass.h>
|
||||||
|
|
||||||
//GString IconzFileName="Iconz.bmp";
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -82,8 +80,10 @@ int Width,Height;
|
||||||
|
|
||||||
// Create Tile Layers
|
// Create Tile Layers
|
||||||
AddLayer(LAYER_TYPE_TILE,LAYER_SUBTYPE_ACTION, Width, Height);
|
AddLayer(LAYER_TYPE_TILE,LAYER_SUBTYPE_ACTION, Width, Height);
|
||||||
|
#ifdef _DEBUG
|
||||||
AddLayer(LAYER_TYPE_ACTOR,LAYER_SUBTYPE_NONE, Width, Height);
|
AddLayer(LAYER_TYPE_ACTOR,LAYER_SUBTYPE_NONE, Width, Height);
|
||||||
|
AddLayer(LAYER_TYPE_ITEM,LAYER_SUBTYPE_NONE, Width, Height);
|
||||||
|
#endif
|
||||||
for (int i=0; i<Layer.size(); i++)
|
for (int i=0; i<Layer.size(); i++)
|
||||||
{
|
{
|
||||||
Layer[i]->InitSubView(this);
|
Layer[i]->InitSubView(this);
|
||||||
|
@ -91,6 +91,9 @@ int Width,Height;
|
||||||
|
|
||||||
|
|
||||||
ActiveLayer=FindLayer(LAYER_TYPE_TILE,LAYER_SUBTYPE_ACTION);
|
ActiveLayer=FindLayer(LAYER_TYPE_TILE,LAYER_SUBTYPE_ACTION);
|
||||||
|
#ifdef _DEBUG
|
||||||
|
ActiveLayer=FindLayer(LAYER_TYPE_ACTOR,LAYER_SUBTYPE_NONE);
|
||||||
|
#endif
|
||||||
CurrentLayer=Layer[ActiveLayer];
|
CurrentLayer=Layer[ActiveLayer];
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
}
|
}
|
||||||
|
@ -252,7 +255,7 @@ CLayer *ThisLayer;
|
||||||
ThisLayer->Render(this,ThisCam,Is3dFlag);
|
ThisLayer->Render(this,ThisCam,Is3dFlag);
|
||||||
if (GridFlag) ThisLayer->RenderGrid(this,ThisCam,i==ActiveLayer);
|
if (GridFlag) ThisLayer->RenderGrid(this,ThisCam,i==ActiveLayer);
|
||||||
}
|
}
|
||||||
if (i!=EndLayer) ThisLayer=Layer[i+1];
|
if (i<EndLayer-1) ThisLayer=Layer[i+1];
|
||||||
|
|
||||||
}
|
}
|
||||||
CurrentLayer->RenderCursor(this,ThisCam,Is3dFlag);
|
CurrentLayer->RenderCursor(this,ThisCam,Is3dFlag);
|
||||||
|
@ -678,21 +681,6 @@ Vector3 &ThisCam=GetCam();
|
||||||
ThisCam=DefaultCamPos;
|
ThisCam=DefaultCamPos;
|
||||||
UpdateView();
|
UpdateView();
|
||||||
}
|
}
|
||||||
/*****************************************************************************/
|
|
||||||
void CCore::GetExecPath(GString &Path)
|
|
||||||
{
|
|
||||||
#ifndef _DEBUG
|
|
||||||
// Get application path
|
|
||||||
char ExeFilename[2048];
|
|
||||||
GFName Exe;
|
|
||||||
GetModuleFileName(GetModuleHandle(NULL),ExeFilename,2048);
|
|
||||||
Exe=ExeFilename;
|
|
||||||
Exe.File(0);
|
|
||||||
Exe.Ext(0);
|
|
||||||
Path=Exe.FullName();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*** GUI *********************************************************************/
|
/*** GUI *********************************************************************/
|
||||||
|
|
|
@ -116,7 +116,6 @@ public:
|
||||||
|
|
||||||
void ResetView();
|
void ResetView();
|
||||||
CElemBank *GetIconBank() {return(IconBank);}
|
CElemBank *GetIconBank() {return(IconBank);}
|
||||||
void GetExecPath(GString &Path);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CMapEditView *CurrentView;
|
CMapEditView *CurrentView;
|
||||||
|
|
|
@ -64,9 +64,10 @@ CElem::CElem(int Width,int Height)
|
||||||
UnitWidth=ElemWidth/UnitSize;
|
UnitWidth=ElemWidth/UnitSize;
|
||||||
UnitHeight=ElemHeight/UnitSize;
|
UnitHeight=ElemHeight/UnitSize;
|
||||||
ElemID=-1;
|
ElemID=-1;
|
||||||
ElemRGB=(u8*)malloc(ElemWidth*ElemHeight*3);
|
int AW=AlignSize(ElemWidth);
|
||||||
memset(ElemRGB,0,ElemWidth*ElemHeight*3);
|
int AH=AlignSize(ElemHeight);
|
||||||
|
ElemRGB=(u8*)MemAlloc(AW*AH*3);
|
||||||
|
memset(ElemRGB,0,AW*AH*3);
|
||||||
Type=ElemType2d;
|
Type=ElemType2d;
|
||||||
TexXOfs=0;
|
TexXOfs=0;
|
||||||
TexYOfs=0;
|
TexYOfs=0;
|
||||||
|
@ -138,7 +139,7 @@ GFName Path=Filename;
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void CElem::CleanUp()
|
void CElem::CleanUp()
|
||||||
{
|
{
|
||||||
free(ElemRGB);
|
MemFree(ElemRGB);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -162,8 +163,16 @@ sTriFace &Tri1=TriList[ListSize+1];
|
||||||
CTexCache &TexCache=Core->GetTexCache();
|
CTexCache &TexCache=Core->GetTexCache();
|
||||||
sTex &ThisTex=TexCache.GetTex(TexID);
|
sTex &ThisTex=TexCache.GetTex(TexID);
|
||||||
|
|
||||||
float dU=1.0/((float)ThisTex.TexWidth/(float)ElemWidth);
|
int CountW=ThisTex.OldW/ElemWidth;
|
||||||
float dV=1.0/((float)ThisTex.TexHeight/(float)ElemHeight);
|
int CountH=ThisTex.OldH/ElemHeight;
|
||||||
|
float dU=ThisTex.ScaleU/(float)CountW;
|
||||||
|
float dV=ThisTex.ScaleV/(float)CountH;
|
||||||
|
|
||||||
|
dU=(1.0f/CountW);
|
||||||
|
dV=(1.0f/CountH);
|
||||||
|
|
||||||
|
// dU=ThisTex.ScaleU;
|
||||||
|
// dV=ThisTex.ScaleV;
|
||||||
|
|
||||||
float u0=(TexXOfs*dU);
|
float u0=(TexXOfs*dU);
|
||||||
float u1=u0+dU;
|
float u1=u0+dU;
|
||||||
|
@ -222,7 +231,7 @@ int ListSize=TriList.size();
|
||||||
if (TexID<0 || TexID>=TexCount)
|
if (TexID<0 || TexID>=TexCount)
|
||||||
{
|
{
|
||||||
CString mexstr;
|
CString mexstr;
|
||||||
mexstr.Format("Invalid TexId\n Wanted %i/%i for %s\nThis is gonna hurt!",TexID,TexCount-1,ThisNode.Name);
|
mexstr.Format("Invalid TexId\n Wanted %i only have %i Id's for %s\nThis is gonna hurt!\n Dont ask me about this error, ask Kev.\n This MUST be fixed.",TexID,TexCount-1,ThisNode.Name);
|
||||||
AfxMessageBox(mexstr,MB_OK | MB_ICONEXCLAMATION);
|
AfxMessageBox(mexstr,MB_OK | MB_ICONEXCLAMATION);
|
||||||
TexID=0;
|
TexID=0;
|
||||||
}
|
}
|
||||||
|
@ -298,22 +307,27 @@ float X1=Ofs.x+UnitWidth;
|
||||||
float Y0=Ofs.y;
|
float Y0=Ofs.y;
|
||||||
float Y1=Ofs.y+UnitHeight;
|
float Y1=Ofs.y+UnitHeight;
|
||||||
float Z=Ofs.z;
|
float Z=Ofs.z;
|
||||||
|
sTex &Tex=TexCache.GetTex(ElemID);
|
||||||
|
float u0=0;
|
||||||
|
float u1=1.0f;//Tex.ScaleU;
|
||||||
|
float v0=0;
|
||||||
|
float v1=1.0f;//Tex.ScaleU;
|
||||||
|
|
||||||
List=glGenLists(1);
|
List=glGenLists(1);
|
||||||
glNewList(List,GL_COMPILE);
|
glNewList(List,GL_COMPILE);
|
||||||
|
|
||||||
glBindTexture(GL_TEXTURE_2D, TexCache.GetTexGLId(ElemID));
|
glBindTexture(GL_TEXTURE_2D, Tex.TexID);
|
||||||
glBegin (GL_QUADS);
|
glBegin (GL_QUADS);
|
||||||
glTexCoord2f(0.0f,0.0f);
|
glTexCoord2f(u0,v0);
|
||||||
glVertex3f(X0,Y0,Z);
|
glVertex3f(X0,Y0,Z);
|
||||||
|
|
||||||
glTexCoord2f(1.0f,0.0f);
|
glTexCoord2f(u1,v0);
|
||||||
glVertex3f(X1,Y0,Z);
|
glVertex3f(X1,Y0,Z);
|
||||||
|
|
||||||
glTexCoord2f(1.0f,1.0f);
|
glTexCoord2f(u1,v1);
|
||||||
glVertex3f(X1,Y1,Z);
|
glVertex3f(X1,Y1,Z);
|
||||||
|
|
||||||
glTexCoord2f(0.0f,1.0f);
|
glTexCoord2f(u0,v1);
|
||||||
glVertex3f(X0,Y1,Z);
|
glVertex3f(X0,Y1,Z);
|
||||||
glEnd();
|
glEnd();
|
||||||
glEndList();
|
glEndList();
|
||||||
|
@ -343,17 +357,8 @@ float ScaleU,ScaleV;
|
||||||
glBegin (GL_TRIANGLES);
|
glBegin (GL_TRIANGLES);
|
||||||
LastMat=ThisMat;
|
LastMat=ThisMat;
|
||||||
sTex &Tex=TexCache.GetTex(ThisMat);
|
sTex &Tex=TexCache.GetTex(ThisMat);
|
||||||
int AW=TexCache.AlignSize(Tex.TexWidth);
|
ScaleU=Tex.ScaleU;
|
||||||
int AH=TexCache.AlignSize(Tex.TexHeight);
|
ScaleV=Tex.ScaleV;
|
||||||
if (AW!=Tex.TexWidth || AH!=Tex.TexHeight)
|
|
||||||
{
|
|
||||||
ScaleU=(float)Tex.TexWidth/(float)AW;
|
|
||||||
ScaleV=(float)Tex.TexHeight/(float)AH;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ScaleU=ScaleV=1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int p=0; p<3; p++)
|
for (int p=0; p<3; p++)
|
||||||
|
@ -488,7 +493,7 @@ float H=UnitHeight;
|
||||||
glClearColor(1,0,1,1 );
|
glClearColor(1,0,1,1 );
|
||||||
// glClearColor(1,1,1,1 );
|
// glClearColor(1,1,1,1 );
|
||||||
glPushAttrib(GL_VIEWPORT_BIT);
|
glPushAttrib(GL_VIEWPORT_BIT);
|
||||||
glViewport(0,0,RGBData.Width,RGBData.Height);
|
glViewport(0,0,RGBData.TexW,RGBData.TexH);
|
||||||
|
|
||||||
glMatrixMode(GL_PROJECTION);
|
glMatrixMode(GL_PROJECTION);
|
||||||
glPushMatrix();
|
glPushMatrix();
|
||||||
|
@ -515,7 +520,7 @@ float H=UnitHeight;
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
glPopAttrib();
|
glPopAttrib();
|
||||||
|
|
||||||
glReadPixels(0,0,RGBData.Width,RGBData.Height,GL_RGB, GL_UNSIGNED_BYTE,RGBData.RGB);
|
glReadPixels(0,0,RGBData.TexW,RGBData.TexH,GL_RGB, GL_UNSIGNED_BYTE,RGBData.RGB);
|
||||||
glClearColor(0,0,0,1 );
|
glClearColor(0,0,0,1 );
|
||||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Clear Screen
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Clear Screen
|
||||||
}
|
}
|
||||||
|
@ -528,10 +533,14 @@ sRGBData RGBData;
|
||||||
char TexName[256];
|
char TexName[256];
|
||||||
|
|
||||||
sprintf(TexName,"_2dPc_%s_%03d",Filename,ID);
|
sprintf(TexName,"_2dPc_%s_%03d",Filename,ID);
|
||||||
ElemRGB=(u8*)malloc(ElemWidth*ElemHeight*3);
|
int AW=AlignSize(ElemWidth);
|
||||||
|
int AH=AlignSize(ElemHeight);
|
||||||
|
ElemRGB=(u8*)MemAlloc(AW*AH*3);
|
||||||
|
|
||||||
RGBData.Width=ElemWidth;
|
RGBData.TexW=AlignSize(ElemWidth);
|
||||||
RGBData.Height=ElemHeight;
|
RGBData.TexH=AlignSize(ElemHeight);
|
||||||
|
RGBData.ScaleU=1.0f;
|
||||||
|
RGBData.ScaleV=1.0f;
|
||||||
RGBData.RGB=ElemRGB;
|
RGBData.RGB=ElemRGB;
|
||||||
RenderElem4Texture(RGBData);
|
RenderElem4Texture(RGBData);
|
||||||
ElemID=TexCache.ProcessTexture(TexName,&RGBData);
|
ElemID=TexCache.ProcessTexture(TexName,&RGBData);
|
||||||
|
@ -553,16 +562,16 @@ char Filename[256];
|
||||||
bool CElem::CheckHasData(sRGBData &RGBData)
|
bool CElem::CheckHasData(sRGBData &RGBData)
|
||||||
{
|
{
|
||||||
u8 *Src=RGBData.RGB;
|
u8 *Src=RGBData.RGB;
|
||||||
int Size=RGBData.Width*RGBData.Height;
|
int Size=RGBData.TexW*RGBData.TexH;
|
||||||
|
|
||||||
for (int i=0; i<Size; i++)
|
while (Size--)
|
||||||
{
|
{
|
||||||
u8 R=*Src++;
|
u8 R=*Src++;
|
||||||
u8 G=*Src++;
|
u8 G=*Src++;
|
||||||
u8 B=*Src++;
|
u8 B=*Src++;
|
||||||
if (R!=255 || G!=0 || B!=255) return(TRUE);
|
if (R!=255 || G!=0 || B!=255) return(true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return(false);
|
return(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -629,12 +638,11 @@ int TexID=TexCache.ProcessTexture(Filename);
|
||||||
sTex &ThisTex=TexCache.GetTex(TexID);
|
sTex &ThisTex=TexCache.GetTex(TexID);
|
||||||
int Width,Height;
|
int Width,Height;
|
||||||
|
|
||||||
if (MaxWidth==-1) MaxWidth=ThisTex.TexWidth;
|
if (MaxWidth==-1) MaxWidth=ThisTex.OldW;
|
||||||
if (MaxHeight==-1) MaxHeight=ThisTex.TexHeight;
|
if (MaxHeight==-1) MaxHeight=ThisTex.OldH;
|
||||||
|
|
||||||
Width=ThisTex.TexWidth/MaxWidth;
|
|
||||||
Height=ThisTex.TexHeight/MaxHeight;
|
|
||||||
|
|
||||||
|
Width=ThisTex.OldW/MaxWidth;
|
||||||
|
Height=ThisTex.OldH/MaxHeight;
|
||||||
|
|
||||||
for (int Y=0; Y<Height; Y++)
|
for (int Y=0; Y<Height; Y++)
|
||||||
{
|
{
|
||||||
|
@ -799,13 +807,14 @@ GString SavePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void CElemBank::AddSet(const char *Filename)
|
int CElemBank::AddSet(const char *Filename)
|
||||||
{
|
{
|
||||||
int ListSize=SetList.size();
|
int ListSize=SetList.size();
|
||||||
CElemSet NewSet(Filename,ListSize,MaxWidth,MaxHeight,BlankFlag,CentreFlag);
|
CElemSet NewSet(Filename,ListSize,MaxWidth,MaxHeight,BlankFlag,CentreFlag);
|
||||||
|
|
||||||
SetList.Add(NewSet);
|
int Idx=SetList.Add(NewSet);
|
||||||
if (SetList.size()!=ListSize) LoadFlag=TRUE;
|
if (SetList.size()!=ListSize) LoadFlag=TRUE;
|
||||||
|
return(Idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -135,6 +135,7 @@ private:
|
||||||
|
|
||||||
int SetNumber;
|
int SetNumber;
|
||||||
int MaxWidth,MaxHeight;
|
int MaxWidth,MaxHeight;
|
||||||
|
int BmpW,BmpH;
|
||||||
bool CentreFlag;
|
bool CentreFlag;
|
||||||
CList<CElem> ElemList;
|
CList<CElem> ElemList;
|
||||||
bool Loaded;
|
bool Loaded;
|
||||||
|
@ -153,7 +154,7 @@ virtual ~CElemBank();
|
||||||
virtual void Load(CFile *File,int Version);
|
virtual void Load(CFile *File,int Version);
|
||||||
virtual void Save(CFile *File);
|
virtual void Save(CFile *File);
|
||||||
|
|
||||||
void AddSet(const char *Filename);
|
int AddSet(const char *Filename);
|
||||||
void LoadAllSets(CCore *Core);
|
void LoadAllSets(CCore *Core);
|
||||||
void LoadNewSet(CCore *Core);
|
void LoadNewSet(CCore *Core);
|
||||||
void ReloadAllSets();
|
void ReloadAllSets();
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
#include "mapedit.h"
|
#include "mapedit.h"
|
||||||
#include "GUILayerItem.h"
|
#include "GUILayerItem.h"
|
||||||
|
|
||||||
|
#include "MapEditDoc.h"
|
||||||
|
#include "MainFrm.h"
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
#define new DEBUG_NEW
|
#define new DEBUG_NEW
|
||||||
#undef THIS_FILE
|
#undef THIS_FILE
|
||||||
|
@ -28,16 +31,25 @@ void CGUILayerItem::DoDataExchange(CDataExchange* pDX)
|
||||||
{
|
{
|
||||||
CDialog::DoDataExchange(pDX);
|
CDialog::DoDataExchange(pDX);
|
||||||
//{{AFX_DATA_MAP(CGUILayerItem)
|
//{{AFX_DATA_MAP(CGUILayerItem)
|
||||||
// NOTE: the ClassWizard will add DDX and DDV calls here
|
DDX_Control(pDX, IDC_LEVEL_ITEM_LIST, m_LevelList);
|
||||||
|
DDX_Control(pDX, IDC_ITEM_LIST, m_List);
|
||||||
//}}AFX_DATA_MAP
|
//}}AFX_DATA_MAP
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BEGIN_MESSAGE_MAP(CGUILayerItem, CDialog)
|
BEGIN_MESSAGE_MAP(CGUILayerItem, CDialog)
|
||||||
//{{AFX_MSG_MAP(CGUILayerItem)
|
//{{AFX_MSG_MAP(CGUILayerItem)
|
||||||
// NOTE: the ClassWizard will add message map macros here
|
ON_BN_CLICKED(IDC_ITEM_DELETE, OnItemDelete)
|
||||||
|
ON_CBN_SELCHANGE(IDC_LEVEL_ITEM_LIST, OnSelchangeLevelItemList)
|
||||||
|
ON_CBN_SELCHANGE(IDC_ITEM_LIST, OnSelchangeItemList)
|
||||||
//}}AFX_MSG_MAP
|
//}}AFX_MSG_MAP
|
||||||
END_MESSAGE_MAP()
|
END_MESSAGE_MAP()
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// CGUILayerItem message handlers
|
// CGUILayerItem message handlers
|
||||||
|
|
||||||
|
|
||||||
|
void CGUILayerItem::OnSelchangeItemList() {theApp.GetCurrent()->Command(CmdMsg_ThingListSelect,m_List.GetCurSel());}
|
||||||
|
void CGUILayerItem::OnSelchangeLevelItemList() {theApp.GetCurrent()->Command(CmdMsg_ThingLevelSelect,m_LevelList.GetCurSel());}
|
||||||
|
void CGUILayerItem::OnItemDelete() {theApp.GetCurrent()->Command(CmdMsg_ThingListDelete,m_List.GetCurSel());}
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,8 @@ public:
|
||||||
// Dialog Data
|
// Dialog Data
|
||||||
//{{AFX_DATA(CGUILayerItem)
|
//{{AFX_DATA(CGUILayerItem)
|
||||||
enum { IDD = IDD_LAYER_ITEM };
|
enum { IDD = IDD_LAYER_ITEM };
|
||||||
// NOTE: the ClassWizard will add data members here
|
CComboBox m_LevelList;
|
||||||
|
CComboBox m_List;
|
||||||
//}}AFX_DATA
|
//}}AFX_DATA
|
||||||
|
|
||||||
|
|
||||||
|
@ -35,7 +36,9 @@ protected:
|
||||||
|
|
||||||
// Generated message map functions
|
// Generated message map functions
|
||||||
//{{AFX_MSG(CGUILayerItem)
|
//{{AFX_MSG(CGUILayerItem)
|
||||||
// NOTE: the ClassWizard will add member functions here
|
afx_msg void OnItemDelete();
|
||||||
|
afx_msg void OnSelchangeLevelItemList();
|
||||||
|
afx_msg void OnSelchangeItemList();
|
||||||
//}}AFX_MSG
|
//}}AFX_MSG
|
||||||
DECLARE_MESSAGE_MAP()
|
DECLARE_MESSAGE_MAP()
|
||||||
};
|
};
|
||||||
|
|
|
@ -45,7 +45,7 @@ GString Filename;
|
||||||
TileBank=new CTileBank;
|
TileBank=new CTileBank;
|
||||||
SubView=TileBank;
|
SubView=TileBank;
|
||||||
|
|
||||||
Core->GetExecPath(Filename);
|
GetExecPath(Filename);
|
||||||
Filename+=theApp.GetConfigStr("FileLocation","Collision");
|
Filename+=theApp.GetConfigStr("FileLocation","Collision");
|
||||||
TileBank->AddSet(Filename);
|
TileBank->AddSet(Filename);
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,20 +45,19 @@ void CLayerItem::InitSubView(CCore *Core)
|
||||||
void CLayerItem::GUIInit(CCore *Core)
|
void CLayerItem::GUIInit(CCore *Core)
|
||||||
{
|
{
|
||||||
// GUI.DisableCallback(true);
|
// GUI.DisableCallback(true);
|
||||||
// Core->GUIAdd(GUI,IDD_LAYER_Item);
|
Core->GUIAdd(GUI,IDD_LAYER_ITEM);
|
||||||
// GUI.DisableCallback(false);
|
// GUI.DisableCallback(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void CLayerItem::GUIKill(CCore *Core)
|
void CLayerItem::GUIKill(CCore *Core)
|
||||||
{
|
{
|
||||||
// Core->GUIRemove(GUI,IDD_LAYER_Item);
|
Core->GUIRemove(GUI,IDD_LAYER_ITEM);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void CLayerItem::GUIUpdate(CCore *Core)
|
void CLayerItem::GUIUpdate(CCore *Core)
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
int i,ListSize;
|
int i,ListSize;
|
||||||
CComboBox &List=GUI.m_List;
|
CComboBox &List=GUI.m_List;
|
||||||
|
|
||||||
|
@ -71,24 +70,20 @@ CComboBox &List=GUI.m_List;
|
||||||
}
|
}
|
||||||
List.SetCurSel(CurrentDefThing);
|
List.SetCurSel(CurrentDefThing);
|
||||||
|
|
||||||
GUIThingUpdate();
|
// GUIThingUpdate();
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void CLayerItem::GUIThingDefClear()
|
void CLayerItem::GUIThingDefClear()
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
CComboBox &List=GUI.m_List;
|
CComboBox &List=GUI.m_List;
|
||||||
CurrentDefThing=-1;
|
CurrentDefThing=-1;
|
||||||
List.SetCurSel(CurrentDefThing);
|
List.SetCurSel(CurrentDefThing);
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void CLayerItem::GUIThingUpdate()
|
void CLayerItem::GUIThingUpdate()
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
int i,ListSize;
|
int i,ListSize;
|
||||||
CComboBox &List=GUI.m_LevelList;
|
CComboBox &List=GUI.m_LevelList;
|
||||||
// Setup ThingList
|
// Setup ThingList
|
||||||
|
@ -102,73 +97,11 @@ CComboBox &List=GUI.m_LevelList;
|
||||||
}
|
}
|
||||||
List.SetCurSel(CurrentThing);
|
List.SetCurSel(CurrentThing);
|
||||||
GUIThingPointUpdate();
|
GUIThingPointUpdate();
|
||||||
// Params
|
|
||||||
GUI.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);
|
|
||||||
}
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
GUI.DisableCallback(false);
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
void CLayerItem::GUIThingPointUpdate()
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void CLayerItem::GUIChanged(CCore *Core)
|
void CLayerItem::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;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include "LayerThing.h"
|
#include "LayerThing.h"
|
||||||
#include "Layer.h"
|
#include "Layer.h"
|
||||||
#include "MapEdit.h"
|
#include "MapEdit.h"
|
||||||
//#include "GUILayerItem.h"
|
#include "GUILayerItem.h"
|
||||||
#include "Elem.h"
|
#include "Elem.h"
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@ -29,13 +29,12 @@ public:
|
||||||
|
|
||||||
void GUIThingDefClear();
|
void GUIThingDefClear();
|
||||||
void GUIThingUpdate();
|
void GUIThingUpdate();
|
||||||
void GUIThingPointUpdate();
|
|
||||||
|
|
||||||
void ExportThing(CExport &Exp,sLayerThing &ThisThing);
|
void ExportThing(CExport &Exp,sLayerThing &ThisThing);
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// CGUILayerItem GUI;
|
CGUILayerItem GUI;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -158,7 +158,11 @@ void CLayerThing::InitSubView(CCore *Core)
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void CLayerThing::LoadThingScript(const char *Filename)
|
void CLayerThing::LoadThingScript(const char *Filename)
|
||||||
{
|
{
|
||||||
ThingScript.LoadAndImport(Filename);
|
GString ExecPath;
|
||||||
|
GString ScriptName;
|
||||||
|
GetExecPath(ExecPath);
|
||||||
|
ScriptName=ExecPath+Filename;
|
||||||
|
ThingScript.LoadAndImport(ScriptName);
|
||||||
|
|
||||||
int i,ListSize=ThingScript.GetGroupCount();
|
int i,ListSize=ThingScript.GetGroupCount();
|
||||||
DefList.resize(ListSize);
|
DefList.resize(ListSize);
|
||||||
|
@ -181,10 +185,11 @@ int i,ListSize=ThingScript.GetGroupCount();
|
||||||
|
|
||||||
ThisDef.XY.resize(1);
|
ThisDef.XY.resize(1);
|
||||||
TRACE2("%s\t\t%s\n",Name,Gfx);
|
TRACE2("%s\t\t%s\n",Name,Gfx);
|
||||||
ThisDef.ElemID=ThingBank->GetSetCount();
|
|
||||||
if (Gfx)
|
if (Gfx)
|
||||||
{
|
{
|
||||||
ThingBank->AddSet(Gfx);
|
char Filename[512];
|
||||||
|
GFName::makeabsolute(ExecPath,Gfx,Filename);
|
||||||
|
ThisDef.ElemID=ThingBank->AddSet(Filename);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -214,9 +219,13 @@ void CLayerThing::RenderThing(CCore *Core,Vector3 &ThisCam,sLayerThing &ThisThin
|
||||||
{
|
{
|
||||||
float ZoomW=Core->GetZoomW();
|
float ZoomW=Core->GetZoomW();
|
||||||
float ZoomH=Core->GetZoomH();
|
float ZoomH=Core->GetZoomH();
|
||||||
float ScrOfsX=(ZoomW/2);
|
|
||||||
float ScrOfsY=(ZoomH/2);
|
|
||||||
Vector3 &Scale=Core->GetScaleVector();
|
Vector3 &Scale=Core->GetScaleVector();
|
||||||
|
Vector3 ScrOfs(ZoomW/2,ZoomH/2,0);
|
||||||
|
|
||||||
|
if (Render3d)
|
||||||
|
{
|
||||||
|
ScrOfs.z=-4.0f;
|
||||||
|
}
|
||||||
|
|
||||||
if (ThingBank->NeedLoad()) ThingBank->LoadAllSets(Core);
|
if (ThingBank->NeedLoad()) ThingBank->LoadAllSets(Core);
|
||||||
|
|
||||||
|
@ -227,7 +236,7 @@ Vector3 &Scale=Core->GetScaleVector();
|
||||||
|
|
||||||
glScalef(Scale.x,Scale.y,Scale.z);
|
glScalef(Scale.x,Scale.y,Scale.z);
|
||||||
glTranslatef(-ThisCam.x,ThisCam.y,0); // Set scroll offset
|
glTranslatef(-ThisCam.x,ThisCam.y,0); // Set scroll offset
|
||||||
glTranslatef(-ScrOfsX,ScrOfsY,0); // Bring to top left corner
|
glTranslatef(-ScrOfs.x,ScrOfs.y,0); // Bring to top left corner
|
||||||
|
|
||||||
int ListSize=ThisThing.XY.size();
|
int ListSize=ThisThing.XY.size();
|
||||||
for (int i=0;i<ListSize; i++)
|
for (int i=0;i<ListSize; i++)
|
||||||
|
@ -244,7 +253,11 @@ int ListSize=ThisThing.XY.size();
|
||||||
if (i==0)
|
if (i==0)
|
||||||
{
|
{
|
||||||
glColor4f(1,1,1,1); // Set default Color
|
glColor4f(1,1,1,1); // Set default Color
|
||||||
|
glEnable(GL_DEPTH_TEST);
|
||||||
|
glTranslatef(0,0,ScrOfs.z);
|
||||||
ThingBank->RenderElem(ThisThing.ElemID,0,0,Render3d);
|
ThingBank->RenderElem(ThisThing.ElemID,0,0,Render3d);
|
||||||
|
glTranslatef(0,0,-ScrOfs.z);
|
||||||
|
glDisable(GL_DEPTH_TEST);
|
||||||
}
|
}
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
}
|
}
|
||||||
|
@ -257,14 +270,11 @@ int ListSize=ThisThing.XY.size();
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void CLayerThing::GUIInit(CCore *Core)
|
void CLayerThing::GUIInit(CCore *Core)
|
||||||
{
|
{
|
||||||
// Core->GUIAdd(GUIToolBar,IDD_TOOLBAR);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void CLayerThing::GUIKill(CCore *Core)
|
void CLayerThing::GUIKill(CCore *Core)
|
||||||
{
|
{
|
||||||
// Core->GUIRemove(GUIToolBar,IDD_TOOLBAR);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
|
|
||||||
[General Info]
|
[General Info]
|
||||||
Version=1
|
Version=1
|
||||||
LastClass=CGUINewMap
|
LastClass=CGUILayerItem
|
||||||
LastTemplate=CDialog
|
LastTemplate=CDialog
|
||||||
NewFileInclude1=#include "stdafx.h"
|
NewFileInclude1=#include "stdafx.h"
|
||||||
NewFileInclude2=#include "mapedit.h"
|
NewFileInclude2=#include "mapedit.h"
|
||||||
LastPage=0
|
LastPage=0
|
||||||
|
|
||||||
ClassCount=19
|
ClassCount=20
|
||||||
Class1=CChildFrame
|
Class1=CChildFrame
|
||||||
Class2=CGLEnabledView
|
Class2=CGLEnabledView
|
||||||
Class3=CGUIAddLayer
|
Class3=CGUIAddLayer
|
||||||
|
@ -28,25 +28,27 @@ Class16=CAboutDlg
|
||||||
Class17=CMapEditDoc
|
Class17=CMapEditDoc
|
||||||
Class18=CMapEditView
|
Class18=CMapEditView
|
||||||
|
|
||||||
ResourceCount=17
|
ResourceCount=18
|
||||||
Resource1=IDR_TOOLBAR (English (U.S.))
|
Resource1=IDD_ABOUTBOX (English (U.S.))
|
||||||
Resource2=IDR_MAPEDITYPE (English (U.S.))
|
Resource2=IDR_MAPEDITYPE (English (U.S.))
|
||||||
Resource3=IDD_NEWMAP
|
Resource3=IDD_LAYER_COLLISION
|
||||||
Resource4=IDD_TOOLBAR
|
Resource4=IDD_MULTIBAR (English (U.S.))
|
||||||
Resource5=IDD_LAYER_COLLISION
|
Resource5=IDD_LAYER_LIST
|
||||||
Resource6=IDD_RESIZE
|
Resource6=IDD_ADDLAYER
|
||||||
Resource7=IDD_ABOUTBOX (English (U.S.))
|
Resource7=IDR_TOOLBAR (English (U.S.))
|
||||||
Resource8=xxxx
|
Resource8=xxxx
|
||||||
Resource9=IDD_TILEBANK
|
Resource9=IDD_LAYER_SHADE
|
||||||
Resource10=IDD_LAYER_SHADE
|
Resource10=IDD_LAYER_ACTOR
|
||||||
Resource11=IDD_ADDLAYER
|
Resource11=IDD_TOOLBAR
|
||||||
Resource12=IDD_MULTIBAR (English (U.S.))
|
Resource12=IDD_RESIZE
|
||||||
Resource13=IDD_ELEMLIST
|
Resource13=IDR_MAINFRAME (English (U.S.))
|
||||||
Resource14=IDD_LAYER_LIST
|
Resource14=IDD_NEWMAP
|
||||||
Resource15=IDD_LAYER_ACTOR2
|
Resource15=IDD_LAYER_ACTOR2
|
||||||
Resource16=IDR_MAINFRAME (English (U.S.))
|
|
||||||
Class19=CGUILayerActor
|
Class19=CGUILayerActor
|
||||||
Resource17=IDD_LAYER_ACTOR
|
Resource16=IDD_TILEBANK
|
||||||
|
Resource17=IDD_ELEMLIST
|
||||||
|
Class20=CGUILayerItem
|
||||||
|
Resource18=IDD_LAYER_ITEM
|
||||||
|
|
||||||
[CLS:CChildFrame]
|
[CLS:CChildFrame]
|
||||||
Type=0
|
Type=0
|
||||||
|
@ -98,7 +100,7 @@ HeaderFile=GUINewMap.h
|
||||||
ImplementationFile=GUINewMap.cpp
|
ImplementationFile=GUINewMap.cpp
|
||||||
Filter=D
|
Filter=D
|
||||||
VirtualFilter=dWC
|
VirtualFilter=dWC
|
||||||
LastObject=IDC_MAPSIZE_HEIGHT
|
LastObject=CGUINewMap
|
||||||
|
|
||||||
[CLS:CGUIResize]
|
[CLS:CGUIResize]
|
||||||
Type=0
|
Type=0
|
||||||
|
@ -213,7 +215,7 @@ Control7=IDC_MAPSIZE_WARNING,static,1342308352
|
||||||
Type=1
|
Type=1
|
||||||
Class=CGUITileBank
|
Class=CGUITileBank
|
||||||
ControlCount=3
|
ControlCount=3
|
||||||
Control1=IDD_TILEBANK_UPDATE,button,1342242816
|
Control1=IDD_TILEBANK_UPDATE,button,1476460544
|
||||||
Control2=IDD_TILEBANK_LOAD,button,1342242816
|
Control2=IDD_TILEBANK_LOAD,button,1342242816
|
||||||
Control3=IDD_TILEBANK_DELETE,button,1342242816
|
Control3=IDD_TILEBANK_DELETE,button,1342242816
|
||||||
|
|
||||||
|
@ -390,9 +392,18 @@ Control6=IDC_LAYERCOLLISION_WATER,button,1342242816
|
||||||
Control7=IDC_LAYERCOLLISION_SOLID,button,1342242816
|
Control7=IDC_LAYERCOLLISION_SOLID,button,1342242816
|
||||||
Control8=IDC_LAYERCOLLISION_DEATH,button,1342242816
|
Control8=IDC_LAYERCOLLISION_DEATH,button,1342242816
|
||||||
|
|
||||||
|
[CLS:CGUILayerActor]
|
||||||
|
Type=0
|
||||||
|
HeaderFile=GUILayerActor.h
|
||||||
|
ImplementationFile=GUILayerActor.cpp
|
||||||
|
BaseClass=CDialog
|
||||||
|
Filter=D
|
||||||
|
VirtualFilter=dWC
|
||||||
|
LastObject=IDC_ACTOR_POS_LIST
|
||||||
|
|
||||||
[DLG:IDD_LAYER_ACTOR]
|
[DLG:IDD_LAYER_ACTOR]
|
||||||
Type=1
|
Type=1
|
||||||
Class=CGUILayerActor
|
Class=?
|
||||||
ControlCount=22
|
ControlCount=22
|
||||||
Control1=IDC_LEVEL_ACTOR_LIST,combobox,1344339971
|
Control1=IDC_LEVEL_ACTOR_LIST,combobox,1344339971
|
||||||
Control2=IDC_ACTOR_POS_LIST,listbox,1352728833
|
Control2=IDC_ACTOR_POS_LIST,listbox,1352728833
|
||||||
|
@ -417,12 +428,21 @@ Control20=IDC_LAYER_ACTOR_GROUP,button,1342177287
|
||||||
Control21=IDC_ACTOR_LIST,combobox,1344339971
|
Control21=IDC_ACTOR_LIST,combobox,1344339971
|
||||||
Control22=IDC_ACTOR_DELETE,button,1342242816
|
Control22=IDC_ACTOR_DELETE,button,1342242816
|
||||||
|
|
||||||
[CLS:CGUILayerActor]
|
[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]
|
||||||
Type=0
|
Type=0
|
||||||
HeaderFile=GUILayerActor.h
|
HeaderFile=GUILayerItem.h
|
||||||
ImplementationFile=GUILayerActor.cpp
|
ImplementationFile=GUILayerItem.cpp
|
||||||
BaseClass=CDialog
|
BaseClass=CDialog
|
||||||
Filter=D
|
Filter=D
|
||||||
VirtualFilter=dWC
|
VirtualFilter=dWC
|
||||||
LastObject=CGUILayerActor
|
LastObject=IDC_ITEM_LIST
|
||||||
|
|
||||||
|
|
|
@ -80,12 +80,6 @@ BSC32=bscmake.exe
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||||
# ADD LINK32 opengl32.lib glu32.lib glib.lib ginlib.lib maths.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept /libpath:"..\libs\ginlib\debug\\" /libpath:"..\libs\glib\debug\\" /libpath:"..\libs\maths\debug\\"
|
# ADD LINK32 opengl32.lib glu32.lib glib.lib ginlib.lib maths.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept /libpath:"..\libs\ginlib\debug\\" /libpath:"..\libs\glib\debug\\" /libpath:"..\libs\maths\debug\\"
|
||||||
# Begin Special Build Tool
|
|
||||||
ProjDir=.
|
|
||||||
TargetDir=.\Debug
|
|
||||||
SOURCE="$(InputPath)"
|
|
||||||
PostBuild_Cmds=if not exist $(TargetDir)\collision.bmp copy $(ProjDir)\res\collision.bmp $(TargetDir)\collision.bmp if not exist $(TargetDir)\iconz.bmp copy $(ProjDir)\res\iconz.bmp $(TargetDir)\iconz.bmp copy $(ProjDir)\res\iconz.bmp $(TargetDir)\iconz.bmp
|
|
||||||
# End Special Build Tool
|
|
||||||
|
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
|
@ -407,6 +401,14 @@ SOURCE=.\GUILayerCollision.h
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\GUILayerItem.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\GUILayerItem.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\GUILayerList.cpp
|
SOURCE=.\GUILayerList.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
|
@ -515,7 +515,7 @@ IDD_TILEBANK DIALOG DISCARDABLE 0, 0, 156, 26
|
||||||
STYLE WS_CHILD
|
STYLE WS_CHILD
|
||||||
FONT 8, "MS Sans Serif"
|
FONT 8, "MS Sans Serif"
|
||||||
BEGIN
|
BEGIN
|
||||||
PUSHBUTTON "Update",IDD_TILEBANK_UPDATE,95,5,50,15
|
PUSHBUTTON "Update",IDD_TILEBANK_UPDATE,95,5,50,15,WS_DISABLED
|
||||||
PUSHBUTTON "Load",IDD_TILEBANK_LOAD,5,5,45,15
|
PUSHBUTTON "Load",IDD_TILEBANK_LOAD,5,5,45,15
|
||||||
PUSHBUTTON "Delete",IDD_TILEBANK_DELETE,50,5,45,15
|
PUSHBUTTON "Delete",IDD_TILEBANK_DELETE,50,5,45,15
|
||||||
END
|
END
|
||||||
|
@ -630,6 +630,18 @@ BEGIN
|
||||||
PUSHBUTTON "Delete Actor",IDC_ACTOR_DELETE,5,40,75,15
|
PUSHBUTTON "Delete Actor",IDC_ACTOR_DELETE,5,40,75,15
|
||||||
END
|
END
|
||||||
|
|
||||||
|
IDD_LAYER_ITEM DIALOG DISCARDABLE 0, 0, 156, 66
|
||||||
|
STYLE WS_CHILD
|
||||||
|
FONT 8, "MS Sans Serif"
|
||||||
|
BEGIN
|
||||||
|
COMBOBOX IDC_LEVEL_ITEM_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
|
||||||
|
END
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
|
@ -718,6 +730,14 @@ BEGIN
|
||||||
TOPMARGIN, 7
|
TOPMARGIN, 7
|
||||||
BOTTOMMARGIN, 249
|
BOTTOMMARGIN, 249
|
||||||
END
|
END
|
||||||
|
|
||||||
|
IDD_LAYER_ITEM, DIALOG
|
||||||
|
BEGIN
|
||||||
|
LEFTMARGIN, 7
|
||||||
|
RIGHTMARGIN, 149
|
||||||
|
TOPMARGIN, 7
|
||||||
|
BOTTOMMARGIN, 59
|
||||||
|
END
|
||||||
END
|
END
|
||||||
#endif // APSTUDIO_INVOKED
|
#endif // APSTUDIO_INVOKED
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ GFName FName=Filename;
|
||||||
RGBData=&ThisRGB;
|
RGBData=&ThisRGB;
|
||||||
LoadTex(NewTex,RGBData);
|
LoadTex(NewTex,RGBData);
|
||||||
FreeBMP(ThisRGB);
|
FreeBMP(ThisRGB);
|
||||||
NewTex.Loaded=TRUE;
|
NewTex.Loaded=true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -57,19 +57,66 @@ GFName FName=Filename;
|
||||||
/**************************************************************************************/
|
/**************************************************************************************/
|
||||||
/**************************************************************************************/
|
/**************************************************************************************/
|
||||||
/**************************************************************************************/
|
/**************************************************************************************/
|
||||||
const int TexAlignTable[]={1,2,4,8,16,32,64,128,256};
|
void CTexCache::CreateAlignTex(Frame &ThisFrame,sRGBData &RGBData)
|
||||||
const int TexAlignTableSize=sizeof(TexAlignTable)/sizeof(int);
|
|
||||||
int CTexCache::AlignSize(int Size)
|
|
||||||
{
|
{
|
||||||
for (int i=0;i<TexAlignTableSize-1; i++)
|
int FrameW=ThisFrame.GetWidth();
|
||||||
|
int FrameH=ThisFrame.GetHeight();
|
||||||
|
int AlignW=AlignSize(FrameW);
|
||||||
|
int AlignH=AlignSize(FrameH);
|
||||||
|
|
||||||
|
RGBData.RGB=(u8*)MemAlloc(AlignW*AlignH*3);
|
||||||
|
ThisFrame.FlipY();
|
||||||
|
RGBData.OldW=FrameW;
|
||||||
|
RGBData.OldH=FrameH;
|
||||||
|
RGBData.TexW=AlignW;
|
||||||
|
RGBData.TexH=AlignH;
|
||||||
|
RGBData.ScaleU=(float)FrameW/(float)AlignW;
|
||||||
|
RGBData.ScaleV=(float)FrameH/(float)AlignH;
|
||||||
|
|
||||||
|
if (FrameW==AlignW && FrameH==AlignH)
|
||||||
{
|
{
|
||||||
if (Size>TexAlignTable[i] && Size<TexAlignTable[i+1]) return(TexAlignTable[i+1]);
|
ThisFrame.MakeRGB(RGBData.RGB);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// Tex is mis aligned, so align and fill borders with pure pink
|
||||||
|
|
||||||
|
u8 *Buffer=(u8*)MemAlloc(FrameW*FrameH*3);
|
||||||
|
u8 *Src,*Dst;
|
||||||
|
int X,Y;
|
||||||
|
ThisFrame.MakeRGB(Buffer);
|
||||||
|
|
||||||
|
Dst=RGBData.RGB;
|
||||||
|
|
||||||
|
Src=Buffer;
|
||||||
|
Dst=RGBData.RGB;
|
||||||
|
for (Y=0; Y<FrameH; Y++)
|
||||||
|
{
|
||||||
|
for (X=0; X<FrameW; X++)
|
||||||
|
{
|
||||||
|
*Dst++=*Src++;
|
||||||
|
*Dst++=*Src++;
|
||||||
|
*Dst++=*Src++;
|
||||||
|
}
|
||||||
|
for (X; X<AlignW; X++)
|
||||||
|
{
|
||||||
|
*Dst++=BlankRGB.rgbRed;
|
||||||
|
*Dst++=BlankRGB.rgbGreen;
|
||||||
|
*Dst++=BlankRGB.rgbBlue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (Y; Y<AlignH; Y++)
|
||||||
|
{
|
||||||
|
for (X=0; X<AlignW; X++)
|
||||||
|
{
|
||||||
|
*Dst++=BlankRGB.rgbRed;
|
||||||
|
*Dst++=BlankRGB.rgbGreen;
|
||||||
|
*Dst++=BlankRGB.rgbBlue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return(Size);
|
MemFree(Buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**************************************************************************************/
|
/**************************************************************************************/
|
||||||
bool CTexCache::LoadBMP(const char *Filename,sRGBData &RGBData)
|
bool CTexCache::LoadBMP(const char *Filename,sRGBData &RGBData)
|
||||||
{
|
{
|
||||||
|
@ -89,12 +136,8 @@ FILE *File;
|
||||||
|
|
||||||
fclose(File);
|
fclose(File);
|
||||||
ThisFrame.LoadBMP(Filename);
|
ThisFrame.LoadBMP(Filename);
|
||||||
|
|
||||||
RGBData.Width=ThisFrame.GetWidth();
|
CreateAlignTex(ThisFrame,RGBData);
|
||||||
RGBData.Height=ThisFrame.GetHeight();
|
|
||||||
RGBData.RGB=(u8*)malloc(RGBData.Width*RGBData.Height*3);
|
|
||||||
ThisFrame.FlipY();
|
|
||||||
ThisFrame.MakeRGB(RGBData.RGB);
|
|
||||||
return(true);
|
return(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,29 +146,27 @@ void CTexCache::FreeBMP(sRGBData &RGBData)
|
||||||
{
|
{
|
||||||
if (RGBData.RGB)
|
if (RGBData.RGB)
|
||||||
{
|
{
|
||||||
free(RGBData.RGB);
|
MemFree(RGBData.RGB);
|
||||||
|
RGBData.RGB=0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************************************/
|
/**************************************************************************************/
|
||||||
void CTexCache::LoadTex(sTex &ThisTex,sRGBData *TexData)
|
void CTexCache::LoadTex(sTex &ThisTex,sRGBData *RGBData)
|
||||||
{
|
{
|
||||||
u8 *Buffer;
|
u8 *Buffer;
|
||||||
int TexWidth=TexData->Width;
|
|
||||||
int TexHeight=TexData->Height;
|
|
||||||
int AlignWidth=AlignSize(TexWidth);
|
|
||||||
int AlignHeight=AlignSize(TexHeight);
|
|
||||||
u8 *Src,*Dst;
|
u8 *Src,*Dst;
|
||||||
|
|
||||||
// create RGB & alpha texture & ensuse texture is correct size for GL
|
// create RGB & alpha texture & ensuse texture is correct size for GL
|
||||||
|
Buffer=(u8*)MemAlloc(RGBData->TexW*RGBData->TexH*4);
|
||||||
|
ASSERT(Buffer);
|
||||||
|
|
||||||
Buffer=(u8*)malloc(AlignWidth*AlignHeight*4);
|
Src=RGBData->RGB;
|
||||||
Src=TexData->RGB;
|
Dst=Buffer;
|
||||||
Dst=&Buffer[0];
|
|
||||||
|
|
||||||
for (int Y=0; Y<TexHeight; Y++)
|
for (int Y=0; Y<RGBData->TexH; Y++)
|
||||||
{
|
{
|
||||||
for (int X=0; X<TexWidth; X++)
|
for (int X=0; X<RGBData->TexW; X++)
|
||||||
{
|
{
|
||||||
u8 R,G,B,A;
|
u8 R,G,B,A;
|
||||||
|
|
||||||
|
@ -142,24 +183,32 @@ u8 *Src,*Dst;
|
||||||
*Dst++=B;
|
*Dst++=B;
|
||||||
*Dst++=A;
|
*Dst++=A;
|
||||||
}
|
}
|
||||||
Dst+=(AlignWidth-TexWidth)*4;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ThisTex.TexWidth=TexWidth;
|
ThisTex.OldW=RGBData->OldW;
|
||||||
ThisTex.TexHeight=TexHeight;
|
ThisTex.OldH=RGBData->OldH;
|
||||||
|
ThisTex.TexW=RGBData->TexW;
|
||||||
ThisTex.ScaleU=(float)TexWidth/(float)AlignWidth;
|
ThisTex.TexH=RGBData->TexH;
|
||||||
ThisTex.ScaleV=(float)TexHeight/(float)AlignHeight;
|
ThisTex.ScaleU=RGBData->ScaleU;
|
||||||
|
ThisTex.ScaleV=RGBData->ScaleV;
|
||||||
|
int Err;
|
||||||
glGenTextures(1, &ThisTex.TexID);
|
glGenTextures(1, &ThisTex.TexID);
|
||||||
|
Err=glGetError();ASSERT(Err==0);
|
||||||
glBindTexture(GL_TEXTURE_2D, ThisTex.TexID);
|
glBindTexture(GL_TEXTURE_2D, ThisTex.TexID);
|
||||||
glTexImage2D(GL_TEXTURE_2D, 0, 4, AlignWidth, AlignHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, &Buffer[0]);
|
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);
|
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);
|
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);
|
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);
|
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_T,GL_CLAMP);
|
||||||
|
Err=glGetError();ASSERT(Err==0);
|
||||||
glBindTexture(GL_TEXTURE_2D, 0);
|
glBindTexture(GL_TEXTURE_2D, 0);
|
||||||
free(Buffer);
|
Err=glGetError();ASSERT(Err==0);
|
||||||
|
MemFree(Buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************************************/
|
/**************************************************************************************/
|
||||||
|
|
|
@ -15,8 +15,9 @@
|
||||||
|
|
||||||
struct sRGBData
|
struct sRGBData
|
||||||
{
|
{
|
||||||
int Width;
|
int OldW,OldH;
|
||||||
int Height;
|
int TexW,TexH;
|
||||||
|
float ScaleU,ScaleV;
|
||||||
u8 *RGB;
|
u8 *RGB;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -25,7 +26,8 @@ struct sTex
|
||||||
GString Filename;
|
GString Filename;
|
||||||
GString Name;
|
GString Name;
|
||||||
GLuint TexID;
|
GLuint TexID;
|
||||||
int TexWidth,TexHeight;
|
int OldW,OldH;
|
||||||
|
int TexW,TexH;
|
||||||
float ScaleU,ScaleV; // For wrong size textures
|
float ScaleU,ScaleV; // For wrong size textures
|
||||||
bool Loaded;
|
bool Loaded;
|
||||||
|
|
||||||
|
@ -37,6 +39,7 @@ const RGBQUAD BlankRGB={255,0,255};
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
class Frame;
|
||||||
class CTexCache
|
class CTexCache
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -47,10 +50,10 @@ public:
|
||||||
void Purge();
|
void Purge();
|
||||||
|
|
||||||
bool LoadBMP(const char *Filename,sRGBData &RGBData);
|
bool LoadBMP(const char *Filename,sRGBData &RGBData);
|
||||||
|
void CreateAlignTex(Frame &ThisFrame,sRGBData &RGBData);
|
||||||
void FreeBMP(sRGBData &RGBData);
|
void FreeBMP(sRGBData &RGBData);
|
||||||
void FixBMP(sRGBData &RGBData);
|
void FixBMP(sRGBData &RGBData);
|
||||||
bool IsSizeOk(int Size);
|
bool IsSizeOk(int Size);
|
||||||
int AlignSize(int Size);
|
|
||||||
|
|
||||||
void LoadTex(sTex &ThisTex,sRGBData *TexData);
|
void LoadTex(sTex &ThisTex,sRGBData *TexData);
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
#define IDD_LAYER_COLLISION 177
|
#define IDD_LAYER_COLLISION 177
|
||||||
#define IDD_ELEMLIST 178
|
#define IDD_ELEMLIST 178
|
||||||
#define IDD_LAYER_ACTOR 179
|
#define IDD_LAYER_ACTOR 179
|
||||||
|
#define IDD_LAYER_ITEM 180
|
||||||
#define IDC_TOOLBAR_COMBO 1018
|
#define IDC_TOOLBAR_COMBO 1018
|
||||||
#define IDC_LAYERLIST_LIST 1019
|
#define IDC_LAYERLIST_LIST 1019
|
||||||
#define IDD_TILEBANK_UPDATE 1029
|
#define IDD_TILEBANK_UPDATE 1029
|
||||||
|
@ -67,7 +68,6 @@
|
||||||
#define IDC_LAYERCOLLISION_DEATH 1088
|
#define IDC_LAYERCOLLISION_DEATH 1088
|
||||||
#define IDC_LAYERSHADE_EDITB3 1089
|
#define IDC_LAYERSHADE_EDITB3 1089
|
||||||
#define IDC_ACTOR_LIST 1089
|
#define IDC_ACTOR_LIST 1089
|
||||||
#define IDC_ACTOR_NEW 1090
|
|
||||||
#define IDC_ACTOR_DELETE 1091
|
#define IDC_ACTOR_DELETE 1091
|
||||||
#define IDC_ACTOR_SPEED_SPIN 1092
|
#define IDC_ACTOR_SPEED_SPIN 1092
|
||||||
#define IDC_ACTOR_PLAYER 1094
|
#define IDC_ACTOR_PLAYER 1094
|
||||||
|
@ -75,6 +75,9 @@
|
||||||
#define IDC_ACTOR_TURNRATE_TEXT 1097
|
#define IDC_ACTOR_TURNRATE_TEXT 1097
|
||||||
#define IDC_ACTOR_TURNRATE 1098
|
#define IDC_ACTOR_TURNRATE 1098
|
||||||
#define IDC_ACTOR_TURNRATE_SPIN 1099
|
#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_TEXT 1112
|
||||||
#define IDC_ACTOR_HEALTH 1113
|
#define IDC_ACTOR_HEALTH 1113
|
||||||
#define IDC_ACTOR_HEALTH_SPIN 1114
|
#define IDC_ACTOR_HEALTH_SPIN 1114
|
||||||
|
@ -106,7 +109,7 @@
|
||||||
#define _APS_3D_CONTROLS 1
|
#define _APS_3D_CONTROLS 1
|
||||||
#define _APS_NEXT_RESOURCE_VALUE 180
|
#define _APS_NEXT_RESOURCE_VALUE 180
|
||||||
#define _APS_NEXT_COMMAND_VALUE 32800
|
#define _APS_NEXT_COMMAND_VALUE 32800
|
||||||
#define _APS_NEXT_CONTROL_VALUE 1097
|
#define _APS_NEXT_CONTROL_VALUE 1103
|
||||||
#define _APS_NEXT_SYMED_VALUE 101
|
#define _APS_NEXT_SYMED_VALUE 101
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
|
|
||||||
#include <Misc.hpp>
|
#include <Misc.hpp>
|
||||||
#include <GFName.hpp>
|
#include <GFName.hpp>
|
||||||
|
#include <malloc.h>
|
||||||
|
|
||||||
#include "Utils.H"
|
#include "Utils.H"
|
||||||
|
|
||||||
|
@ -30,6 +31,18 @@ char szBuf[256];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**************************************************************************************/
|
||||||
|
const int TexAlignTable[]={1,2,4,8,16,32,64,128,256};
|
||||||
|
const int TexAlignTableSize=sizeof(TexAlignTable)/sizeof(int);
|
||||||
|
int AlignSize(int Size)
|
||||||
|
{
|
||||||
|
for (int i=0;i<TexAlignTableSize-1; i++)
|
||||||
|
{
|
||||||
|
if (Size>TexAlignTable[i] && Size<TexAlignTable[i+1]) return(TexAlignTable[i+1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return(Size);
|
||||||
|
}
|
||||||
/**************************************************************************************/
|
/**************************************************************************************/
|
||||||
/**************************************************************************************/
|
/**************************************************************************************/
|
||||||
void BuildGLBox(float XMin,float XMax,float YMin,float YMax,float ZMin,float ZMax)
|
void BuildGLBox(float XMin,float XMax,float YMin,float YMax,float ZMin,float ZMax)
|
||||||
|
@ -336,3 +349,56 @@ int round(float f)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
void *_MemAlloc(size_t Size)
|
||||||
|
{
|
||||||
|
CheckMem();
|
||||||
|
void *Ptr=malloc(Size);
|
||||||
|
CheckMem();
|
||||||
|
return(Ptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
void _MemFree(void *Ptr)
|
||||||
|
{
|
||||||
|
CheckMem();
|
||||||
|
free(Ptr);
|
||||||
|
CheckMem();
|
||||||
|
|
||||||
|
}
|
||||||
|
/*****************************************************************************/
|
||||||
|
void CheckMem()
|
||||||
|
{
|
||||||
|
int Status = _heapchk();
|
||||||
|
|
||||||
|
switch( Status)
|
||||||
|
{
|
||||||
|
case _HEAPOK:
|
||||||
|
// TRACE0(" OK - heap is fine\n" );
|
||||||
|
break;
|
||||||
|
case _HEAPEMPTY:
|
||||||
|
// TRACE0(" OK - heap is empty\n" );
|
||||||
|
break;
|
||||||
|
case _HEAPBADBEGIN:
|
||||||
|
TRACE0( "ERROR - bad start of heap\n" );
|
||||||
|
break;
|
||||||
|
case _HEAPBADNODE:
|
||||||
|
TRACE0( "ERROR - bad node in heap\n" );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*****************************************************************************/
|
||||||
|
void GetExecPath(GString &Path)
|
||||||
|
{
|
||||||
|
#ifndef _DEBUG
|
||||||
|
// Get application path
|
||||||
|
char ExeFilename[2048];
|
||||||
|
GFName Exe;
|
||||||
|
GetModuleFileName(GetModuleHandle(NULL),ExeFilename,2048);
|
||||||
|
Exe=ExeFilename;
|
||||||
|
Exe.File(0);
|
||||||
|
Exe.Ext(0);
|
||||||
|
Path=Exe.FullName();
|
||||||
|
#else
|
||||||
|
Path="\\SpongeBob\\tools\\MapEdit\\";
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
|
@ -35,6 +35,8 @@ class GString;
|
||||||
class CMapEditDoc;
|
class CMapEditDoc;
|
||||||
void DbgMsg(const char * pszFmt,...);
|
void DbgMsg(const char * pszFmt,...);
|
||||||
|
|
||||||
|
int AlignSize(int Size);
|
||||||
|
|
||||||
void BuildGLBox(float XMin,float XMax,float YMin,float YMax,float ZMin,float ZMax);
|
void BuildGLBox(float XMin,float XMax,float YMin,float YMax,float ZMin,float ZMax);
|
||||||
void BuildGLBoxNoNormals(float XMin,float XMax,float YMin,float YMax,float ZMin,float ZMax);
|
void BuildGLBoxNoNormals(float XMin,float XMax,float YMin,float YMax,float ZMin,float ZMax);
|
||||||
void BuildGLQuad(float XMin,float XMax,float YMin,float YMax,float Z);
|
void BuildGLQuad(float XMin,float XMax,float YMin,float YMax,float Z);
|
||||||
|
@ -55,5 +57,19 @@ GString GetWorkingPath();
|
||||||
void CheckFilename(GString &Filename);
|
void CheckFilename(GString &Filename);
|
||||||
int round(float f) ;
|
int round(float f) ;
|
||||||
|
|
||||||
|
void *_MemAlloc(size_t Size);
|
||||||
|
void _MemFree(void *Ptr);
|
||||||
|
void CheckMem();
|
||||||
|
|
||||||
|
#ifdef _DEBUG
|
||||||
|
#define MemAlloc(v) _MemAlloc(v)
|
||||||
|
#define MemFree(v) _MemFree(v)
|
||||||
|
#else
|
||||||
|
#define MemAlloc(v) malloc(v)
|
||||||
|
#define MemFree(v) free(v)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void GetExecPath(GString &Path);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
43
tools/MapEdit/Item.ini
Normal file
43
tools/MapEdit/Item.ini
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
# Item Script
|
||||||
|
#
|
||||||
|
################################################
|
||||||
|
# [Name]
|
||||||
|
# Gfx=Sprite filename
|
||||||
|
################################################
|
||||||
|
|
||||||
|
################################################
|
||||||
|
[Balloon]
|
||||||
|
Gfx=..\..\graphics\pickups\+balloon.bmp
|
||||||
|
|
||||||
|
[BubbleMixture]
|
||||||
|
Gfx=..\..\graphics\pickups\+bubblemixture.bmp
|
||||||
|
|
||||||
|
[Glasses]
|
||||||
|
Gfx=..\..\graphics\pickups\+glasses.bmp
|
||||||
|
|
||||||
|
[Health25]
|
||||||
|
Gfx=..\..\graphics\pickups\+health25.bmp
|
||||||
|
|
||||||
|
[Health50]
|
||||||
|
Gfx=..\..\graphics\pickups\+health50.bmp
|
||||||
|
|
||||||
|
[Health100]
|
||||||
|
Gfx=..\..\graphics\pickups\+health100.bmp
|
||||||
|
|
||||||
|
[Helmet]
|
||||||
|
Gfx=..\..\graphics\pickups\+helmet.bmp
|
||||||
|
|
||||||
|
[JellyAmmo]
|
||||||
|
Gfx=..\..\graphics\pickups\+jellyammo.bmp
|
||||||
|
|
||||||
|
[Pants]
|
||||||
|
Gfx=..\..\graphics\pickups\+pants.bmp
|
||||||
|
|
||||||
|
[Shoe]
|
||||||
|
Gfx=..\..\graphics\pickups\+shoe.bmp
|
||||||
|
|
||||||
|
[Spatula]
|
||||||
|
Gfx=..\..\graphics\pickups\+spatula.bmp
|
||||||
|
|
||||||
|
[Teeth]
|
||||||
|
Gfx=..\..\graphics\pickups\+teeth.bmp
|
Binary file not shown.
12
tools/MapEdit/MapEdit.ini
Normal file
12
tools/MapEdit/MapEdit.ini
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
##########################
|
||||||
|
# Map Editor Config File #
|
||||||
|
##########################
|
||||||
|
|
||||||
|
[FileLocation]
|
||||||
|
Collision=collision.bmp
|
||||||
|
Iconz=Iconz.bmp
|
||||||
|
|
||||||
|
[LayerScript]
|
||||||
|
ActorScript=Actor.ini
|
||||||
|
ItemScript=Item.ini
|
||||||
|
PlatformScript=Platform.ini
|
354
tools/MapEdit/actor.ini
Normal file
354
tools/MapEdit/actor.ini
Normal file
|
@ -0,0 +1,354 @@
|
||||||
|
# Character Script
|
||||||
|
#
|
||||||
|
################################################
|
||||||
|
# [Name]
|
||||||
|
# Gfx=Sprite filename
|
||||||
|
# WayPoints=0/1
|
||||||
|
# Speed=0-10
|
||||||
|
# TurnRate=0-4095
|
||||||
|
# Collision=0/1
|
||||||
|
# Health=0-255
|
||||||
|
# Player=0/1 # Player Flag
|
||||||
|
################################################
|
||||||
|
|
||||||
|
################################################
|
||||||
|
# Player
|
||||||
|
################################################
|
||||||
|
[SpongeBob]
|
||||||
|
Gfx=..\..\graphics\characters\spongebob\render\psx\SpongeBob_IdleBreath0001.bmp
|
||||||
|
Player=1
|
||||||
|
|
||||||
|
################################################
|
||||||
|
# Friends
|
||||||
|
################################################
|
||||||
|
#[BarnacleBoy]
|
||||||
|
#Gfx=..\..\graphics\characters\
|
||||||
|
#WayPoints=0
|
||||||
|
#Speed=0
|
||||||
|
#TurnRate=0
|
||||||
|
#Collision=0
|
||||||
|
#Health=0
|
||||||
|
#AttackStrength=0
|
||||||
|
|
||||||
|
#[Gary]
|
||||||
|
#Gfx=..\..\graphics\characters\
|
||||||
|
#WayPoints=0
|
||||||
|
#Speed=3
|
||||||
|
#TurnRate=0
|
||||||
|
#Collision=0
|
||||||
|
#Health=0
|
||||||
|
#AttackStrength=0
|
||||||
|
|
||||||
|
#[Krusty]
|
||||||
|
#Gfx=..\..\graphics\characters\
|
||||||
|
#WayPoints=0
|
||||||
|
#Speed=0
|
||||||
|
#TurnRate=0
|
||||||
|
#Collision=0
|
||||||
|
#Health=0
|
||||||
|
#AttackStrength=0
|
||||||
|
|
||||||
|
#[MermaidMan]
|
||||||
|
#Gfx=..\..\graphics\characters\
|
||||||
|
#WayPoints=0
|
||||||
|
#Speed=0
|
||||||
|
#TurnRate=0
|
||||||
|
#Collision=0
|
||||||
|
#Health=0
|
||||||
|
#AttackStrength=0
|
||||||
|
|
||||||
|
#[Patrick]
|
||||||
|
#Gfx=..\..\graphics\characters\
|
||||||
|
#WayPoints=0
|
||||||
|
#Speed=0
|
||||||
|
#TurnRate=0
|
||||||
|
#Collision=0
|
||||||
|
#Health=0
|
||||||
|
#AttackStrength=0
|
||||||
|
|
||||||
|
#[Sandy]
|
||||||
|
#Gfx=..\..\graphics\characters\
|
||||||
|
#WayPoints=0
|
||||||
|
#Speed=0
|
||||||
|
#TurnRate=0
|
||||||
|
#Collision=0
|
||||||
|
#Health=0
|
||||||
|
#AttackStrength=0
|
||||||
|
|
||||||
|
#[Squidward]
|
||||||
|
#Gfx=..\..\graphics\characters\
|
||||||
|
#WayPoints=0
|
||||||
|
#Speed=0
|
||||||
|
#TurnRate=0
|
||||||
|
#Collision=0
|
||||||
|
#Health=0
|
||||||
|
#AttackStrength=0
|
||||||
|
|
||||||
|
#[Plankton]
|
||||||
|
#Gfx=..\..\graphics\characters\
|
||||||
|
#WayPoints=0
|
||||||
|
#Speed=0
|
||||||
|
#TurnRate=0
|
||||||
|
#Collision=0
|
||||||
|
#Health=0
|
||||||
|
#AttackStrength=0
|
||||||
|
|
||||||
|
################################################
|
||||||
|
# Enemies
|
||||||
|
################################################
|
||||||
|
|
||||||
|
[SmallJellyfish-Level1]
|
||||||
|
Gfx=..\..\graphics\characters\Jellyfish1\render\psx\JellyFish1_Idle0.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=3
|
||||||
|
TurnRate=128
|
||||||
|
Collision=1
|
||||||
|
Health=16
|
||||||
|
AttackStrength=20
|
||||||
|
|
||||||
|
#[SmallJellyfish-Level2]
|
||||||
|
#Gfx=..\..\graphics\characters\Jellyfish2\render\psx\Jellyfish2.bmp
|
||||||
|
#WayPoints=1
|
||||||
|
#Speed=3
|
||||||
|
#TurnRate=128
|
||||||
|
#Collision=1
|
||||||
|
#Health=16
|
||||||
|
#AttackStrength=40
|
||||||
|
|
||||||
|
# [Largejellyfish] - This is a platform
|
||||||
|
|
||||||
|
#[Motherjellyfish]
|
||||||
|
#Gfx=..\..\graphics\characters\
|
||||||
|
#WayPoints=1
|
||||||
|
#Speed=3
|
||||||
|
#TurnRate=256
|
||||||
|
#Collision=0
|
||||||
|
#Health=256
|
||||||
|
#AttackStrength=1234
|
||||||
|
|
||||||
|
[Anenome-Level1]
|
||||||
|
Gfx=..\..\graphics\characters\AnenomeLvl1\render\psx\AnenomeLvl1_Fire0001.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=0
|
||||||
|
TurnRate=128
|
||||||
|
Collision=0
|
||||||
|
Health=16
|
||||||
|
AttackStrength=20
|
||||||
|
|
||||||
|
#[Anenome-Level2]
|
||||||
|
#Gfx=..\..\graphics\characters\
|
||||||
|
#WayPoints=1
|
||||||
|
#Speed=0
|
||||||
|
#TurnRate=128
|
||||||
|
#Collision=0
|
||||||
|
#Health=32
|
||||||
|
#AttackStrength=20
|
||||||
|
|
||||||
|
[Anenome-Level3]
|
||||||
|
Gfx=..\..\graphics\characters\AnenomeLvl3\Render\PSX\AnemneLvl3_Fire_0001.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=0
|
||||||
|
TurnRate=128
|
||||||
|
Collision=0
|
||||||
|
Health=48
|
||||||
|
AttackStrength=20
|
||||||
|
|
||||||
|
[BabyOctopus]
|
||||||
|
Gfx=..\..\graphics\characters\babyoctopus\render\psx\Babyoctopus_Idle0001.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=2
|
||||||
|
TurnRate=512
|
||||||
|
Collision=0
|
||||||
|
Health=1
|
||||||
|
AttackStrength=20
|
||||||
|
|
||||||
|
[Ballblob]
|
||||||
|
Gfx=..\..\graphics\characters\ballblob\render\psx\BallBlob_Bounce0001.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=3
|
||||||
|
TurnRate=0
|
||||||
|
Collision=1
|
||||||
|
Health=0
|
||||||
|
AttackStrength=20
|
||||||
|
|
||||||
|
#[Boogermonster]
|
||||||
|
#Gfx=..\..\graphics\characters\
|
||||||
|
#WayPoints=1
|
||||||
|
#Speed=0
|
||||||
|
#TurnRate=128
|
||||||
|
#Collision=1
|
||||||
|
#Health=0
|
||||||
|
#AttackStrength=20
|
||||||
|
|
||||||
|
[Caterpillar]
|
||||||
|
Gfx=..\..\graphics\characters\caterpillar\render\psx\caterpillar_crawl0000.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=1
|
||||||
|
TurnRate=0
|
||||||
|
Collision=0
|
||||||
|
Health=48
|
||||||
|
AttackStrength=20
|
||||||
|
|
||||||
|
#[Clam-Level1]
|
||||||
|
#Gfx=..\..\graphics\characters\
|
||||||
|
#WayPoints=1
|
||||||
|
#Speed=0
|
||||||
|
#TurnRate=0
|
||||||
|
#Collision=1
|
||||||
|
#Health=0
|
||||||
|
#AttackStrength=20
|
||||||
|
|
||||||
|
#[Clam-Level2]
|
||||||
|
#Gfx=..\..\graphics\characters\
|
||||||
|
#WayPoints=1
|
||||||
|
#Speed=0
|
||||||
|
#TurnRate=0
|
||||||
|
#Collision=1
|
||||||
|
#Health=0
|
||||||
|
#AttackStrength=20
|
||||||
|
|
||||||
|
[Eyeball]
|
||||||
|
Gfx=..\..\graphics\characters\eyeball\render\psx\EyeBall_0000.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=0
|
||||||
|
TurnRate=128
|
||||||
|
Collision=0
|
||||||
|
Health=32
|
||||||
|
AttackStrength=20
|
||||||
|
|
||||||
|
[Flamingskull]
|
||||||
|
Gfx=..\..\graphics\characters\flamingskull\render\psx\FlamingSkull_0001.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=3
|
||||||
|
TurnRate=128
|
||||||
|
Collision=0
|
||||||
|
Health=16
|
||||||
|
AttackStrength=20
|
||||||
|
|
||||||
|
[FlyingDutchman]
|
||||||
|
Gfx=..\..\graphics\characters\flyingdutchman\render\psx\flyingdutchman_idlebreathe0000.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=3
|
||||||
|
TurnRate=2048
|
||||||
|
Collision=0
|
||||||
|
Health=256
|
||||||
|
AttackStrength=0
|
||||||
|
|
||||||
|
[Ghost]
|
||||||
|
Gfx=..\..\graphics\characters\ghost\render\psx\Ghost_Idle0001.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=2
|
||||||
|
TurnRate=128
|
||||||
|
Collision=0
|
||||||
|
Health=0
|
||||||
|
AttackStrength=20
|
||||||
|
|
||||||
|
#[GiantWorm]
|
||||||
|
#Gfx=..\..\graphics\characters\
|
||||||
|
#WayPoints=1
|
||||||
|
#Speed=3
|
||||||
|
#TurnRate=128
|
||||||
|
#Collision=0
|
||||||
|
#Health=256
|
||||||
|
#AttackStrength=0
|
||||||
|
|
||||||
|
[HermitCrab]
|
||||||
|
Gfx=..\..\graphics\characters\hermitcrab\render\psx\hermitcrab_idle0001.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=2
|
||||||
|
TurnRate=0
|
||||||
|
Collision=0
|
||||||
|
Health=0
|
||||||
|
AttackStrength=20
|
||||||
|
# 20 for snap, 40 for roll...ARGH
|
||||||
|
|
||||||
|
[IronDogFish]
|
||||||
|
Gfx=..\..\graphics\characters\irondogfish\render\psx\irondogfish_idle0000.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=3
|
||||||
|
TurnRate=2048
|
||||||
|
Collision=0
|
||||||
|
Health=256
|
||||||
|
AttackStrength=0
|
||||||
|
|
||||||
|
[PuffaFish]
|
||||||
|
Gfx=..\..\graphics\characters\puffafish\render\psx\PuffaFish_PuffUpIdle0001.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=2
|
||||||
|
TurnRate=128
|
||||||
|
Collision=0
|
||||||
|
Health=64
|
||||||
|
AttackStrength=20
|
||||||
|
|
||||||
|
#[SeaSnake]
|
||||||
|
#Gfx=..\..\graphics\characters\
|
||||||
|
#WayPoints=1
|
||||||
|
#Speed=3
|
||||||
|
#TurnRate=256
|
||||||
|
#Collision=0
|
||||||
|
#Health=56
|
||||||
|
#AttackStrength=20
|
||||||
|
|
||||||
|
[Sharkman]
|
||||||
|
Gfx=..\..\graphics\characters\sharkman\render\psx\SharkMan_Idle1_0001.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=3
|
||||||
|
TurnRate=0
|
||||||
|
Collision=0
|
||||||
|
Health=16
|
||||||
|
AttackStrength=20
|
||||||
|
|
||||||
|
#[SharkSub]
|
||||||
|
#Gfx=..\..\graphics\characters\
|
||||||
|
#WayPoints=1
|
||||||
|
#Speed=3
|
||||||
|
#TurnRate=2048
|
||||||
|
#Collision=0
|
||||||
|
#Health=256
|
||||||
|
#AttackStrength=0
|
||||||
|
|
||||||
|
[Skeletalfish]
|
||||||
|
Gfx=..\..\graphics\characters\Skeletalfish\render\psx\skeletalfish_idle0000.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=3
|
||||||
|
TurnRate=2048
|
||||||
|
Collision=0
|
||||||
|
Health=0
|
||||||
|
AttackStrength=20
|
||||||
|
|
||||||
|
[SpiderCrab]
|
||||||
|
Gfx=..\..\graphics\characters\spidercrab\render\psx\SpiderCrab_Idle0001.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=3
|
||||||
|
TurnRate=0
|
||||||
|
Collision=1
|
||||||
|
Health=2
|
||||||
|
# 1st shot stuns, if shot again is killed
|
||||||
|
AttackStrength=20
|
||||||
|
|
||||||
|
[Squiddart]
|
||||||
|
Gfx=..\..\graphics\characters\squiddart\render\psx\SquidDart_Swim0001.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=5
|
||||||
|
TurnRate=256
|
||||||
|
Collision=0
|
||||||
|
Health=16
|
||||||
|
AttackStrength=20
|
||||||
|
|
||||||
|
[Stomper]
|
||||||
|
Gfx=..\..\graphics\characters\stomper\render\psx\Stomper_Crush0001.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=5
|
||||||
|
TurnRate=0
|
||||||
|
Collision=0
|
||||||
|
Health=0
|
||||||
|
AttackStrength=20
|
||||||
|
|
||||||
|
[DustDevil]
|
||||||
|
Gfx=..\..\graphics\characters\DustDevil\render\psx\dustdevil_twist0001.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=5
|
||||||
|
TurnRate=0
|
||||||
|
Collision=0
|
||||||
|
Health=0
|
||||||
|
AttackStrength=20
|
Binary file not shown.
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
346
tools/MapEdit/platform.ini
Normal file
346
tools/MapEdit/platform.ini
Normal file
|
@ -0,0 +1,346 @@
|
||||||
|
# Character Script
|
||||||
|
#
|
||||||
|
################################################
|
||||||
|
# [Name]
|
||||||
|
# Gfx=Sprite filename
|
||||||
|
# WayPoints=0/1
|
||||||
|
# Speed=0-10
|
||||||
|
# TurnRate=0-4095
|
||||||
|
# Collision=0/1
|
||||||
|
# Health=0-255
|
||||||
|
# Player=0/1 # Player Flag
|
||||||
|
################################################
|
||||||
|
|
||||||
|
################################################
|
||||||
|
# Player
|
||||||
|
################################################
|
||||||
|
[SpongeBob]
|
||||||
|
Gfx=..\..\graphics\spongebob.bmp
|
||||||
|
Player=1
|
||||||
|
|
||||||
|
################################################
|
||||||
|
# Friends
|
||||||
|
################################################
|
||||||
|
[BarnacleBoy]
|
||||||
|
Gfx=..\..\graphics\barnicleboy.bmp
|
||||||
|
WayPoints=0
|
||||||
|
Speed=0
|
||||||
|
TurnRate=0
|
||||||
|
Collision=0
|
||||||
|
Health=0
|
||||||
|
AttackStrength=0
|
||||||
|
|
||||||
|
[Gary]
|
||||||
|
Gfx=..\..\graphics\gary.bmp
|
||||||
|
WayPoints=0
|
||||||
|
Speed=3
|
||||||
|
TurnRate=0
|
||||||
|
Collision=0
|
||||||
|
Health=0
|
||||||
|
AttackStrength=0
|
||||||
|
|
||||||
|
[Krusty]
|
||||||
|
Gfx=..\..\graphics\Krusty.bmp
|
||||||
|
WayPoints=0
|
||||||
|
Speed=0
|
||||||
|
TurnRate=0
|
||||||
|
Collision=0
|
||||||
|
Health=0
|
||||||
|
AttackStrength=0
|
||||||
|
|
||||||
|
[MermaidMan]
|
||||||
|
Gfx=..\..\graphics\MermaidMan.bmp
|
||||||
|
WayPoints=0
|
||||||
|
Speed=0
|
||||||
|
TurnRate=0
|
||||||
|
Collision=0
|
||||||
|
Health=0
|
||||||
|
AttackStrength=0
|
||||||
|
|
||||||
|
[Patrick]
|
||||||
|
Gfx=..\..\graphics\Patrick.bmp
|
||||||
|
WayPoints=0
|
||||||
|
Speed=0
|
||||||
|
TurnRate=0
|
||||||
|
Collision=0
|
||||||
|
Health=0
|
||||||
|
AttackStrength=0
|
||||||
|
|
||||||
|
[Sandy]
|
||||||
|
Gfx=..\..\graphics\Sandy.bmp
|
||||||
|
WayPoints=0
|
||||||
|
Speed=0
|
||||||
|
TurnRate=0
|
||||||
|
Collision=0
|
||||||
|
Health=0
|
||||||
|
AttackStrength=0
|
||||||
|
|
||||||
|
[Squidward]
|
||||||
|
Gfx=..\..\graphics\Squidward.bmp
|
||||||
|
WayPoints=0
|
||||||
|
Speed=0
|
||||||
|
TurnRate=0
|
||||||
|
Collision=0
|
||||||
|
Health=0
|
||||||
|
AttackStrength=0
|
||||||
|
|
||||||
|
[Plankton]
|
||||||
|
Gfx=..\..\graphics\plankton.bmp
|
||||||
|
WayPoints=0
|
||||||
|
Speed=0
|
||||||
|
TurnRate=0
|
||||||
|
Collision=0
|
||||||
|
Health=0
|
||||||
|
AttackStrength=0
|
||||||
|
|
||||||
|
################################################
|
||||||
|
# Enemies
|
||||||
|
################################################
|
||||||
|
|
||||||
|
[SmallJellyfish-Level1]
|
||||||
|
Gfx=..\..\graphics\JellyFish1.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=3
|
||||||
|
TurnRate=128
|
||||||
|
Collision=1
|
||||||
|
Health=16
|
||||||
|
AttackStrength=20
|
||||||
|
|
||||||
|
[SmallJellyfish-Level2]
|
||||||
|
Gfx=..\..\graphics\JellyFish2.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=3
|
||||||
|
TurnRate=128
|
||||||
|
Collision=1
|
||||||
|
Health=16
|
||||||
|
AttackStrength=40
|
||||||
|
|
||||||
|
# [Largejellyfish] - This is a platform
|
||||||
|
|
||||||
|
[Motherjellyfish]
|
||||||
|
Gfx=..\..\graphics\MotherJellyFish.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=3
|
||||||
|
TurnRate=256
|
||||||
|
Collision=0
|
||||||
|
Health=256
|
||||||
|
AttackStrength=1234
|
||||||
|
|
||||||
|
[Anenome-Level1]
|
||||||
|
Gfx=..\..\graphics\Anenome1.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=0
|
||||||
|
TurnRate=128
|
||||||
|
Collision=0
|
||||||
|
Health=16
|
||||||
|
AttackStrength=20
|
||||||
|
|
||||||
|
[Anenome-Level2]
|
||||||
|
Gfx=..\..\graphics\Anenome2.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=0
|
||||||
|
TurnRate=128
|
||||||
|
Collision=0
|
||||||
|
Health=32
|
||||||
|
AttackStrength=20
|
||||||
|
|
||||||
|
[Anenome-Level3]
|
||||||
|
Gfx=..\..\graphics\Anenome3.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=0
|
||||||
|
TurnRate=128
|
||||||
|
Collision=0
|
||||||
|
Health=48
|
||||||
|
AttackStrength=20
|
||||||
|
|
||||||
|
[BabyOctopus]
|
||||||
|
Gfx=..\..\graphics\Babyoctopus.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=2
|
||||||
|
TurnRate=512
|
||||||
|
Collision=0
|
||||||
|
Health=1
|
||||||
|
AttackStrength=20
|
||||||
|
|
||||||
|
[Ballblob]
|
||||||
|
Gfx=..\..\graphics\BallBlob.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=3
|
||||||
|
TurnRate=0
|
||||||
|
Collision=1
|
||||||
|
Health=0
|
||||||
|
AttackStrength=20
|
||||||
|
|
||||||
|
[Boogermonster]
|
||||||
|
Gfx=..\..\graphics\Boogermonster.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=0
|
||||||
|
TurnRate=128
|
||||||
|
Collision=1
|
||||||
|
Health=0
|
||||||
|
AttackStrength=20
|
||||||
|
|
||||||
|
[Caterpillar]
|
||||||
|
Gfx=..\..\graphics\Caterpillar.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=1
|
||||||
|
TurnRate=0
|
||||||
|
Collision=0
|
||||||
|
Health=48
|
||||||
|
AttackStrength=20
|
||||||
|
|
||||||
|
[Clam-Level1]
|
||||||
|
Gfx=..\..\graphics\clam1.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=0
|
||||||
|
TurnRate=0
|
||||||
|
Collision=1
|
||||||
|
Health=0
|
||||||
|
AttackStrength=20
|
||||||
|
|
||||||
|
[Clam-Level2]
|
||||||
|
Gfx=..\..\graphics\clam2.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=0
|
||||||
|
TurnRate=0
|
||||||
|
Collision=1
|
||||||
|
Health=0
|
||||||
|
AttackStrength=20
|
||||||
|
|
||||||
|
[Eyeball]
|
||||||
|
Gfx=..\..\graphics\Eyeball.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=0
|
||||||
|
TurnRate=128
|
||||||
|
Collision=0
|
||||||
|
Health=32
|
||||||
|
AttackStrength=20
|
||||||
|
|
||||||
|
[Flamingskull]
|
||||||
|
Gfx=..\..\graphics\Flamingskull.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=3
|
||||||
|
TurnRate=128
|
||||||
|
Collision=0
|
||||||
|
Health=16
|
||||||
|
AttackStrength=20
|
||||||
|
|
||||||
|
[FlyingDutchman]
|
||||||
|
Gfx=..\..\graphics\FlyingDutchman.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=3
|
||||||
|
TurnRate=2048
|
||||||
|
Collision=0
|
||||||
|
Health=256
|
||||||
|
AttackStrength=0
|
||||||
|
|
||||||
|
[Ghost]
|
||||||
|
Gfx=..\..\graphics\Ghost.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=2
|
||||||
|
TurnRate=128
|
||||||
|
Collision=0
|
||||||
|
Health=0
|
||||||
|
AttackStrength=20
|
||||||
|
|
||||||
|
[GiantWorm]
|
||||||
|
Gfx=..\..\graphics\GiantWorm.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=3
|
||||||
|
TurnRate=128
|
||||||
|
Collision=0
|
||||||
|
Health=256
|
||||||
|
AttackStrength=0
|
||||||
|
|
||||||
|
[HermitCrab]
|
||||||
|
Gfx=..\..\graphics\HermitCrab.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=2
|
||||||
|
TurnRate=0
|
||||||
|
Collision=0
|
||||||
|
Health=0
|
||||||
|
AttackStrength=20
|
||||||
|
# 20 for snap, 40 for roll...ARGH
|
||||||
|
|
||||||
|
[IronDogFish]
|
||||||
|
Gfx=..\..\graphics\IronDogFish.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=3
|
||||||
|
TurnRate=2048
|
||||||
|
Collision=0
|
||||||
|
Health=256
|
||||||
|
AttackStrength=0
|
||||||
|
|
||||||
|
[PuffaFish]
|
||||||
|
Gfx=..\..\graphics\PuffaFish.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=2
|
||||||
|
TurnRate=128
|
||||||
|
Collision=0
|
||||||
|
Health=64
|
||||||
|
AttackStrength=20
|
||||||
|
|
||||||
|
[SeaSnake]
|
||||||
|
Gfx=..\..\graphics\SeaSnake.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=3
|
||||||
|
TurnRate=256
|
||||||
|
Collision=0
|
||||||
|
Health=56
|
||||||
|
AttackStrength=20
|
||||||
|
|
||||||
|
[Sharkman]
|
||||||
|
Gfx=..\..\graphics\Sharkman.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=3
|
||||||
|
TurnRate=0
|
||||||
|
Collision=0
|
||||||
|
Health=16
|
||||||
|
AttackStrength=20
|
||||||
|
|
||||||
|
[SharkSub]
|
||||||
|
Gfx=..\..\graphics\SharkSub.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=3
|
||||||
|
TurnRate=2048
|
||||||
|
Collision=0
|
||||||
|
Health=256
|
||||||
|
AttackStrength=0
|
||||||
|
|
||||||
|
[Skeletalfish]
|
||||||
|
Gfx=..\..\graphics\Skeletalfish.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=3
|
||||||
|
TurnRate=2048
|
||||||
|
Collision=0
|
||||||
|
Health=0
|
||||||
|
AttackStrength=20
|
||||||
|
|
||||||
|
[SpiderCrab]
|
||||||
|
Gfx=..\..\graphics\SpiderCrab.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=3
|
||||||
|
TurnRate=0
|
||||||
|
Collision=1
|
||||||
|
Health=2
|
||||||
|
# 1st shot stuns, if shot again is killed
|
||||||
|
AttackStrength=20
|
||||||
|
|
||||||
|
[Squiddart]
|
||||||
|
Gfx=..\..\graphics\Squiddart.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=5
|
||||||
|
TurnRate=256
|
||||||
|
Collision=0
|
||||||
|
Health=16
|
||||||
|
AttackStrength=20
|
||||||
|
|
||||||
|
[Stomper]
|
||||||
|
Gfx=..\..\graphics\Stomper.bmp
|
||||||
|
WayPoints=1
|
||||||
|
Speed=5
|
||||||
|
TurnRate=0
|
||||||
|
Collision=0
|
||||||
|
Health=0
|
||||||
|
AttackStrength=20
|
||||||
|
|
Loading…
Add table
Reference in a new issue