diff --git a/Graphics/characters/Ballblob/AnimList.Txt b/Graphics/characters/Ballblob/AnimList.Txt index 7ee9cedce..5693015e8 100644 --- a/Graphics/characters/Ballblob/AnimList.Txt +++ b/Graphics/characters/Ballblob/AnimList.Txt @@ -1,3 +1,2 @@ +Idle Bite -Bounce -Wobble \ No newline at end of file diff --git a/Graphics/characters/Gary/AnimList.Txt b/Graphics/characters/Gary/AnimList.Txt index e69de29bb..0850318a9 100644 --- a/Graphics/characters/Gary/AnimList.Txt +++ b/Graphics/characters/Gary/AnimList.Txt @@ -0,0 +1 @@ +idle \ No newline at end of file diff --git a/Graphics/characters/Sandy/AnimList.Txt b/Graphics/characters/Sandy/AnimList.Txt index e69de29bb..0850318a9 100644 --- a/Graphics/characters/Sandy/AnimList.Txt +++ b/Graphics/characters/Sandy/AnimList.Txt @@ -0,0 +1 @@ +idle \ No newline at end of file diff --git a/Graphics/levels/Chapter01/Level02/Level02.MEX b/Graphics/levels/Chapter01/Level02/Level02.MEX index 7a7453aa8..1090e91a1 100644 Binary files a/Graphics/levels/Chapter01/Level02/Level02.MEX and b/Graphics/levels/Chapter01/Level02/Level02.MEX differ diff --git a/Graphics/levels/Chapter01/Level02/level02.Mep b/Graphics/levels/Chapter01/Level02/level02.Mep index d3931b67c..0e8b6615b 100644 Binary files a/Graphics/levels/Chapter01/Level02/level02.Mep and b/Graphics/levels/Chapter01/Level02/level02.Mep differ diff --git a/Graphics/levels/Chapter01/Level03/Level03.MEX b/Graphics/levels/Chapter01/Level03/Level03.MEX index 3c96c5ddf..721222a9f 100644 Binary files a/Graphics/levels/Chapter01/Level03/Level03.MEX and b/Graphics/levels/Chapter01/Level03/Level03.MEX differ diff --git a/Graphics/levels/Chapter01/Level04/Level04.MEX b/Graphics/levels/Chapter01/Level04/Level04.MEX index 77281b6a7..a9b0e10c1 100644 Binary files a/Graphics/levels/Chapter01/Level04/Level04.MEX and b/Graphics/levels/Chapter01/Level04/Level04.MEX differ diff --git a/Graphics/levels/Chapter02/Level01/level01.MEX b/Graphics/levels/Chapter02/Level01/level01.MEX index ee772cd9e..4346d5586 100644 Binary files a/Graphics/levels/Chapter02/Level01/level01.MEX and b/Graphics/levels/Chapter02/Level01/level01.MEX differ diff --git a/Graphics/levels/Chapter02/Level02/Level02.MEX b/Graphics/levels/Chapter02/Level02/Level02.MEX index efd7d68eb..d5b3941a7 100644 Binary files a/Graphics/levels/Chapter02/Level02/Level02.MEX and b/Graphics/levels/Chapter02/Level02/Level02.MEX differ diff --git a/Graphics/levels/Chapter03/Level01/Level01.MEX b/Graphics/levels/Chapter03/Level01/Level01.MEX index a2853a034..ef6a77bcd 100644 Binary files a/Graphics/levels/Chapter03/Level01/Level01.MEX and b/Graphics/levels/Chapter03/Level01/Level01.MEX differ diff --git a/Graphics/levels/Chapter03/Level02/Level02.MEX b/Graphics/levels/Chapter03/Level02/Level02.MEX index d0c55d95a..5c10154f3 100644 Binary files a/Graphics/levels/Chapter03/Level02/Level02.MEX and b/Graphics/levels/Chapter03/Level02/Level02.MEX differ diff --git a/Graphics/levels/Chapter03/Level04/Level04.MEX b/Graphics/levels/Chapter03/Level04/Level04.MEX index 03a6fdd69..e9cb5e45b 100644 Binary files a/Graphics/levels/Chapter03/Level04/Level04.MEX and b/Graphics/levels/Chapter03/Level04/Level04.MEX differ diff --git a/Utils/Libs/DaveLib/facestore.cpp b/Utils/Libs/DaveLib/facestore.cpp index 0da775c9a..00d93db86 100644 --- a/Utils/Libs/DaveLib/facestore.cpp +++ b/Utils/Libs/DaveLib/facestore.cpp @@ -82,7 +82,21 @@ inline bool uvaprox( sUV &uv0, sUV &uv1 ) } //*************************************************************************** -CFace &CFaceStore::AddFace(vector const &P, const sGinTri &T, const sUVTri &uv,GString const &Tex,int ID,bool ProcessTexFlag ) +void CFaceStore::SetTPageFlag(CFace &F,int MatFlag) +{ +int Trans=0; + + switch (MatFlag>>3) + { +// case 0: Trans=2; break; /* Subtractive */ + case 1: Trans=1; break; /* Additive */ + } +// Trans=1; + F.TPageFlag=Trans<<5; +} + +//*************************************************************************** +CFace &CFaceStore::AddFace(vector const &P, const sGinTri &T, const sUVTri &uv,GString const &Tex,int MatFlag,bool ProcessTexFlag ) { //int ListSize = FaceList.size(); // FaceList.resize(ListSize+1); @@ -101,9 +115,10 @@ CFace F; if (F.uvs[i].v < 0.f) F.uvs[i].v=0.f; if (F.uvs[i].v > 1.f) F.uvs[i].v=1.f; } - + F.TPageFlag=0; F.TexName=Tex; F.Mat = -1; + SetTPageFlag(F,MatFlag); return(AddFace(F,ProcessTexFlag)); } @@ -153,6 +168,7 @@ int ListSize=Faces.GetFaceCount(); } //*************************************************************************** +/* CFace &CFaceStore::AddFace(sTriFace &Face,int ID) { int ListSize = FaceList.size(); @@ -177,7 +193,7 @@ CFace &F = FaceList[ListSize]; F.ID=ID; return(F); } - +*/ //*************************************************************************** //*** Texture Stuff ********************************************************* //*************************************************************************** @@ -367,8 +383,15 @@ int V=ThisTex.v+H; Out.uv1[0]=(uv1[0]-XOfs); Out.uv1[1]=(uv1[1]-YOfs); Out.uv2[0]=(uv2[0]-XOfs); Out.uv2[1]=(uv2[1]-YOfs); - Out.TPage=ThisTex.Tpage; + Out.TPage=ThisTex.Tpage | In.TPageFlag; Out.Clut=ThisTex.Clut; + Out.PolyCode=GPU_PolyFT3Code; + + if (In.TPageFlag) + { + Out.PolyCode|=GPUCode_SemiTrans; + } + } diff --git a/Utils/Libs/DaveLib/facestore.h b/Utils/Libs/DaveLib/facestore.h index e25609258..51aae51f5 100644 --- a/Utils/Libs/DaveLib/facestore.h +++ b/Utils/Libs/DaveLib/facestore.h @@ -35,8 +35,10 @@ public: int vis[4]; Vector3 Normal; bool Avail; - int ID; +// int ID; GString TexName; + int TPageFlag; + }; /* @@ -71,6 +73,7 @@ public: struct sTriFace { int Mat; + int Flags; Vector3 vtx[3]; int pts[3]; sUV uvs[3]; @@ -86,7 +89,8 @@ public: CFaceStore(int Max) {MaxStrip=Max;TexGrab=&FaceStoreTexGrab;} ~CFaceStore(){}; - CFace &AddFace(vector const &P, const sGinTri &T, const sUVTri &uv,GString const &Tex,int ID=0,bool ProcessTexFlag=false); + void SetTPageFlag(CFace &F,int MatFlag); + CFace &AddFace(vector const &P, const sGinTri &T, const sUVTri &uv,GString const &Tex,int MatFlag=0,bool ProcessTexFlag=false); CFace &AddFace(CFace &F,bool TexFlag=true); void AddFaces(vector&Faces,bool TexFlag=true); void AddFaces(CFaceStore &Faces,bool TexFlag=true); diff --git a/Utils/MapEdit/Elem.cpp b/Utils/MapEdit/Elem.cpp index e27a28f12..4eba9e1b3 100644 --- a/Utils/MapEdit/Elem.cpp +++ b/Utils/MapEdit/Elem.cpp @@ -99,7 +99,7 @@ GFName Path=Filename; Create2dTexture(TexCache,Path.File(),Node); Build2dDrawList(TexCache,DrawList[ElemType2d]); BlankFlag=false; - if (!ValidFlag) SetInvalid(); +// if (!ValidFlag) SetInvalid(); } /*****************************************************************************/ @@ -245,6 +245,7 @@ std::vector const &NodeTriMat=ThisNode.GetTriMaterial(); std::vector const &SceneTexList=ThisScene.GetTexList(); std::vector const &SceneUsedMatList=ThisScene.GetUsedMaterialIdx(); +std::vector const &SceneMatList=ThisScene.GetMaterials(); int TexCount=SceneTexList.size(); int TriCount=NodeTriList.size(); @@ -257,7 +258,7 @@ int ListSize=TriList.size(); sUVTri const &ThisUV=NodeUVList[T]; sTriFace &Tri=TriList[ListSize+T]; int ThisMat=NodeTriMat[T]; - int TexID; + int TexID,TexFlags; // Sort Textures - Only add the ones that are used :o) @@ -269,10 +270,12 @@ int ListSize=TriList.size(); AfxMessageBox(mexstr,MB_OK | MB_ICONEXCLAMATION); TexID=0; } - else +// else { + TexFlags=SceneMatList[TexID].Flags; GString ThisName; GString TexName=SceneTexList[TexID]; + ThisName=SetPath+TexName; TRACE2("%i !%s!\n",TexID,ThisName); TexID=TexCache.ProcessTexture(ThisName); @@ -293,6 +296,7 @@ Matrix4x4 TransMtx; Tri.uvs[p].u=ThisUV.p[p].u; Tri.uvs[p].v=ThisUV.p[p].v; Tri.Mat=TexID; + Tri.Flags=TexFlags; } } for (int Child=0; Child const &NodeMatList = ThisNode.GetTriMaterial(); vector const &NodeUVList = ThisNode.GetUVTris(); vector const &SceneTexList= Scene.GetTexList(); vector const &SceneUsedMatList=Scene.GetUsedMaterialIdx(); +vector const &SceneMaterials=Scene.GetMaterials(); int TriCount=NodeTriList.size(); @@ -165,7 +166,9 @@ int TriCount=NodeTriList.size(); if (Mat>SceneTexList.size()) GObject::Error(ERR_FATAL,"Crap Material ID, wanted %i, only have %i\n",Mat,SceneTexList.size()); GString TexName=RootPath+SceneTexList[Mat]; - ModelFaceList.AddFace( NodeVtxList, NodeTriList[T], NodeUVList[T], TexName,0,false); + + CFace &F=ModelFaceList.AddFace( NodeVtxList, NodeTriList[T], NodeUVList[T], TexName,SceneMaterials[Mat].Flags,false); +// ModelFaceList.SetTPageFlag(F,SceneMaterials[Mat].Flags); } int ChildCount=ThisNode.GetPruneChildCount(); @@ -197,6 +200,7 @@ int Idx; CFace F; ExpTri2Face(ThisTri,F); + ModelFaceList.SetTPageFlag(F,ThisTri.Flags); ModelFaceList.AddFace(F,false); } @@ -299,8 +303,9 @@ u8 *TilePtr=(u8*) &ByteHdr[FileHdr->TileOfs]; sExpTile &InTile=InTileList[i]; InTile=*ThisTilePtr; - InTile.RGB=(u8*)malloc(RGBSize); - memcpy(InTile.RGB,TilePtr+sizeof(sExpTile),RGBSize); +// InTile.RGB=(u8*)malloc(RGBSize); +// memcpy(InTile.RGB,TilePtr+sizeof(sExpTile),RGBSize); + InTile.RGB=0; TilePtr+=RGBSize+sizeof(sExpTile); } @@ -532,6 +537,7 @@ void CMkLevel::ExpTri2Face(sExpTri &ThisTri,CFace &F,bool ImportTex) F.uvs[p].u=ThisTri.uv[p][0]; F.uvs[p].v=ThisTri.uv[p][1]; } + } //*************************************************************************** @@ -648,8 +654,7 @@ int TileID=OutTile3dList.size(); F.uvs[0]=F.uvs[1]; F.uvs[1]=TmpUV; } - - + OutFaceList.SetTPageFlag(F,ThisTri.Flags); OutFaceList.AddFace(F,true); } @@ -663,66 +668,64 @@ int TileID=OutTile3dList.size(); int CMkLevel::Create2dTex(int Tile,int Flags) { sExpTile &SrcTile=InTileList[Tile]; -int Idx; -sMkLevelTex InTex; +//sMkLevelTex InTex; - InTex.Set=SrcTile.Set; - InTex.Flags=Flags; - InTex.XOfs=SrcTile.XOfs; - InTex.YOfs=SrcTile.YOfs; - InTex.RGB=SrcTile.RGB; - - Idx=Tex2dList.Find(InTex); - if (Idx!=-1) return(Idx); +// InTex.RGB=SrcTile.RGB; // Try and find RGB data match - Idx=FindRGBMatch(InTex); - if (Idx!=-1) return(Idx); +// not working +// Idx=FindRGBMatch(InTex); +// if (Idx!=-1) return(Idx); // Must be new, add it - BuildTileTex(InTex); - Tex2dList.push_back(InTex); - return(InTex.TexID); +// InTex.Set=SrcTile.Set; +// InTex.Flags=Flags; +// InTex.XOfs=SrcTile.XOfs; +// InTex.YOfs=SrcTile.YOfs; + +int TexID=BuildTileTex(SrcTile,Flags); +// Tex2dList.push_back(InTex); + return(TexID); } //*************************************************************************** -int CMkLevel::BuildTileTex(sMkLevelTex &InTex) +int CMkLevel::BuildTileTex(sExpTile &SrcTile,int Flags) { -Frame &InFrame=BmpList[InTex.Set]; +Frame &InFrame=BmpList[SrcTile.Set]; Frame ThisFrame; Rect ThisRect; -GString Name=GFName(InSetNameList[InTex.Set]).File(); +GString Name=GFName(InSetNameList[SrcTile.Set]).File(); GString TexName; int BmpW=InFrame.GetWidth(); int BmpH=InFrame.GetHeight(); - +int TexID; TexGrab.ShrinkToFit(false); TexGrab.AllowRotate(false); - if (InTex.XOfs*16>BmpW) + if (SrcTile.XOfs*16>BmpW) { - printf("AARGH!!! %s(%i) wants X=%i,tile is only %i Wide\n",Name,InTex.Set,InTex.XOfs*16,BmpW); - InTex.XOfs=0; + printf("AARGH!!! %s(%i) wants X=%i,tile is only %i Wide\n",Name,SrcTile.Set,SrcTile.XOfs*16,BmpW); + SrcTile.XOfs=0; } - if (InTex.YOfs*16>BmpH) + if (SrcTile.YOfs*16>BmpH) { - printf("AARGH!!! %s(%i) wants Y=%i,tile is only %i High\n",Name,InTex.Set,InTex.YOfs*16,BmpH); - InTex.YOfs=0; + printf("AARGH!!! %s(%i) wants Y=%i,tile is only %i High\n",Name,SrcTile.Set,SrcTile.YOfs*16,BmpH); + SrcTile.YOfs=0; } - MakeTexName(InTex,TexName); + MakeTexName(SrcTile,Flags,TexName); - ThisRect.X=InTex.XOfs*16; - ThisRect.Y=InTex.YOfs*16; + ThisRect.X=SrcTile.XOfs*16; + ThisRect.Y=SrcTile.YOfs*16; ThisRect.W=16; ThisRect.H=16; ThisFrame.Grab(InFrame,ThisRect); - if (InTex.Flags& PC_TILE_FLAG_MIRROR_X) ThisFrame.FlipX(); - if (InTex.Flags & PC_TILE_FLAG_MIRROR_Y) ThisFrame.FlipY(); + if (Flags& PC_TILE_FLAG_MIRROR_X) ThisFrame.FlipX(); + if (Flags & PC_TILE_FLAG_MIRROR_Y) ThisFrame.FlipY(); - InTex.TexID=TexGrab.AddMemFrame(TexName,ThisFrame); + TexID=TexGrab.AddMemFrame(TexName,ThisFrame); #ifdef _DEBUG if (0) @@ -735,26 +738,28 @@ int BmpH=InFrame.GetHeight(); } } #endif - return(InTex.TexID); + return(TexID); } //*************************************************************************** -void CMkLevel::MakeTexName(sMkLevelTex &InTex,GString &OutStr) +void CMkLevel::MakeTexName(sExpTile &SrcTile,int Flags,GString &OutStr) { char NewName[256]; -GString Name=GFName(InSetNameList[InTex.Set]).File(); +GString Name=GFName(InSetNameList[SrcTile.Set]).File(); - sprintf(NewName,"%s_%02d_%02d_%01d_",Name,InTex.XOfs,InTex.YOfs,InTex.Flags&PC_TILE_FLAG_MIRROR_XY); + sprintf(NewName,"%s_%02d_%02d_%01d_",Name,SrcTile.XOfs,SrcTile.YOfs,Flags&PC_TILE_FLAG_MIRROR_XY); OutStr=NewName; } //*************************************************************************** +/* int CMkLevel::FindRGBMatch(sMkLevelTex &ThisTex) { int i,ListSize=Tex2dList.size(); int Size=TileW*TileH; u8 *RGBPtr=ThisTex.RGB; + if (!RGBPtr) printf("HA HA\n"); // Create Checksum for this tile ThisTex.RChk=0; ThisTex.GChk=0; @@ -765,6 +770,7 @@ u8 *RGBPtr=ThisTex.RGB; ThisTex.GChk+=*RGBPtr++; ThisTex.BChk+=*RGBPtr++; } + // Check all others for match for (i=0; i &TriList=OutFaceList.GetOutTriList(); vector const &VtxList=OutFaceList.GetVtxList(); int ThisPos=ftell(File); int i,ListSize=TriList.size(); +int ZOfs=+4*Scale; for (i=0;iZ[p]) ZMin=Z[p]; + if (ZMaxOtOfs) MinOT=OtOfs; if (MaxOT15) OtOfs=15; + if (OtOfs<0) OtOfs=0; + +// if (OtOfs>15) OtOfs=15; + T.OTOfs=OtOfs; // Write It fwrite(&T,1,sizeof(sTri),File); } printf("Tri %i\n",ListSize); + printf("ZMin %i ZMax %i\n",ZMin,ZMax); return(ThisPos); diff --git a/Utils/MkLevel/MkLevel.dsp b/Utils/MkLevel/MkLevel.dsp index 4774620af..839096687 100644 --- a/Utils/MkLevel/MkLevel.dsp +++ b/Utils/MkLevel/MkLevel.dsp @@ -123,6 +123,14 @@ SOURCE=.\Layers\MkLevelLayerFX.h # End Source File # Begin Source File +SOURCE=.\Layers\MkLevelLayerHazard.cpp +# End Source File +# Begin Source File + +SOURCE=.\Layers\MkLevelLayerHazard.h +# End Source File +# Begin Source File + SOURCE=.\Layers\MkLevelLayerItem.cpp # End Source File # Begin Source File diff --git a/Utils/MkLevel/MkLevel.h b/Utils/MkLevel/MkLevel.h index de8cbd88c..4238898ca 100644 --- a/Utils/MkLevel/MkLevel.h +++ b/Utils/MkLevel/MkLevel.h @@ -17,13 +17,14 @@ using namespace std; //*************************************************************************** +/* struct sMkLevelTex { int Set; int XOfs,YOfs; - u8 *RGB; +// u8 *RGB; int Flags; - int RChk,GChk,BChk; +// int RChk,GChk,BChk; int TexID; bool operator ==(sMkLevelTex const &v1) @@ -35,7 +36,7 @@ bool operator ==(sMkLevelTex const &v1) return(true); } }; - +*/ //*************************************************************************** struct sMkLevelModel { @@ -72,10 +73,10 @@ public: int Create2dTex(int Tile,int Flags); int Create3dTile(sExpLayerTile &ThisTile); - int FindRGBMatch(sMkLevelTex &ThisTex); - bool IsRGBSame(const sMkLevelTex &Tile0,const sMkLevelTex &Tile1); - void MakeTexName(sMkLevelTex &InTex,GString &OutStr); - int BuildTileTex(sMkLevelTex &InTex); +// int FindRGBMatch(sMkLevelTex &ThisTex); +// bool IsRGBSame(const sMkLevelTex &Tile0,const sMkLevelTex &Tile1); + void MakeTexName(sExpTile &SrcTile,int Flags,GString &OutStr); + int BuildTileTex(sExpTile &SrcTile,int Flags); char *GetConfigStr(const char *Grp,const char *Key) {return(Config.GetStr(Grp,Key));} CIni &GetConfig() {return(Config);} @@ -137,7 +138,7 @@ protected: CList Tile2dList; CList Tile3dList; - CList Tex2dList; +// CList Tex2dList; CTexGrab TexGrab; CList BmpList; diff --git a/data/DataCache.scr b/data/DataCache.scr index 42d020687..3e6f81352 100644 --- a/data/DataCache.scr +++ b/data/DataCache.scr @@ -138,8 +138,6 @@ levels/CHAPTER06_LEVEL05.Tex levels/FMA_SHADYSHOALS.Lvl levels/FMA_SHADYSHOALS.Tex -LEVELS/FMA_SHADYEXTERIOR.Lvl -LEVELS/FMA_SHADYEXTERIOR.Tex actors/SPONGEBOB.SBK actors/SPONGEBOB_CORALBLOWER.SBK @@ -149,6 +147,8 @@ actors/SPONGEBOB_NET.SBK actors/BARNACLEBOY.SBK actors/KRUSTY.SBK actors/SQUIDWARD.SBK +actors/GARY.SBK +actors/SANDY.SBK actors/ANENOME.SBK actors/BABYOCTOPUS.SBK @@ -169,5 +169,3 @@ actors/SKELETALFISH.SBK actors/SPIDERCRAB.SBK actors/SPIKEYANENOME.SBK actors/STOMPER.SBK - - diff --git a/makefile.gfx b/makefile.gfx index f7b407db6..aac93fd11 100644 --- a/makefile.gfx +++ b/makefile.gfx @@ -53,7 +53,7 @@ LEVELS_CHAPTER03 := LEVEL01 LEVEL02 LEVEL03 LEVEL04 LEVELS_CHAPTER04 := LEVEL01 LEVEL02 LEVEL03 LEVEL04 LEVELS_CHAPTER05 := LEVEL01 LEVEL02 LEVEL03 LEVEL04 LEVELS_CHAPTER06 := LEVEL01 LEVEL02 LEVEL03 LEVEL04 LEVEL05 -LEVELS_FMA := SHADYSHOALS SHADYEXTERIOR +LEVELS_FMA := SHADYSHOALS LEVELS_MAKEFILES := $(foreach CHAPTER,$(LEVELS_CHAPTERS),$(foreach LEVEL,$(LEVELS_$(CHAPTER)),$(LEVELS_MAKEFILE_DIR)/$(CHAPTER)_$(LEVEL).mak)) @@ -108,8 +108,8 @@ ACTOR_MAKEFILE_DIR := $(TEMP_BUILD_DIR)/actor ACTOR_DIRS_TO_MAKE := $(ACTOR_MAKEFILE_DIR) $(ACTOR_OUT_DIR) ACTOR_SPONGEBOB := SpongeBob SpongeBob_CoralBlower SpongeBob_JellyLauncher SpongeBob_Net -ACTOR_NPC := BarnacleBoy Krusty Squidward -# BarnacleBoy Gary Krusty MermaidMan Patrick Plankton Sandy Squidward +ACTOR_NPC := BarnacleBoy Krusty Squidward Gary Sandy +# MermaidMan Patrick Plankton ACTOR_ENEMY := Anenome BabyOctopus Ballblob Caterpillar clam Dustdevil Eyeball \ Flamingskull FlyingDutchman Ghost HermitCrab IronDogFish Lrgjellyfish \ diff --git a/source/enemy/nbblob.cpp b/source/enemy/nbblob.cpp index 1c739274e..5f03d44dc 100644 --- a/source/enemy/nbblob.cpp +++ b/source/enemy/nbblob.cpp @@ -49,10 +49,10 @@ void CNpcBallBlobEnemy::processMovement( int _frames ) if ( !m_animPlaying && m_frame != 0 ) { - m_animNo = ANIM_BALLBLOB_WOBBLE; + m_animNo = ANIM_BALLBLOB_IDLE; m_frame = 0; } - else if ( m_animNo == ANIM_BALLBLOB_BOUNCE ) + else if ( m_animNo == ANIM_BALLBLOB_IDLE ) { moveX = 0; moveY = 0; @@ -85,14 +85,14 @@ void CNpcBallBlobEnemy::processMovement( int _frames ) { m_velocity.vy = -m_velocity.vy; m_animPlaying = true; - m_animNo = ANIM_BALLBLOB_BOUNCE; + m_animNo = ANIM_BALLBLOB_IDLE; m_frame = 0; } else { m_velocity.vy = -( 5 << 8 ); m_animPlaying = true; - m_animNo = ANIM_BALLBLOB_BOUNCE; + m_animNo = ANIM_BALLBLOB_IDLE; m_frame = 0; } @@ -105,10 +105,10 @@ void CNpcBallBlobEnemy::processMovement( int _frames ) if ( m_npcPath.thinkFlat( Pos, &pathComplete, &waypointXDist, &waypointYDist, &waypointHeading ) ) { - if ( m_animNo != ANIM_BALLBLOB_BOUNCE ) + if ( m_animNo != ANIM_BALLBLOB_IDLE) { m_animPlaying = true; - m_animNo = ANIM_BALLBLOB_WOBBLE; + m_animNo = ANIM_BALLBLOB_IDLE; m_frame = 0; } } diff --git a/source/enemy/npcdata.cpp b/source/enemy/npcdata.cpp index ac8988106..08d1e70ec 100644 --- a/source/enemy/npcdata.cpp +++ b/source/enemy/npcdata.cpp @@ -904,7 +904,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] = { // NPC_BALL_BLOB ACTORS_BALLBLOB_SBK, - ANIM_BALLBLOB_WOBBLE, + ANIM_BALLBLOB_IDLE, NPC_SENSOR_NONE, NPC_MOVEMENT_STATIC, NPC_CLOSE_NONE, @@ -915,7 +915,7 @@ CNpcEnemy::NPC_DATA CNpcEnemy::m_data[NPC_UNIT_TYPE_MAX] = DETECT_ALL_COLLISION, DAMAGE__BURN_ENEMY, 16, - ANIM_BALLBLOB_WOBBLE, + ANIM_BALLBLOB_IDLE, NPC_SHOT_GENERIC, 0, 0, diff --git a/source/gfx/actor.cpp b/source/gfx/actor.cpp index b30b8678c..902d9d083 100644 --- a/source/gfx/actor.cpp +++ b/source/gfx/actor.cpp @@ -743,9 +743,9 @@ int ShiftY=(Pos.vy & 15); { P0=&ModelVtxList[TList->P0]; P1=&ModelVtxList[TList->P1]; P2=&ModelVtxList[TList->P2]; gte_ldv3(P0,P1,P2); - setPolyFT3(TPrimPtr); - setShadeTex(TPrimPtr,1); setlen(TPrimPtr, GPU_PolyFT3Tag); + TPrimPtr->code=TList->PolyCode; + setRGB0(TPrimPtr,128,128,128); gte_rtpt_b(); T0=*(u32*)&TList->uv0; // Get UV0 & TPage diff --git a/source/level/layertile3d.cpp b/source/level/layertile3d.cpp index efc3d6c13..7edfa0d4c 100644 --- a/source/level/layertile3d.cpp +++ b/source/level/layertile3d.cpp @@ -135,9 +135,9 @@ VECTOR BlkPos; P0=&VtxList[TList->P0]; P1=&VtxList[TList->P1]; P2=&VtxList[TList->P2]; CMX_SetTransMtxXY(&BlkPos); gte_ldv3(P0,P1,P2); - setPolyFT3(TPrimPtr); - setShadeTex(TPrimPtr,1); setlen(TPrimPtr, GPU_PolyFT3Tag); + TPrimPtr->code=TList->PolyCode; + setRGB0(TPrimPtr,128,128,128); gte_rtpt_b(); T0=*(u32*)&TList->uv0; // Get UV0 & TPage diff --git a/tools/Data/bin/MkLevel.exe b/tools/Data/bin/MkLevel.exe index c768ad2ed..0b528b4d5 100644 Binary files a/tools/Data/bin/MkLevel.exe and b/tools/Data/bin/MkLevel.exe differ diff --git a/tools/Data/include/dstructs.h b/tools/Data/include/dstructs.h index 96cf0e411..33379f091 100644 --- a/tools/Data/include/dstructs.h +++ b/tools/Data/include/dstructs.h @@ -87,7 +87,9 @@ struct sTri u16 TPage; // 2 u8 uv2[2]; // 2 u16 P2; // 2 - u32 OTOfs; // 4 + u16 OTOfs; // 2 + u8 PolyCode; // 1 + u8 Pad; // 1 }; // 20 //--------------------------------------------------------------------------- @@ -103,7 +105,9 @@ struct sQuad u16 TPage; // 2 u8 uv2[2]; // 2 u8 uv3[2]; // 2 - u32 OTOfs; // 4 + u16 OTOfs; // 2 + u8 PolyCode; // 1 + u8 Pad; // 1 }; // 24