[Scummvm-cvs-logs] CVS: scummvm/simon simon.cpp,1.72,1.73
Max Horn
fingolfin at users.sourceforge.net
Wed Nov 13 05:43:02 CET 2002
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/common map.h,1.5,1.6
- Next message: [Scummvm-cvs-logs] CVS: scummvm/backends/sdl sdl-common.cpp,1.14,1.15 sdl-common.h,1.6,1.7 sdl.cpp,1.11,1.12 sdl_gl.cpp,1.14,1.15
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/simon
In directory usw-pr-cvs1:/tmp/cvs-serv7350/simon
Modified Files:
simon.cpp
Log Message:
cleanup
Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -d -r1.72 -r1.73
--- simon.cpp 13 Nov 2002 07:58:26 -0000 1.72
+++ simon.cpp 13 Nov 2002 13:42:16 -0000 1.73
@@ -4674,11 +4674,15 @@
void SimonState::initSound()
{
+ uint i;
/* only read voice file in windows game */
if (_game & GAME_TALKIE) {
const char *s;
const char *e;
+ //
+ // Load voice file
+ //
_voice_offsets = NULL;
_voice_file = new File();
_voice_type = FORMAT_NONE;
@@ -4725,6 +4729,10 @@
if (_voice_file->read(_voice_offsets, gss->NUM_VOICE_RESOURCES * sizeof(uint32)) != gss->NUM_VOICE_RESOURCES * sizeof(uint32))
error("Cannot read voice offsets");
+#ifdef SCUMM_BIG_ENDIAN
+ for (i = 0; i < gss->NUM_VOICE_RESOURCES; i++)
+ _voice_offsets[i] = FROM_LE_32(_voice_offsets[i]);
+#endif
#ifdef USE_MAD
if (_voice_type == FORMAT_MP3) {
uint8 buf[2048];
@@ -4740,6 +4748,9 @@
#endif
}
+ //
+ // Load effects
+ //
_effects_offsets = NULL;
_effects_file = new File();
_effects_type = FORMAT_VOC;
@@ -4772,6 +4783,10 @@
if (_effects_file->read(_effects_offsets, gss->NUM_EFFECTS_RESOURCES * sizeof(uint32)) != gss->NUM_EFFECTS_RESOURCES * sizeof(uint32))
error("Cannot read effects offsets");
+#ifdef SCUMM_BIG_ENDIAN
+ for (i = 0; i < gss->NUM_EFFECTS_RESOURCES; i++)
+ _effects_offsets[i] = FROM_LE_32(_effects_offsets[i]);
+#endif
#ifdef USE_MAD
if (_effects_type == FORMAT_MP3) {
uint8 buf[2048];
@@ -4789,18 +4804,6 @@
_effects_type = FORMAT_NONE;
}
-#if defined(SCUMM_BIG_ENDIAN)
- uint r;
- if (_voice_offsets) {
- for (r = 0; r < gss->NUM_VOICE_RESOURCES; r++)
- _voice_offsets[r] = FROM_LE_32(_voice_offsets[r]);
- }
-
- if (_effects_offsets) {
- for (r = 0; r < gss->NUM_EFFECTS_RESOURCES; r++)
- _effects_offsets[r] = FROM_LE_32(_effects_offsets[r]);
- }
-#endif
}
}
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/common map.h,1.5,1.6
- Next message: [Scummvm-cvs-logs] CVS: scummvm/backends/sdl sdl-common.cpp,1.14,1.15 sdl-common.h,1.6,1.7 sdl.cpp,1.11,1.12 sdl_gl.cpp,1.14,1.15
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list