Commit Graph

1170 Commits

Author SHA1 Message Date
Johannes Schickel
a7cc5bd301 AGOS: Properly overwrite hasFile from SearchSet in ArchiveMan.
Formerly the hasFile method was non-const, thus did not overwrite the virtual
hasFile method of SearchSet. Since all accesses to this function have been
done through a ArchiveMan typed variable, the missing overwrite should not
have caused any trouble.

It looks like this was forgotten in a6ec4f70da.
2012-01-27 20:10:31 +01:00
Johannes Schickel
baafd74b66 AGOS: Fix silly copy&paste mistake, which broke Vorbis and MP3 support. 2012-01-26 01:35:06 +01:00
Johannes Schickel
c82a75df69 AGOS: Rework digital sound playback.
The BaseSound class does now only save the sound filename instead of a file
handle. When a new sound is started a new file handle is created, which
assures that each sound uses a different file handle and thus allows for
directly streaming sounds from disk.

This fixes bug #3475610
"AGOS: Wrong sound effects during intro of Simon 2 (DOS)".
2012-01-26 01:01:41 +01:00
Andrea Corna
a6ec4f70da COMMON: Make more members of Archive constant. 2011-12-13 17:55:57 +01:00
Travis Howell
105c90b9d5 AGOS: Fix using saved games from the CD versions of Simon the Sorcerer 2, on the floppy disk versions of Simon the Sorcerer 2. 2011-11-19 17:05:23 +11:00
Strangerke
bab4b6f729 LAUNCHER: Introduce GUIO0() in order to replace GUIO1(GUIO_NONE) 2011-11-16 22:38:58 +01:00
D G Turner
783e3fea62 AGOS: Fix engine crash when playing Feeble Files from cabinet datafiles.
Playing with cabinet datafiles, this failed to find the "Charisma.smk"
file in the cabinets when in the Recreation (TV) room on Cygnus Alpha
and this caused an engine abort after the GUI dialog warning of the
"missing" video file. This was due to animation.cpp code using
Common::file::exists() instead of going via the ArchiveMan.

However,a hasFile() method implementation was also required to implement
fallback to decompressed (movie) files if the file requested is not in
the cabinet or the cabinet has been externally decompressed to files.

Thanks to fuzzie for the hasFile() patch.

Also, removed noisy warning which this correction triggers repeatedly in
installshield_cab.cpp hasFile(). This looks like leftover from
debugging, so not critical.
2011-11-13 23:44:38 +00:00
Travis Howell
b05187c1a7 AGOS: Merge duplicate code remaining from refactoring in the past. 2011-11-03 13:02:12 +11:00
Eugene Sandulenko
0e1affcc97 AGOS: Fix warnings 2011-11-02 22:55:58 +00:00
Strangerke
4e0c574fd2 LAUNCHER: Add GUIO_NOASPECT to agos 2011-10-24 00:57:30 +02:00
Eugene Sandulenko
32972a5ffb AD: Switched rest of the engines to new GUIO 2011-10-23 17:53:13 +01:00
Johannes Schickel
3e1405b939 AUDIO: Add default disposeAfterUse value to makeVOCStream again. 2011-10-09 21:24:06 +02:00
Johannes Schickel
221434a83f AUDIO: Remove unused makeVOCStream interface. 2011-10-09 21:23:29 +02:00
Travis Howell
d5a763b763 AGOS: Update MidiPlayer::~MidiPlayer() to match the default implementation. Hopefully will fix bug #3419778, thanks to digitall for the pointer. 2011-10-07 14:38:24 +11:00
Travis Howell
f20b8ecaa1 AGOS: Fix dumping all images option. 2011-10-07 00:04:08 +11:00
Travis Howell
460c4eca26 AGOS: Fix loading VGA files from InstallShield cab file. 2011-09-25 10:32:20 +10:00
Johannes Schickel
507b9a75e7 AGOS: Made some static data const. 2011-09-08 00:38:39 +02:00
Travis Howell
039805ad3b AGOS: Fix regression when starting Personal Nightmare, or disabling AGOS2. 2011-08-28 16:40:03 +10:00
Eugene Sandulenko
35aa235e4b Merge pull request #79 from clone2727/agos_cab
AGOS: Add support for loading data from Windows (InstallShield) installer archives
2011-08-27 08:21:57 -07:00
Travis Howell
5346ac18b7 AGOS: Integrate InstallShield support. 2011-08-27 11:00:24 -04:00
Travis Howell
5e174cbfe4 AGOS: Fix load/save issues in Waxworks, which were caused by error in loadRoomItems. 2011-08-27 10:46:54 +10:00
Johannes Schickel
f705a9b286 AGOS: Proper implementation of the Simon 1 demo aka Accolade MIDI parser.
This is based on the Elvira 1 demo.
2011-08-21 04:49:48 +02:00
Johannes Schickel
7173dbfd35 AGOS: Use delete instead of free on an C++ object.
This fixes some ugly valgrind warnings and some crashes when quitting AGOS
games for me.
2011-08-21 04:48:58 +02:00
Matthew Hoops
f91f0f2756 AGOS: Add an archive class for handling InstallShield Cabinets 2011-08-20 16:42:09 -04:00
Johannes Schickel
5a1f75eae3 AGOS: Slight cleanup.
Now AgosEngine::_language is of type Common::Language instead of uint16. It is
currently only used with values of that enumeration, thus it should be safe to
use that type for it too.
2011-08-20 19:30:18 +02:00
Eugene Sandulenko
52147dc0c0 AGOS: Switched pause dialog to getLanguageKeyYes usage 2011-08-20 12:52:34 +01:00
Filippos Karapetis
21b2a7064f Merge pull request #63 from tsoliman/detection-tables
Some missing ADGF_CD and ADGF_UNSTABLE flags
2011-08-13 12:24:30 -07:00
Ori Avtalion
c3cfdd36a5 AGOS: Fix struct/class mismatch 2011-08-09 00:52:33 +03:00
Christoph Mallon
a5a8833c05 COMMON: Add DisposablePtr<T>, which replaces many repeated implementations of a dispose flag. 2011-08-07 15:19:08 +02:00
Christoph Mallon
5f4d83c38d AGOS: Correct off-by-one error in range check for setting the debug level. 2011-08-07 15:19:07 +02:00
Christoph Mallon
0a458019b3 AGOS: Replace if-cascade by switch. 2011-08-07 15:19:07 +02:00
Christoph Mallon
23a0f5318c JANITORIAL: Remove trailing empty lines. 2011-08-07 13:53:33 +02:00
Tarek Soliman
79efb47cf6 AGOS: Flag CD titles with ADGF_CD 2011-08-06 23:32:37 -05:00
Eugene Sandulenko
6e795a89b0 AGOS: Reduced header dependency 2011-08-06 11:28:40 +01:00
Littleboy
b694a78f62 ANALYSIS: Add static casts to is* functions
This fixes a potential problem with passing char values that would be sign-extended and yield unexpected results.
See http://msdn.microsoft.com/en-us/library/ms245348.aspx
2011-06-23 08:52:52 -04:00
Julien
a8b13e8a6b AGOS: Fix operator precedence warning 2011-06-23 15:11:36 +08: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
Johannes Schickel
0246bdf74e AGOS: Get rid of unused variable. 2011-06-18 19:56:07 +02:00
Max Horn
5455fc5ff4 AGOS: Replace vsprintf by Common::String::vformat 2011-06-18 01:36:15 +02:00
Max Horn
593b929047 DETECTOR: Separate code for handling obsolete gameids from advanced detector
This includes a renaming of ADObsoleteGameID to Engine::ObsoleteGameID,
and AdvancedDetector::findGameID now is Engines::findGameID.

Doxygen comments were added or improved
2011-06-14 18:52:07 +02:00
Max Horn
7c992d6598 DETECTOR: Merge ADParams into AdvancedMetaEngine 2011-06-14 18:17:01 +02:00
Thierry Crozat
06bbb57ad7 I18N: Make many more GUI MessageDialog strings translatable 2011-06-13 22:19:18 +01:00
Max Horn
58c36801f4 AGOS: Switch to alternate AdvancedMetaEngine, avoid ADParams 2011-06-10 22:15:40 +02:00
Max Horn
4827cc914a ENGINES: Change incorrect use of 'target' to 'gameid' 2011-06-10 22:15:40 +02:00
md5
c713628721 AGOS: Silenced a false positive warning in MSVC 2011-05-29 19:48:47 +03:00
Matthew Hoops
9539017ee3 ALL: initialise -> initialize 2011-05-25 11:17:11 -04:00
Matthew Hoops
eea482fa43 ALL: behaviour -> behavior 2011-05-25 10:50:46 -04:00
Max Horn
183e018c19 AGOS: cleanup 2011-05-17 15:36:25 +02:00
Max Horn
4cbe4ede66 COMMON: Registers RandomSources in constructor with the event recorder
This also removes the dependency of engines on the event recorder header
and API, and will make it easier to RandomSources that are not properly
registered.
2011-05-17 12:17:26 +02:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Johannes Schickel
71bdb86e02 Merge pull request #16 "Add a PixelFormat to Graphics::Surface.".
For further discussion check here:
https://github.com/scummvm/scummvm/pull/16

Conflicts:
	graphics/png.cpp
2011-05-01 16:54:45 +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
Ori Avtalion
cd6ee0589d JANITORIAL: Format forward declarations to follow convention 2011-04-28 12:20:34 +03:00
Max Horn
73f04118f3 COMMON: Rename Error to ErrorCode, introduce new Error class 2011-04-18 18:22:02 +02:00
Johannes Schickel
2e0db94f04 AGOS: Prefer Surface::create taking a PixelFormat over the one taking a byte depth. 2011-04-17 16:25:10 +02:00
Max Horn
2e095e25f2 ALL: centre -> center 2011-04-14 14:34:28 +02:00
Max Horn
0ce2ca4e00 COMMON: Replace MKID_BE by MKTAG
MKID_BE relied on unspecified behavior of the C++ compiler,
and as such was always a bit unsafe. The new MKTAG macro
is slightly less elegant, but does no longer depend on the
behavior of the compiler.
Inspired by FFmpeg, which has an almost identical macro.
2011-04-12 16:53:15 +02:00
dhewg
d83a83ef50 JANITORIAL: Remove/comment unused vars
Found by GCC 4.6's -Wunused-but-set-variable
2011-03-29 21:57:56 +02:00
Max Horn
088bd7a70b ENGINES: Remove unused MIDI pass-through code 2011-03-23 17:07:48 +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
2bc842dcee AGOS: Sanitize the mutex locking in MidiPlayer::startTrack 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
dhewg
f8271e0d07 AGOS: Cleanup syncSoundSettings() 2011-03-19 15:33:34 +01:00
Ori Avtalion
ee3e08bbc2 AGOS: Avoid hiding overloaded virtual methods 2011-02-27 21:25:05 +02:00
dhewg
bd191e1787 AGOS: Respect the screen pitch for movies
Fixes DXA and Smacker movies on Android
2011-02-26 11:58:41 +01:00
Johannes Schickel
55a6e5af76 AGOS: Fix mouse cursor color in Simon 1. 2011-02-18 18:39:26 +01:00
Johannes Schickel
2b62f6bec3 AGOS: Adapt to setPalette RGBA->RGB change.
I only (minimally) tested this change with Simon 1 + 2 DOS CD.
2011-02-15 23:22:30 +01:00
Max Horn
42ab839dd6 AUDIO: Rename sound/ dir to audio/
svn-id: r55850
2011-02-09 01:09:01 +00:00
Max Horn
ee7056542c AGOS: Reduce header interdependencies
svn-id: r55843
2011-02-09 00:13:42 +00:00
Max Horn
4cfa520dce AGOS: Change private to protected, Instead of making subclasses friends
svn-id: r55842
2011-02-09 00:13:20 +00:00
Max Horn
2d1c8a3533 ALL: Fix whitespaces / indention
svn-id: r55818
2011-02-07 23:01:06 +00:00
Max Horn
ab039812e7 COMMON: OSystem now has a PaletteManager
svn-id: r55806
2011-02-07 17:52:38 +00:00
David Turner
861fab3fb1 AGOS: Fix Memory Leaks in Feeble Files.
Found with Valgrind.

svn-id: r55559
2011-01-27 04:13:10 +00:00
David Turner
d55626722e AGOS: Fix Memory Leaks when playing Simon 2 Win.
These were identified with Valgrind.

svn-id: r55558
2011-01-27 02:57:07 +00:00
Eugene Sandulenko
caa6684752 VIDEO: Move video classes to Video:: namespace
svn-id: r55479
2011-01-23 19:08:09 +00:00
Eugene Sandulenko
806ccf5d25 GRAPHICS: Move graphics/video/ to video/. Step 1/2
svn-id: r55473
2011-01-23 17:14:43 +00:00
Matthew Hoops
375f32fbe9 VIDEO: Make VideoDecoder::decodeNextFrame() return a const Surface pointer
svn-id: r54927
2010-12-16 01:35:13 +00:00
Max Horn
6edc86a19b DEBUG: Let GUI::Debugger::preEnter and postEnter (un)pause the engine
svn-id: r54815
2010-12-07 18:54:21 +00:00
Max Horn
2180b2d6b5 COMMON: Split common/stream.h into several headers
svn-id: r54385
2010-11-19 17:03:07 +00:00
Max Horn
ee4770ffb6 ENGINES: Change 'colour' to 'color'
Only changed this in engines where 'color' was/is already used
almost exclusively

svn-id: r54288
2010-11-17 12:22:08 +00:00
Max Horn
059944e59c COMMON: Push #include audiocd.h in system.h out to .cpp files
svn-id: r54148
2010-11-08 23:07:42 +00:00
Max Horn
82e473bc3b BACKENDS: Partial merge of gsoc2010-opengl: Audio CD changes only
This commit contains the AudioCDManager changes from the gsoc2010-opengl
branch. The other changes in that branch are restricted to the backends
directory only (plus configure).

The Nintendo DS and Dreamcast ports still need to be ported over to
the new Audio CD system, but that should be fairly easy to do.

svn-id: r54147
2010-11-08 22:53:36 +00:00
Travis Howell
1e078a22f5 AGOS: Display item names and descriptions via GUImessage, in Swampy Adventures for now.
svn-id: r54084
2010-11-05 03:30:45 +00:00
Max Horn
a7248a0601 ENGINES: Replace many printfs by warning/debug/debugN
svn-id: r54031
2010-11-01 21:37:47 +00:00
Max Horn
e27b05ef35 COMMON: Rename String::printf() to String::format()
This is a first step towards getting rid of all uses of regular printf,
fprintf, vprintf, vfprintf, puts, fputs, etc. in our codebase.

The name format() reflects the purpose of the function, and parallels
String.format() in Java, boost::format, and others.

svn-id: r54004
2010-11-01 16:02:28 +00:00
Max Horn
a1dd7a07a1 ENGINES: Remove some 'using' statements
svn-id: r54001
2010-11-01 16:00:17 +00:00
Filippos Karapetis
db369838e2 AGOS: Fixed code analysis warnings - bug #3087828
svn-id: r53503
2010-10-15 15:23:53 +00:00
Max Horn
4ccce19876 ENGINES: Enhance namespace comments a bit
svn-id: r53484
2010-10-15 12:48:19 +00:00
Johannes Schickel
75e8452b6e OPENGL: Merged from trunk, from rev 52105 to 53396.
This includes an rather hacky attempt to merge all the recent gp2x backend
changes into the branch. I suppose the gp2x backend and probably all new
backends, i.e. gph, dingux etc., might not compile anymore.

Since I have no way of testing those it would be nice if porters could look
into getting those up to speed in this branch.

svn-id: r53399
2010-10-13 03:57:44 +00:00
Torbjörn Andersson
ad02009888 AGOS: Hopefully fix bug #3000876 ("FF: Crackling/static popping")
We want the WAV stream in playSounData() to contain the entire WAV
data, but the size we read does not include the eight first bytes.

svn-id: r52908
2010-09-26 12:28:26 +00:00
Travis Howell
184833924b AGOS: Fix bug #3011638 - WAXWORKS: Crash retrieving spear from the crocodile carcass.
svn-id: r52906
2010-09-26 12:22:46 +00:00
Torbjörn Andersson
113e14224d AGOS: Fix Valgrind warnings on exit.
svn-id: r52904
2010-09-26 12:07:50 +00:00
Johannes Schickel
c6b85c2a87 I18N: Use a String instead of a char buffer.
This should improve r52751, since String does automatic memory handling, thus
no more buffer overflows should by possible by having a too large translated
string.

svn-id: r52758
2010-09-17 12:54:00 +00:00
Thierry Crozat
44610eb037 I18N: fix a buffer size issue with translated save/load strings in AGOS
svn-id: r52751
2010-09-16 19:50:15 +00:00
Thierry Crozat
057056b8d3 I18N: Add translation for load/save success or failure messages
Also improve and update the french translation.

svn-id: r52740
2010-09-15 23:25:46 +00:00
Johannes Schickel
6588398ce6 MIDI: Send a reset MIDI device signal on startup.
This is currently done in the engine code. I adapted AGI, AGOS, DRACI,
GROOVIE, LURE, MADE, QUEEN, SAGA, SKY, TINSEL and TOUCHE to send a reset
device on startup. The sound output still works fine (started up a game
from every engine), so this should hopefully not introduce any regressions.

As far as I can tell it seems that SCUMM does send a proper device reset, so
I did not touch it. KYRA only sends a proper reset for MT-32 currently. I am
not sure about SCI though.

This fixes bug #3066826 "SIMON: MIDI notes off when using RTL after SCI".

svn-id: r52736
2010-09-15 22:00:20 +00:00
Willem Jan Palenstijn
8f1143bfdc COMMON: Remove Rational::operator int/double
This prevents accidental implicit rounding
and might also fix compilation on AmigaOS4 (bug #3060981).

svn-id: r52616
2010-09-07 09:02:46 +00:00
Travis Howell
ffb414d265 AGOS: Add Polish version of Swampy Adventures.
svn-id: r52464
2010-08-31 05:18:38 +00:00
Alejandro Marzini
fb4086cadb Merged from trunk, from Rev 50841 to HEAD
svn-id: r51495
2010-07-30 05:28:09 +00:00