Commit Graph

299 Commits

Author SHA1 Message Date
Max Horn
754c250c65 HUGO: When erroring out due to a missing file, tell the user which file is missing 2011-03-24 16:46:45 +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
Max Horn
dd88f39bc7 HUGO: Replace Utils::Box by Utils::notifyBox + Common::String::format 2011-03-21 13:16:35 +01:00
Max Horn
458ebbafd2 HUGO: Split Utils::Box -> new funcs Utils::yesNoBox and Utils::promptBox
This also fixes a bug in the kBoxPrompt code (it returned a pointer to
the content of a temporary string object).
2011-03-21 12:53:50 +01:00
dhewg
dfa5f743de HUGO: Init volume levels on startup 2011-03-19 16:04:53 +01:00
strangerke
563ac93c16 Hugo: Use EntryDialog in Box() 2011-03-17 20:07:24 +01:00
Eugene Sandulenko
0389bd0c4b HUGO: Fix compilation 2011-03-17 17:46:38 +02:00
Eugene Sandulenko
4ea65d0a1e HUGO: renamed guard #defines 2011-03-17 17:31:09 +02:00
Eugene Sandulenko
901b5e2097 HUGO: Initial work on user input dialog 2011-03-17 17:31:05 +02:00
Eugene Sandulenko
c813391455 HUGO: Renamed menu.* to dialogs.* 2011-03-17 17:31:02 +02:00
strangerke
9fb28410b5 HUGO: Misc savegame modifications
- Add initial savegame on slot 0
- Save viewstate as it may now contain several different values when saving
- Fix loading from GMM
- Implement ctrl-N
2011-03-08 00:21:02 +01:00
strangerke
29b5b4afa6 HUGO: Fix registration messages for H1 Dos Freeware version (in intro) 2011-03-07 19:40:20 +01:00
Max Horn
e9dad7859c HUGO: Silence GCC warning 2011-03-02 14:07:46 +01:00
D G Turner
22ebc2b724 HUGO: Correct 2 Memory Leaks in DAT Object Loading. 2011-03-01 07:37:26 +00:00
D G Turner
95b1bfa0be HUGO: Correction for Schedule saveActions() mistake. 2011-03-01 07:02:21 +00:00
strangerke
d05428015e HUGO: Rewrite saveActions() and readActions() in order to be platform and endian safe.
This breaks (again) the savegame file formats... Hopefully for the last time
2011-03-01 00:44:28 +01:00
strangerke
41927e0f6d HUGO: cleanup, fix several bad indirections (thanks LordHoto) 2011-02-28 23:15:06 +01:00
strangerke
560eb302f1 HUGO: Fix assert while saving under linux 2011-02-28 21:58:10 +01:00
strangerke
1b16b482f9 HUGO: Remove forgotten debug message 2011-02-28 00:59:38 +01:00
strangerke
a4d4dc81a9 HUGO: rewrite saveEvents() and restoreEvents() in order to be endian and platform safe 2011-02-28 00:58:25 +01:00
strangerke
02e51f9de5 HUGO: Set all the palette instead of only one color in remapPal.
This fixes the palette issue after the cave in H3
2011-02-27 11:10:09 +01:00
strangerke
a99b394836 HUGO: Better fix for graphics glitches in DOS versions, fix H3 ending animation 2011-02-27 01:04:49 +01:00
strangerke
756a343cb8 HUGO: Fix graphic glitches in DOS versions 2011-02-26 14:06:30 +01:00
strangerke
fbf41fc66a HUGO:
- Increase savegame version, as it has changed due to RGBa->RGB modification
- Fix regression in restorePal()
- Implement load from GMM
2011-02-24 19:59:36 +01:00
strangerke
38f70f66f0 HUGO: Fix crash when Hugo.dat not found (or wrong version detected) 2011-02-20 11:33:17 +01:00
strangerke
93f25b73be HUGO/TOOLS: reorder things in HUGO.DAT, move from RGBA to RGB 2011-02-20 11:32:00 +01:00
strangerke
bb51d090a8 HUGO: Fix a bug in setCursorPal() introduced by recent palette modifications 2011-02-20 10:39:32 +01:00
strangerke
c9223b9b9b HUGO: Some more refactoring 2011-02-20 10:37:41 +01:00
Johannes Schickel
e21d6e0d11 Merge branch 'osystem-palette' of https://github.com/lordhoto/scummvm into master
Conflicts:
	backends/platform/android/android.cpp
	engines/sci/graphics/screen.cpp
	engines/sci/graphics/transitions.cpp
2011-02-19 21:46:45 +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
strangerke
399b59a583 HUGO: Avoid duplicated code in functions related to HUGO.DAT 2011-02-18 08:11:55 +01:00
Johannes Schickel
a02454644a Merge branch 'master' into osystem-palette
Conflicts:
	backends/platform/wii/osystem_gfx.cpp
2011-02-15 23:42:50 +01:00
strangerke
2f0b35bbb5 HUGO: Replace cypher by a global variable, clean engine destructor 2011-02-15 19:30:15 +01:00
strangerke
402ac930fe HUGO: more refactoring and encapsulation 2011-02-15 10:15:21 +01:00
Johannes Schickel
c796dbe7c2 HUGO: Adapt to the setPalette RGBA->RGB change.
This is currently done by converting the internal palette from RGBA(?) to RGB
when setPalette / replaceCursorPalette is called.

This change is not tested, since I do not have any Hugo game.
2011-02-14 17:08:32 +01:00
strangerke
97852d473e HUGO: Some more refactoring
Move _hotspots to mouse class and encapsulate it, rename some variables in route class
2011-02-14 08:31:01 +01:00
strangerke
1036979de3 HUGO: Fix a bug in engine destructor 2011-02-12 19:29:56 +01:00
strangerke
c04682b3ae HUGO: Start to simplify hugo.dat loading 2011-02-12 19:01:46 +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é
4ad7f20b77 HUGO: little optimization in decodeString(), cleanup
svn-id: r55894
2011-02-12 14:37:59 +00:00
Arnaud Boutonné
69d907151b HUGO: Cleanup based on Fingolfin comments
svn-id: r55887
2011-02-12 08:13:35 +00:00
Arnaud Boutonné
87ab737e6b HUGO: Cleanup: fix style issue in Doxygen comments
svn-id: r55884
2011-02-11 20:27:48 +00:00
Arnaud Boutonné
fffb8f5617 HUGO: Fix warning "virtual function override intended?" reported by LordHoto (thanks for the explanation)
svn-id: r55881
2011-02-11 07:42:35 +00:00
Arnaud Boutonné
7bca1f136c HUGO: Fix regression in H3: game exits at the end of the intro
svn-id: r55880
2011-02-11 07:24:42 +00:00
Arnaud Boutonné
3c5fb26a91 HUGO: refactoring: move boundaries to object class
svn-id: r55879
2011-02-11 07:12:29 +00:00
Max Horn
42ab839dd6 AUDIO: Rename sound/ dir to audio/
svn-id: r55850
2011-02-09 01:09:01 +00:00