This commit is contained in:
parent
1966aa6f60
commit
2b171295b5
44 changed files with 588 additions and 603 deletions
|
@ -47,6 +47,7 @@ int round(float f)
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************
|
//***************************************************************************
|
||||||
|
/*
|
||||||
void alignFile( FILE *f, int align )
|
void alignFile( FILE *f, int align )
|
||||||
{
|
{
|
||||||
long fp = ftell(f);
|
long fp = ftell(f);
|
||||||
|
@ -57,6 +58,17 @@ void alignFile( FILE *f, int align )
|
||||||
fwrite(buffer, s, 1, f);
|
fwrite(buffer, s, 1, f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
//***************************************************************************
|
||||||
|
void PadFile(FILE *File)
|
||||||
|
{
|
||||||
|
int Pad=ftell(File) & 3;
|
||||||
|
|
||||||
|
if (Pad)
|
||||||
|
{
|
||||||
|
fwrite(&Pad,Pad,1,File);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//***************************************************************************
|
//***************************************************************************
|
||||||
GString CheckFileString(const char * Str)
|
GString CheckFileString(const char * Str)
|
||||||
|
@ -148,3 +160,58 @@ FILE *File=fopen(Name,"rb");
|
||||||
}
|
}
|
||||||
return((char*)Name);
|
return((char*)Name);
|
||||||
}
|
}
|
||||||
|
/**************************************************************************************/
|
||||||
|
struct sTgaHdr
|
||||||
|
{
|
||||||
|
char id; // 0
|
||||||
|
char colmaptype; // 1
|
||||||
|
char imagetype; // 2
|
||||||
|
char fei[2]; // 3
|
||||||
|
char cml[2]; // 5
|
||||||
|
char cmes; // 7
|
||||||
|
short xorig; // 8
|
||||||
|
short yorig; // 10
|
||||||
|
short width; // 12
|
||||||
|
short height; // 14
|
||||||
|
char depth; // 15
|
||||||
|
char imagedesc; // 16
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void SaveTGA(char *Filename,int W,int H,u8 *Data,bool IsBGR)
|
||||||
|
{
|
||||||
|
FILE *File;
|
||||||
|
sTgaHdr FileHdr;
|
||||||
|
|
||||||
|
File=fopen(Filename,"wb");
|
||||||
|
|
||||||
|
memset(&FileHdr,0 ,sizeof(sTgaHdr));
|
||||||
|
|
||||||
|
FileHdr.imagetype= 2; //imagetype
|
||||||
|
FileHdr.width = W;
|
||||||
|
FileHdr.height= H;
|
||||||
|
FileHdr.depth=24;
|
||||||
|
|
||||||
|
fwrite(&FileHdr,sizeof(sTgaHdr),1,File);
|
||||||
|
if (!IsBGR)
|
||||||
|
{
|
||||||
|
fwrite(Data,W*H*3,1,File);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int Size=W*H;
|
||||||
|
for (int i=0; i<Size;i++)
|
||||||
|
{
|
||||||
|
fwrite(&Data[2],1,1,File);
|
||||||
|
fwrite(&Data[1],1,1,File);
|
||||||
|
fwrite(&Data[0],1,1,File);
|
||||||
|
Data+=3;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fclose(File);
|
||||||
|
}
|
||||||
|
|
||||||
|
//***************************************************
|
||||||
|
|
|
@ -100,6 +100,10 @@ SOURCE=.\facestore.h
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\IniClass.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\List.h
|
SOURCE=.\List.h
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
|
@ -66,9 +66,12 @@ void DebugStr();
|
||||||
|
|
||||||
int round(float f);
|
int round(float f);
|
||||||
|
|
||||||
void alignFile( FILE *f, int align );
|
//void alignFile( FILE *f, int align );
|
||||||
|
void PadFile(FILE *File);
|
||||||
|
|
||||||
|
|
||||||
char *FindFile(const char *Name);
|
char *FindFile(const char *Name);
|
||||||
|
void SaveTGA(char *Filename,int W,int H,u8 *Data,bool IsBGR=false);
|
||||||
|
|
||||||
//***************************************************************************
|
//***************************************************************************
|
||||||
#endif
|
#endif
|
|
@ -127,7 +127,7 @@ void Export(char *OutFile)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------*/
|
/*----------------------------------------------------------------------------*/
|
||||||
char *GetData(char *GroupEntry,char *KeyEntry)
|
char *GetData(const char *GroupEntry,const char *KeyEntry)
|
||||||
{
|
{
|
||||||
int Group=FindGroup(GroupEntry);
|
int Group=FindGroup(GroupEntry);
|
||||||
if (Group==-1) return(0);
|
if (Group==-1) return(0);
|
||||||
|
@ -138,14 +138,14 @@ int Entry=FindKey(GroupEntry,KeyEntry);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------*/
|
/*----------------------------------------------------------------------------*/
|
||||||
char *GetStr(char *GroupEntry,char *KeyEntry)
|
char *GetStr(const char *GroupEntry,const char *KeyEntry)
|
||||||
{
|
{
|
||||||
char *Str=GetData(GroupEntry,KeyEntry);
|
char *Str=GetData(GroupEntry,KeyEntry);
|
||||||
return(Str);
|
return(Str);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------*/
|
/*----------------------------------------------------------------------------*/
|
||||||
int GetInt(char *GroupEntry,char *KeyEntry)
|
int GetInt(const char *GroupEntry,const char *KeyEntry)
|
||||||
{
|
{
|
||||||
char *Str=GetData(GroupEntry,KeyEntry);
|
char *Str=GetData(GroupEntry,KeyEntry);
|
||||||
int Var=0;
|
int Var=0;
|
||||||
|
@ -153,6 +153,15 @@ int Var=0;
|
||||||
return(Var);
|
return(Var);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*----------------------------------------------------------------------------*/
|
||||||
|
bool GetInt(const char *GroupEntry,const char *KeyEntry,int &Var)
|
||||||
|
{
|
||||||
|
char *Str=GetData(GroupEntry,KeyEntry);
|
||||||
|
if (!Str) return(false);
|
||||||
|
Var=atol(Str);
|
||||||
|
return(true);
|
||||||
|
}
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------*/
|
/*----------------------------------------------------------------------------*/
|
||||||
int UpdateGroup(char *GroupEntry)
|
int UpdateGroup(char *GroupEntry)
|
||||||
{
|
{
|
||||||
|
@ -241,7 +250,7 @@ void StripGroupName(char *Name)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------*/
|
/*----------------------------------------------------------------------------*/
|
||||||
int FindGroup(char *GroupEntry)
|
int FindGroup(const char *GroupEntry)
|
||||||
{
|
{
|
||||||
for (int Loop=0;Loop<IniGroup.size();Loop++)
|
for (int Loop=0;Loop<IniGroup.size();Loop++)
|
||||||
{
|
{
|
||||||
|
@ -251,7 +260,7 @@ int FindGroup(char *GroupEntry)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*----------------------------------------------------------------------------*/
|
/*----------------------------------------------------------------------------*/
|
||||||
int FindKey(char *GroupEntry,char *KeyEntry)
|
int FindKey(const char *GroupEntry,const char *KeyEntry)
|
||||||
{
|
{
|
||||||
int Group=FindGroup(GroupEntry);;
|
int Group=FindGroup(GroupEntry);;
|
||||||
if (Group==-1) return(-1);
|
if (Group==-1) return(-1);
|
||||||
|
|
|
@ -845,8 +845,12 @@ void SprSet::WriteSprFile(char const * Name)
|
||||||
Returns:
|
Returns:
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
void SprFrame::SetFrameAndInfo(Frame const & Fr,FileInfo const & NewMyFileInfo,int MaxSize)
|
void SprFrame::SetFrameAndInfo(Frame const & Fr,FileInfo const & NewMyFileInfo,int MaxSize)
|
||||||
|
{
|
||||||
|
if (this!=&Fr)
|
||||||
{
|
{
|
||||||
Frame::CopyFrame(Fr);
|
Frame::CopyFrame(Fr);
|
||||||
|
}
|
||||||
|
|
||||||
MyFileInfo=NewMyFileInfo;
|
MyFileInfo=NewMyFileInfo;
|
||||||
|
|
||||||
OrigW=Fr.GetWidth();
|
OrigW=Fr.GetWidth();
|
||||||
|
|
|
@ -110,12 +110,12 @@ BOOL operator==(sExpMapElem const &v1)
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*** Things ******************************************************************/
|
/*** Things ******************************************************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
struct sExpLayerActor
|
struct sExpLayerThing
|
||||||
{
|
{
|
||||||
int Speed;
|
|
||||||
int TurnRate;
|
|
||||||
int Health;
|
int Health;
|
||||||
int AttackStrength;
|
int AttackStrength;
|
||||||
|
int Speed;
|
||||||
|
int TurnRate;
|
||||||
bool CollisionFlag;
|
bool CollisionFlag;
|
||||||
bool PlayerFlag;
|
bool PlayerFlag;
|
||||||
int Spare[8];
|
int Spare[8];
|
||||||
|
|
|
@ -131,26 +131,3 @@ void CLayerActor::GUIChanged(CCore *Core)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
/*** Functions ***************************************************************/
|
|
||||||
/*****************************************************************************/
|
|
||||||
void CLayerActor::ExportThing(CExport &Exp,sLayerThing &ThisThing)
|
|
||||||
{
|
|
||||||
int i,ListSize=ThisThing.XY.size();
|
|
||||||
sExpLayerActor OutThing;
|
|
||||||
// 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(sExpLayerActor));
|
|
||||||
}
|
|
||||||
|
|
|
@ -31,9 +31,6 @@ public:
|
||||||
void GUIThingUpdate(bool OnlySel=false);
|
void GUIThingUpdate(bool OnlySel=false);
|
||||||
void GUIThingPointUpdate(bool OnlySel=false);
|
void GUIThingPointUpdate(bool OnlySel=false);
|
||||||
|
|
||||||
void ExportThing(CExport &Exp,sLayerThing &ThisThing);
|
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
CGUILayerActor GUI;
|
CGUILayerActor GUI;
|
||||||
|
|
||||||
|
|
|
@ -114,27 +114,3 @@ void CLayerItem::GUIChanged(CCore *Core)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
/*** Functions ***************************************************************/
|
|
||||||
/*****************************************************************************/
|
|
||||||
void CLayerItem::ExportThing(CExport &Exp,sLayerThing &ThisThing)
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
int i,ListSize=ThisThing.XY.size();
|
|
||||||
sExpLayerItem OutThing;
|
|
||||||
// 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(sExpLayerItem));
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
|
@ -30,9 +30,6 @@ public:
|
||||||
void GUIThingDefClear();
|
void GUIThingDefClear();
|
||||||
void GUIThingUpdate(bool OnlySel=false);
|
void GUIThingUpdate(bool OnlySel=false);
|
||||||
|
|
||||||
void ExportThing(CExport &Exp,sLayerThing &ThisThing);
|
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
CGUILayerItem GUI;
|
CGUILayerItem GUI;
|
||||||
|
|
||||||
|
|
|
@ -136,27 +136,3 @@ void CLayerPlatform::GUIChanged(CCore *Core)
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
/*** Functions ***************************************************************/
|
|
||||||
/*****************************************************************************/
|
|
||||||
void CLayerPlatform::ExportThing(CExport &Exp,sLayerThing &ThisThing)
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
int i,ListSize=ThisThing.XY.size();
|
|
||||||
sExpLayerPlatform OutThing;
|
|
||||||
// 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(sExpLayerPlatform));
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
|
@ -31,9 +31,6 @@ public:
|
||||||
void GUIThingUpdate(bool OnlySel=false);
|
void GUIThingUpdate(bool OnlySel=false);
|
||||||
void GUIThingPointUpdate(bool OnlySel=false);
|
void GUIThingPointUpdate(bool OnlySel=false);
|
||||||
|
|
||||||
void ExportThing(CExport &Exp,sLayerThing &ThisThing);
|
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// CGUILayerPlatform GUI;
|
// CGUILayerPlatform GUI;
|
||||||
|
|
||||||
|
|
|
@ -701,6 +701,26 @@ int i,ListSize=ThingList.size();
|
||||||
ExportThingNames(Exp);
|
ExportThingNames(Exp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*****************************************************************************/
|
||||||
|
void CLayerThing::ExportThing(CExport &Exp,sLayerThing &ThisThing)
|
||||||
|
{
|
||||||
|
int i,ListSize=ThisThing.XY.size();
|
||||||
|
sExpLayerThing OutThing;
|
||||||
|
// 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));
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void CLayerThing::ExportThingNames(CExport &Exp)
|
void CLayerThing::ExportThingNames(CExport &Exp)
|
||||||
|
|
|
@ -78,7 +78,7 @@ virtual void SaveThingNames(CFile *File);
|
||||||
virtual void LoadThingScript(const char *Filename);
|
virtual void LoadThingScript(const char *Filename);
|
||||||
|
|
||||||
virtual void Export(CCore *Core,CExport &Exp);
|
virtual void Export(CCore *Core,CExport &Exp);
|
||||||
virtual void ExportThing(CExport &Exp,sLayerThing &ThisThing)=0;
|
virtual void ExportThing(CExport &Exp,sLayerThing &ThisThing);
|
||||||
virtual void ExportThingNames(CExport &Exp);
|
virtual void ExportThingNames(CExport &Exp);
|
||||||
|
|
||||||
// Functions
|
// Functions
|
||||||
|
|
|
@ -9,12 +9,14 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <DaveLib.h>
|
#include <DaveLib.h>
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
|
#include <SprSet.h>
|
||||||
#include "MkActor.h"
|
#include "MkActor.h"
|
||||||
|
|
||||||
#include <pak.h>
|
#include <pak.h>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
//#define CheckDups 1
|
||||||
|
//#define OutputTGA
|
||||||
|
|
||||||
//***************************************************************************
|
//***************************************************************************
|
||||||
vector<CMkActor> ActorList;
|
vector<CMkActor> ActorList;
|
||||||
|
@ -257,6 +259,7 @@ int Error=0;
|
||||||
sFrame NewFrame;
|
sFrame NewFrame;
|
||||||
NewFrame.Filename=Find.name;
|
NewFrame.Filename=Find.name;
|
||||||
ThisAnim.Frames.push_back(NewFrame);
|
ThisAnim.Frames.push_back(NewFrame);
|
||||||
|
|
||||||
Error=_findnext( FileHandle, &Find);
|
Error=_findnext( FileHandle, &Find);
|
||||||
}
|
}
|
||||||
_findclose( FileHandle);
|
_findclose( FileHandle);
|
||||||
|
@ -310,7 +313,7 @@ Rect OriginalRect;
|
||||||
nfAreaBytes=nfLineWidthBytes*nfH;
|
nfAreaBytes=nfLineWidthBytes*nfH;
|
||||||
Bmp.PsxSize=nfAreaBytes;
|
Bmp.PsxSize=nfAreaBytes;
|
||||||
|
|
||||||
Bmp.Psx=(u8*)malloc(nfAreaBytes);
|
Bmp.Psx=(u8*)malloc(nfAreaBytes+16);
|
||||||
ASSERT(Bmp.Psx);
|
ASSERT(Bmp.Psx);
|
||||||
|
|
||||||
for (int y=0;y<nfH;y++)
|
for (int y=0;y<nfH;y++)
|
||||||
|
@ -324,7 +327,7 @@ Rect OriginalRect;
|
||||||
|
|
||||||
PixAddr=&Bmp.Psx[(x/2)+(nfLineWidthBytes*y)];
|
PixAddr=&Bmp.Psx[(x/2)+(nfLineWidthBytes*y)];
|
||||||
|
|
||||||
if (PixAddr>&Bmp.Psx[nfAreaBytes]) printf("!");
|
if (PixAddr>=&Bmp.Psx[nfAreaBytes]) ASSERT(!"");
|
||||||
if ((x&1))
|
if ((x&1))
|
||||||
{
|
{
|
||||||
*PixAddr&=0x0f;
|
*PixAddr&=0x0f;
|
||||||
|
@ -344,39 +347,28 @@ int CMkActor::LoadBmp(GString &Name,bool VRamFlag)
|
||||||
{
|
{
|
||||||
GString Filename=SpriteDir+Name;
|
GString Filename=SpriteDir+Name;
|
||||||
|
|
||||||
int Idx,i,ListSize;
|
int BmpListSize=BmpList.size();
|
||||||
int W,H,Size;
|
|
||||||
sBmp NewBmp;
|
sBmp NewBmp;
|
||||||
Frame &Bmp=NewBmp.Bmp;
|
SprFrame &NewFrame=NewBmp.Bmp;
|
||||||
|
FileInfo ThisInfo;
|
||||||
|
|
||||||
|
// ThisInfo.SetInfo(name, CrossHair, ThisZeroColZero, MoveUVs, AllowRotate, ShrinkToFit, m_allocateAs16bit);
|
||||||
|
ThisInfo.SetInfo(Filename, false, true, false, false, true, false);
|
||||||
|
|
||||||
NewBmp.Filename=Filename;
|
|
||||||
NewBmp.RGB=0;
|
NewBmp.RGB=0;
|
||||||
NewBmp.Pak=0;
|
NewBmp.Pak=0;
|
||||||
NewBmp.Psx=0;
|
NewBmp.Psx=0;
|
||||||
NewBmp.VRamFlag=VRamFlag;
|
NewBmp.VRamFlag=VRamFlag;
|
||||||
Bmp.LoadBMP(Filename);
|
|
||||||
W=Bmp.GetWidth();
|
NewFrame.LoadBMP(Filename);
|
||||||
H=Bmp.GetHeight();
|
|
||||||
Size=W*H;
|
#ifdef CheckDups
|
||||||
|
int Size=NewFrame.GetWidth()*NewFrame.GetHeight();
|
||||||
NewBmp.RGB=(u8*)malloc(Size*3);
|
NewBmp.RGB=(u8*)malloc(Size*3);
|
||||||
ASSERT(NewBmp.RGB);
|
ASSERT(NewBmp.RGB);
|
||||||
Bmp.MakeRGB(NewBmp.RGB);
|
NewFrame.MakeRGB(NewBmp.RGB);
|
||||||
|
|
||||||
#if _DEBUG && 0
|
|
||||||
{
|
|
||||||
u8 *TGA=(u8*)malloc(Size*3);
|
|
||||||
ASSERT(TGA);
|
|
||||||
Bmp.FlipY();
|
|
||||||
Bmp.MakeRGB(TGA);
|
|
||||||
Bmp.FlipY();
|
|
||||||
|
|
||||||
char OutName[256];
|
|
||||||
sprintf(OutName,"\\x\\%s.tga",Name);
|
|
||||||
SaveTGA(OutName,W,H,TGA,true);
|
|
||||||
free(TGA);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
// Check for dups (Broken at the mo, ah well)
|
||||||
// Gen Chksum
|
// Gen Chksum
|
||||||
u8 *RGB=NewBmp.RGB;
|
u8 *RGB=NewBmp.RGB;
|
||||||
NewBmp.ChkR=NewBmp.ChkG=NewBmp.ChkB=0;
|
NewBmp.ChkR=NewBmp.ChkG=NewBmp.ChkB=0;
|
||||||
|
@ -387,14 +379,12 @@ u8 *RGB=NewBmp.RGB;
|
||||||
NewBmp.ChkB+=*RGB++;
|
NewBmp.ChkB+=*RGB++;
|
||||||
}
|
}
|
||||||
|
|
||||||
ListSize=BmpList.size();
|
int Idx=-1;
|
||||||
Idx=-1;
|
|
||||||
// Find existing
|
// Find existing
|
||||||
for (i=0; i<ListSize && Idx==-1; i++)
|
for (int i=0; i<BmpListSize && Idx==-1; i++)
|
||||||
{
|
{
|
||||||
sBmp &ThisBmp=BmpList[i];
|
sBmp &ThisBmp=BmpList[i];
|
||||||
if (ThisBmp.Filename==Filename) Idx=i;
|
// if (ThisBmp.ChkR==NewBmp.ChkR && ThisBmp.ChkG==NewBmp.ChkG && ThisBmp.ChkB==NewBmp.ChkB)
|
||||||
if (ThisBmp.ChkR==NewBmp.ChkR && ThisBmp.ChkG==NewBmp.ChkG && ThisBmp.ChkB==NewBmp.ChkB)
|
|
||||||
{
|
{
|
||||||
if (IsImageSame(ThisBmp,NewBmp)) Idx=i;
|
if (IsImageSame(ThisBmp,NewBmp)) Idx=i;
|
||||||
}
|
}
|
||||||
|
@ -406,23 +396,38 @@ u8 *RGB=NewBmp.RGB;
|
||||||
free(NewBmp.RGB);
|
free(NewBmp.RGB);
|
||||||
return(Idx);
|
return(Idx);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
MakePsxGfx(NewBmp);
|
|
||||||
BmpList.push_back(NewBmp);
|
BmpList.push_back(NewBmp);
|
||||||
if (VRamFlag)
|
BmpList[BmpListSize].Bmp.SetFrameAndInfo(BmpList[BmpListSize].Bmp,ThisInfo,0);
|
||||||
|
MakePsxGfx(BmpList[BmpListSize]);
|
||||||
|
|
||||||
|
|
||||||
|
#if _DEBUG && defined(OutputTGA)
|
||||||
{
|
{
|
||||||
TexGrab.AddMemFrame(NewBmp.Filename,NewBmp.Bmp);
|
Frame &OutF=BmpList[BmpListSize].Bmp;
|
||||||
|
u8 *TGA=(u8*)malloc(OutF.GetWidth()*OutF.GetHeight()*3);
|
||||||
|
ASSERT(TGA);
|
||||||
|
OutF.FlipY();
|
||||||
|
OutF.MakeRGB(TGA);
|
||||||
|
OutF.FlipY();
|
||||||
|
|
||||||
|
char OutName[256];
|
||||||
|
sprintf(OutName,"\\x\\%s.tga",Name);
|
||||||
|
SaveTGA(OutName,OutF.GetWidth(),OutF.GetHeight(),TGA,true);
|
||||||
|
free(TGA);
|
||||||
}
|
}
|
||||||
return(ListSize);
|
#endif
|
||||||
|
|
||||||
|
return(BmpListSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************
|
//***************************************************************************
|
||||||
bool CMkActor::IsImageSame(sBmp &Bmp0,sBmp &Bmp1)
|
bool CMkActor::IsImageSame(sBmp &Bmp0,sBmp &Bmp1)
|
||||||
{
|
{
|
||||||
int W0=Bmp0.Bmp.GetWidth();
|
int W0=Bmp0.Bmp.GetOrigW();
|
||||||
int H0=Bmp0.Bmp.GetHeight();
|
int H0=Bmp0.Bmp.GetOrigH();
|
||||||
int W1=Bmp1.Bmp.GetWidth();
|
int W1=Bmp1.Bmp.GetOrigW();
|
||||||
int H1=Bmp1.Bmp.GetHeight();
|
int H1=Bmp1.Bmp.GetOrigH();
|
||||||
int Size=W0*H0*3;
|
int Size=W0*H0*3;
|
||||||
u8 *RGB0=Bmp0.RGB;
|
u8 *RGB0=Bmp0.RGB;
|
||||||
u8 *RGB1=Bmp1.RGB;
|
u8 *RGB1=Bmp1.RGB;
|
||||||
|
@ -436,6 +441,7 @@ u8 *RGB1=Bmp1.RGB;
|
||||||
}
|
}
|
||||||
return(true);
|
return(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
//***************************************************************************
|
//***************************************************************************
|
||||||
//***************************************************************************
|
//***************************************************************************
|
||||||
//***************************************************************************
|
//***************************************************************************
|
||||||
|
@ -592,6 +598,11 @@ vector<sSpriteFrame> Out;
|
||||||
else
|
else
|
||||||
{ // Pak
|
{ // Pak
|
||||||
Out[i].PAKSpr=(u8*)ftell(File);
|
Out[i].PAKSpr=(u8*)ftell(File);
|
||||||
|
Out[i].XOfs=-ThisBmp.Bmp.GetX();
|
||||||
|
Out[i].YOfs=-ThisBmp.Bmp.GetY();
|
||||||
|
Out[i].W=ThisBmp.Bmp.GetWidth();
|
||||||
|
Out[i].H=ThisBmp.Bmp.GetHeight();
|
||||||
|
|
||||||
fwrite(ThisBmp.Pak,1,ThisBmp.PakSize,File);
|
fwrite(ThisBmp.Pak,1,ThisBmp.PakSize,File);
|
||||||
PadFile(File);
|
PadFile(File);
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,8 +23,7 @@ struct sAnim
|
||||||
//***************************************************************************
|
//***************************************************************************
|
||||||
struct sBmp
|
struct sBmp
|
||||||
{
|
{
|
||||||
GString Filename;
|
SprFrame Bmp;
|
||||||
Frame Bmp;
|
|
||||||
int ChkR,ChkG,ChkB;
|
int ChkR,ChkG,ChkB;
|
||||||
u8 *RGB;
|
u8 *RGB;
|
||||||
u8 *Psx;
|
u8 *Psx;
|
||||||
|
@ -39,7 +38,6 @@ class CMkActor
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CMkActor(GString &ActorName,GString &ActorPath,GString &SpritePath);
|
CMkActor(GString &ActorName,GString &ActorPath,GString &SpritePath);
|
||||||
// ~CMkActor();
|
|
||||||
|
|
||||||
static void SetTPData(const char *Name,int TPBase,int TPW,int TPH);
|
static void SetTPData(const char *Name,int TPBase,int TPW,int TPH);
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ void CNpcEnemy::processCloseClamJumpAttack( int _frames )
|
||||||
if ( !m_animPlaying )
|
if ( !m_animPlaying )
|
||||||
{
|
{
|
||||||
m_animPlaying = true;
|
m_animPlaying = true;
|
||||||
m_animNo = ANIM_CLAM_CLAMSNAPUP;
|
m_animNo = ANIM_CLAM_SIDESNAP;
|
||||||
m_frame = 0;
|
m_frame = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -96,7 +96,7 @@ void CNpcEnemy::processCloseClamSnapAttack( int _frames )
|
||||||
if ( !m_animPlaying )
|
if ( !m_animPlaying )
|
||||||
{
|
{
|
||||||
m_animPlaying = true;
|
m_animPlaying = true;
|
||||||
m_animNo = ANIM_CLAM_CLAMSIDESNAP;
|
m_animNo = ANIM_CLAM_SIDESNAP;
|
||||||
m_frame = 0;
|
m_frame = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,8 @@
|
||||||
#include "game\convo.h"
|
#include "game\convo.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "Gfx\Skel.h"
|
|
||||||
|
#include "Gfx\actor.h"
|
||||||
|
|
||||||
#ifndef __VID_HEADER_
|
#ifndef __VID_HEADER_
|
||||||
#include "system\vid.h"
|
#include "system\vid.h"
|
||||||
|
@ -63,11 +64,6 @@ void CNpcFriend::init()
|
||||||
{
|
{
|
||||||
CNpcThing::init();
|
CNpcThing::init();
|
||||||
|
|
||||||
// sActorHdr *Hdr=m_skel.Load(ACTORS_SPONGEBOB_A3D);
|
|
||||||
// m_skel.Init(Hdr);
|
|
||||||
m_skel.Init(ACTORS_SPONGEBOB_A3D);
|
|
||||||
m_actorTPage = TPLoadTex(ACTORS_ACTOR_SPONGEBOB_TEX);
|
|
||||||
|
|
||||||
Pos.vx = 100;
|
Pos.vx = 100;
|
||||||
Pos.vy = 100;
|
Pos.vy = 100;
|
||||||
|
|
||||||
|
@ -96,10 +92,6 @@ void CNpcFriend::shutdown()
|
||||||
{
|
{
|
||||||
//m_spriteBank->dump(); delete m_spriteBank;
|
//m_spriteBank->dump(); delete m_spriteBank;
|
||||||
|
|
||||||
// temporary
|
|
||||||
//TPFree( m_actorTPage );
|
|
||||||
//CAnimDB::Dump( m_data[m_type].animData );
|
|
||||||
|
|
||||||
CNpcThing::shutdown();
|
CNpcThing::shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -135,11 +127,7 @@ void CNpcFriend::render()
|
||||||
renderPos.vx = ( Pos.vx + m_drawOffset.vx - offset.vx - ( VidGetScrW() >> 1 ) ) * 20;
|
renderPos.vx = ( Pos.vx + m_drawOffset.vx - offset.vx - ( VidGetScrW() >> 1 ) ) * 20;
|
||||||
renderPos.vy = ( Pos.vy + m_drawOffset.vy - offset.vy - ( VidGetScrH() >> 1 ) ) * 20;
|
renderPos.vy = ( Pos.vy + m_drawOffset.vy - offset.vy - ( VidGetScrH() >> 1 ) ) * 20;
|
||||||
|
|
||||||
m_skel.setPos( renderPos );
|
m_actorGfx->Render(renderPos,m_frame,m_animNo,false);
|
||||||
m_skel.setFrame(m_frame);
|
|
||||||
m_skel.setAnimNo(m_animNo);
|
|
||||||
m_skel.Animate(this);
|
|
||||||
m_skel.Render(this);
|
|
||||||
|
|
||||||
/*s32 x,y;
|
/*s32 x,y;
|
||||||
s32 scrnWidth = VidGetScrW();
|
s32 scrnWidth = VidGetScrW();
|
||||||
|
@ -216,12 +204,7 @@ void CNpcEnemy::init()
|
||||||
{
|
{
|
||||||
CEnemyThing::init();
|
CEnemyThing::init();
|
||||||
|
|
||||||
// sActorHdr *Hdr = m_skel.Load( m_data[m_type].skelType );
|
m_actorGfx=CActorPool::GetActor(m_data[m_type].skelType);
|
||||||
// m_skel.Init( Hdr );
|
|
||||||
m_skel.Init(m_data[m_type].skelType);
|
|
||||||
m_actorTPage = TPLoadTex( ACTORS_ACTOR_ENEMY_TEX );
|
|
||||||
|
|
||||||
m_skel.setAng(1024);
|
|
||||||
|
|
||||||
m_animPlaying = true;
|
m_animPlaying = true;
|
||||||
m_animNo = m_data[m_type].initAnim;
|
m_animNo = m_data[m_type].initAnim;
|
||||||
|
@ -545,7 +528,6 @@ void CNpcEnemy::shutdown()
|
||||||
m_positionHistory = NULL;
|
m_positionHistory = NULL;
|
||||||
|
|
||||||
// temporary
|
// temporary
|
||||||
TPFree( m_actorTPage );
|
|
||||||
CEnemyThing::shutdown();
|
CEnemyThing::shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -561,7 +543,7 @@ void CNpcEnemy::think(int _frames)
|
||||||
|
|
||||||
if ( m_animPlaying )
|
if ( m_animPlaying )
|
||||||
{
|
{
|
||||||
int frameCount = m_skel.getFrameCount();
|
int frameCount = m_actorGfx->getFrameCount(m_animNo);
|
||||||
|
|
||||||
if ( frameCount - m_frame > _frames )
|
if ( frameCount - m_frame > _frames )
|
||||||
{
|
{
|
||||||
|
@ -576,12 +558,12 @@ void CNpcEnemy::think(int _frames)
|
||||||
|
|
||||||
if ( m_heading > 1024 && m_heading < 3072 )
|
if ( m_heading > 1024 && m_heading < 3072 )
|
||||||
{
|
{
|
||||||
m_skel.setAng( 3072 );
|
//!! m_actorGfx.setAng( 3072 );
|
||||||
m_reversed = true;
|
m_reversed = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_skel.setAng( 1024 );
|
//!! m_actorGfx.setAng( 1024 );
|
||||||
m_reversed = false;
|
m_reversed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1284,18 +1266,14 @@ void CNpcEnemy::render()
|
||||||
|
|
||||||
if ( m_reversed )
|
if ( m_reversed )
|
||||||
{
|
{
|
||||||
m_skel.setZAng( ( m_heading + 2048 ) & 4095 );
|
//!! m_actorGfx.setZAng( ( m_heading + 2048 ) & 4095 );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_skel.setZAng( m_heading );
|
//!! m_actorGfx.setZAng( m_heading );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_skel.setPos( renderPos );
|
m_actorGfx->Render(renderPos,m_frame,m_animNo,m_reversed);
|
||||||
m_skel.setFrame(m_frame);
|
|
||||||
m_skel.setAnimNo(m_animNo);
|
|
||||||
m_skel.Animate(this);
|
|
||||||
m_skel.Render(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -20,7 +20,8 @@
|
||||||
#include "thing/thing.h"
|
#include "thing/thing.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "Gfx/Skel.h"
|
|
||||||
|
//#include "Gfx/Skel.h"
|
||||||
|
|
||||||
#ifndef __ENEMY_NPCPATH_H__
|
#ifndef __ENEMY_NPCPATH_H__
|
||||||
#include "enemy\npcpath.h"
|
#include "enemy\npcpath.h"
|
||||||
|
@ -101,8 +102,7 @@ protected:
|
||||||
|
|
||||||
int m_frame;
|
int m_frame;
|
||||||
int m_animNo;
|
int m_animNo;
|
||||||
CSkel m_skel;
|
CActorGfx *m_actorGfx;
|
||||||
TPAGE_DESC m_actorTPage;
|
|
||||||
DVECTOR m_drawOffset;
|
DVECTOR m_drawOffset;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -500,8 +500,7 @@ protected:
|
||||||
|
|
||||||
int m_frame;
|
int m_frame;
|
||||||
int m_animNo;
|
int m_animNo;
|
||||||
CSkel m_skel;
|
CActorGfx *m_actorGfx;
|
||||||
TPAGE_DESC m_actorTPage;
|
|
||||||
DVECTOR m_drawOffset;
|
DVECTOR m_drawOffset;
|
||||||
|
|
||||||
virtual void collidedWith(CThing *_thisThing);
|
virtual void collidedWith(CThing *_thisThing);
|
||||||
|
|
|
@ -27,9 +27,9 @@
|
||||||
#include <ACTOR_CLAM_ANIM.h>
|
#include <ACTOR_CLAM_ANIM.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __ANIM_SHARKSUB_HEADER__
|
//#ifndef __ANIM_SHARKSUB_HEADER__
|
||||||
#include <ACTOR_SHARKSUB_ANIM.h>
|
//#include <ACTOR_SHARKSUB_ANIM.h>
|
||||||
#endif
|
//#endif
|
||||||
|
|
||||||
|
|
||||||
CNpcFriend::NPC_FRIEND_DATA CNpcFriend::m_data[NPC_FRIEND_UNIT_TYPE_MAX] =
|
CNpcFriend::NPC_FRIEND_DATA CNpcFriend::m_data[NPC_FRIEND_UNIT_TYPE_MAX] =
|
||||||
|
@ -66,8 +66,8 @@ CNpcFriend::NPC_FRIEND_DATA CNpcFriend::m_data[NPC_FRIEND_UNIT_TYPE_MAX] =
|
||||||
CNpcPlatform::NPC_PLATFORM_DATA CNpcPlatform::m_data[NPC_PLATFORM_TYPE_MAX] =
|
CNpcPlatform::NPC_PLATFORM_DATA CNpcPlatform::m_data[NPC_PLATFORM_TYPE_MAX] =
|
||||||
{
|
{
|
||||||
{ // NPC_LINEAR_PLATFORM
|
{ // NPC_LINEAR_PLATFORM
|
||||||
ACTORS_CLAM_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_CLAMSHUT,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_PLATFORM_MOVEMENT_FIXED_PATH,
|
NPC_PLATFORM_MOVEMENT_FIXED_PATH,
|
||||||
3,
|
3,
|
||||||
//512,
|
//512,
|
||||||
|
@ -79,8 +79,8 @@ CNpcPlatform::NPC_PLATFORM_DATA CNpcPlatform::m_data[NPC_PLATFORM_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_CIRCULAR_PLATFORM
|
{ // NPC_CIRCULAR_PLATFORM
|
||||||
ACTORS_CLAM_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_CLAMSHUT,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_PLATFORM_MOVEMENT_FIXED_CIRCULAR,
|
NPC_PLATFORM_MOVEMENT_FIXED_CIRCULAR,
|
||||||
3,
|
3,
|
||||||
128,
|
128,
|
||||||
|
@ -91,8 +91,8 @@ CNpcPlatform::NPC_PLATFORM_DATA CNpcPlatform::m_data[NPC_PLATFORM_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_BUBBLE_PLATFORM
|
{ // NPC_BUBBLE_PLATFORM
|
||||||
ACTORS_CLAM_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_CLAMSHUT,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_PLATFORM_MOVEMENT_BUBBLE,
|
NPC_PLATFORM_MOVEMENT_BUBBLE,
|
||||||
3,
|
3,
|
||||||
128,
|
128,
|
||||||
|
@ -106,8 +106,8 @@ CNpcPlatform::NPC_PLATFORM_DATA CNpcPlatform::m_data[NPC_PLATFORM_TYPE_MAX] =
|
||||||
CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
{
|
{
|
||||||
{ // NPC_FALLING_ITEM
|
{ // NPC_FALLING_ITEM
|
||||||
ACTORS_CLAM_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_CLAMSHUT,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_INIT_DEFAULT,
|
NPC_INIT_DEFAULT,
|
||||||
NPC_SENSOR_FALLING_ITEM_USER_CLOSE,
|
NPC_SENSOR_FALLING_ITEM_USER_CLOSE,
|
||||||
NPC_MOVEMENT_STATIC,
|
NPC_MOVEMENT_STATIC,
|
||||||
|
@ -123,8 +123,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_FISH_HOOK
|
{ // NPC_FISH_HOOK
|
||||||
ACTORS_CLAM_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_CLAMSHUT,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_INIT_FISH_HOOK,
|
NPC_INIT_FISH_HOOK,
|
||||||
NPC_SENSOR_FISH_HOOK_USER_CLOSE,
|
NPC_SENSOR_FISH_HOOK_USER_CLOSE,
|
||||||
NPC_MOVEMENT_STATIC,
|
NPC_MOVEMENT_STATIC,
|
||||||
|
@ -140,8 +140,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_DUST_DEVIL
|
{ // NPC_DUST_DEVIL
|
||||||
ACTORS_CLAM_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_CLAMSHUT,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_INIT_RETURNING_HAZARD,
|
NPC_INIT_RETURNING_HAZARD,
|
||||||
NPC_SENSOR_NONE,
|
NPC_SENSOR_NONE,
|
||||||
NPC_MOVEMENT_RETURNING_HAZARD,
|
NPC_MOVEMENT_RETURNING_HAZARD,
|
||||||
|
@ -157,8 +157,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_PENDULUM
|
{ // NPC_PENDULUM
|
||||||
ACTORS_CLAM_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_CLAMSHUT,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_INIT_PENDULUM,
|
NPC_INIT_PENDULUM,
|
||||||
NPC_SENSOR_NONE,
|
NPC_SENSOR_NONE,
|
||||||
NPC_MOVEMENT_PENDULUM,
|
NPC_MOVEMENT_PENDULUM,
|
||||||
|
@ -174,8 +174,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_FIREBALL
|
{ // NPC_FIREBALL
|
||||||
ACTORS_CLAM_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_CLAMSHUT,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_INIT_FIREBALL,
|
NPC_INIT_FIREBALL,
|
||||||
NPC_SENSOR_NONE,
|
NPC_SENSOR_NONE,
|
||||||
NPC_MOVEMENT_FIREBALL,
|
NPC_MOVEMENT_FIREBALL,
|
||||||
|
@ -191,8 +191,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_SAW_BLADE
|
{ // NPC_SAW_BLADE
|
||||||
ACTORS_CLAM_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_CLAMSHUT,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_INIT_RETURNING_HAZARD,
|
NPC_INIT_RETURNING_HAZARD,
|
||||||
NPC_SENSOR_NONE,
|
NPC_SENSOR_NONE,
|
||||||
NPC_MOVEMENT_RETURNING_HAZARD,
|
NPC_MOVEMENT_RETURNING_HAZARD,
|
||||||
|
@ -208,8 +208,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_SMALL_JELLYFISH_1
|
{ // NPC_SMALL_JELLYFISH_1
|
||||||
ACTORS_CLAM_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_CLAMSHUT,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_INIT_DEFAULT,
|
NPC_INIT_DEFAULT,
|
||||||
NPC_SENSOR_JELLYFISH_USER_CLOSE,
|
NPC_SENSOR_JELLYFISH_USER_CLOSE,
|
||||||
NPC_MOVEMENT_FIXED_PATH,
|
NPC_MOVEMENT_FIXED_PATH,
|
||||||
|
@ -225,8 +225,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_SMALL_JELLYFISH_2
|
{ // NPC_SMALL_JELLYFISH_2
|
||||||
ACTORS_CLAM_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_CLAMSHUT,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_INIT_DEFAULT,
|
NPC_INIT_DEFAULT,
|
||||||
NPC_SENSOR_JELLYFISH_USER_CLOSE,
|
NPC_SENSOR_JELLYFISH_USER_CLOSE,
|
||||||
NPC_MOVEMENT_FIXED_PATH,
|
NPC_MOVEMENT_FIXED_PATH,
|
||||||
|
@ -242,8 +242,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_ANEMONE_1
|
{ // NPC_ANEMONE_1
|
||||||
ACTORS_CLAM_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_CLAMSHUT,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_INIT_DEFAULT,
|
NPC_INIT_DEFAULT,
|
||||||
NPC_SENSOR_ANEMONE_USER_CLOSE,
|
NPC_SENSOR_ANEMONE_USER_CLOSE,
|
||||||
NPC_MOVEMENT_STATIC,
|
NPC_MOVEMENT_STATIC,
|
||||||
|
@ -259,8 +259,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_ANEMONE_2
|
{ // NPC_ANEMONE_2
|
||||||
ACTORS_CLAM_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_CLAMSHUT,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_INIT_DEFAULT,
|
NPC_INIT_DEFAULT,
|
||||||
NPC_SENSOR_ANEMONE_USER_CLOSE,
|
NPC_SENSOR_ANEMONE_USER_CLOSE,
|
||||||
NPC_MOVEMENT_STATIC,
|
NPC_MOVEMENT_STATIC,
|
||||||
|
@ -276,8 +276,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_ANEMONE_3
|
{ // NPC_ANEMONE_3
|
||||||
ACTORS_CLAM_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_CLAMSHUT,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_INIT_DEFAULT,
|
NPC_INIT_DEFAULT,
|
||||||
NPC_SENSOR_ANEMONE_USER_CLOSE,
|
NPC_SENSOR_ANEMONE_USER_CLOSE,
|
||||||
NPC_MOVEMENT_STATIC,
|
NPC_MOVEMENT_STATIC,
|
||||||
|
@ -293,8 +293,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_SKELETAL_FISH
|
{ // NPC_SKELETAL_FISH
|
||||||
ACTORS_CLAM_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_CLAMSHUT,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_INIT_DEFAULT,
|
NPC_INIT_DEFAULT,
|
||||||
NPC_SENSOR_GENERIC_USER_VISIBLE,
|
NPC_SENSOR_GENERIC_USER_VISIBLE,
|
||||||
NPC_MOVEMENT_FIXED_PATH,
|
NPC_MOVEMENT_FIXED_PATH,
|
||||||
|
@ -310,8 +310,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_CLAM_JUMP
|
{ // NPC_CLAM_JUMP
|
||||||
ACTORS_CLAM_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_CLAMSNAPUP,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_INIT_DEFAULT,
|
NPC_INIT_DEFAULT,
|
||||||
NPC_SENSOR_CLAM_USER_CLOSE,
|
NPC_SENSOR_CLAM_USER_CLOSE,
|
||||||
NPC_MOVEMENT_STATIC,
|
NPC_MOVEMENT_STATIC,
|
||||||
|
@ -327,8 +327,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_CLAM_STATIC
|
{ // NPC_CLAM_STATIC
|
||||||
ACTORS_CLAM_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_CLAMSIDESNAP,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_INIT_DEFAULT,
|
NPC_INIT_DEFAULT,
|
||||||
NPC_SENSOR_CLAM_USER_CLOSE,
|
NPC_SENSOR_CLAM_USER_CLOSE,
|
||||||
NPC_MOVEMENT_STATIC,
|
NPC_MOVEMENT_STATIC,
|
||||||
|
@ -344,8 +344,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_SQUID_DART
|
{ // NPC_SQUID_DART
|
||||||
ACTORS_CLAM_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_CLAMSHUT,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_INIT_DEFAULT,
|
NPC_INIT_DEFAULT,
|
||||||
NPC_SENSOR_NONE,
|
NPC_SENSOR_NONE,
|
||||||
NPC_MOVEMENT_FIXED_PATH,
|
NPC_MOVEMENT_FIXED_PATH,
|
||||||
|
@ -361,8 +361,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_FISH_FOLK
|
{ // NPC_FISH_FOLK
|
||||||
ACTORS_CLAM_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_CLAMSHUT,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_INIT_FISH_FOLK,
|
NPC_INIT_FISH_FOLK,
|
||||||
NPC_SENSOR_NONE,
|
NPC_SENSOR_NONE,
|
||||||
NPC_MOVEMENT_FIXED_PATH_WALK,
|
NPC_MOVEMENT_FIXED_PATH_WALK,
|
||||||
|
@ -378,8 +378,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_PRICKLY_BUG
|
{ // NPC_PRICKLY_BUG
|
||||||
ACTORS_CLAM_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_CLAMSHUT,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_INIT_DEFAULT,
|
NPC_INIT_DEFAULT,
|
||||||
NPC_SENSOR_NONE,
|
NPC_SENSOR_NONE,
|
||||||
NPC_MOVEMENT_FIXED_PATH_WALK,
|
NPC_MOVEMENT_FIXED_PATH_WALK,
|
||||||
|
@ -395,8 +395,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_SEA_SNAKE
|
{ // NPC_SEA_SNAKE
|
||||||
ACTORS_CLAM_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_CLAMSHUT,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_INIT_DEFAULT,
|
NPC_INIT_DEFAULT,
|
||||||
NPC_SENSOR_NONE,
|
NPC_SENSOR_NONE,
|
||||||
NPC_MOVEMENT_FIXED_PATH,
|
NPC_MOVEMENT_FIXED_PATH,
|
||||||
|
@ -412,8 +412,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_PUFFA_FISH
|
{ // NPC_PUFFA_FISH
|
||||||
ACTORS_CLAM_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_CLAMSHUT,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_INIT_DEFAULT,
|
NPC_INIT_DEFAULT,
|
||||||
NPC_SENSOR_NONE,
|
NPC_SENSOR_NONE,
|
||||||
NPC_MOVEMENT_FIXED_PATH,
|
NPC_MOVEMENT_FIXED_PATH,
|
||||||
|
@ -429,8 +429,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_ANGLER_FISH
|
{ // NPC_ANGLER_FISH
|
||||||
ACTORS_CLAM_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_CLAMSHUT,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_INIT_DEFAULT,
|
NPC_INIT_DEFAULT,
|
||||||
NPC_SENSOR_NONE,
|
NPC_SENSOR_NONE,
|
||||||
NPC_MOVEMENT_FIXED_PATH,
|
NPC_MOVEMENT_FIXED_PATH,
|
||||||
|
@ -446,8 +446,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_HERMIT_CRAB
|
{ // NPC_HERMIT_CRAB
|
||||||
ACTORS_CLAM_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_CLAMSHUT,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_INIT_DEFAULT,
|
NPC_INIT_DEFAULT,
|
||||||
NPC_SENSOR_NONE,
|
NPC_SENSOR_NONE,
|
||||||
NPC_MOVEMENT_FIXED_PATH_WALK,
|
NPC_MOVEMENT_FIXED_PATH_WALK,
|
||||||
|
@ -463,8 +463,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_MINE
|
{ // NPC_MINE
|
||||||
ACTORS_CLAM_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_CLAMSHUT,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_INIT_DEFAULT,
|
NPC_INIT_DEFAULT,
|
||||||
NPC_SENSOR_NONE,
|
NPC_SENSOR_NONE,
|
||||||
NPC_MOVEMENT_STATIC,
|
NPC_MOVEMENT_STATIC,
|
||||||
|
@ -480,8 +480,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_BOOGER_MONSTER
|
{ // NPC_BOOGER_MONSTER
|
||||||
ACTORS_CLAM_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_CLAMSHUT,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_INIT_DEFAULT,
|
NPC_INIT_DEFAULT,
|
||||||
NPC_SENSOR_BOOGER_MONSTER_USER_CLOSE,
|
NPC_SENSOR_BOOGER_MONSTER_USER_CLOSE,
|
||||||
NPC_MOVEMENT_STATIC,
|
NPC_MOVEMENT_STATIC,
|
||||||
|
@ -497,8 +497,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_SPIDER_CRAB
|
{ // NPC_SPIDER_CRAB
|
||||||
ACTORS_CLAM_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_CLAMSHUT,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_INIT_DEFAULT,
|
NPC_INIT_DEFAULT,
|
||||||
NPC_SENSOR_SPIDER_CRAB_USER_CLOSE,
|
NPC_SENSOR_SPIDER_CRAB_USER_CLOSE,
|
||||||
NPC_MOVEMENT_FIXED_PATH_WALK,
|
NPC_MOVEMENT_FIXED_PATH_WALK,
|
||||||
|
@ -514,8 +514,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_EYEBALL
|
{ // NPC_EYEBALL
|
||||||
ACTORS_CLAM_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_CLAMSHUT,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_INIT_DEFAULT,
|
NPC_INIT_DEFAULT,
|
||||||
NPC_SENSOR_EYEBALL_USER_CLOSE,
|
NPC_SENSOR_EYEBALL_USER_CLOSE,
|
||||||
NPC_MOVEMENT_STATIC,
|
NPC_MOVEMENT_STATIC,
|
||||||
|
@ -531,8 +531,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_BABY_OCTOPUS
|
{ // NPC_BABY_OCTOPUS
|
||||||
ACTORS_CLAM_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_CLAMSHUT,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_INIT_DEFAULT,
|
NPC_INIT_DEFAULT,
|
||||||
NPC_SENSOR_NONE,
|
NPC_SENSOR_NONE,
|
||||||
NPC_MOVEMENT_FIXED_PATH,
|
NPC_MOVEMENT_FIXED_PATH,
|
||||||
|
@ -548,8 +548,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_ZOMBIE_FISH_FOLK
|
{ // NPC_ZOMBIE_FISH_FOLK
|
||||||
ACTORS_CLAM_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_CLAMSHUT,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_INIT_FISH_FOLK,
|
NPC_INIT_FISH_FOLK,
|
||||||
NPC_SENSOR_NONE,
|
NPC_SENSOR_NONE,
|
||||||
NPC_MOVEMENT_FIXED_PATH_WALK,
|
NPC_MOVEMENT_FIXED_PATH_WALK,
|
||||||
|
@ -565,8 +565,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_NINJA_STARFISH
|
{ // NPC_NINJA_STARFISH
|
||||||
ACTORS_CLAM_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_CLAMSHUT,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_INIT_DEFAULT,
|
NPC_INIT_DEFAULT,
|
||||||
NPC_SENSOR_NINJA_STARFISH_USER_CLOSE,
|
NPC_SENSOR_NINJA_STARFISH_USER_CLOSE,
|
||||||
NPC_MOVEMENT_STATIC,
|
NPC_MOVEMENT_STATIC,
|
||||||
|
@ -582,8 +582,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_GHOST
|
{ // NPC_GHOST
|
||||||
ACTORS_CLAM_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_CLAMSHUT,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_INIT_DEFAULT,
|
NPC_INIT_DEFAULT,
|
||||||
NPC_SENSOR_NONE,
|
NPC_SENSOR_NONE,
|
||||||
NPC_MOVEMENT_FIXED_PATH,
|
NPC_MOVEMENT_FIXED_PATH,
|
||||||
|
@ -599,8 +599,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_GHOST_PIRATE
|
{ // NPC_GHOST_PIRATE
|
||||||
ACTORS_CLAM_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_CLAMSHUT,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_INIT_GHOST_PIRATE,
|
NPC_INIT_GHOST_PIRATE,
|
||||||
NPC_SENSOR_GHOST_PIRATE_USER_CLOSE,
|
NPC_SENSOR_GHOST_PIRATE_USER_CLOSE,
|
||||||
NPC_MOVEMENT_STATIC,
|
NPC_MOVEMENT_STATIC,
|
||||||
|
@ -616,8 +616,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_FLAMING_SKULL
|
{ // NPC_FLAMING_SKULL
|
||||||
ACTORS_CLAM_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_CLAMSHUT,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_INIT_FLAMING_SKULL,
|
NPC_INIT_FLAMING_SKULL,
|
||||||
NPC_SENSOR_FLAMING_SKULL_USER_CLOSE,
|
NPC_SENSOR_FLAMING_SKULL_USER_CLOSE,
|
||||||
NPC_MOVEMENT_STATIC,
|
NPC_MOVEMENT_STATIC,
|
||||||
|
@ -633,8 +633,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_SHARK_MAN
|
{ // NPC_SHARK_MAN
|
||||||
ACTORS_CLAM_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_CLAMSHUT,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_INIT_DEFAULT,
|
NPC_INIT_DEFAULT,
|
||||||
NPC_SENSOR_GENERIC_USER_VISIBLE,
|
NPC_SENSOR_GENERIC_USER_VISIBLE,
|
||||||
NPC_MOVEMENT_FIXED_PATH_WALK,
|
NPC_MOVEMENT_FIXED_PATH_WALK,
|
||||||
|
@ -650,8 +650,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_OIL_BLOB
|
{ // NPC_OIL_BLOB
|
||||||
ACTORS_CLAM_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_CLAMSHUT,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_INIT_DEFAULT,
|
NPC_INIT_DEFAULT,
|
||||||
NPC_SENSOR_OIL_BLOB_USER_CLOSE,
|
NPC_SENSOR_OIL_BLOB_USER_CLOSE,
|
||||||
NPC_MOVEMENT_STATIC,
|
NPC_MOVEMENT_STATIC,
|
||||||
|
@ -667,8 +667,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_SKULL_STOMPER
|
{ // NPC_SKULL_STOMPER
|
||||||
ACTORS_CLAM_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_CLAMSHUT,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_INIT_SKULL_STOMPER,
|
NPC_INIT_SKULL_STOMPER,
|
||||||
NPC_SENSOR_SKULL_STOMPER_USER_CLOSE,
|
NPC_SENSOR_SKULL_STOMPER_USER_CLOSE,
|
||||||
NPC_MOVEMENT_STATIC,
|
NPC_MOVEMENT_STATIC,
|
||||||
|
@ -684,8 +684,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_MOTHER_JELLYFISH
|
{ // NPC_MOTHER_JELLYFISH
|
||||||
ACTORS_CLAM_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_CLAMSHUT,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_INIT_MOTHER_JELLYFISH,
|
NPC_INIT_MOTHER_JELLYFISH,
|
||||||
NPC_SENSOR_NONE,
|
NPC_SENSOR_NONE,
|
||||||
NPC_MOVEMENT_MOTHER_JELLYFISH,
|
NPC_MOVEMENT_MOTHER_JELLYFISH,
|
||||||
|
@ -701,8 +701,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_SUB_SHARK
|
{ // NPC_SUB_SHARK
|
||||||
ACTORS_SHARKSUB_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_SHARKSUB_SHARKSUBSWIM,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_INIT_SUB_SHARK,
|
NPC_INIT_SUB_SHARK,
|
||||||
NPC_SENSOR_NONE,
|
NPC_SENSOR_NONE,
|
||||||
NPC_MOVEMENT_SUB_SHARK,
|
NPC_MOVEMENT_SUB_SHARK,
|
||||||
|
@ -718,8 +718,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_PARASITIC_WORM
|
{ // NPC_PARASITIC_WORM
|
||||||
ACTORS_CLAM_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_CLAMSHUT,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_INIT_PARASITIC_WORM,
|
NPC_INIT_PARASITIC_WORM,
|
||||||
NPC_SENSOR_NONE,
|
NPC_SENSOR_NONE,
|
||||||
NPC_MOVEMENT_PARASITIC_WORM,
|
NPC_MOVEMENT_PARASITIC_WORM,
|
||||||
|
@ -735,8 +735,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_FLYING_DUTCHMAN
|
{ // NPC_FLYING_DUTCHMAN
|
||||||
ACTORS_CLAM_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_CLAMSHUT,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_INIT_FLYING_DUTCHMAN,
|
NPC_INIT_FLYING_DUTCHMAN,
|
||||||
NPC_SENSOR_NONE,
|
NPC_SENSOR_NONE,
|
||||||
NPC_MOVEMENT_FLYING_DUTCHMAN,
|
NPC_MOVEMENT_FLYING_DUTCHMAN,
|
||||||
|
@ -752,8 +752,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_IRON_DOGFISH
|
{ // NPC_IRON_DOGFISH
|
||||||
ACTORS_CLAM_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_CLAMSHUT,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_INIT_IRON_DOGFISH,
|
NPC_INIT_IRON_DOGFISH,
|
||||||
NPC_SENSOR_IRON_DOGFISH_USER_CLOSE,
|
NPC_SENSOR_IRON_DOGFISH_USER_CLOSE,
|
||||||
NPC_MOVEMENT_IRON_DOGFISH,
|
NPC_MOVEMENT_IRON_DOGFISH,
|
||||||
|
@ -769,8 +769,8 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] =
|
||||||
},
|
},
|
||||||
|
|
||||||
{ // NPC_PARASITIC_WORM_SEGMENT
|
{ // NPC_PARASITIC_WORM_SEGMENT
|
||||||
ACTORS_CLAM_A3D,
|
ACTORS_CLAM_SBK,
|
||||||
ANIM_CLAM_CLAMSHUT,
|
ANIM_CLAM_SIDESNAP,
|
||||||
NPC_INIT_PARASITIC_WORM_SEGMENT,
|
NPC_INIT_PARASITIC_WORM_SEGMENT,
|
||||||
NPC_SENSOR_NONE,
|
NPC_SENSOR_NONE,
|
||||||
NPC_MOVEMENT_STATIC,
|
NPC_MOVEMENT_STATIC,
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __ANIM_SHARKSUB_HEADER__
|
#ifndef __ANIM_SHARKSUB_HEADER__
|
||||||
#include <ACTOR_SHARKSUB_ANIM.h>
|
#include <ACTOR_CLAM_ANIM.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -39,13 +39,13 @@ void CNpcEnemy::processSubSharkMovement( int _frames )
|
||||||
if ( playerXDistSqr + playerYDistSqr < 100 && !m_salvoCount )
|
if ( playerXDistSqr + playerYDistSqr < 100 && !m_salvoCount )
|
||||||
{
|
{
|
||||||
m_animPlaying = true;
|
m_animPlaying = true;
|
||||||
m_animNo = ANIM_SHARKSUB_SHARKSUBSWIPE;
|
m_animNo = ANIM_CLAM_SIDESNAP;
|
||||||
m_frame = 0;
|
m_frame = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_animPlaying = true;
|
m_animPlaying = true;
|
||||||
m_animNo = ANIM_SHARKSUB_SHARKSUBSWIM;
|
m_animNo = ANIM_CLAM_SIDESNAP;
|
||||||
m_frame = 0;
|
m_frame = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -156,7 +156,7 @@ void CNpcEnemy::processCloseSubSharkAttack( int _frames )
|
||||||
if ( !m_animPlaying )
|
if ( !m_animPlaying )
|
||||||
{
|
{
|
||||||
m_animPlaying = true;
|
m_animPlaying = true;
|
||||||
m_animNo = ANIM_SHARKSUB_SHARKSUBSPRINTOPEN;
|
m_animNo = ANIM_CLAM_SIDESNAP;
|
||||||
m_frame = 0;
|
m_frame = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,7 +165,7 @@ void CNpcEnemy::processCloseSubSharkAttack( int _frames )
|
||||||
if ( playerXDistSqr < 10000 )
|
if ( playerXDistSqr < 10000 )
|
||||||
{
|
{
|
||||||
m_animPlaying = true;
|
m_animPlaying = true;
|
||||||
m_animNo = ANIM_SHARKSUB_SHARKSUBCHOMP;
|
m_animNo = ANIM_CLAM_SIDESNAP;
|
||||||
m_frame = 0;
|
m_frame = 0;
|
||||||
|
|
||||||
m_state = SUB_SHARK_SWALLOW;
|
m_state = SUB_SHARK_SWALLOW;
|
||||||
|
@ -211,7 +211,7 @@ void CNpcEnemy::processCloseSubSharkAttack( int _frames )
|
||||||
if ( !m_animPlaying )
|
if ( !m_animPlaying )
|
||||||
{
|
{
|
||||||
m_animPlaying = true;
|
m_animPlaying = true;
|
||||||
m_animNo = ANIM_SHARKSUB_SHARKSUBSWIM;
|
m_animNo = ANIM_CLAM_SIDESNAP;
|
||||||
m_frame = 0;
|
m_frame = 0;
|
||||||
m_controlFunc = NPC_CONTROL_MOVEMENT;
|
m_controlFunc = NPC_CONTROL_MOVEMENT;
|
||||||
m_movementTimer = GameState::getOneSecondInFrames() * 8;
|
m_movementTimer = GameState::getOneSecondInFrames() * 8;
|
||||||
|
|
|
@ -68,6 +68,7 @@
|
||||||
#include "sound\sound.h"
|
#include "sound\sound.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "gfx\actor.h"
|
||||||
|
|
||||||
|
|
||||||
//int GX=512/2;
|
//int GX=512/2;
|
||||||
|
@ -95,7 +96,6 @@ int CGameScene::s_levelFinished;
|
||||||
|
|
||||||
CGameScene GameScene;
|
CGameScene GameScene;
|
||||||
|
|
||||||
#include "gfx\actorpool.h"
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void CGameScene::init()
|
void CGameScene::init()
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,9 +5,10 @@
|
||||||
#include "system\global.h"
|
#include "system\global.h"
|
||||||
#include "mem\memory.h"
|
#include "mem\memory.h"
|
||||||
#include "fileio\fileio.h"
|
#include "fileio\fileio.h"
|
||||||
#include "utils\quat.h"
|
|
||||||
#include "gfx\actor.h"
|
#include "gfx\actor.h"
|
||||||
#include "utils\utils.h"
|
#include "utils\utils.h"
|
||||||
|
#include "utils\pak.h"
|
||||||
|
#include "gfx\prim.h"
|
||||||
|
|
||||||
#include <dstructs.h>
|
#include <dstructs.h>
|
||||||
|
|
||||||
|
@ -17,33 +18,100 @@ CActorGfx *CActorPool::ActorList[CActorPool::MAX_ACTORS];
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
CActorGfx::CActorGfx(FileEquate _Filename)
|
void CActorGfx::Init(FileEquate _Filename)
|
||||||
{
|
{
|
||||||
Filename=_Filename;
|
CActorPool::GetActor(Filename);
|
||||||
/* ActorData=(sActorHdr*)CFileIO::loadFile(Filename);
|
|
||||||
|
|
||||||
for (int i=0; i<ActorData->AnimCount; i++)
|
|
||||||
{
|
|
||||||
ActorData->AnimList[i].Move=(s32*) MakePtr(ActorData,(int)ActorData->AnimList[i].Move);
|
|
||||||
ActorData->AnimList[i].Anim=(AnimIdx*) MakePtr(ActorData,(int)ActorData->AnimList[i].Anim);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DAVE_DBGMSG("Nodes %i\n",ActorData->BoneCount);
|
/*****************************************************************************/
|
||||||
DAVE_DBGMSG("Tris %i\n",ActorData->TriCount);
|
CActorGfx::CActorGfx(FileEquate _Filename)
|
||||||
DAVE_DBGMSG("Vtx %i\n",ActorData->VtxCount);
|
{
|
||||||
DAVE_DBGMSG("Anims %i\n",ActorData->AnimCount);
|
int i;
|
||||||
*/
|
Filename=_Filename;
|
||||||
|
SpriteBank=(sSpriteAnimBank*)CFileIO::loadFile(Filename);
|
||||||
|
|
||||||
|
SpriteBank->AnimList=(sSpriteAnim*) MakePtr(SpriteBank,(int)SpriteBank->AnimList);
|
||||||
|
SpriteBank->FrameList=(sSpriteFrame*) MakePtr(SpriteBank,(int)SpriteBank->FrameList);
|
||||||
|
SpriteBank->Palette=(u8*) MakePtr(SpriteBank,(int)SpriteBank->Palette);
|
||||||
|
|
||||||
|
// FixUp AnimList
|
||||||
|
for (i=0; i<SpriteBank->AnimCount; i++)
|
||||||
|
{
|
||||||
|
sSpriteAnim *ThisAnim=&SpriteBank->AnimList[i];
|
||||||
|
ThisAnim->Anim=(u16*) MakePtr(SpriteBank,(int)ThisAnim->Anim);
|
||||||
|
}
|
||||||
|
// FixUp FrameList
|
||||||
|
for (i=0; i<SpriteBank->FrameCount; i++)
|
||||||
|
{
|
||||||
|
sSpriteFrame *ThisFrame=&SpriteBank->FrameList[i];
|
||||||
|
ThisFrame->PAKSpr=(u8*) MakePtr(SpriteBank,(int)ThisFrame->PAKSpr);
|
||||||
|
}
|
||||||
|
|
||||||
|
DAVE_DBGMSG("Anims %i\n",SpriteBank->AnimCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
CActorGfx::~CActorGfx()
|
CActorGfx::~CActorGfx()
|
||||||
{
|
{
|
||||||
MemFree(ActorData);
|
MemFree(SpriteBank);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
int TPP=0;
|
||||||
|
int TPA=0;
|
||||||
|
int TPX=512;
|
||||||
|
int TPY=256;
|
||||||
|
int RR=128;
|
||||||
|
int GG=128;
|
||||||
|
int BB=128;
|
||||||
|
int XX=32;
|
||||||
|
int YY=32;
|
||||||
|
//int PW=16;
|
||||||
void CActorGfx::Render(DVECTOR &Pos,int Anim,int Frame,bool FlipX)
|
void CActorGfx::Render(DVECTOR &Pos,int Anim,int Frame,bool FlipX)
|
||||||
{
|
{
|
||||||
|
sSpriteAnim &ThisAnim=SpriteBank->AnimList[Anim];
|
||||||
|
u16 FrameNo=ThisAnim.Anim[Frame];
|
||||||
|
sSpriteFrame &ThisFrame=SpriteBank->FrameList[FrameNo];
|
||||||
|
POLY_FT4 *Ft4;
|
||||||
|
u8 Buffer[256*256];
|
||||||
|
|
||||||
|
PAK_doUnpak(Buffer,ThisFrame.PAKSpr);
|
||||||
|
// clut
|
||||||
|
RECT Rect;
|
||||||
|
Rect.x=512;
|
||||||
|
Rect.y=511;
|
||||||
|
Rect.w=SpriteBank->ColorCount;
|
||||||
|
Rect.h=1;
|
||||||
|
LoadImage( &Rect, (u32*)SpriteBank->Palette);
|
||||||
|
|
||||||
|
// Gfx
|
||||||
|
Rect.x=512;
|
||||||
|
Rect.y=256;
|
||||||
|
Rect.w=ThisFrame.W/4;
|
||||||
|
Rect.h=ThisFrame.H;
|
||||||
|
LoadImage( &Rect, (u32*)Buffer);
|
||||||
|
|
||||||
|
Ft4=GetPrimFT4();
|
||||||
|
setXYWH(Ft4,Pos.vx-ThisFrame.XOfs,Pos.vy-ThisFrame.YOfs,ThisFrame.W,ThisFrame.H);
|
||||||
|
setUVWH(Ft4,0,0,ThisFrame.W,ThisFrame.H);
|
||||||
|
setRGB0(Ft4,RR,GG,BB);
|
||||||
|
setTPage(Ft4,0,0,TPX,TPY);
|
||||||
|
setClut(Ft4, TPX, 511);
|
||||||
|
AddPrimToList(Ft4,0);
|
||||||
|
|
||||||
|
Ft4=GetPrimFT4();
|
||||||
|
setXYWH(Ft4,Pos.vx-ThisFrame.XOfs,Pos.vy-ThisFrame.YOfs,ThisFrame.W,ThisFrame.H);
|
||||||
|
Ft4->x0-=XX;
|
||||||
|
Ft4->x1-=XX;
|
||||||
|
Ft4->y0+=YY;
|
||||||
|
Ft4->y1+=YY;
|
||||||
|
|
||||||
|
setUVWH(Ft4,0,0,ThisFrame.W,ThisFrame.H);
|
||||||
|
setRGB0(Ft4,0,0,0);
|
||||||
|
setSemiTrans(Ft4,1);
|
||||||
|
setTPage(Ft4,0,0,TPX,TPY);
|
||||||
|
setClut(Ft4, TPX, 511);
|
||||||
|
AddPrimToList(Ft4,0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,7 +166,7 @@ int Idx;
|
||||||
Idx=FindFreeIdx();
|
Idx=FindFreeIdx();
|
||||||
ASSERT(Idx!=-1);
|
ASSERT(Idx!=-1);
|
||||||
|
|
||||||
NewActor=new ("ActorPool") CActorPool(Filename);
|
NewActor=new ("ActorPool") CActorGfx(Filename);
|
||||||
ActorList[Idx]=NewActor;
|
ActorList[Idx]=NewActor;
|
||||||
|
|
||||||
return(NewActor);
|
return(NewActor);
|
||||||
|
@ -109,7 +177,7 @@ int Idx;
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void CActorPool::DumpActor(FileEquate Filename)
|
void CActorPool::DumpActor(FileEquate Filename)
|
||||||
{
|
{
|
||||||
CActorPool *ThisActor;
|
CActorGfx *ThisActor;
|
||||||
int Idx;
|
int Idx;
|
||||||
|
|
||||||
// Is Loaded?
|
// Is Loaded?
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/******************/
|
/*******************/
|
||||||
/*** Actor Bank ***/
|
/*** Actor Stuff ***/
|
||||||
/******************/
|
/*******************/
|
||||||
|
|
||||||
#ifndef __ACTOR_HEADER__
|
#ifndef __ACTOR_HEADER__
|
||||||
#define __ACTOR_HEADER__
|
#define __ACTOR_HEADER__
|
||||||
|
@ -16,30 +16,30 @@
|
||||||
class CActorGfx
|
class CActorGfx
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CActorGfx(){};
|
// CActorGfx(){};
|
||||||
CActorGfx(FileEquate Filename);
|
CActorGfx(FileEquate Filename);
|
||||||
~CActorGfx();
|
virtual ~CActorGfx();
|
||||||
|
|
||||||
|
void Init(FileEquate _Filename);
|
||||||
void Render(DVECTOR &Pos,int Anim,int Frame,bool FlipX);
|
void Render(DVECTOR &Pos,int Anim,int Frame,bool FlipX);
|
||||||
void Dump();
|
void Dump();
|
||||||
|
|
||||||
int getFrameCount() {return(0);}
|
int getFrameCount(int Anim) {return(SpriteBank->AnimList[Anim].FrameCount);}
|
||||||
|
|
||||||
FileEquate GetFilename() {return(Filename);}
|
FileEquate GetFilename() {return(Filename);}
|
||||||
private:
|
private:
|
||||||
FileEquate Filename;
|
FileEquate Filename;
|
||||||
sSpriteAnimBank *ActorData;
|
sSpriteAnimBank *SpriteBank;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
class CActorBank
|
class CActorPool
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
MAX_ACTORS=8,
|
MAX_ACTORS=8,
|
||||||
};
|
};
|
||||||
// virtual ~ActorBank(){};
|
|
||||||
|
|
||||||
static void Init();
|
static void Init();
|
||||||
|
|
||||||
|
|
|
@ -151,11 +151,10 @@ int Time = GameState::getFramesSinceLast();
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
/*
|
||||||
void CMoveTex::Add(sTexInfo &SrcFrame,sTexInfo &DstFrame)
|
void CMoveTex::Add(sTexInfo &SrcFrame,sTexInfo &DstFrame)
|
||||||
{
|
{
|
||||||
int Idx;
|
int Idx;
|
||||||
// ASSERT(SrcFrame.w==DstFrame.w);
|
|
||||||
// ASSERT(SrcFrame.h==DstFrame.h);
|
|
||||||
|
|
||||||
for (Idx=0; Idx<MOVETEX_MAX && MoveTexList[Idx].Src; Idx++);
|
for (Idx=0; Idx<MOVETEX_MAX && MoveTexList[Idx].Src; Idx++);
|
||||||
|
|
||||||
|
@ -166,10 +165,11 @@ CMoveTex &ThisTex=MoveTexList[Idx];
|
||||||
ThisTex.Src=&SrcFrame;
|
ThisTex.Src=&SrcFrame;
|
||||||
ThisTex.Dst=&DstFrame;
|
ThisTex.Dst=&DstFrame;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
void CMoveTex::MoveTex()
|
void CMoveTex::MoveTex()
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
CMoveTex *ThisTex=MoveTexList,*NextTex;
|
CMoveTex *ThisTex=MoveTexList,*NextTex;
|
||||||
|
|
||||||
for (int Idx=0; Idx<MOVETEX_MAX; Idx++)
|
for (int Idx=0; Idx<MOVETEX_MAX; Idx++)
|
||||||
|
@ -180,6 +180,7 @@ CMoveTex *ThisTex=MoveTexList,*NextTex;
|
||||||
MoveImage((RECT*)ThisTex.Src,ThisTex.Dst->x,ThisTex.Dst->y);
|
MoveImage((RECT*)ThisTex.Src,ThisTex.Dst->x,ThisTex.Dst->y);
|
||||||
ThisTex.Src=0;
|
ThisTex.Src=0;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
@ -42,14 +42,14 @@ public:
|
||||||
|
|
||||||
CMoveTex()
|
CMoveTex()
|
||||||
{
|
{
|
||||||
Src=0;
|
// Src=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Add(sTexInfo &SrcFrame,sTexInfo &DstFrame);
|
//static void Add(sTexInfo &SrcFrame,sTexInfo &DstFrame);
|
||||||
static void MoveTex();
|
static void MoveTex();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
sTexInfo *Src,*Dst;
|
// sTexInfo *Src,*Dst;
|
||||||
|
|
||||||
static CMoveTex MoveTexList[];
|
static CMoveTex MoveTexList[];
|
||||||
};
|
};
|
||||||
|
|
|
@ -234,8 +234,7 @@ void CPlayer::init()
|
||||||
// m_onPlatform = false;
|
// m_onPlatform = false;
|
||||||
// m_prevOnPlatform = false;
|
// m_prevOnPlatform = false;
|
||||||
|
|
||||||
m_skel.Init(ACTORS_SPONGEBOB_A3D);
|
m_actorGfx=CActorPool::GetActor(ACTORS_SPONGEBOB_SBK);
|
||||||
TPLoadTex(ACTORS_ACTOR_SPONGEBOB_TEX);
|
|
||||||
|
|
||||||
for(int i=0;i<NUM_PLAYERMODES;i++)
|
for(int i=0;i<NUM_PLAYERMODES;i++)
|
||||||
{
|
{
|
||||||
|
@ -259,8 +258,8 @@ m_animFrame=0;
|
||||||
|
|
||||||
s_screenPos=128;
|
s_screenPos=128;
|
||||||
|
|
||||||
m_skel.setAng(512);
|
//!! m_actorGfx.setAng(512);
|
||||||
//m_skel.setAngInc(678);
|
//m_actorGfx.setAngInc(678);
|
||||||
|
|
||||||
setCollisionSize(25,50);
|
setCollisionSize(25,50);
|
||||||
setCollisionCentreOffset(0,-25);
|
setCollisionCentreOffset(0,-25);
|
||||||
|
@ -348,11 +347,6 @@ else if(Pos.vy>m_mapEdge.vy-64)Pos.vy=m_mapEdge.vy-64;
|
||||||
|
|
||||||
// Look around
|
// Look around
|
||||||
int pad=getPadInputHeld();
|
int pad=getPadInputHeld();
|
||||||
if(PadGetDown(0)&PAD_CIRCLE)
|
|
||||||
{
|
|
||||||
m_skel.blink();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Camera scroll..
|
// Camera scroll..
|
||||||
if(m_cameraScrollDir==-1)
|
if(m_cameraScrollDir==-1)
|
||||||
|
@ -454,33 +448,24 @@ m_fontBank->print(40,40,posBuf);
|
||||||
// Render
|
// Render
|
||||||
if(m_invincibleFrameCount==0||m_invincibleFrameCount&2)
|
if(m_invincibleFrameCount==0||m_invincibleFrameCount&2)
|
||||||
{
|
{
|
||||||
#ifdef __USER_paul__
|
|
||||||
if(mouth!=-1)
|
|
||||||
{
|
|
||||||
m_skel.setMouthTex(mouth);
|
|
||||||
mouth=-1;
|
|
||||||
}
|
|
||||||
if(eyes!=-1)
|
|
||||||
{
|
|
||||||
m_skel.setEyeTex(eyes);
|
|
||||||
eyes=-1;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//int xval=(255-(MAP2D_BLOCKSTEPSIZE*(-m_cameraScrollPos.vx>>8)));
|
//int xval=(255-(MAP2D_BLOCKSTEPSIZE*(-m_cameraScrollPos.vx>>8)));
|
||||||
//DrawLine(xval-7,0,xval-7,255,0,128,255,0);
|
//DrawLine(xval-7,0,xval-7,255,0,128,255,0);
|
||||||
//DrawLine(xval+7,0,xval+7,255,0,128,255,0);
|
//DrawLine(xval+7,0,xval+7,255,0,128,255,0);
|
||||||
|
|
||||||
SetGeomOffset(SCREEN_GEOM_CENTRE_X+m_playerScreenGeomPos.vx,SCREEN_GEOM_CENTRE_Y+m_playerScreenGeomPos.vy);
|
//!! SetGeomOffset(SCREEN_GEOM_CENTRE_X+m_playerScreenGeomPos.vx,SCREEN_GEOM_CENTRE_Y+m_playerScreenGeomPos.vy);
|
||||||
if(panim!=-1)
|
// if(panim!=-1)
|
||||||
m_skel.setAnimNo(panim);
|
// m_actorGfx.setAnimNo(panim);
|
||||||
else
|
// else
|
||||||
m_skel.setAnimNo(m_animNo);
|
// m_actorGfx.setAnimNo(m_animNo);
|
||||||
m_skel.setFrame(m_animFrame);
|
//!! m_actorGfx.setFrame(m_animFrame);
|
||||||
m_skel.Animate(this);
|
//!! m_actorGfx.Animate(this);
|
||||||
m_skel.Render(this);
|
//!! m_actorGfx.Render(this);
|
||||||
|
//!! m_currentPlayerModeClass->render();
|
||||||
|
//!! SetGeomOffset(SCREEN_GEOM_CENTRE_X,SCREEN_GEOM_CENTRE_Y);
|
||||||
|
DVECTOR Pos={256,128};
|
||||||
|
m_actorGfx->Render(Pos,m_animNo,m_animFrame,0);
|
||||||
m_currentPlayerModeClass->render();
|
m_currentPlayerModeClass->render();
|
||||||
SetGeomOffset(SCREEN_GEOM_CENTRE_X,SCREEN_GEOM_CENTRE_Y);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -634,7 +619,7 @@ void CPlayer::setFacing(int _facing)
|
||||||
if(m_facing!=_facing)
|
if(m_facing!=_facing)
|
||||||
{
|
{
|
||||||
m_facing=_facing;
|
m_facing=_facing;
|
||||||
m_skel.setDir(_facing);
|
//!! m_actorGfx.setDir(_facing);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -687,7 +672,7 @@ void CPlayer::setAnimFrame(int _animFrame)
|
||||||
}
|
}
|
||||||
int CPlayer::getAnimFrameCount()
|
int CPlayer::getAnimFrameCount()
|
||||||
{
|
{
|
||||||
return m_skel.getFrameCount(m_animNo);
|
return m_actorGfx->getFrameCount(m_animNo);
|
||||||
}
|
}
|
||||||
int CPlayer::getAnimNo()
|
int CPlayer::getAnimNo()
|
||||||
{
|
{
|
||||||
|
|
|
@ -22,9 +22,8 @@
|
||||||
#include "thing/thing.h"
|
#include "thing/thing.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __GFX_SKELSPNG_H__
|
#include "gfx/actor.h"
|
||||||
#include "gfx/skelspng.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef __DATA_STRUCTS_HEADER__
|
#ifndef __DATA_STRUCTS_HEADER__
|
||||||
#include <dstructs.h>
|
#include <dstructs.h>
|
||||||
|
@ -189,7 +188,7 @@ private:
|
||||||
static const AnimSfx s_animSfx[];
|
static const AnimSfx s_animSfx[];
|
||||||
int m_animFrame;
|
int m_animFrame;
|
||||||
int m_animNo;
|
int m_animNo;
|
||||||
CSkelSpongeBob m_skel;
|
CActorGfx *m_actorGfx;
|
||||||
|
|
||||||
DVECTOR m_playerScreenGeomPos;
|
DVECTOR m_playerScreenGeomPos;
|
||||||
DVECTOR m_cameraPos;
|
DVECTOR m_cameraPos;
|
||||||
|
|
|
@ -123,7 +123,8 @@ void CPlayerModeBubbleMixture::think()
|
||||||
// Blowing?
|
// Blowing?
|
||||||
if(m_blowing)
|
if(m_blowing)
|
||||||
{
|
{
|
||||||
m_player->setAnimNo(ANIM_SPONGEBOB_KARATE);
|
//!! m_player->setAnimNo(ANIM_SPONGEBOB_KARATE);
|
||||||
|
m_player->setAnimNo(ANIM_SPONGEBOB_FIRE);
|
||||||
m_player->setAnimFrame(m_blowFrame);
|
m_player->setAnimFrame(m_blowFrame);
|
||||||
m_blowFrame++;
|
m_blowFrame++;
|
||||||
if(m_blowFrame>=m_player->getAnimFrameCount())
|
if(m_blowFrame>=m_player->getAnimFrameCount())
|
||||||
|
|
|
@ -84,7 +84,8 @@ void CPlayerModeChop::think()
|
||||||
// Chopping?
|
// Chopping?
|
||||||
if(m_chopping)
|
if(m_chopping)
|
||||||
{
|
{
|
||||||
m_player->setAnimNo(ANIM_SPONGEBOB_KARATE);
|
//!! m_player->setAnimNo(ANIM_SPONGEBOB_KARATE);
|
||||||
|
m_player->setAnimNo(ANIM_SPONGEBOB_FIRE);
|
||||||
m_player->setAnimFrame(m_chopFrame);
|
m_player->setAnimFrame(m_chopFrame);
|
||||||
m_chopFrame++;
|
m_chopFrame++;
|
||||||
if(m_chopFrame>=m_player->getAnimFrameCount())
|
if(m_chopFrame>=m_player->getAnimFrameCount())
|
||||||
|
|
|
@ -103,7 +103,8 @@ void CPlayerModeNet::think()
|
||||||
// Netting?
|
// Netting?
|
||||||
if(m_netting)
|
if(m_netting)
|
||||||
{
|
{
|
||||||
m_player->setAnimNo(ANIM_SPONGEBOB_KARATE);
|
//!!! m_player->setAnimNo(ANIM_SPONGEBOB_KARATE);
|
||||||
|
m_player->setAnimNo(ANIM_SPONGEBOB_FIRE);
|
||||||
m_player->setAnimFrame(m_netFrame);
|
m_player->setAnimFrame(m_netFrame);
|
||||||
m_netFrame++;
|
m_netFrame++;
|
||||||
if(m_netFrame>=m_player->getAnimFrameCount())
|
if(m_netFrame>=m_player->getAnimFrameCount())
|
||||||
|
|
|
@ -62,7 +62,8 @@
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
void CPlayerStateFall::enter(CPlayerModeBase *_playerMode)
|
void CPlayerStateFall::enter(CPlayerModeBase *_playerMode)
|
||||||
{
|
{
|
||||||
_playerMode->setAnimNo(ANIM_SPONGEBOB_HOVER);
|
// _playerMode->setAnimNo(ANIM_SPONGEBOB_HOVER);
|
||||||
|
_playerMode->setAnimNo(ANIM_SPONGEBOB_FIRE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -257,12 +257,14 @@ void CPlayerStateIdle::setNextIdleAnim(CPlayerModeBase *_playerMode)
|
||||||
static IdleAnims s_unarmedIdleAnims[]=
|
static IdleAnims s_unarmedIdleAnims[]=
|
||||||
{
|
{
|
||||||
// start frame loop frame end frame loop count
|
// start frame loop frame end frame loop count
|
||||||
{ -1, ANIM_SPONGEBOB_IDLEBREATHE, -1, 4 }, // default
|
//!! { -1, ANIM_SPONGEBOB_IDLEBREATHE, -1, 4 }, // default
|
||||||
{ -1, ANIM_SPONGEBOB_IDLEBREATHE, -1, 10 },
|
//!! { -1, ANIM_SPONGEBOB_IDLEBREATHE, -1, 10 },
|
||||||
{ ANIM_SPONGEBOB_FACEFRONT, ANIM_SPONGEBOB_IDLEHOOLA, ANIM_SPONGEBOB_FACEBACK, 5 },
|
//!! { ANIM_SPONGEBOB_FACEFRONT, ANIM_SPONGEBOB_IDLEHOOLA, ANIM_SPONGEBOB_FACEBACK, 5 },
|
||||||
{ ANIM_SPONGEBOB_FACEFRONT, ANIM_SPONGEBOB_IDLEWIGGLEARM, ANIM_SPONGEBOB_FACEBACK, 5 },
|
//!! { ANIM_SPONGEBOB_FACEFRONT, ANIM_SPONGEBOB_IDLEWIGGLEARM, ANIM_SPONGEBOB_FACEBACK, 5 },
|
||||||
{ -1, ANIM_SPONGEBOB_IDLELOOK, -1, 1 },
|
//!! { -1, ANIM_SPONGEBOB_IDLELOOK, -1, 1 },
|
||||||
{ -1, ANIM_SPONGEBOB_IDLEWIND, -1, 1 },
|
//!! { -1, ANIM_SPONGEBOB_IDLEWIND, -1, 1 },
|
||||||
|
{ -1, ANIM_SPONGEBOB_IDLEHOOLA, -1, 4 }, // default
|
||||||
|
|
||||||
};
|
};
|
||||||
static int s_numUnarmedIdleAnims=sizeof(s_unarmedIdleAnims)/sizeof(IdleAnims);
|
static int s_numUnarmedIdleAnims=sizeof(s_unarmedIdleAnims)/sizeof(IdleAnims);
|
||||||
IdleAnims *CPlayerStateUnarmedIdle::getIdleAnimsDb(int _animNo)
|
IdleAnims *CPlayerStateUnarmedIdle::getIdleAnimsDb(int _animNo)
|
||||||
|
@ -285,9 +287,10 @@ int CPlayerStateUnarmedIdle::getNumIdleAnims()
|
||||||
static IdleAnims s_coralBlowerIdleAnims[]=
|
static IdleAnims s_coralBlowerIdleAnims[]=
|
||||||
{
|
{
|
||||||
// start frame loop frame end frame loop count
|
// start frame loop frame end frame loop count
|
||||||
{ -1, ANIM_SPONGEBOB_IDLEBREATHE, -1, 4 }, // default
|
//!! { -1, ANIM_SPONGEBOB_IDLEBREATHE, -1, 4 }, // default
|
||||||
{ -1, ANIM_SPONGEBOB_IDLEBREATHE, -1, 10 },
|
//!! { -1, ANIM_SPONGEBOB_IDLEBREATHE, -1, 10 },
|
||||||
{ -1, ANIM_SPONGEBOB_IDLELOOK, -1, 1 },
|
//!! { -1, ANIM_SPONGEBOB_IDLELOOK, -1, 1 },
|
||||||
|
{ -1, ANIM_SPONGEBOB_IDLEHOOLA, -1, 1 },
|
||||||
};
|
};
|
||||||
static int s_numCoralBlowerIdleAnims=sizeof(s_coralBlowerIdleAnims)/sizeof(IdleAnims);
|
static int s_numCoralBlowerIdleAnims=sizeof(s_coralBlowerIdleAnims)/sizeof(IdleAnims);
|
||||||
IdleAnims *CPlayerStateCoralBlowerIdle::getIdleAnimsDb(int _animNo)
|
IdleAnims *CPlayerStateCoralBlowerIdle::getIdleAnimsDb(int _animNo)
|
||||||
|
|
|
@ -67,7 +67,8 @@
|
||||||
---------------------------------------------------------------------- */
|
---------------------------------------------------------------------- */
|
||||||
void CPlayerStateJump::enter(CPlayerModeBase *_playerMode)
|
void CPlayerStateJump::enter(CPlayerModeBase *_playerMode)
|
||||||
{
|
{
|
||||||
_playerMode->setAnimNo(ANIM_SPONGEBOB_HOVER);
|
//!! _playerMode->setAnimNo(ANIM_SPONGEBOB_HOVER);
|
||||||
|
_playerMode->setAnimNo(ANIM_SPONGEBOB_FIRE);
|
||||||
m_jumpFrames=0;
|
m_jumpFrames=0;
|
||||||
|
|
||||||
_playerMode->jump();
|
_playerMode->jump();
|
||||||
|
|
|
@ -71,7 +71,8 @@ void CPlayerStateRun::enter(CPlayerModeBase *_playerMode)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_playerMode->setAnimNo(ANIM_SPONGEBOB_RUNSTART);
|
//!! _playerMode->setAnimNo(ANIM_SPONGEBOB_RUNSTART);
|
||||||
|
_playerMode->setAnimNo(ANIM_SPONGEBOB_FIRE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(controlHeld&PI_LEFT)
|
if(controlHeld&PI_LEFT)
|
||||||
|
@ -126,7 +127,8 @@ void CPlayerStateRun::think(CPlayerModeBase *_playerMode)
|
||||||
_playerMode->setState(STATE_IDLE);
|
_playerMode->setState(STATE_IDLE);
|
||||||
if(m_numberOfTimeAnimHasLooped>=4)
|
if(m_numberOfTimeAnimHasLooped>=4)
|
||||||
{
|
{
|
||||||
_playerMode->setAnimNo(ANIM_SPONGEBOB_RUNSTOP);
|
//!! _playerMode->setAnimNo(ANIM_SPONGEBOB_RUNSTOP);
|
||||||
|
_playerMode->setAnimNo(ANIM_SPONGEBOB_FIRE);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,8 +18,6 @@
|
||||||
#include "thing/thing.h"
|
#include "thing/thing.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "Gfx/Skel.h"
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
class CProjectile : public CEnemyProjectileThing
|
class CProjectile : public CEnemyProjectileThing
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include "gfx\prim.h"
|
#include "gfx\prim.h"
|
||||||
#include "gfx\tpage.h"
|
#include "gfx\tpage.h"
|
||||||
#include "utils\utils.h"
|
#include "utils\utils.h"
|
||||||
#include "gfx\actorpool.h"
|
#include "gfx\actor.h"
|
||||||
|
|
||||||
#include "system\gp.h"
|
#include "system\gp.h"
|
||||||
|
|
||||||
|
@ -117,9 +117,7 @@ void InitSystem() // reordered to reduce black screen (hope all is well
|
||||||
|
|
||||||
CBubicleFactory::init();
|
CBubicleFactory::init();
|
||||||
|
|
||||||
CActorPool::AddActor(ACTORS_SPONGEBOB_A3D);
|
CActorPool::AddActor(ACTORS_SPONGEBOB_SBK);
|
||||||
// CAnimDB::Init();
|
|
||||||
// CAnimDB::Load(ACTORS_SPONGEBOB_ABK);
|
|
||||||
|
|
||||||
#if defined(__DEBUG_MEM__)
|
#if defined(__DEBUG_MEM__)
|
||||||
DebugMemFontInit();
|
DebugMemFontInit();
|
||||||
|
|
|
@ -1,33 +1,7 @@
|
||||||
/*=========================================================================
|
#include "system\global.h"
|
||||||
|
|
||||||
PAK.CPP
|
|
||||||
|
|
||||||
Author: Gary Liddon @ Climax (from work by Nick Pelling && Carl Muller)
|
|
||||||
Created:
|
|
||||||
Project: Diablo PSX
|
|
||||||
Purpose: PAK decompress \ compress code
|
|
||||||
|
|
||||||
Copyright (c) 1997 Climax Development Ltd
|
|
||||||
|
|
||||||
===========================================================================*/
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
|
||||||
Includes
|
|
||||||
-------- */
|
|
||||||
|
|
||||||
/* Std Lib
|
|
||||||
------- */
|
|
||||||
|
|
||||||
/* Glib
|
|
||||||
---- */
|
|
||||||
|
|
||||||
/* Local
|
|
||||||
----- */
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "pak.h"
|
#include "utils\pak.h"
|
||||||
|
|
||||||
/* Graphics
|
|
||||||
-------- */
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
/*----------------------------------------------------------------------
|
||||||
Tyepdefs && Defines
|
Tyepdefs && Defines
|
||||||
|
@ -44,7 +18,7 @@
|
||||||
struct Block
|
struct Block
|
||||||
{
|
{
|
||||||
int data[128];
|
int data[128];
|
||||||
BOOL blockrep;
|
bool blockrep;
|
||||||
int blocksize;
|
int blocksize;
|
||||||
int blockoffset;
|
int blockoffset;
|
||||||
|
|
||||||
|
@ -115,7 +89,7 @@ void Block::writeBlock(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get ready for next block
|
// Get ready for next block
|
||||||
blockrep = FALSE;
|
blockrep = false;
|
||||||
blockoffset = 0;
|
blockoffset = 0;
|
||||||
blocksize = -1;
|
blocksize = -1;
|
||||||
}
|
}
|
||||||
|
@ -158,7 +132,7 @@ int lowLevelPak(u8 * Dest,u8 const * buffer,int insize,Block & theblock)
|
||||||
|
|
||||||
theblock.Dest=Dest;
|
theblock.Dest=Dest;
|
||||||
theblock.outsize=0;
|
theblock.outsize=0;
|
||||||
theblock.blockrep=FALSE;
|
theblock.blockrep=false;
|
||||||
|
|
||||||
BACKDIST = -128;
|
BACKDIST = -128;
|
||||||
FORWARDDIST = 255;
|
FORWARDDIST = 255;
|
||||||
|
@ -244,7 +218,7 @@ int lowLevelPak(u8 * Dest,u8 const * buffer,int insize,Block & theblock)
|
||||||
{
|
{
|
||||||
/* We have found a match */
|
/* We have found a match */
|
||||||
theblock.writeBlock();
|
theblock.writeBlock();
|
||||||
theblock.blockrep = TRUE;
|
theblock.blockrep = true;
|
||||||
theblock.blocksize = bestlength;
|
theblock.blocksize = bestlength;
|
||||||
theblock.blockoffset = bestoffset;
|
theblock.blockoffset = bestoffset;
|
||||||
inpos += bestlength;
|
inpos += bestlength;
|
||||||
|
@ -257,7 +231,7 @@ int lowLevelPak(u8 * Dest,u8 const * buffer,int insize,Block & theblock)
|
||||||
|
|
||||||
/* Terminate file */
|
/* Terminate file */
|
||||||
|
|
||||||
theblock.blockrep = TRUE;
|
theblock.blockrep = true;
|
||||||
theblock.blocksize = 0;
|
theblock.blocksize = 0;
|
||||||
theblock.blockoffset = 0;
|
theblock.blockoffset = 0;
|
||||||
theblock.writeBlock();
|
theblock.writeBlock();
|
||||||
|
|
|
@ -1,61 +1,12 @@
|
||||||
/*=========================================================================
|
|
||||||
|
|
||||||
PAK.H
|
|
||||||
|
|
||||||
Author: Carl Muller (algorithm Nick Pelling && Carl Muller)
|
|
||||||
Created:
|
|
||||||
Project:
|
|
||||||
Purpose:
|
|
||||||
|
|
||||||
Copyright (c) 1997 Climax Development Ltd
|
|
||||||
|
|
||||||
===========================================================================*/
|
|
||||||
|
|
||||||
#ifndef __PAK_PAK_H__
|
#ifndef __PAK_PAK_H__
|
||||||
#define __PAK_PAK_H__
|
#define __PAK_PAK_H__
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
|
||||||
Includes
|
|
||||||
-------- */
|
|
||||||
|
|
||||||
/* Std Lib
|
|
||||||
------- */
|
|
||||||
|
|
||||||
/* Glib
|
|
||||||
---- */
|
|
||||||
#include <gtypes.h>
|
|
||||||
|
|
||||||
/* Local
|
|
||||||
----- */
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
|
||||||
Tyepdefs && Defines
|
|
||||||
------------------- */
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
|
||||||
Structure defintions
|
|
||||||
-------------------- */
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------------
|
|
||||||
Globals
|
|
||||||
------- */
|
|
||||||
|
|
||||||
/* Vars
|
|
||||||
---- */
|
|
||||||
|
|
||||||
/* Data
|
|
||||||
---- */
|
|
||||||
|
|
||||||
/* Functions
|
|
||||||
--------- */
|
|
||||||
int PAK_doPak(u8 * Dest,u8 const * source,int insize);
|
int PAK_doPak(u8 * Dest,u8 const * source,int insize);
|
||||||
int PAK_doUnpak(u8 * Dest,u8 const * Source);
|
int PAK_doUnpak(u8 * Dest,u8 const * Source);
|
||||||
int PAK_findPakSize(u8 const * souce,int insize);
|
int PAK_findPakSize(u8 const * souce,int insize);
|
||||||
int PAK_getLastAmountOfDataRead(void);
|
int PAK_getLastAmountOfDataRead(void);
|
||||||
|
|
||||||
/*---------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
#endif /* __PAK_PAK_H__ */
|
|
||||||
|
|
||||||
/*===========================================================================
|
#endif
|
||||||
end */
|
|
||||||
|
|
|
@ -580,6 +580,7 @@ s32 Dpx, Dpy, Dpz;
|
||||||
return (Dpx + Dpy + Dpz);
|
return (Dpx + Dpy + Dpz);
|
||||||
}
|
}
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
/*
|
||||||
inline void QuatSlerp(sQuat *s, sQuat *d, int t, sQuat *o)
|
inline void QuatSlerp(sQuat *s, sQuat *d, int t, sQuat *o)
|
||||||
{
|
{
|
||||||
s32 xx, yy, zz, ww;
|
s32 xx, yy, zz, ww;
|
||||||
|
@ -627,8 +628,9 @@ sQuat to;
|
||||||
gte_LoadAverageShort12(s, &to, c0, c1, o);
|
gte_LoadAverageShort12(s, &to, c0, c1, o);
|
||||||
o->vw = ((c0 * s->vw) + (c1 * to.vw)) >> 12;
|
o->vw = ((c0 * s->vw) + (c1 * to.vw)) >> 12;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
/*
|
||||||
static const s32 DeltaErr = 1000;
|
static const s32 DeltaErr = 1000;
|
||||||
inline void NormalizeQuaternion(sQuat *o)
|
inline void NormalizeQuaternion(sQuat *o)
|
||||||
{
|
{
|
||||||
|
@ -646,5 +648,5 @@ s32 t = (u32)((s32)o->vx*o->vx+(s32)o->vy*o->vy+(s32)o->vz*o->vz+(s32)o->vw*o->v
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
#endif
|
#endif
|
BIN
tools/Data/bin/MkActor.exe
Normal file
BIN
tools/Data/bin/MkActor.exe
Normal file
Binary file not shown.
Binary file not shown.
65
tools/Data/bin/MkLevel.ini
Normal file
65
tools/Data/bin/MkLevel.ini
Normal file
|
@ -0,0 +1,65 @@
|
||||||
|
# Thing definitions
|
||||||
|
# Names must be exactly the same as the group names from the map editor scripts
|
||||||
|
|
||||||
|
[TYPE]
|
||||||
|
# Player
|
||||||
|
SpongeBob=0
|
||||||
|
|
||||||
|
# NPC
|
||||||
|
BarnacleBoy=1
|
||||||
|
Gary=2
|
||||||
|
Krusty=3
|
||||||
|
MermaidMan=4
|
||||||
|
Patrick=5
|
||||||
|
Sandy=6
|
||||||
|
Squidward=7
|
||||||
|
Plankton=8
|
||||||
|
|
||||||
|
# Enemies
|
||||||
|
SmallJellyfish-Level1=10
|
||||||
|
SmallJellyfish-Level2=11
|
||||||
|
Motherjellyfish=12
|
||||||
|
Anenome-Level1=13
|
||||||
|
Anenome-Level2=14
|
||||||
|
Anenome-Level3=15
|
||||||
|
BabyOctopus=16
|
||||||
|
Ballblob=17
|
||||||
|
Boogermonster=18
|
||||||
|
Caterpillar=19
|
||||||
|
Clam-Level1=20
|
||||||
|
Clam-Level2=21
|
||||||
|
Eyeball=22
|
||||||
|
Flamingskull=23
|
||||||
|
FlyingDutchman=24
|
||||||
|
Ghost=25
|
||||||
|
GiantWorm=26
|
||||||
|
HermitCrab=27
|
||||||
|
IronDogFish=28
|
||||||
|
PuffaFish=29
|
||||||
|
SeaSnake=30
|
||||||
|
Sharkman=31
|
||||||
|
SharkSub=32
|
||||||
|
Skeletalfish=33
|
||||||
|
SpiderCrab=34
|
||||||
|
Squiddart=35
|
||||||
|
Stomper=36
|
||||||
|
DustDevil=37
|
||||||
|
|
||||||
|
# Items
|
||||||
|
Balloon=0
|
||||||
|
BubbleMixture=1
|
||||||
|
Glasses=2
|
||||||
|
Health25=3
|
||||||
|
Health50=4
|
||||||
|
Health100=5
|
||||||
|
Helmet=6
|
||||||
|
JellyAmmo=7
|
||||||
|
Pants=8
|
||||||
|
Shoe=9
|
||||||
|
Spatula=10
|
||||||
|
Teeth=11
|
||||||
|
|
||||||
|
# Platforms
|
||||||
|
Boots=0
|
||||||
|
Train=1
|
||||||
|
Higher=2
|
|
@ -33,50 +33,10 @@ enum PSX_DATA_ENUM
|
||||||
LAYER_SHADE_RGB_MAX=4,
|
LAYER_SHADE_RGB_MAX=4,
|
||||||
};
|
};
|
||||||
|
|
||||||
//***************************************************************************
|
|
||||||
// biped bone IDs
|
|
||||||
/*
|
|
||||||
enum BONE_NAME
|
|
||||||
{
|
|
||||||
BIP0,
|
|
||||||
BIP01_PELVI,
|
|
||||||
BIP01_SPIN,
|
|
||||||
BIP01_SPINE,
|
|
||||||
BIP01_NEC,
|
|
||||||
BIP01_HEA,
|
|
||||||
BIP01_L_CLAVICL,
|
|
||||||
BIP01_L_UPPERAR,
|
|
||||||
BIP01_L_FOREAR,
|
|
||||||
BIP01_L_HAN,
|
|
||||||
BIP01_R_CLAVICL,
|
|
||||||
BIP01_R_UPPERAR,
|
|
||||||
BIP01_R_FOREAR,
|
|
||||||
BIP01_R_HAN,
|
|
||||||
BIP01_L_THIG,
|
|
||||||
BIP01_L_CAL,
|
|
||||||
BIP01_L_FOO,
|
|
||||||
BIP01_L_TOE,
|
|
||||||
BIP01_R_THIG,
|
|
||||||
BIP01_R_CAL,
|
|
||||||
BIP01_R_FOO,
|
|
||||||
BIP01_R_TOE0,
|
|
||||||
MAX_BONE
|
|
||||||
};
|
|
||||||
*/
|
|
||||||
|
|
||||||
//***************************************************************************
|
//***************************************************************************
|
||||||
//*** Base Types ************************************************************
|
//*** Base Types ************************************************************
|
||||||
//***************************************************************************
|
//***************************************************************************
|
||||||
#ifndef sQuat
|
|
||||||
struct sQuat
|
|
||||||
{
|
|
||||||
s16 vx,vy,vz,vw;
|
|
||||||
#ifdef WIN32
|
|
||||||
bool operator==(sQuat const &v1) {return((vx==v1.vx) && (vy==v1.vy) && (vz==v1.vz) && (vw==v1.vw));}
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct sShortXYZ
|
struct sShortXYZ
|
||||||
{
|
{
|
||||||
s16 vx,vy,vz;
|
s16 vx,vy,vz;
|
||||||
|
@ -114,37 +74,6 @@ struct sMat
|
||||||
// s32 DblFlag;
|
// s32 DblFlag;
|
||||||
};
|
};
|
||||||
|
|
||||||
//***************************************************************************
|
|
||||||
struct sTexInfo // Basically same as PSX RECT
|
|
||||||
{
|
|
||||||
s16 x, y, w, h;
|
|
||||||
};
|
|
||||||
|
|
||||||
//***************************************************************************
|
|
||||||
struct sWeight
|
|
||||||
{
|
|
||||||
s16 vx,vy,vz,VtxNo; // 8
|
|
||||||
};
|
|
||||||
|
|
||||||
//***************************************************************************
|
|
||||||
struct sBone
|
|
||||||
{
|
|
||||||
sVtx BoneSize; // 8
|
|
||||||
s16 Parent; // 2
|
|
||||||
s16 TriStart; // 2
|
|
||||||
s16 TriCount; // 2
|
|
||||||
s16 VtxCount; // 2
|
|
||||||
}; // 16
|
|
||||||
/*
|
|
||||||
struct sBone
|
|
||||||
{
|
|
||||||
sVtx BoneSize; // 8
|
|
||||||
s16 Parent,Idx; // 4
|
|
||||||
s32 WeightCount; // 4
|
|
||||||
sWeight *WeightList; // 4
|
|
||||||
}; // 20
|
|
||||||
*/
|
|
||||||
|
|
||||||
//***************************************************************************
|
//***************************************************************************
|
||||||
//*** Poly Types ************************************************************
|
//*** Poly Types ************************************************************
|
||||||
//***************************************************************************
|
//***************************************************************************
|
||||||
|
@ -192,40 +121,16 @@ enum TILE3D_FLAGS
|
||||||
};
|
};
|
||||||
*/
|
*/
|
||||||
typedef u16 sTileMapElem; // Tile or Tri Start
|
typedef u16 sTileMapElem; // Tile or Tri Start
|
||||||
/*
|
|
||||||
struct sTileMapElem
|
|
||||||
{
|
|
||||||
u16 Elem; // Tile or Tri Start
|
|
||||||
};
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
struct sTileMapElem3d : public sTileMapElem
|
|
||||||
{
|
|
||||||
u16 Flags;
|
|
||||||
};
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
struct sTileTable
|
|
||||||
{
|
|
||||||
u16 TriList;
|
|
||||||
u16 TriCount;
|
|
||||||
};
|
|
||||||
*/
|
|
||||||
struct sTile
|
struct sTile
|
||||||
{
|
{
|
||||||
// 3d Tile
|
|
||||||
// u16 TriStart; // 2
|
|
||||||
// u16 TileTable[TILE3D_FLAGS_MAX]; // 10
|
|
||||||
// 2d Tile
|
// 2d Tile
|
||||||
u8 u0,v0; // 2
|
u8 u0,v0; // 2
|
||||||
u16 Clut; // 2
|
u16 Clut; // 2
|
||||||
u16 TPage; // 2
|
u16 TPage; // 2
|
||||||
u16 Pad; // :o( need this? // 2
|
u16 Pad; // :o( need this? // 2
|
||||||
|
|
||||||
#ifdef WIN32
|
}; // 8
|
||||||
//bool operator==(sTile const &v1) {return(false);}
|
|
||||||
#endif
|
|
||||||
}; // 20
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Layers
|
// Layers
|
||||||
|
@ -274,9 +179,9 @@ struct sLvlHdr
|
||||||
u32 ActionLayer;
|
u32 ActionLayer;
|
||||||
u32 ForeLayer;
|
u32 ForeLayer;
|
||||||
u32 CollisionLayer;
|
u32 CollisionLayer;
|
||||||
u32 Pad1;
|
u32 ActorList;
|
||||||
u32 Pad2;
|
u32 ItemList;
|
||||||
u32 Pad3;
|
u32 PlatformList;
|
||||||
u32 Pad4;
|
u32 Pad4;
|
||||||
u32 Pad5;
|
u32 Pad5;
|
||||||
u32 Pad6;
|
u32 Pad6;
|
||||||
|
@ -284,63 +189,79 @@ struct sLvlHdr
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
// TileBank
|
|
||||||
/*
|
|
||||||
struct sTileBankHdr
|
|
||||||
{
|
|
||||||
u32 TriList;
|
|
||||||
u32 QuadList;
|
|
||||||
u32 VtxList;
|
|
||||||
u32 TileList;
|
|
||||||
};
|
|
||||||
*/
|
|
||||||
|
|
||||||
//***************************************************************************
|
//***************************************************************************
|
||||||
//***************************************************************************
|
//***************************************************************************
|
||||||
//***************************************************************************
|
//***************************************************************************
|
||||||
// Actors
|
// Actors
|
||||||
|
struct sSpriteFrame
|
||||||
typedef u16 AnimIdx;
|
|
||||||
|
|
||||||
struct sAnimHdr
|
|
||||||
{
|
{
|
||||||
u16 FrameCount;
|
u8 *PAKSpr; // 4
|
||||||
u16 Pad;
|
s8 XOfs,YOfs; // 2
|
||||||
AnimIdx *Anim;
|
u8 W,H; // 2
|
||||||
s32 *Move;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct sActorHdr
|
struct sSpriteAnim
|
||||||
{
|
{
|
||||||
u16 BoneCount;
|
u16 FrameCount; // 2
|
||||||
u16 TriCount;
|
u16 *Anim; // 2
|
||||||
u16 QuadCount;
|
|
||||||
u16 WeightCount;
|
|
||||||
u16 VtxCount;
|
|
||||||
u16 AnimCount;
|
|
||||||
|
|
||||||
sBone *BoneList;
|
|
||||||
sTri *TriList;
|
|
||||||
sQuad *QuadList;
|
|
||||||
sWeight *WeightList;
|
|
||||||
sVtx *VtxList;
|
|
||||||
sTexInfo *TexInfo;
|
|
||||||
sAnimHdr *AnimList;
|
|
||||||
sQuat *QuatTable;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct sSpriteAnimBank
|
||||||
|
{
|
||||||
|
u16 ColorCount; // 2
|
||||||
|
u16 AnimCount; // 2
|
||||||
|
u16 FrameCount; // 2
|
||||||
|
u16 Pad; // 2
|
||||||
|
|
||||||
|
u8 *Palette; // 4
|
||||||
|
sSpriteAnim *AnimList; // 4
|
||||||
|
sSpriteFrame *FrameList; // 4
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
//***************************************************************************
|
//***************************************************************************
|
||||||
// Anim
|
//***************************************************************************
|
||||||
/*
|
//***************************************************************************
|
||||||
struct sAnimFileHdr
|
// Things - Must be 4 byte aligned for pos data
|
||||||
|
struct sThingHdr
|
||||||
{
|
{
|
||||||
u16 BoneCount;
|
u16 Count;
|
||||||
u16 AnimCount;
|
u16 Pad;
|
||||||
sQuat *QuatTable;
|
|
||||||
// Anim Hdrs....
|
|
||||||
};
|
};
|
||||||
*/
|
|
||||||
|
|
||||||
|
struct sThingPoint
|
||||||
|
{
|
||||||
|
u16 X,Y;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct sThingActor
|
||||||
|
{
|
||||||
|
u16 Type;
|
||||||
|
u16 Health;
|
||||||
|
u16 AttackStrength;
|
||||||
|
u16 Speed;
|
||||||
|
u16 TurnRate;
|
||||||
|
u8 Flags;
|
||||||
|
u8 PointCount;
|
||||||
|
// Point List...
|
||||||
|
}; // 12
|
||||||
|
|
||||||
|
struct sThingItem
|
||||||
|
{
|
||||||
|
u16 Type;
|
||||||
|
u16 Pad; // Poo!
|
||||||
|
sThingPoint Pos;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct sThingPlatform
|
||||||
|
{
|
||||||
|
u16 Type;
|
||||||
|
u16 Speed;
|
||||||
|
u16 TurnRate;
|
||||||
|
u8 Flags;
|
||||||
|
u8 PointCount;
|
||||||
|
// Point List...
|
||||||
|
}; // 10
|
||||||
|
|
||||||
|
//***************************************************************************
|
||||||
#endif
|
#endif
|
Loading…
Add table
Reference in a new issue