This commit is contained in:
Daveo 2001-06-25 20:41:25 +00:00
parent 690a51d59d
commit c76bf22672
6 changed files with 25 additions and 12 deletions

View File

@ -22,6 +22,7 @@ using namespace std;
//***************************************************************************
vector<CMkActor> ActorList;
int TPBase=-1,TPWidth=-1,TPHeight=-1;
int DupThresh;
GString TPOutStr;
GString RootPath;
@ -71,6 +72,10 @@ int Count;
TpStr= CheckFileString(String);
Aspect=(float)atof(TpStr);
break;
case 'c':
TpStr= CheckFileString(String);
DupThresh=(int)atol(TpStr);
break;
case 't':
TpStr= CheckFileString(String);
TextPtr=Text;
@ -361,7 +366,7 @@ int Size=Bmp.Frm.GetWidth()*Bmp.Frm.GetHeight();
Bmp.Frm.MakeRGB(Bmp.RGB);
// Check for dups (Broken at the mo, ah well)
// Gen Chksum
/*
u8 *RGB=Bmp.RGB;
Bmp.ChkR=Bmp.ChkG=Bmp.ChkB=0;
for (i=0; i<Size; i++)
@ -370,7 +375,7 @@ u8 *RGB=Bmp.RGB;
Bmp.ChkG+=*RGB++;
Bmp.ChkB+=*RGB++;
}
*/
// Find existing
for (i=0; i<BmpListSize; i++)
{
@ -392,23 +397,32 @@ bool CMkActor::IsImageSame(sBmp &Bmp0,sBmp &Bmp1)
{
int W0,H0,W1,H1,Size;
u8 *RGB0,*RGB1;
if (Bmp0.ChkR!=Bmp1.ChkR || Bmp0.ChkG!=Bmp1.ChkG || Bmp0.ChkB!=Bmp1.ChkB) return(false);
int DiffCount=0;
// if (Bmp0.ChkR!=Bmp1.ChkR || Bmp0.ChkG!=Bmp1.ChkG || Bmp0.ChkB!=Bmp1.ChkB) return(false);
W0=Bmp0.Frm.GetWidth();
H0=Bmp0.Frm.GetHeight();
W1=Bmp1.Frm.GetWidth();
H1=Bmp1.Frm.GetHeight();
if (W0!=W1 || H0!=H1) return(false);
Size=W0*H0*3;
Size=W0*H0;
RGB0=Bmp0.RGB;
RGB1=Bmp1.RGB;
for (int i=0; i<Size; i++)
{
if (*RGB0++!=*RGB1++) return(false);
// if (*RGB0++!=*RGB1++) return(false);
if (*RGB0++!=*RGB1++ || // R
*RGB0++!=*RGB1++ || // G
*RGB0++!=*RGB1++) // B
{
DiffCount++;
}
}
return(true);
if (DiffCount<=DupThresh)
return(true);
else
return(false);
}
//***************************************************************************

View File

@ -25,7 +25,7 @@ struct sBmp
{
Frame Frm;
int OrigW,OrigH;
int ChkR,ChkG,ChkB;
// int ChkR,ChkG,ChkB;
u8 *RGB;
u8 *Psx;
u8 *Pak;

View File

@ -106,6 +106,7 @@ ACTOR_SPRITE_DIR := Render/Psx
ACTOR_OUT_DIR := $(DATA_OUT)/Actors
ACTOR_MAKEFILE_DIR := $(TEMP_BUILD_DIR)/actor
ACTOR_DIRS_TO_MAKE := $(ACTOR_MAKEFILE_DIR) $(ACTOR_OUT_DIR)
MKACTOR_OPTS:= -c:16
ACTOR_SPONGEBOB := SpongeBob SpongeBob_CoralBlower SpongeBob_JellyLauncher SpongeBob_Net SpongeBob_Glove SpongeBob_Wand SpongeBob_JellyFish
ACTOR_NPC := BarnacleBoy Krusty Squidward Gary Sandy Patrick MermaidMan

View File

@ -40,9 +40,7 @@
#include "..\..\tools\vlc\include\vlc_bit.h"
#ifndef __USER_paul__
//#define FORCE_FMV 1
#endif
#if __FILE_SYSTEM__==CD | FORCE_FMV
#define ENABLE_FMV
@ -149,7 +147,7 @@ static u_long *SectorBuffer;
static const FmvData s_fmvData[MAX_FMVS]=
{
{FILEPOS_THQ_STR, 240-15 },
{FILEPOS_INTRO_STR, 0 },
{FILEPOS_INTRO_STR, 371-15 },
};

View File

@ -79,7 +79,7 @@ static bool fmvPerFrameFunc()
---------------------------------------------------------------------- */
void CFrontEndFMVIntro::select()
{
// FMV_play(FMV_INTRO,&fmvPerFrameFunc);
FMV_play(FMV_INTRO,&fmvPerFrameFunc);
}
/*----------------------------------------------------------------------

Binary file not shown.