Commit Graph

48 Commits

Author SHA1 Message Date
Alyssa Milburn
5efba92b8e HUGO: Coding style fixes. 2011-08-24 10:58:06 +02:00
Eugene Sandulenko
78f1ea7690 OSYSTEM: extended installTimerProc() with timer ID parameter 2011-08-06 11:28:35 +01:00
Max Horn
88913c0139 ALL: Remove trailing whitespaces
This tries to make our code a bit more compliant with our code formatting
conventions. For future use, this is the command I used:
  git ls-files "*.cpp" "*.h" | xargs sed -i -e 's/[ \t]*$//'
2011-06-20 00:59:48 +02:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Ori Avtalion
9414d7a6e2 JANITORIAL: Reduce header dependencies in shared code
Some backends may break as I only compiled SDL
2011-04-28 15:08:58 +03:00
Max Horn
7949d7c6de AUDIO: Move more common code to Audio::MidiPlayer
This also should fix some regressions from the previous
commits, related to MidiParser's either being leaked,
or being deleted and then used again (i.e., crashing).

I tested as many games as I had available, but further
testing of all affected engines is called for anyway.
2011-03-25 14:15:53 +01:00
Max Horn
6bf4745a1b HUGO: Move MidiDriver creation into MidiPlayer constructor 2011-03-25 14:15:43 +01:00
Max Horn
94e7a231fe HUGO: Change MidiPlayer to derive from Audio::MidiPlayer 2011-03-24 16:46:47 +01:00
Max Horn
e70fd59b35 ENGINES: Further simplify pseudo MidiDrivers; fix some regressions
The regression affected AGOS and maybe some others; specifically,
the real MidiDriver would have been deleted twice -- I previously
missed that the Engine instances takes care of freeing the real
MidiDriver, not the MidiPlayer wrapping it.

This commit should clarify the ownership of the real MidiDriver for
most pseudo MidiDrivers.
2011-03-23 16:49:41 +01:00
Max Horn
29847ea42d AUDIO: Change several fake MidiDrivers to MidiDriver_BASE subclasses
Many engines follow the advice in audio/midiparser.h and create a
"pseudo-MidiDriver" subclass. But MidiParser really only needs a tiny
subset of the MidiDriver capabilities, namely those found in
MidiDriver_BASE. So we try to subclass from that whenever possible; this
allows us to remove many stub methods, and enables further future
simplifications.
2011-03-23 15:25:47 +01:00
Max Horn
7b02dac3c5 ENGINES: Use Common::StackLock in more places 2011-03-23 15:25:46 +01:00
Max Horn
8982fff1b7 AUDIO: Add pure virtual MidiDriver::isOpen() method
This in turn enables modifying MidiDriver_MPU401::close() to allow
it to be called on a midi driver that has not yet been opened.

The specific issue that triggered me to make these changes was a
crash-upon-quit in HUGO, caused by it instantiating a midi driver,
then encountering an error (missing hugo.dat) *before* having
opened the new midi driver; the general cleanup code then tries
to close the (not yet opened) midi driver -> kaboom

Also fixed some engines which were leaking MidiDriver instances.
2011-03-22 23:51:47 +01:00
strangerke
2ad969bcac HUGO: Remove extra spaces at end of lines 2011-02-18 22:43:38 +01:00
strangerke
ec559360ab HUGO: Move several short function bodies from headers to cpp files 2011-02-18 22:24:32 +01:00
Arnaud Boutonné
c846231af3 HUGO: Replace Common::File by Common::ReadStream in several functions
svn-id: r55897
2011-02-12 16:20:57 +00:00
Arnaud Boutonné
87ab737e6b HUGO: Cleanup: fix style issue in Doxygen comments
svn-id: r55884
2011-02-11 20:27:48 +00:00
Max Horn
42ab839dd6 AUDIO: Rename sound/ dir to audio/
svn-id: r55850
2011-02-09 01:09:01 +00:00
Arnaud Boutonné
935b318798 HUGO: Suppress static variables (except one)
This also fixes the multiple-RTL related music bug reported by D. Gray

svn-id: r55758
2011-02-03 18:25:38 +00:00
Arnaud Boutonné
4263549536 HUGO: 'Constify' engine as much as possible
svn-id: r55741
2011-02-02 21:12:51 +00:00
Arnaud Boutonné
088b5f7743 HUGO: Use a separate thread for honker player and fix ticks per seconds
This fixes the speaker music stopped by message boxes, and the speaker music itself.

svn-id: r55700
2011-02-01 00:08:12 +00:00
Arnaud Boutonné
2846ce14f3 HUGO: Move text arrays to a separate class
svn-id: r55507
2011-01-25 00:32:48 +00:00
Arnaud Boutonné
3f6496d5b5 HUGO: Cleanup
Suppress almost all defines, rename constants

svn-id: r55451
2011-01-23 00:05:52 +00:00
Arnaud Boutonné
30a94d2af6 HUGO: Cleanup: Remove some C-style comments
svn-id: r55360
2011-01-20 19:33:31 +00:00
Arnaud Boutonné
868717b444 TOOLS: Add Dos intro music number in hugo.dat
svn-id: r55145
2011-01-07 15:14:38 +00:00
Arnaud Boutonné
fc130351f3 HUGO: Fix GCC warnings, second try (sorry)
svn-id: r55134
2011-01-06 14:30:34 +00:00
Arnaud Boutonné
910d2d577a HUGO: Fix GCC warnings
svn-id: r55133
2011-01-06 14:16:23 +00:00
Arnaud Boutonné
46e5149269 HUGO: Implement DOS player
svn-id: r55132
2011-01-06 14:06:04 +00:00
Arnaud Boutonné
fcf40ad626 HUGO: Some space/tab cleanups
svn-id: r55088
2011-01-01 23:57:50 +00:00
Arnaud Boutonné
5d6771e3df HUGO: Midi are no longer looping. Add handling to default playlist
svn-id: r55084
2011-01-01 10:51:57 +00:00
David Turner
98783a15e8 HUGO: Fix MIDI Player Memory Leak in H3 Win.
svn-id: r55040
2010-12-26 13:58:39 +00:00
Arnaud Boutonné
18d3e58825 HUGO: Suppress some obsolete volume related variables
svn-id: r55019
2010-12-22 22:56:42 +00:00
Arnaud Boutonné
6d30449d5a HUGO: Implement syncSoundSettings()
svn-id: r55018
2010-12-22 22:25:52 +00:00
Arnaud Boutonné
d9cc9d5800 HUGO: Replace function comments by doxygen comments
svn-id: r55014
2010-12-22 18:25:48 +00:00
Arnaud Boutonné
51e9cdb12c HUGO: Fix little bug in sound player
Mute/unmute sound and music at the same time

svn-id: r55013
2010-12-22 17:51:07 +00:00
Henry Bush
ada3c01cc1 HUGO: Set some volume levels to get the MAME adlib emul working
svn-id: r55000
2010-12-22 09:22:14 +00:00
Henry Bush
e20c902812 HUGO: Add music debug level, some cleanup when opening driver
svn-id: r54999
2010-12-22 09:09:38 +00:00
Arnaud Boutonné
76eb9d7f64 HUGO: Clean-up, move MidiPlayer class definition to .h file
svn-id: r54923
2010-12-15 20:37:09 +00:00
David Turner
7aca10bf9a HUGO: Close Memory Leak in PlayMusic() Function.
svn-id: r54664
2010-11-30 01:49:00 +00:00
Filippos Karapetis
325d93d5d8 HUGO: Fixed crash on exit when hugo.dat is not available
svn-id: r54228
2010-11-13 13:41:43 +00:00
David Turner
6c78ca4876 HUGO: Close two minor memory leaks.
Destructor added to SoundHandler and added delete for _intro in engine destructor.

svn-id: r54225
2010-11-13 08:08:58 +00:00
Arnaud Boutonné
35f220ace2 HUGO: cleanup: Suppress trailing spaces and tabs
svn-id: r53825
2010-10-25 13:31:01 +00:00
Arnaud Boutonné
0101a0e0bb HUGO: Moved _objects to a separate file
also suppressed some dereferencing

svn-id: r53674
2010-10-21 17:09:57 +00:00
Arnaud Boutonné
694758fd2a HUGO: Clean-up
svn-id: r52988
2010-10-03 08:08:42 +00:00
Arnaud Boutonné
ec9708694e HUGO: Hopefully fix GCC_PRINTF issue in util
* Add a mask in each call of Warn(), Error() and Box() not using one
* cleanup: use the same wording for 'End of namespace Hugo' in all files

svn-id: r52406
2010-08-27 09:48:53 +00:00
Oystein Eftevaag
a7541810b4 HUGO: Removed some dead code and redundant indirection
svn-id: r52404
2010-08-26 23:41:39 +00:00
Oystein Eftevaag
98400327c3 HUGO: Implemented basic MIDI support.
svn-id: r52403
2010-08-26 23:13:17 +00:00
Sven Hesse
54c1a1463f HUGO: Fix file permissions
755->644

svn-id: r52177
2010-08-17 23:55:31 +00:00
Eugene Sandulenko
06960d33e1 HUGO: Adding engine to the main tree
svn-id: r52137
2010-08-17 09:28:20 +00:00