Opened 19 years ago

Closed 19 years ago

Last modified 2 years ago

#296 closed defect

simon (.voc) still does not work :(

Reported by: SF/olki Owned by: SF/ender
Priority: normal Component: Engine: AGOS
Version: Keywords:
Cc: Game: Simon the Sorcerer 1


Thanks for accepting my patch. Unfortunatly some of the modifications you made prevent the game from working.

Firstly, the game exits during startup with following error: Error: Midi song has no 'MThd'!

This is can be fixed with following patch:

--- simon.cpp 5 Jun 2002 02:59:35 -0000 1.31 +++ simon.cpp 5 Jun 2002 07:49:52 -0000 @@ -8444,7 +8444,7 @@

/* FIXME: not properly implemented */ if (_game & GAME_WIN) { - fseek(_game_file, _game_offsets_ptr[gss->MUSIC_INDEX_BASE + music],SEEK_SET); + fseek(_game_file, _game_offsets_ptr[gss->MUSIC_INDEX_BASE + music] - 1,SEEK_SET); f = _game_file;


Further, the game exits with a segfault ( Fatal signal: Segmentation Fault (SDL Parachute Deployed) ) as soon as voice is loaded.

I won't have time to find the bug during the next two weeks, but if it hasn't been fixed by you by then, expect to find another patch in the patches section ;)

Ticket imported from: #564756. Ticket imported from: bugs/296.

Attachments (1)

simonfix (2.5 KB ) - added by SF/olki 19 years ago.

Download all attachments as: .zip

Change History (12)

by SF/olki, 19 years ago

Attachment: simonfix added

comment:1 by SF/olki, 19 years ago

Well, I did manage to find a little bit of time ;).

Changes in sound/mixer.cpp had completly broken the sound support for simon. WAV support probably doesn't work anymore, but I didn't fix it since I have no way to test it. VOC support is fixed with the attached patch.

comment:2 by SF/ender, 19 years ago

Applied - does it work now? :)

comment:3 by SF/olki, 19 years ago

Much better. But while copy and pasting you forgot to change two values ;) :

8385c8385 < fread(buffer, size, 1, _effects_file); --- > fread(buffer, size, 1, _voice_file); 8387c8387 < _mixer->play_raw(&_effects_sound, buffer, size, samples_per_sec, --- > _mixer->play_raw(&_voice_sound, buffer, size, samples_per_sec,

Sound is a little bit choppy. I haven't found it's cause yet. Once I find a bit of time, I'll try to fix it.

comment:4 by fingolfin, 19 years ago

Owner: set to SF/ender

comment:5 by fingolfin, 19 years ago

Endy applied the patch, does it work now?

comment:6 by SF/olki, 19 years ago

Yes and No ;) Sound works. But Sounds that are long simply get cut off in the middle. This wasn't the case when SoundMixer::FLAG_FILE was used. But maybe this is only because I'm too incompetant to use malloc correctly ;)

comment:7 by SF/olki, 19 years ago

/sound/mixer.cpp is broken. This does not only affect simon, but also samnmax (intro), the dig and ft.

This patch should solve the problem:

diff -r1.29 mixer.cpp 202a203 > _realsize = size; 208d208 < _realsize = size;

comment:8 by SF/bbrox, 19 years ago

OK, just comitted your fix.

Let us know if this work or not so that we can close the bug :-)

comment:9 by SF/olki, 19 years ago

Great. Works like a charm ;)

comment:10 by fingolfin, 19 years ago

Status: newclosed

comment:11 by digitall, 2 years ago

Component: Engine: AGOS
Game: Simon the Sorcerer 1
Note: See TracTickets for help on using tickets.