This commit is contained in:
2024-08-07 09:16:27 -04:00
parent fdfadd5c7e
commit 5f971cf684
5200 changed files with 731717 additions and 0 deletions

85
mediapak/ENTRYINF.HPP Normal file
View File

@@ -0,0 +1,85 @@
#ifndef _MEDIAPAK_ENTRYINFO_HPP_
#define _MEDIAPAK_ENTRYINFO_HPP_
#ifndef _COMMON_WINDOWS_HPP_
#include <common/windows.hpp>
#endif
#ifndef _COMMON_STRING_HPP_
#include <common/string.hpp>
#endif
#ifndef _MEDIAPAK_PAKENTRY_HPP_
#include <mediapak/pakentry.hpp>
#endif
class EntryInfo
{
public:
EntryInfo(void);
EntryInfo(const EntryInfo &someEntryInfo);
virtual ~EntryInfo();
EntryInfo &operator=(const EntryInfo &someEntryInfo);
BOOL operator==(const EntryInfo &someEntryInfo);
const String &name(void)const;
void name(const String &entryName);
PakEntry::EntryType type(void)const;
void type(PakEntry::EntryType entryType);
private:
String mEntryName;
PakEntry::EntryType mEntryType;
};
inline
EntryInfo::EntryInfo(void)
: mEntryType(PakEntry::Invalid)
{
}
inline
EntryInfo::EntryInfo(const EntryInfo &someEntryInfo)
{
*this=someEntryInfo;
}
inline
EntryInfo::~EntryInfo()
{
}
inline
EntryInfo &EntryInfo::operator=(const EntryInfo &someEntryInfo)
{
name(someEntryInfo.name());
type(someEntryInfo.type());
return *this;
}
inline
BOOL EntryInfo::operator==(const EntryInfo &someEntryInfo)
{
return (name()==someEntryInfo.name()&&
type()==someEntryInfo.type());
}
inline
const String &EntryInfo::name(void)const
{
return mEntryName;
}
inline
void EntryInfo::name(const String &entryName)
{
mEntryName=entryName;
}
inline
PakEntry::EntryType EntryInfo::type(void)const
{
return mEntryType;
}
inline
void EntryInfo::type(PakEntry::EntryType entryType)
{
mEntryType=entryType;
}
#endif

179
mediapak/MAIN.CPP Normal file
View File

@@ -0,0 +1,179 @@
#include <iostream.h>
#include <common/windows.hpp>
#include <common/openfile.hpp>
#include <mediapak/pakentry.hpp>
#include <mediapak/mediapak.hpp>
#include <mediapak/entryinf.hpp>
#include <sample/wave.hpp>
#include <sample/purewave.hpp>
// create(mediapakfilename)
// add(mediapak,filename,type,id)
// remove(mediapak,id)
// display(mediapakfilename)
void displayUsage(void);
BOOL handleAdd(const String &strCommand);
BOOL handleRemove(const String &strCommand);
BOOL handleList(const String &strCommand);
BOOL handleCreate(const String &strCommand);
//int PASCAL WinMain(HINSTANCE hInstance,HINSTANCE /*hPrevInstance*/,LPSTR /*lpszCmdLine*/,int /*nCmdShow*/)
void main(int argc,char **argv)
{
MediaPak mediaPak;
Array<EntryInfo> entryInfoArray;
String strDebug;
if(!mediaPak.open("mediapak.pak",MediaPak::OpenAlways))return;
// mediaPak.add("c:\\work\\scene\\media\\bmp\\tie1.bmp");
::sprintf(strDebug,"%d\n",mediaPak.entries());
::OutputDebugString(strDebug);
mediaPak.getInfo(entryInfoArray);
for(int index=0;index<entryInfoArray.size();index++)
{
::OutputDebugString(entryInfoArray[index].name()+String("\n"));
}
#if 0
String strCommandLine;
String strCommand;
if(1==argc){displayUsage();return;}
strCommandLine=argv[1];
strCommand=strCommandLine.betweenString(0,'(');
if(strCommand.isNull())strCommand=strCommandLine;
if(strCommand==String("add"))handleAdd(strCommandLine);
else if(strCommand==String("remove"))handleRemove(strCommandLine);
else if(strCommand==String("list"))handleList(strCommandLine);
else if(strCommand==String("create"))
{
if(handleCreate(strCommandLine))cout << "creation completed" << endl;
else cout << "creation failed"<< endl;
}
else displayUsage();
#endif
return;
}
BOOL handleAdd(const String &strCommand)
{
String strPathMediaPak;
String strPathFileName;
String strID;
String strType;
MediaPak mediaPak;
PakEntry pakEntry;
GlobalData<BYTE> mediaData;
FileHandle openFile;
strPathMediaPak=strCommand.betweenString('(',',');
strPathFileName=strCommand.betweenString(',',',');
strType=strCommand.betweenString(',',')').betweenString(',',',');
strID=strCommand.betweenString(',',')').betweenString(',',0).betweenString(',',0);
if(strPathMediaPak.isNull())return FALSE;
if(strPathFileName.isNull())return FALSE;
if(strID.isNull())return FALSE;
if(strType.isNull())return FALSE;
mediaPak.open(strPathMediaPak);
if(strType==String("SOUND"))pakEntry.type(PakEntry::Sound);
else if(strType==String("BITMAP"))pakEntry.type(PakEntry::Bitmap);
else pakEntry.type(PakEntry::Blob);
openFile.open(strPathFileName);
mediaData.size(openFile.size());
openFile.read((BYTE*)&mediaData[0],mediaData.size());
pakEntry.name(strPathFileName);
pakEntry.id(::atoi(strID));
pakEntry.rawData(mediaData);
mediaPak.add(pakEntry);
return TRUE;
}
BOOL handleRemove(const String &strCommand)
{
return FALSE;
}
BOOL handleList(const String &strCommand)
{
String pathMediaPak;
String strType;
MediaPak mediaPak;
PakEntry pakEntry;
pathMediaPak=strCommand.betweenString('(',')');
if(pathMediaPak.isNull())return FALSE;
if(!mediaPak.open(pathMediaPak))return FALSE;
for(int index=0;index<mediaPak.entries();index++)
{
mediaPak.getEntry(pakEntry,index);
if(PakEntry::Sound==pakEntry.type())strType="SOUND";
else if(PakEntry::Bitmap==pakEntry.type())strType="BITMAP";
else strType="BLOB";
cout << pakEntry.name() << " " << strType << " id:" << pakEntry.id() << endl;
}
return FALSE;
}
BOOL handleCreate(const String &strCommand)
{
String pathMediaPak;
MediaPak mediaPak;
pathMediaPak=strCommand.betweenString('(',')');
if(pathMediaPak.isNull())return FALSE;
return mediaPak.open(pathMediaPak,MediaPak::CreateAlways);
}
void displayUsage(void)
{
cout << "USAGE: mediapak add(pathmediapak,pathfilename,type,id) type=SOUND|BITMAP|BLOB" << endl;
cout << " delete(pathmediapak,id)" << endl;
cout << " list(pathmediapak)" << endl;
cout << " create(pathmediapak)" << endl;
return;
}
#if 0
MediaPak mediaPak;
PakEntry pakEntry;
GlobalData<BYTE> soundData;
FileHandle openFile;
WaveForm waveForm;
mediaPak.open("c:\\multimed.pak",TRUE);
pakEntry.type(PakEntry::Sound);
openFile.open("C:\\GAMES\\DOOM2\\DSTELEPT.WAV");
soundData.size(openFile.size());
openFile.read((BYTE*)soundData,soundData.size());
pakEntry.name("DSTELEPT");
pakEntry.id(0);
pakEntry.rawData(soundData);
mediaPak.add(pakEntry);
openFile.open("C:\\GAMES\\DOOM2\\DSPISTOL.WAV");
soundData.size(openFile.size());
openFile.read((BYTE*)soundData,soundData.size());
pakEntry.name("DSPISTOL");
pakEntry.id(0);
pakEntry.rawData(soundData);
mediaPak.add(pakEntry);
mediaPak.open("c:\\multimed.pak");
if(!mediaPak.getEntry(waveForm,0))return FALSE;
PureWave pureWave;
pureWave.play(waveForm,DeviceHandler::Wait);
mediaPak.close();
#endif

251
mediapak/MEDIAPAK.BAK Normal file
View File

@@ -0,0 +1,251 @@
# Microsoft Developer Studio Generated NMAKE File, Format Version 4.20
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
!IF "$(CFG)" == ""
CFG=mediapak - Win32 Debug
!MESSAGE No configuration specified. Defaulting to mediapak - Win32 Debug.
!ENDIF
!IF "$(CFG)" != "mediapak - Win32 Release" && "$(CFG)" !=\
"mediapak - Win32 Debug"
!MESSAGE Invalid configuration "$(CFG)" specified.
!MESSAGE You can specify a configuration when running NMAKE on this makefile
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "mediapak.mak" CFG="mediapak - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "mediapak - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "mediapak - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE
!ERROR An invalid configuration is specified.
!ENDIF
!IF "$(OS)" == "Windows_NT"
NULL=
!ELSE
NULL=nul
!ENDIF
################################################################################
# Begin Project
# PROP Target_Last_Scanned "mediapak - Win32 Debug"
CPP=cl.exe
!IF "$(CFG)" == "mediapak - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
OUTDIR=.\Release
INTDIR=.\Release
ALL : "$(OUTDIR)\mediapak.lib"
CLEAN :
-@erase "$(INTDIR)\mediapak.obj"
-@erase "$(OUTDIR)\mediapak.lib"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS"\
/Fp"$(INTDIR)/mediapak.pch" /YX /Fo"$(INTDIR)/" /c
CPP_OBJS=.\Release/
CPP_SBRS=.\.
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
BSC32_FLAGS=/nologo /o"$(OUTDIR)/mediapak.bsc"
BSC32_SBRS= \
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
LIB32_FLAGS=/nologo /out:"$(OUTDIR)/mediapak.lib"
LIB32_OBJS= \
"$(INTDIR)\mediapak.obj" \
"..\Exe\mscommon.lib"
"$(OUTDIR)\mediapak.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
$(LIB32) @<<
$(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
<<
!ELSEIF "$(CFG)" == "mediapak - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "msvcobj"
# PROP Intermediate_Dir "msvcobj"
# PROP Target_Dir ""
OUTDIR=.\msvcobj
INTDIR=.\msvcobj
ALL : "..\exe\mediapak.lib"
CLEAN :
-@erase "$(INTDIR)\mediapak.obj"
-@erase "..\exe\mediapak.lib"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
# ADD CPP /nologo /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "STRICT" /D "__FLAT__" /YX /c
CPP_PROJ=/nologo /MLd /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D\
"STRICT" /D "__FLAT__" /Fp"$(INTDIR)/mediapak.pch" /YX /Fo"$(INTDIR)/" /c
CPP_OBJS=.\msvcobj/
CPP_SBRS=.\.
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
BSC32_FLAGS=/nologo /o"$(OUTDIR)/mediapak.bsc"
BSC32_SBRS= \
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"..\exe\mediapak.lib"
LIB32_FLAGS=/nologo /out:"..\exe\mediapak.lib"
LIB32_OBJS= \
"$(INTDIR)\mediapak.obj" \
"..\Exe\mscommon.lib"
"..\exe\mediapak.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
$(LIB32) @<<
$(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
<<
!ENDIF
.c{$(CPP_OBJS)}.obj:
$(CPP) $(CPP_PROJ) $<
.cpp{$(CPP_OBJS)}.obj:
$(CPP) $(CPP_PROJ) $<
.cxx{$(CPP_OBJS)}.obj:
$(CPP) $(CPP_PROJ) $<
.c{$(CPP_SBRS)}.sbr:
$(CPP) $(CPP_PROJ) $<
.cpp{$(CPP_SBRS)}.sbr:
$(CPP) $(CPP_PROJ) $<
.cxx{$(CPP_SBRS)}.sbr:
$(CPP) $(CPP_PROJ) $<
################################################################################
# Begin Target
# Name "mediapak - Win32 Release"
# Name "mediapak - Win32 Debug"
!IF "$(CFG)" == "mediapak - Win32 Release"
!ELSEIF "$(CFG)" == "mediapak - Win32 Debug"
!ENDIF
################################################################################
# Begin Source File
SOURCE=.\mediapak.cpp
!IF "$(CFG)" == "mediapak - Win32 Release"
DEP_CPP_MEDIA=\
{$(INCLUDE)}"\.\entryinf.hpp"\
{$(INCLUDE)}"\.\mediapak.hpp"\
{$(INCLUDE)}"\.\pakentry.hpp"\
{$(INCLUDE)}"\common\block.hpp"\
{$(INCLUDE)}"\common\block.tpp"\
{$(INCLUDE)}"\common\diskinfo.hpp"\
{$(INCLUDE)}"\common\except.hpp"\
{$(INCLUDE)}"\common\filetime.hpp"\
{$(INCLUDE)}"\common\finddata.hpp"\
{$(INCLUDE)}"\common\fixup.hpp"\
{$(INCLUDE)}"\common\gdata.hpp"\
{$(INCLUDE)}"\common\gdata.tpp"\
{$(INCLUDE)}"\common\profile.hpp"\
{$(INCLUDE)}"\common\pvector.hpp"\
{$(INCLUDE)}"\common\pvector.tpp"\
{$(INCLUDE)}"\common\stdlib.hpp"\
{$(INCLUDE)}"\common\string.hpp"\
{$(INCLUDE)}"\common\systime.hpp"\
{$(INCLUDE)}"\common\types.hpp"\
{$(INCLUDE)}"\common\windows.hpp"\
"$(INTDIR)\mediapak.obj" : $(SOURCE) $(DEP_CPP_MEDIA) "$(INTDIR)"
!ELSEIF "$(CFG)" == "mediapak - Win32 Debug"
DEP_CPP_MEDIA=\
{$(INCLUDE)}"\.\entryinf.hpp"\
{$(INCLUDE)}"\.\mediapak.hpp"\
{$(INCLUDE)}"\.\pakentry.hpp"\
{$(INCLUDE)}"\common\array.hpp"\
{$(INCLUDE)}"\common\block.hpp"\
{$(INCLUDE)}"\common\block.tpp"\
{$(INCLUDE)}"\common\diskinfo.hpp"\
{$(INCLUDE)}"\common\except.hpp"\
{$(INCLUDE)}"\common\filetime.hpp"\
{$(INCLUDE)}"\common\finddata.hpp"\
{$(INCLUDE)}"\common\fixup.hpp"\
{$(INCLUDE)}"\common\gdata.hpp"\
{$(INCLUDE)}"\common\gdata.tpp"\
{$(INCLUDE)}"\common\openfile.hpp"\
{$(INCLUDE)}"\common\overlap.hpp"\
{$(INCLUDE)}"\common\profile.hpp"\
{$(INCLUDE)}"\common\pvector.hpp"\
{$(INCLUDE)}"\common\pvector.tpp"\
{$(INCLUDE)}"\common\stdio.hpp"\
{$(INCLUDE)}"\common\stdlib.hpp"\
{$(INCLUDE)}"\common\string.hpp"\
{$(INCLUDE)}"\common\systime.hpp"\
{$(INCLUDE)}"\common\types.hpp"\
{$(INCLUDE)}"\common\windows.hpp"\
{$(INCLUDE)}"\sample\puresmpl.hpp"\
{$(INCLUDE)}"\sample\wave.hpp"\
"$(INTDIR)\mediapak.obj" : $(SOURCE) $(DEP_CPP_MEDIA) "$(INTDIR)"
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=\Work\Exe\mscommon.lib
!IF "$(CFG)" == "mediapak - Win32 Release"
!ELSEIF "$(CFG)" == "mediapak - Win32 Debug"
!ENDIF
# End Source File
# End Target
# End Project
################################################################################

29
mediapak/MEDIAPAK.DSW Normal file
View File

@@ -0,0 +1,29 @@
Microsoft Developer Studio Workspace File, Format Version 5.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "mediapak"=.\mediapak.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

251
mediapak/MEDIAPAK.MAK Normal file
View File

@@ -0,0 +1,251 @@
# Microsoft Developer Studio Generated NMAKE File, Format Version 4.20
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
!IF "$(CFG)" == ""
CFG=mediapak - Win32 Debug
!MESSAGE No configuration specified. Defaulting to mediapak - Win32 Debug.
!ENDIF
!IF "$(CFG)" != "mediapak - Win32 Release" && "$(CFG)" !=\
"mediapak - Win32 Debug"
!MESSAGE Invalid configuration "$(CFG)" specified.
!MESSAGE You can specify a configuration when running NMAKE on this makefile
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "mediapak.mak" CFG="mediapak - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "mediapak - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "mediapak - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE
!ERROR An invalid configuration is specified.
!ENDIF
!IF "$(OS)" == "Windows_NT"
NULL=
!ELSE
NULL=nul
!ENDIF
################################################################################
# Begin Project
# PROP Target_Last_Scanned "mediapak - Win32 Debug"
CPP=cl.exe
!IF "$(CFG)" == "mediapak - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
OUTDIR=.\Release
INTDIR=.\Release
ALL : "$(OUTDIR)\mediapak.lib"
CLEAN :
-@erase "$(INTDIR)\mediapak.obj"
-@erase "$(OUTDIR)\mediapak.lib"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS"\
/Fp"$(INTDIR)/mediapak.pch" /YX /Fo"$(INTDIR)/" /c
CPP_OBJS=.\Release/
CPP_SBRS=.\.
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
BSC32_FLAGS=/nologo /o"$(OUTDIR)/mediapak.bsc"
BSC32_SBRS= \
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
LIB32_FLAGS=/nologo /out:"$(OUTDIR)/mediapak.lib"
LIB32_OBJS= \
"$(INTDIR)\mediapak.obj" \
"..\Exe\mscommon.lib"
"$(OUTDIR)\mediapak.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
$(LIB32) @<<
$(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
<<
!ELSEIF "$(CFG)" == "mediapak - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "msvcobj"
# PROP Intermediate_Dir "msvcobj"
# PROP Target_Dir ""
OUTDIR=.\msvcobj
INTDIR=.\msvcobj
ALL : "..\exe\mediapak.lib"
CLEAN :
-@erase "$(INTDIR)\mediapak.obj"
-@erase "..\exe\mediapak.lib"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
# ADD CPP /nologo /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "STRICT" /D "__FLAT__" /YX /c
CPP_PROJ=/nologo /MLd /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D\
"STRICT" /D "__FLAT__" /Fp"$(INTDIR)/mediapak.pch" /YX /Fo"$(INTDIR)/" /c
CPP_OBJS=.\msvcobj/
CPP_SBRS=.\.
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
BSC32_FLAGS=/nologo /o"$(OUTDIR)/mediapak.bsc"
BSC32_SBRS= \
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"..\exe\mediapak.lib"
LIB32_FLAGS=/nologo /out:"..\exe\mediapak.lib"
LIB32_OBJS= \
"$(INTDIR)\mediapak.obj" \
"..\Exe\mscommon.lib"
"..\exe\mediapak.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
$(LIB32) @<<
$(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
<<
!ENDIF
.c{$(CPP_OBJS)}.obj:
$(CPP) $(CPP_PROJ) $<
.cpp{$(CPP_OBJS)}.obj:
$(CPP) $(CPP_PROJ) $<
.cxx{$(CPP_OBJS)}.obj:
$(CPP) $(CPP_PROJ) $<
.c{$(CPP_SBRS)}.sbr:
$(CPP) $(CPP_PROJ) $<
.cpp{$(CPP_SBRS)}.sbr:
$(CPP) $(CPP_PROJ) $<
.cxx{$(CPP_SBRS)}.sbr:
$(CPP) $(CPP_PROJ) $<
################################################################################
# Begin Target
# Name "mediapak - Win32 Release"
# Name "mediapak - Win32 Debug"
!IF "$(CFG)" == "mediapak - Win32 Release"
!ELSEIF "$(CFG)" == "mediapak - Win32 Debug"
!ENDIF
################################################################################
# Begin Source File
SOURCE=.\mediapak.cpp
!IF "$(CFG)" == "mediapak - Win32 Release"
DEP_CPP_MEDIA=\
{$(INCLUDE)}"\.\entryinf.hpp"\
{$(INCLUDE)}"\.\mediapak.hpp"\
{$(INCLUDE)}"\.\pakentry.hpp"\
{$(INCLUDE)}"\common\block.hpp"\
{$(INCLUDE)}"\common\block.tpp"\
{$(INCLUDE)}"\common\diskinfo.hpp"\
{$(INCLUDE)}"\common\except.hpp"\
{$(INCLUDE)}"\common\filetime.hpp"\
{$(INCLUDE)}"\common\finddata.hpp"\
{$(INCLUDE)}"\common\fixup.hpp"\
{$(INCLUDE)}"\common\gdata.hpp"\
{$(INCLUDE)}"\common\gdata.tpp"\
{$(INCLUDE)}"\common\profile.hpp"\
{$(INCLUDE)}"\common\pvector.hpp"\
{$(INCLUDE)}"\common\pvector.tpp"\
{$(INCLUDE)}"\common\stdlib.hpp"\
{$(INCLUDE)}"\common\string.hpp"\
{$(INCLUDE)}"\common\systime.hpp"\
{$(INCLUDE)}"\common\types.hpp"\
{$(INCLUDE)}"\common\windows.hpp"\
"$(INTDIR)\mediapak.obj" : $(SOURCE) $(DEP_CPP_MEDIA) "$(INTDIR)"
!ELSEIF "$(CFG)" == "mediapak - Win32 Debug"
DEP_CPP_MEDIA=\
{$(INCLUDE)}"\.\entryinf.hpp"\
{$(INCLUDE)}"\.\mediapak.hpp"\
{$(INCLUDE)}"\.\pakentry.hpp"\
{$(INCLUDE)}"\common\array.hpp"\
{$(INCLUDE)}"\common\block.hpp"\
{$(INCLUDE)}"\common\block.tpp"\
{$(INCLUDE)}"\common\diskinfo.hpp"\
{$(INCLUDE)}"\common\except.hpp"\
{$(INCLUDE)}"\common\filetime.hpp"\
{$(INCLUDE)}"\common\finddata.hpp"\
{$(INCLUDE)}"\common\fixup.hpp"\
{$(INCLUDE)}"\common\gdata.hpp"\
{$(INCLUDE)}"\common\gdata.tpp"\
{$(INCLUDE)}"\common\openfile.hpp"\
{$(INCLUDE)}"\common\overlap.hpp"\
{$(INCLUDE)}"\common\profile.hpp"\
{$(INCLUDE)}"\common\pvector.hpp"\
{$(INCLUDE)}"\common\pvector.tpp"\
{$(INCLUDE)}"\common\stdio.hpp"\
{$(INCLUDE)}"\common\stdlib.hpp"\
{$(INCLUDE)}"\common\string.hpp"\
{$(INCLUDE)}"\common\systime.hpp"\
{$(INCLUDE)}"\common\types.hpp"\
{$(INCLUDE)}"\common\windows.hpp"\
{$(INCLUDE)}"\sample\puresmpl.hpp"\
{$(INCLUDE)}"\sample\wave.hpp"\
"$(INTDIR)\mediapak.obj" : $(SOURCE) $(DEP_CPP_MEDIA) "$(INTDIR)"
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=\Work\Exe\mscommon.lib
!IF "$(CFG)" == "mediapak - Win32 Release"
!ELSEIF "$(CFG)" == "mediapak - Win32 Debug"
!ENDIF
# End Source File
# End Target
# End Project
################################################################################

BIN
mediapak/MEDIAPAK.MDP Normal file

Binary file not shown.

23
mediapak/MEDIAPAK.PLG Normal file
View File

@@ -0,0 +1,23 @@
--------------------Configuration: mediapak - Win32 Debug--------------------
Begining build with project "E:\work\MEDIAPAK\mediapak.dsp", at root.
Active configuration is Win32 (x86) Static Library (based on Win32 (x86) Static Library)
Project's tools are:
"32-bit C/C++ Compiler for 80x86" with flags "/nologo /Zp1 /MTd /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "STRICT" /D "__FLAT__" /Fp".\msvcobj/mediapak.pch" /YX /Fo".\msvcobj/" /Fd".\msvcobj/" /FD /I /work" /I /parts" " " /c "
"Browser Database Maker" with flags "/nologo /o".\msvcobj/mediapak.bsc" "
"Library Manager" with flags "/nologo /out:"..\exe\mediapak.lib" "
"Custom Build" with flags ""
"<Component 0xa>" with flags ""
Creating temp file "E:\WINDOWS\TEMP\RSPF270.TMP" with contents </nologo /Zp1 /MTd /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "STRICT" /D "__FLAT__" /Fp".\msvcobj/mediapak.pch" /YX /Fo".\msvcobj/" /Fd".\msvcobj/" /FD /I /work" /I /parts" " " /c
"E:\work\MEDIAPAK\mediapak.cpp"
>
Creating command line "cl.exe @E:\WINDOWS\TEMP\RSPF270.TMP"
Creating command line "link.exe -lib /nologo /out:"..\exe\mediapak.lib" .\msvcobj\mediapak.obj ..\Exe\mscommon.lib"
Compiling...
mediapak.cpp
Creating library...
mediapak.lib - 0 error(s), 0 warning(s)

270
mediapak/Mediapak.cpp Normal file
View File

@@ -0,0 +1,270 @@
#include <mediapak/mediapak.hpp>
#include <mediapak/entryinf.hpp>
#include <mediapak/entryhdr.hpp>
#include <common/profile.hpp>
MediaPak::MediaPak(void)
: mEntries(0), mOffsetEntries(0)
{
}
MediaPak::MediaPak(const MediaPak &mediaPak)
{
*this=mediaPak;
}
MediaPak::~MediaPak()
{
close();
}
MediaPak &MediaPak::operator=(const MediaPak &/*mediaPak*/)
{ // private implementation
return *this;
}
BOOL MediaPak::open(const String &pathFileName,Mode openMode)
{
DWORD magic;
mPakFile.close();
mEntries=0;
if(CreateAlways==openMode)
{
mPakFile.open(pathFileName,FileHandle::ReadWrite,FileHandle::ShareRead,FileHandle::Overwrite);
if(!mPakFile.isOkay())return FALSE;
magic=HeaderMagic;
mEntries=0;
mPakFile.write((unsigned char*)&magic,sizeof(magic));
mOffsetEntries=mPakFile.tell();
mPakFile.write((unsigned char*)&mEntries,sizeof(mEntries));
}
else if(OpenExisting==openMode)
{
mPakFile.open(pathFileName,FileHandle::ReadWrite,FileHandle::ShareRead,FileHandle::Open);
if(!mPakFile.isOkay())return FALSE;
mPakFile.read((unsigned char*)&magic,sizeof(magic));
mOffsetEntries=mPakFile.tell();
if(magic!=HeaderMagic){mPakFile.close();return FALSE;}
mPakFile.read((unsigned char*)&mEntries,sizeof(mEntries));
}
else // OpenAlways
{
if(mPakFile.open(pathFileName,FileHandle::ReadWrite,FileHandle::ShareRead,FileHandle::Open))
{
if(!mPakFile.isOkay())return FALSE;
mPakFile.read((unsigned char*)&magic,sizeof(magic));
mOffsetEntries=mPakFile.tell();
if(magic!=HeaderMagic){mPakFile.close();return FALSE;}
mPakFile.read((unsigned char*)&mEntries,sizeof(mEntries));
}
else
{
mPakFile.open(pathFileName,FileHandle::ReadWrite,FileHandle::ShareRead,FileHandle::Mode(FileHandle::Create));
if(!mPakFile.isOkay())return FALSE;
magic=HeaderMagic;
mEntries=0;
mPakFile.write((unsigned char*)&magic,sizeof(magic));
mOffsetEntries=mPakFile.tell();
mPakFile.write((unsigned char*)&mEntries,sizeof(mEntries));
}
}
return TRUE;
}
void MediaPak::close(void)
{
if(!mPakFile.isOkay())return;
mPakFile.close();
}
BOOL MediaPak::add(const String &strPathFileName)
{
PakEntry::EntryType entryType;
PakEntry pakEntry;
String strExtension;
String strName;
FileHandle inFile;
Profile iniProfile;
if(!isOkay()||strPathFileName.isNull())return FALSE;
strExtension=strPathFileName.betweenString('.',0);
if(strExtension.isNull())return FALSE;
inFile.open(strPathFileName);
if(!inFile.isOkay())return FALSE;
strExtension.upper();
if(strExtension==String("BMP"))pakEntry.type(PakEntry::Bitmap);
else if(strExtension==String("WAV"))pakEntry.type(PakEntry::Sound);
else pakEntry.type(PakEntry::Blob);
strName=strPathFileName;
iniProfile.makeFileName(strName);
pakEntry.name(strName);
pakEntry.id(entries()+1);
pakEntry.rawData().size(inFile.size());
inFile.read((BYTE*)&(pakEntry.rawData()[0]),pakEntry.rawData().size());
inFile.close();
return add(pakEntry);
}
BOOL MediaPak::add(const PakEntry &pakEntry)
{
DWORD entryLength;
if(!isOkay())return FALSE;
mPakFile.seek(mOffsetEntries,FileHandle::SeekBegin);
mPakFile.read((unsigned char*)&mEntries,sizeof(mEntries));
for(int index=0;index<mEntries;index++)
{
mPakFile.read((unsigned char*)&entryLength,sizeof(entryLength));
mPakFile.seek(entryLength,FileHandle::SeekCurrent);
}
entryLength=sizeof(int)+sizeof(int)+sizeof(int)+sizeof(int)+pakEntry.name().length()+((PakEntry&)pakEntry).rawData().size(); // sizeof(int)+
mPakFile.write((unsigned char*)&entryLength,sizeof(entryLength));
mPakFile.write((DWORD)pakEntry.type());
mPakFile.write((DWORD)pakEntry.id());
mPakFile.write((DWORD)pakEntry.name().length());
mPakFile.write((unsigned char*)(char*)pakEntry.name(),pakEntry.name().length());
mPakFile.write(((PakEntry&)pakEntry).rawData().size());
mPakFile.write((unsigned char*)(BYTE*)&(((PakEntry&)pakEntry).rawData()[0]),((PakEntry&)pakEntry).rawData().size());
mEntries++;
mPakFile.seek(mOffsetEntries,FileHandle::SeekBegin);
mPakFile.write(mEntries);
return FALSE;
}
DWORD MediaPak::entries(void)const
{
return mEntries;
}
BOOL MediaPak::getEntry(PakEntry &pakEntry,DWORD entryIndex)
{
EntryHeader entryHeader;
String entryName;
int entryLength;
int workData;
if(!mPakFile.isOkay())return FALSE;
mPakFile.seek(mOffsetEntries,FileHandle::SeekBegin);
mPakFile.read((unsigned char*)&mEntries,sizeof(mEntries));
if(entryIndex>=mEntries)return FALSE;
for(int index=0;index<entryIndex;index++)
{
mPakFile.read((unsigned char*)&entryLength,sizeof(entryLength));
mPakFile.seek(entryLength,FileHandle::SeekCurrent);
}
if(!mEntries)return FALSE;
entryHeader.read(mPakFile);
pakEntry.type(PakEntry::EntryType(entryHeader.entryType()));
pakEntry.id(entryHeader.entryID());
entryName.reserve(entryHeader.entryNameLength()+1);
mPakFile.read((unsigned char *)(char*)entryName,entryHeader.entryNameLength());
pakEntry.name(entryName);
mPakFile.read((unsigned char*)&workData,sizeof(workData));
pakEntry.rawData().size(workData);
mPakFile.read((unsigned char*)(BYTE*)&(pakEntry.rawData()[0]),workData);
return TRUE;
}
BOOL MediaPak::getEntry(WaveForm &waveForm,DWORD entryIndex)
{
EntryHeader entryHeader;
PakEntry pakEntry;
String entryName;
int entryLength;
int workData;
if(!mPakFile.isOkay())return FALSE;
mPakFile.seek(mOffsetEntries,FileHandle::SeekBegin);
mPakFile.read((unsigned char*)&mEntries,sizeof(mEntries));
if(entryIndex>=mEntries)return FALSE;
for(int index=0;index<entryIndex;index++)
{
mPakFile.read((unsigned char*)&entryLength,sizeof(entryLength));
mPakFile.seek(entryLength,FileHandle::SeekCurrent);
}
if(!mEntries)return FALSE;
entryHeader.read(mPakFile);
pakEntry.type(PakEntry::EntryType(entryHeader.entryType()));
pakEntry.id(entryHeader.entryID());
entryName.reserve(entryHeader.entryNameLength()+1);
if(PakEntry::Sound!=pakEntry.type())return FALSE;
mPakFile.read((unsigned char *)(char*)entryName,entryHeader.entryNameLength());
pakEntry.name(entryName);
mPakFile.read((unsigned char*)&workData,sizeof(workData));
pakEntry.rawData().size(workData);
return waveForm.read(mPakFile);
/// return waveForm<<mPakFile;
}
BOOL MediaPak::isOkay(void)const
{
return mPakFile.isOkay();
}
// ***********************
BOOL MediaPak::getInfo(EntryInfo &entryInfo,DWORD entryIndex)
{
String entryName;
int entryLength;
int workData;
if(!mPakFile.isOkay())return FALSE;
mPakFile.seek(mOffsetEntries,FileHandle::SeekBegin);
mPakFile.read((unsigned char*)&mEntries,sizeof(mEntries));
if(entryIndex>=mEntries)return FALSE;
for(int index=0;index<entryIndex;index++)
{
mPakFile.read((unsigned char*)&entryLength,sizeof(entryLength));
mPakFile.seek(entryLength,FileHandle::SeekCurrent);
}
if(!mEntries)return FALSE;
mPakFile.read((unsigned char*)&entryLength,sizeof(entryLength));
mPakFile.read((unsigned char*)&workData,sizeof(workData));
entryInfo.type(PakEntry::EntryType(workData));
mPakFile.read((unsigned char*)&workData,sizeof(workData));
mPakFile.read((unsigned char*)&workData,sizeof(workData));
entryName.reserve(workData+1);
mPakFile.read((unsigned char *)(char*)entryName,workData);
entryInfo.name(entryName);
return TRUE;
}
BOOL MediaPak::getInfo(Array<EntryInfo> &entryInfoArray)
{
String entryName;
int entryLength;
int workData;
if(!mPakFile.isOkay())return FALSE;
mPakFile.seek(mOffsetEntries,FileHandle::SeekBegin);
mPakFile.read((unsigned char*)&mEntries,sizeof(mEntries));
if(!mEntries)return FALSE;
entryInfoArray.size(mEntries);
for(int index=0;index<mEntries;index++)
{
mPakFile.read((unsigned char*)&entryLength,sizeof(entryLength));
mPakFile.read((unsigned char*)&workData,sizeof(workData));
entryInfoArray[index].type(PakEntry::EntryType(workData));
mPakFile.read((unsigned char*)&workData,sizeof(workData));
mPakFile.read((unsigned char*)&workData,sizeof(workData));
entryName.reserve(workData+1);
mPakFile.read((unsigned char *)(char*)entryName,workData);
entryInfoArray[index].name(entryName);
if(index==mEntries-1)break;
mPakFile.read((unsigned char*)&workData,sizeof(workData));
mPakFile.seek(workData,FileHandle::SeekCurrent);
}
return TRUE;
}
// "MPAK0100" 40h,50h,41h,4Bh
// ENTRIES DD
// SIZE DD { THIS IS SIZEOF(TYPE)+SIZEOF(OFFSET)+SIZEOF(NAME)+SIZEOF(DATA)
// TYPE DD {SOUND=0,BITMAP=1,BLOB=2}
// OFFSET DD
// NAME { LENGTH DD, NAMEBYTES DB }
// DATA

46
mediapak/Mediapak.hpp Normal file
View File

@@ -0,0 +1,46 @@
#ifndef _MEDIAPAK_MEDIAPAK_HPP_
#define _MEDIAPAK_MEDIAPAK_HPP_
#ifndef _COMMON_WINDOWS_HPP_
#include <common/windows.hpp>
#endif
#ifndef _COMMON_OPENFILE_HPP_
#include <common/openfile.hpp>
#endif
#ifndef _COMMON_ARRAY_HPP_
#include <common/array.hpp>
#endif
#ifndef _SAMPLE_WAVEFORM_HPP_
#include <sample/wave.hpp>
#endif
#ifndef _MEDIAPAK_PAKENTRY_HPP_
#include <mediapak/pakentry.hpp>
#endif
class EntryInfo;
class MediaPak
{
public:
enum Mode{CreateAlways,OpenExisting,OpenAlways};
MediaPak(void);
virtual ~MediaPak();
BOOL open(const String &pathFileName,Mode openMode=OpenExisting);
void close(void);
BOOL add(const PakEntry &pakEntry);
BOOL add(const String &strPathFileName);
BOOL getEntry(PakEntry &pakEntry,DWORD entryIndex);
BOOL getEntry(WaveForm &waveForm,DWORD entryIndex);
BOOL getInfo(Array<EntryInfo> &entryInfoArray);
BOOL getInfo(EntryInfo &entryInfo,DWORD entryIndex);
DWORD entries(void)const;
BOOL isOkay(void)const;
private:
enum {HeaderMagic=0x4050414E};
MediaPak(const MediaPak &mediaPak);
MediaPak &operator=(const MediaPak &mediaPak);
FileHandle mPakFile;
DWORD mEntries;
DWORD mOffsetEntries;
};
#endif

416
mediapak/PAKTEST.MAK Normal file
View File

@@ -0,0 +1,416 @@
# Microsoft Developer Studio Generated NMAKE File, Format Version 4.20
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Application" 0x0101
!IF "$(CFG)" == ""
CFG=paktest - Win32 Debug
!MESSAGE No configuration specified. Defaulting to paktest - Win32 Debug.
!ENDIF
!IF "$(CFG)" != "paktest - Win32 Release" && "$(CFG)" !=\
"paktest - Win32 Debug"
!MESSAGE Invalid configuration "$(CFG)" specified.
!MESSAGE You can specify a configuration when running NMAKE on this makefile
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "paktest.mak" CFG="paktest - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "paktest - Win32 Release" (based on "Win32 (x86) Application")
!MESSAGE "paktest - Win32 Debug" (based on "Win32 (x86) Application")
!MESSAGE
!ERROR An invalid configuration is specified.
!ENDIF
!IF "$(OS)" == "Windows_NT"
NULL=
!ELSE
NULL=nul
!ENDIF
################################################################################
# Begin Project
# PROP Target_Last_Scanned "paktest - Win32 Debug"
RSC=rc.exe
MTL=mktyplib.exe
CPP=cl.exe
!IF "$(CFG)" == "paktest - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
OUTDIR=.\Release
INTDIR=.\Release
ALL : "$(OUTDIR)\paktest.exe"
CLEAN :
-@erase "$(INTDIR)\main.obj"
-@erase "$(INTDIR)\mediapak.obj"
-@erase "$(OUTDIR)\paktest.exe"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS"\
/Fp"$(INTDIR)/paktest.pch" /YX /Fo"$(INTDIR)/" /c
CPP_OBJS=.\Release/
CPP_SBRS=.\.
# ADD BASE MTL /nologo /D "NDEBUG" /win32
# ADD MTL /nologo /D "NDEBUG" /win32
MTL_PROJ=/nologo /D "NDEBUG" /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
BSC32_FLAGS=/nologo /o"$(OUTDIR)/paktest.bsc"
BSC32_SBRS= \
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\
odbccp32.lib /nologo /subsystem:windows /incremental:no\
/pdb:"$(OUTDIR)/paktest.pdb" /machine:I386 /out:"$(OUTDIR)/paktest.exe"
LINK32_OBJS= \
"$(INTDIR)\main.obj" \
"$(INTDIR)\mediapak.obj" \
"..\Exe\mscommon.lib" \
"..\Exe\sample.lib"
"$(OUTDIR)\paktest.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ELSEIF "$(CFG)" == "paktest - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "msvcobj"
# PROP Intermediate_Dir "msvcobj"
# PROP Target_Dir ""
OUTDIR=.\msvcobj
INTDIR=.\msvcobj
ALL : "$(OUTDIR)\paktest.exe"
CLEAN :
-@erase "$(INTDIR)\main.obj"
-@erase "$(INTDIR)\mediapak.obj"
-@erase "$(INTDIR)\vc40.idb"
-@erase "$(INTDIR)\vc40.pdb"
-@erase "$(OUTDIR)\paktest.exe"
-@erase "$(OUTDIR)\paktest.ilk"
-@erase "$(OUTDIR)\paktest.pdb"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
# ADD CPP /nologo /Zp1 /MTd /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "STRICT" /D "__FLAT__" /YX /c
CPP_PROJ=/nologo /Zp1 /MTd /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS"\
/D "STRICT" /D "__FLAT__" /Fp"$(INTDIR)/paktest.pch" /YX /Fo"$(INTDIR)/"\
/Fd"$(INTDIR)/" /c
CPP_OBJS=.\msvcobj/
CPP_SBRS=.\.
# ADD BASE MTL /nologo /D "_DEBUG" /win32
# ADD MTL /nologo /D "_DEBUG" /win32
MTL_PROJ=/nologo /D "_DEBUG" /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
BSC32_FLAGS=/nologo /o"$(OUTDIR)/paktest.bsc"
BSC32_SBRS= \
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386
# SUBTRACT LINK32 /pdb:none
LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo\
/subsystem:console /incremental:yes /pdb:"$(OUTDIR)/paktest.pdb" /debug\
/machine:I386 /out:"$(OUTDIR)/paktest.exe"
LINK32_OBJS= \
"$(INTDIR)\main.obj" \
"$(INTDIR)\mediapak.obj" \
"..\Exe\mscommon.lib" \
"..\Exe\sample.lib"
"$(OUTDIR)\paktest.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ENDIF
.c{$(CPP_OBJS)}.obj:
$(CPP) $(CPP_PROJ) $<
.cpp{$(CPP_OBJS)}.obj:
$(CPP) $(CPP_PROJ) $<
.cxx{$(CPP_OBJS)}.obj:
$(CPP) $(CPP_PROJ) $<
.c{$(CPP_SBRS)}.sbr:
$(CPP) $(CPP_PROJ) $<
.cpp{$(CPP_SBRS)}.sbr:
$(CPP) $(CPP_PROJ) $<
.cxx{$(CPP_SBRS)}.sbr:
$(CPP) $(CPP_PROJ) $<
################################################################################
# Begin Target
# Name "paktest - Win32 Release"
# Name "paktest - Win32 Debug"
!IF "$(CFG)" == "paktest - Win32 Release"
!ELSEIF "$(CFG)" == "paktest - Win32 Debug"
!ENDIF
################################################################################
# Begin Source File
SOURCE=.\mediapak.cpp
!IF "$(CFG)" == "paktest - Win32 Release"
DEP_CPP_MEDIA=\
{$(INCLUDE)}"\.\entryinf.hpp"\
{$(INCLUDE)}"\.\mediapak.hpp"\
{$(INCLUDE)}"\.\pakentry.hpp"\
{$(INCLUDE)}"\common\array.hpp"\
{$(INCLUDE)}"\common\assert.hpp"\
{$(INCLUDE)}"\common\block.hpp"\
{$(INCLUDE)}"\common\block.tpp"\
{$(INCLUDE)}"\common\diskinfo.hpp"\
{$(INCLUDE)}"\common\filetime.hpp"\
{$(INCLUDE)}"\common\finddata.hpp"\
{$(INCLUDE)}"\common\fixup.hpp"\
{$(INCLUDE)}"\common\gdata.hpp"\
{$(INCLUDE)}"\common\gdata.tpp"\
{$(INCLUDE)}"\common\openfile.hpp"\
{$(INCLUDE)}"\common\profile.hpp"\
{$(INCLUDE)}"\common\pvector.hpp"\
{$(INCLUDE)}"\common\pvector.tpp"\
{$(INCLUDE)}"\common\stdlib.hpp"\
{$(INCLUDE)}"\common\string.hpp"\
{$(INCLUDE)}"\common\systime.hpp"\
{$(INCLUDE)}"\common\types.hpp"\
{$(INCLUDE)}"\common\windows.hpp"\
{$(INCLUDE)}"\sample\wave.hpp"\
"$(INTDIR)\mediapak.obj" : $(SOURCE) $(DEP_CPP_MEDIA) "$(INTDIR)"
!ELSEIF "$(CFG)" == "paktest - Win32 Debug"
DEP_CPP_MEDIA=\
{$(INCLUDE)}"\.\entryinf.hpp"\
{$(INCLUDE)}"\.\mediapak.hpp"\
{$(INCLUDE)}"\.\pakentry.hpp"\
{$(INCLUDE)}"\common\array.hpp"\
{$(INCLUDE)}"\common\assert.hpp"\
{$(INCLUDE)}"\common\block.hpp"\
{$(INCLUDE)}"\common\block.tpp"\
{$(INCLUDE)}"\common\diskinfo.hpp"\
{$(INCLUDE)}"\common\fileio.hpp"\
{$(INCLUDE)}"\common\filetime.hpp"\
{$(INCLUDE)}"\common\finddata.hpp"\
{$(INCLUDE)}"\common\fixup.hpp"\
{$(INCLUDE)}"\common\gdata.hpp"\
{$(INCLUDE)}"\common\gdata.tpp"\
{$(INCLUDE)}"\common\intel.hpp"\
{$(INCLUDE)}"\common\iobuff.hpp"\
{$(INCLUDE)}"\common\memfile.hpp"\
{$(INCLUDE)}"\common\mmsystem.hpp"\
{$(INCLUDE)}"\common\openfile.hpp"\
{$(INCLUDE)}"\common\profile.hpp"\
{$(INCLUDE)}"\common\pvector.hpp"\
{$(INCLUDE)}"\common\pvector.tpp"\
{$(INCLUDE)}"\common\stdio.hpp"\
{$(INCLUDE)}"\common\stdlib.hpp"\
{$(INCLUDE)}"\common\string.hpp"\
{$(INCLUDE)}"\common\systime.hpp"\
{$(INCLUDE)}"\common\types.hpp"\
{$(INCLUDE)}"\common\windows.hpp"\
{$(INCLUDE)}"\sample\chunkid.hpp"\
{$(INCLUDE)}"\sample\datachnk.hpp"\
{$(INCLUDE)}"\sample\fmtchnk.hpp"\
{$(INCLUDE)}"\sample\genchnk.hpp"\
{$(INCLUDE)}"\sample\puresmpl.hpp"\
{$(INCLUDE)}"\sample\wave.hpp"\
{$(INCLUDE)}"\sys\stat.h"\
{$(INCLUDE)}"\sys\types.h"\
"$(INTDIR)\mediapak.obj" : $(SOURCE) $(DEP_CPP_MEDIA) "$(INTDIR)"
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=.\main.cpp
!IF "$(CFG)" == "paktest - Win32 Release"
DEP_CPP_MAIN_=\
{$(INCLUDE)}"\.\entryinf.hpp"\
{$(INCLUDE)}"\.\mediapak.hpp"\
{$(INCLUDE)}"\.\pakentry.hpp"\
{$(INCLUDE)}"\common\array.hpp"\
{$(INCLUDE)}"\common\assert.hpp"\
{$(INCLUDE)}"\common\block.hpp"\
{$(INCLUDE)}"\common\block.tpp"\
{$(INCLUDE)}"\common\callback.hpp"\
{$(INCLUDE)}"\common\callback.tpp"\
{$(INCLUDE)}"\common\cbdata.hpp"\
{$(INCLUDE)}"\common\cbptr.hpp"\
{$(INCLUDE)}"\common\fileio.hpp"\
{$(INCLUDE)}"\common\filetime.hpp"\
{$(INCLUDE)}"\common\gdata.hpp"\
{$(INCLUDE)}"\common\gdata.tpp"\
{$(INCLUDE)}"\common\guiwnd.hpp"\
{$(INCLUDE)}"\common\intel.hpp"\
{$(INCLUDE)}"\common\iobuff.hpp"\
{$(INCLUDE)}"\common\memfile.hpp"\
{$(INCLUDE)}"\common\mmsystem.hpp"\
{$(INCLUDE)}"\common\openfile.hpp"\
{$(INCLUDE)}"\common\pcallbck.hpp"\
{$(INCLUDE)}"\common\stdlib.hpp"\
{$(INCLUDE)}"\common\string.hpp"\
{$(INCLUDE)}"\common\systime.hpp"\
{$(INCLUDE)}"\common\types.hpp"\
{$(INCLUDE)}"\common\vhandler.hpp"\
{$(INCLUDE)}"\common\window.hpp"\
{$(INCLUDE)}"\common\windows.hpp"\
{$(INCLUDE)}"\common\windowsx.hpp"\
{$(INCLUDE)}"\sample\chunkid.hpp"\
{$(INCLUDE)}"\sample\devhndlr.hpp"\
{$(INCLUDE)}"\sample\fmtchnk.hpp"\
{$(INCLUDE)}"\sample\incaps.hpp"\
{$(INCLUDE)}"\sample\outcaps.hpp"\
{$(INCLUDE)}"\sample\pcmform.hpp"\
{$(INCLUDE)}"\sample\purewave.hpp"\
{$(INCLUDE)}"\sample\wave.hpp"\
{$(INCLUDE)}"\sample\wavefmex.hpp"\
{$(INCLUDE)}"\sample\wavehdr.hpp"\
{$(INCLUDE)}"\sample\wavein.hpp"\
{$(INCLUDE)}"\sample\waveout.hpp"\
{$(INCLUDE)}"\sys\stat.h"\
{$(INCLUDE)}"\sys\types.h"\
"$(INTDIR)\main.obj" : $(SOURCE) $(DEP_CPP_MAIN_) "$(INTDIR)"
!ELSEIF "$(CFG)" == "paktest - Win32 Debug"
DEP_CPP_MAIN_=\
{$(INCLUDE)}"\.\entryinf.hpp"\
{$(INCLUDE)}"\.\mediapak.hpp"\
{$(INCLUDE)}"\.\pakentry.hpp"\
{$(INCLUDE)}"\common\array.hpp"\
{$(INCLUDE)}"\common\assert.hpp"\
{$(INCLUDE)}"\common\block.hpp"\
{$(INCLUDE)}"\common\block.tpp"\
{$(INCLUDE)}"\common\callback.hpp"\
{$(INCLUDE)}"\common\callback.tpp"\
{$(INCLUDE)}"\common\cbdata.hpp"\
{$(INCLUDE)}"\common\cbptr.hpp"\
{$(INCLUDE)}"\common\fileio.hpp"\
{$(INCLUDE)}"\common\filetime.hpp"\
{$(INCLUDE)}"\common\gdata.hpp"\
{$(INCLUDE)}"\common\gdata.tpp"\
{$(INCLUDE)}"\common\guiwnd.hpp"\
{$(INCLUDE)}"\common\intel.hpp"\
{$(INCLUDE)}"\common\iobuff.hpp"\
{$(INCLUDE)}"\common\memfile.hpp"\
{$(INCLUDE)}"\common\mmsystem.hpp"\
{$(INCLUDE)}"\common\openfile.hpp"\
{$(INCLUDE)}"\common\pcallbck.hpp"\
{$(INCLUDE)}"\common\stdio.hpp"\
{$(INCLUDE)}"\common\stdlib.hpp"\
{$(INCLUDE)}"\common\string.hpp"\
{$(INCLUDE)}"\common\systime.hpp"\
{$(INCLUDE)}"\common\types.hpp"\
{$(INCLUDE)}"\common\vhandler.hpp"\
{$(INCLUDE)}"\common\window.hpp"\
{$(INCLUDE)}"\common\windows.hpp"\
{$(INCLUDE)}"\common\windowsx.hpp"\
{$(INCLUDE)}"\sample\chunkid.hpp"\
{$(INCLUDE)}"\sample\datachnk.hpp"\
{$(INCLUDE)}"\sample\devhndlr.hpp"\
{$(INCLUDE)}"\sample\fmtchnk.hpp"\
{$(INCLUDE)}"\sample\genchnk.hpp"\
{$(INCLUDE)}"\sample\puresmpl.hpp"\
{$(INCLUDE)}"\sample\purewave.hpp"\
{$(INCLUDE)}"\sample\wave.hpp"\
{$(INCLUDE)}"\sample\wavein.hpp"\
{$(INCLUDE)}"\sys\stat.h"\
{$(INCLUDE)}"\sys\types.h"\
"$(INTDIR)\main.obj" : $(SOURCE) $(DEP_CPP_MAIN_) "$(INTDIR)"
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=\Work\Exe\mscommon.lib
!IF "$(CFG)" == "paktest - Win32 Release"
!ELSEIF "$(CFG)" == "paktest - Win32 Debug"
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=\Work\Exe\sample.lib
!IF "$(CFG)" == "paktest - Win32 Release"
!ELSEIF "$(CFG)" == "paktest - Win32 Debug"
!ENDIF
# End Source File
# End Target
# End Project
################################################################################

BIN
mediapak/PAKTEST.MDP Normal file

Binary file not shown.

117
mediapak/Pakentry.hpp Normal file
View File

@@ -0,0 +1,117 @@
#ifndef _MEDIAPAK_PAKENTRY_HPP_
#define _MEDIAPAK_PAKENTRY_HPP_
#ifndef _COMMON_WINDOWS_HPP_
#include <common/windows.hpp>
#endif
#ifndef _COMMON_STRING_HPP_
#include <common/string.hpp>
#endif
#ifndef _COMMON_GLOBALDATA_HPP_
#include <common/gdata.hpp>
#endif
class PakEntry
{
public:
enum EntryType{Invalid,Sound,Bitmap,Blob};
PakEntry(void);
PakEntry(const PakEntry &pakEntry);
virtual ~PakEntry();
PakEntry &operator=(const PakEntry &pakEntry);
BOOL operator==(const PakEntry &pakEntry)const;
EntryType type(void)const;
void type(EntryType entryType);
const String &name(void)const;
void name(const String &name);
int id(void)const;
void id(int id);
GlobalData<BYTE> &rawData(void);
void rawData(GlobalData<BYTE> &rawData);
private:
EntryType mEntryType;
int mID;
String mName;
GlobalData<BYTE> mRawData;
};
inline
PakEntry::PakEntry(void)
{
}
inline
PakEntry::PakEntry(const PakEntry &pakEntry)
{
*this=pakEntry;
}
inline
PakEntry::~PakEntry()
{
}
inline
PakEntry &PakEntry::operator=(const PakEntry &pakEntry)
{
type(pakEntry.type());
name(pakEntry.name());
rawData(((PakEntry&)pakEntry).rawData());
return *this;
}
inline
BOOL PakEntry::operator==(const PakEntry &pakEntry)const
{
return (type()==pakEntry.type()&&
name()==pakEntry.name()&&
((PakEntry&)*this).rawData()==((PakEntry&)pakEntry).rawData());
}
inline
PakEntry::EntryType PakEntry::type(void)const
{
return mEntryType;
}
inline
void PakEntry::type(EntryType entryType)
{
mEntryType=entryType;
}
inline
const String &PakEntry::name(void)const
{
return mName;
}
inline
void PakEntry::name(const String &name)
{
mName=name;
}
inline
int PakEntry::id(void)const
{
return mID;
}
inline
void PakEntry::id(int id)
{
mID=id;
}
inline
GlobalData<BYTE> &PakEntry::rawData(void)
{
return mRawData;
}
inline
void PakEntry::rawData(GlobalData<BYTE> &rawData)
{
mRawData=rawData;
}
#endif

Binary file not shown.

BIN
mediapak/Release/vc60.idb Normal file

Binary file not shown.

29
mediapak/SCRAPS.TXT Normal file
View File

@@ -0,0 +1,29 @@
#if 0
BOOL MediaPak::open(const String &pathFileName,BOOL creationFlag)
{
DWORD magic;
mPakFile.close();
mEntries=0;
if(creationFlag)
{
mPakFile.open(pathFileName,FileHandle::ReadWrite,FileHandle::ShareRead,FileHandle::Overwrite);
magic=HeaderMagic;
mEntries=0;
mPakFile.write((unsigned char*)&magic,sizeof(magic));
mOffsetEntries=mPakFile.tell();
mPakFile.write((unsigned char*)&mEntries,sizeof(mEntries));
}
else
{
mPakFile.open(pathFileName,FileHandle::ReadWrite,FileHandle::ShareRead,FileHandle::Open);
if(!mPakFile.isOkay())return FALSE;
mPakFile.read((unsigned char*)&magic,sizeof(magic));
mOffsetEntries=mPakFile.tell();
if(magic!=HeaderMagic){mPakFile.close();return FALSE;}
mPakFile.read((unsigned char*)&mEntries,sizeof(mEntries));
}
return TRUE;
}
#endif

129
mediapak/entryhdr.hpp Normal file
View File

@@ -0,0 +1,129 @@
#ifndef _MEDIAPAK_ENTRYHEADER_HPP_
#define _MEDIAPAK_ENTRYHEADER_HPP_
#ifndef _COMMON_OPENFILE_HPP_
#include <common/openfile.hpp>
#endif
class EntryHeader
{
public:
EntryHeader(void);
EntryHeader(const EntryHeader &someEntryHeader);
virtual ~EntryHeader();
EntryHeader &operator=(const EntryHeader &someEntryHeader);
bool operator==(const EntryHeader &someEntryHeader)const;
bool read(FileHandle &someFileHandle);
bool write(FileHandle &someFileHandle);
int entryLength(void)const;
void entryLength(int entryLength);
int entryType(void)const;
void entryType(int entryType);
int entryID(void)const;
void entryID(int entryID);
int entryNameLength(void)const;
void entryNameLength(int entryNameLength);
private:
int mEntryLength;
int mEntryType;
int mEntryID;
int mEntryNameLength;
};
inline
EntryHeader::EntryHeader(void)
: mEntryLength(0), mEntryType(0), mEntryID(0), mEntryNameLength(0)
{
}
inline
EntryHeader::EntryHeader(const EntryHeader &someEntryHeader)
{
*this=someEntryHeader;
}
inline
EntryHeader::~EntryHeader()
{
}
inline
EntryHeader &EntryHeader::operator=(const EntryHeader &someEntryHeader)
{
entryLength(someEntryHeader.entryLength());
entryType(someEntryHeader.entryType());
entryID(someEntryHeader.entryID());
entryNameLength(someEntryHeader.entryNameLength());
return *this;
}
inline
bool EntryHeader::operator==(const EntryHeader &someEntryHeader)const
{
return (entryLength()==someEntryHeader.entryLength()&&
entryType()==someEntryHeader.entryType()&&
entryID()==someEntryHeader.entryID()&&
entryNameLength()==someEntryHeader.entryNameLength());
}
inline
bool EntryHeader::read(FileHandle &someFileHandle)
{
if(!someFileHandle.isOkay())return false;
return someFileHandle.read((unsigned char*)&mEntryLength,sizeof(mEntryLength)+sizeof(mEntryType)+sizeof(mEntryID)+sizeof(mEntryNameLength));
}
inline
bool EntryHeader::write(FileHandle &someFileHandle)
{
if(!someFileHandle.isOkay())return false;
return someFileHandle.write((unsigned char*)&mEntryLength,sizeof(mEntryLength)+sizeof(mEntryType)+sizeof(mEntryID)+sizeof(mEntryNameLength));
}
inline
int EntryHeader::entryLength(void)const
{
return mEntryLength;
}
inline
void EntryHeader::entryLength(int entryLength)
{
mEntryLength=entryLength;
}
inline
int EntryHeader::entryType(void)const
{
return mEntryType;
}
inline
void EntryHeader::entryType(int entryType)
{
mEntryType=entryType;
}
inline
int EntryHeader::entryID(void)const
{
return mEntryID;
}
inline
void EntryHeader::entryID(int entryID)
{
mEntryID=entryID;
}
inline
int EntryHeader::entryNameLength(void)const
{
return mEntryNameLength;
}
inline
void EntryHeader::entryNameLength(int entryNameLength)
{
mEntryNameLength=entryNameLength;
}
#endif

110
mediapak/mediapak.001 Normal file
View File

@@ -0,0 +1,110 @@
# Microsoft Developer Studio Project File - Name="mediapak" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 5.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=mediapak - Win32 Release
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "mediapak.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "mediapak.mak" CFG="mediapak - Win32 Release"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "mediapak - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "mediapak - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
!IF "$(CFG)" == "mediapak - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir ".\Release"
# PROP BASE Intermediate_Dir ".\Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir ".\Release"
# PROP Intermediate_Dir ".\Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "mediapak - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir ".\Debug"
# PROP BASE Intermediate_Dir ".\Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir ".\msvcobj"
# PROP Intermediate_Dir ".\msvcobj"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
# ADD CPP /nologo /Zp1 /MTd /GX /Z7 /Od /I "/work" /I "/parts" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "STRICT" /D "__FLAT__" /YX /FD /c
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"..\exe\mediapak.lib"
!ENDIF
# Begin Target
# Name "mediapak - Win32 Release"
# Name "mediapak - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
# Begin Source File
SOURCE=.\mediapak.cpp
# End Source File
# Begin Source File
SOURCE=..\Exe\mscommon.lib
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
# Begin Source File
SOURCE=.\entryinf.hpp
# End Source File
# Begin Source File
SOURCE=.\mediapak.hpp
# End Source File
# Begin Source File
SOURCE=.\pakentry.hpp
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project

116
mediapak/mediapak.dsp Normal file
View File

@@ -0,0 +1,116 @@
# Microsoft Developer Studio Project File - Name="mediapak" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=mediapak - Win32 Release
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "mediapak.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "mediapak.mak" CFG="mediapak - Win32 Release"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "mediapak - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "mediapak - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "mediapak - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir ".\Release"
# PROP BASE Intermediate_Dir ".\Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir ".\Release"
# PROP Intermediate_Dir ".\Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
# ADD CPP /nologo /MT /GX /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "__FLAT__" /D "STRICT" /YX /FD /c
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo
!ELSEIF "$(CFG)" == "mediapak - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir ".\Debug"
# PROP BASE Intermediate_Dir ".\Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir ".\msvcobj"
# PROP Intermediate_Dir ".\msvcobj"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
# ADD CPP /nologo /Gz /MTd /GX /Z7 /Od /D "_DEBUG" /D "STRICT" /D "__FLAT__" /D "WIN32" /D "_WINDOWS" /YX /FD /I /work" /I /parts" " " /c
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"..\exe\mediapak.lib"
!ENDIF
# Begin Target
# Name "mediapak - Win32 Release"
# Name "mediapak - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
# Begin Source File
SOURCE=.\mediapak.cpp
# End Source File
# Begin Source File
SOURCE=..\Exe\mscommon.lib
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
# Begin Source File
SOURCE=.\entryinf.hpp
# End Source File
# Begin Source File
SOURCE=.\mediapak.hpp
# End Source File
# Begin Source File
SOURCE=.\pakentry.hpp
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project