add support for Mac D1 sounds (converted to RAW format), update Xcode project
This commit is contained in:
parent
b4bbed6ed8
commit
2b94bf476a
|
@ -1,5 +1,9 @@
|
|||
D2X-Rebirth Changelog
|
||||
|
||||
20080227
|
||||
--------
|
||||
d2x-rebirth.xcodeproj, main/bmread.c, main/piggy.c: allow external sound files to be put in 'Sounds' folder, update Xcode project
|
||||
|
||||
20080225
|
||||
--------
|
||||
include/loadgl.h, main/newmenu.c, main/titles.c: Added definitions for OpenGL fucntions which might not be included in system headers; Cleaned and declared briefings palette hacks (EMULATING_D1 needs work!); Menu right border shadow was too wide;
|
||||
|
|
|
@ -608,7 +608,6 @@
|
|||
EB0420D10A341042002CC961 /* screens.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = screens.h; sourceTree = "<group>"; };
|
||||
EB0420D20A341042002CC961 /* scores.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = scores.h; sourceTree = "<group>"; };
|
||||
EB0420D30A341042002CC961 /* robot.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = robot.h; sourceTree = "<group>"; };
|
||||
EB0420D40A341042002CC961 /* reorder.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = reorder.h; sourceTree = "<group>"; };
|
||||
EB0420D50A341042002CC961 /* render.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = render.h; sourceTree = "<group>"; };
|
||||
EB0420D60A341042002CC961 /* powerup.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = powerup.h; sourceTree = "<group>"; };
|
||||
EB0420D70A341042002CC961 /* polyobj.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = polyobj.h; sourceTree = "<group>"; };
|
||||
|
@ -1223,7 +1222,6 @@
|
|||
EB0420D70A341042002CC961 /* polyobj.h */,
|
||||
EB0420D60A341042002CC961 /* powerup.h */,
|
||||
EB0420D50A341042002CC961 /* render.h */,
|
||||
EB0420D40A341042002CC961 /* reorder.h */,
|
||||
EB0420D30A341042002CC961 /* robot.h */,
|
||||
EB0420D20A341042002CC961 /* scores.h */,
|
||||
EB0420D10A341042002CC961 /* screens.h */,
|
||||
|
|
|
@ -314,20 +314,22 @@ int ds_load(int skip, char * filename ) {
|
|||
}
|
||||
|
||||
removeext(filename, fname);
|
||||
sprintf(rawname, "%s.%s", fname, (GameArg.SndDigiSampleRate==SAMPLE_RATE_22K) ? "r22" : "raw");
|
||||
sprintf(rawname, "Sounds/%s.%s", fname, (GameArg.SndDigiSampleRate==SAMPLE_RATE_22K) ? "r22" : "raw");
|
||||
|
||||
i=piggy_find_sound( fname );
|
||||
if (i!=255) {
|
||||
return i;
|
||||
}
|
||||
|
||||
cfp = cfopen( rawname, "rb" );
|
||||
cfp = PHYSFSX_openDataFile(rawname);
|
||||
|
||||
if (cfp!=NULL) {
|
||||
new.length = cfilelength( cfp );
|
||||
MALLOC( new.data, ubyte, new.length );
|
||||
cfread( new.data, 1, new.length, cfp );
|
||||
cfclose(cfp);
|
||||
new.bits = 8;
|
||||
new.freq = 11025;
|
||||
// -- mprintf( (0, "S" ));
|
||||
// -- mprintf( (0, "<%s>", rawname ));
|
||||
} else {
|
||||
|
@ -408,9 +410,9 @@ int gamedata_read_tbl(int pc_shareware)
|
|||
|
||||
// Open BITMAPS.TBL for reading.
|
||||
have_bin_tbl = 0;
|
||||
InfoFile = cfopen( "BITMAPS.TBL", "rb" );
|
||||
InfoFile = PHYSFSX_openDataFile("BITMAPS.TBL");
|
||||
if (InfoFile == NULL) {
|
||||
InfoFile = cfopen("BITMAPS.BIN", "rb");
|
||||
InfoFile = PHYSFSX_openDataFile("BITMAPS.BIN");
|
||||
if (InfoFile == NULL)
|
||||
return 0; //missing BITMAPS.TBL and BITMAPS.BIN file
|
||||
have_bin_tbl = 1;
|
||||
|
|
|
@ -1666,6 +1666,8 @@ void piggy_dump_all()
|
|||
|
||||
void piggy_close()
|
||||
{
|
||||
int i;
|
||||
|
||||
piggy_close_file();
|
||||
|
||||
if (BitmapBits)
|
||||
|
@ -1674,6 +1676,10 @@ void piggy_close()
|
|||
if ( SoundBits )
|
||||
d_free( SoundBits );
|
||||
|
||||
for (i = 0; i < Num_sound_files; i++)
|
||||
if (SoundOffset[i] == 0)
|
||||
d_free(GameSounds[i].data);
|
||||
|
||||
hashtable_free( &AllBitmapsNames );
|
||||
hashtable_free( &AllDigiSndNames );
|
||||
|
||||
|
|
Loading…
Reference in a new issue