Commit Graph
100 Commits
Author SHA1 Message Date
Sven Hesse a5fcdb55da GOB: Mark intentional fallthrough in switch statements 2018-02-13 13:29:03 +01:00
Sven Hesse acc9773a3d GOB: Add another interactive Gob3 demo, as supplied by Dark-Star
This demo comes with texts in English (GB), German and French.
2017-01-26 16:30:23 +01:00
Sven Hesse 10708f7a8d BLADERUNNER: Fix invalid read
Conditions are evaluated left to right. If you want short-
circuiting to protect from invalid read, you have to do the
range checks before the pointer dereferencing.
2016-09-29 22:33:34 +02:00
Sven Hesse 7b6159e095 BLADERUNNER: Fix invalid delete[]
delete[] -> delete. It's a single pointer, not an array.
2016-09-29 22:33:34 +02:00
Sven Hesse 5b8df8cd8a BLADERUNNER: Resolve argument shadowing 2016-09-29 22:33:34 +02:00
Sven Hesse 2189721387 BLADERUNNER: ScriptBase needs a virtual destructor 2016-09-29 22:33:34 +02:00
Sven Hesse 88035e6876 BLADERUNNER: Remove unnecessary semicolon 2016-09-29 22:33:34 +02:00
Sven Hesse ff1df93e9d BLADERUNNER: Rename _vptr to _vpointer
_vptr is a reserved keyword!
2016-09-29 22:33:33 +02:00
Sven Hesse 76cfb2c8a9 BLADERUNNER: Remove extra class qualification
MSVC allows it, but it's against the standard.
2016-09-29 22:33:33 +02:00
Sven Hesse aca13f7ba9 GOB: Work around broken resource sizes in Gobliiins EGA
The EGA version of Gobliiins, similar to Little Red Riding Hood,
claims a few resources are larger than they actually are. The original
happily reads past the resource structure, but we'll instead fix
the size of the resource after loading.

This fixes bug #7162.
2016-07-20 21:59:22 +02:00
Sven Hesse 8546ecab04 AGOS: Fix wrongly indented debugC() statement
GCC 6's -Wmisleading-indentation warns about the debugC() statement
being wrongly indented, as if belonging into the else's branch, which
it clearly doesn't.
2016-07-20 18:39:42 +02:00
Sven Hesse 2c81602454 GOB: Don't completely reset the OPL in AdLib::initOPL()
It shouldn't be necessary anymore, since initOPL() cleans everything.
If, however, suddenly a piece of music sounds weird in a Gob game,
this is the place to look for.

This fixes a race condition between OPL::reset() and the callback
timer.
2016-02-28 21:04:23 +01:00
Sven Hesse 92e7bfa959 GOB: Remove unnecessary includes and forward-declarations 2016-01-02 03:16:30 +01:00
Sven Hesse 1fa0197229 GOB: Make the currently playing CD track all-uppercase
This is what the original game does too, and the scripts query for
all-uppercase CD track names.

Interestingly, this being wrong has been mostly inconsequential. It
does, however, manifest in one bug in the underwater wreck level of
Gobliins 2. After calling the Moray Eel by lighting the lamp with
Winkle, speaking to said eel has the scripts wait for the currently
playing background track to end before playing the voice lines,
instead of ending the audio track forcefully. The track is only about
a minute long, so it's "only" annoying, not a game-stopper.

The scripts also try to compare the CD track name with some different,
all-uppercase names, so this is possibly relevant in some other places
as well. No such bug report exists at the moment, though.

See also the forum post with the bug report:
http://forums.scummvm.org/viewtopic.php?p=81733#81733

A somewhat related bug report is #2999 "GOB2 : Moray Eel Game Freeze
(Wreck Scene)" (<http://sourceforge.net/p/scummvm/bugs/2999/>). At
that time, the script expression parser still did a stricmp for the
NEQ expression (which is wrong), and that made the bug not trigger.
Commit 5c58b9a3a4, which fixed that
incorrect NEQ behaviour, then made this bug here appear.
2015-09-02 20:38:16 +02:00
Sven Hesse 370107c953 GOB: Remove a useless call to Variables::getAddressOff8()
This is a left-over vestige of when the gob engine recorded the size
of each variable currently in use, because it byte-swapped all
variables on save/load depending on the machine ScummVM ran on.

The gob engine doesn't do that all anymore (instead, the variables are
always stored in the endianness of the original game), so
getAddressOff8() doesn't store "this is an 8-bit variable" anymore,
making the call a NOP.

This fixes Coverity Scan issue #1267142.
2015-08-03 15:56:43 +02:00
Sven Hesse 5bec0cbb9d GOB: Make coordinate parameters in Surface::fillRect() signed
And clip to [0, width), [0, height) before drawing.

This fixes bug #6864, which is a regression I introduced in
51fd528fe5 when I changed all
the drawing code to use the Surface class.

I thought that having unsigned coordinates makes sense, but
for some reason, Fascination sets _destSpriteX (which maps
to left in fillRect()) to -1, expecting the drawing code to
clip.
2015-05-07 00:34:02 +02:00
Sven Hesse 3f66f28624 ZVISION: Remove trailing whitespace 2015-01-18 20:35:51 +01:00
Sven Hesse 7bdf48170a GOB: Remove useless memcpy()
Happened while removing Draw::_vgaSmallPalette in 0f9b1364c.

Fixes Coverity issue #1230309.
2014-10-19 00:08:32 +02:00
Sven Hesse 1bbee909fa CREDITS: Add Haiku port maintained by Luc Schrijvers
Quoth Luc Schrijvers (Begasus) on scummvm-devel:
"Haiku is stepping up and there is a recipe (script to build
scummvm) in the haikuporters git repo [...] I'll still do a
full build and make it available for download that could be
upped on your download page when ready"
2014-07-11 15:46:25 +02:00
Sven Hesse f54a3304f2 CREDITS: Retire BeOS porter Stefan Parviainen
Quoth Luc Schrijvers (Begasus) on scummvm-devel:
"BeOS isn't maintained anymore (latest version still working
on BeOS was something like 1.0."
2014-07-11 15:40:16 +02:00
Sven Hesse 24595ede3b GOB: Remove duplicate entries for Ween DOS
Seems like that happened when I sorted them by platform
after splitting up the big detection table in 07b17f711.

This fixes bug #6676.
2014-07-08 21:03:47 +02:00
Sven Hesse 9d97e61e4d CREDITS: Update to add Fedor to Symbian 2014-06-19 13:47:05 +02:00
Sven Hesse fc250701c5 VOYEUR: Janitorial - Remove trailing whitespace 2014-05-28 23:30:29 +02:00
Sven Hesse 2168d43d5d MADS: Janitorial - Trim more trailing whitespace 2014-05-28 23:25:49 +02:00
Sven Hesse 6908c1ee42 CREDITS: Update for Voyeur- and MADS-changes 2014-05-28 23:18:17 +02:00
Sven Hesse dba4084c8a GOB: Calculate _totResStart even if no resources follow
It's also used as a base offset for TOT strings.
This fixes a crash in the Amiga version of Bargon Attack.
2014-03-16 16:40:08 +01:00
Sven Hesse 0f9b1364cf GOB: Remove the last remnants of Draw::_vgaSmallPalette
Draw::_vgaSmallPalette was supposed to be a 16-color VGA
palette / EGA palette, but we've been using the first 16
entries of Draw::_vgaPalette for that for ages now.

The only parts where we didn't were codepaths never
actually taken in the gob games, so for the sake of
clarity (and fixing Coverity issues), this commit removes
those as well.

Fixes Coverity issues 1192648 and 1192649.
2014-03-16 15:35:35 +01:00
Sven Hesse 5e835ef915 RECORDER: Fix indenting 2013-07-14 19:04:09 +02:00
Sven Hesse 989ea7cb56 JANITORIAL: Remove trailing whitespace 2013-07-14 19:01:47 +02:00
Sven Hesse 4b3f5149b5 VIDEO: Add hypothetical 32bpp support 2013-06-30 19:07:04 +02:00
Sven Hesse 231586d924 VIDEO: Add hypothetical 32bpp support 2013-06-30 19:00:17 +02:00
Sven Hesse 9a88fe8485 GOB: Add hypothetical 32bpp support 2013-06-30 19:00:05 +02:00
Sven Hesse 2c5a0008ba AUDIO: Do not error out when channel offset >= length after interrupt()
This fixes a Protracker module in the OS/2 version of
Hopkins FBI (bug #3612101). In row 0x30 of the first
pattern, the set channel offset effect in the fourth track
pushes the offset past the sample (repeat) length.
This is not error; the mixing function already handles this
case flawlessly. No assert() is necessary there.
2013-04-28 17:31:53 +02:00
Sven Hesse 4a59c02a8f GOB: Add a call to Inter::animPalette() in the hotspot checker
The original has the call there too, as confirmed using
the disasm of the gob3 binary.

This fixes bug #3611208.
2013-04-19 11:40:18 +02:00
Sven Hesse 642708de4c GOB: Fix a misplaced continue / fallthrough 2013-04-15 19:07:55 +02:00
Sven Hesse fc50db1545 GOB: Change strcpy/strcat to strlcpy/strlcat for safety 2013-04-15 19:00:26 +02:00
Sven Hesse 61b1a594b8 GOB: Change strcpy to strlcpy for safety 2013-04-15 18:49:00 +02:00
Sven Hesse bbe4372f5b GOB: Add another sanity check 2013-04-15 18:42:46 +02:00
Sven Hesse 2a1308b4e1 GOB: Add a sanity check 2013-04-15 18:36:44 +02:00
Sven Hesse e589bd4525 GOB: Fix another potential array overrun 2013-04-15 18:35:33 +02:00
Sven Hesse 3540b943cf GOB: Fix a potential array overrun 2013-04-15 18:30:12 +02:00
Sven Hesse eb55db436d GOB: Fix a leak 2013-04-15 18:25:01 +02:00
Sven Hesse 658608d0dd GOB: Correct a delete/delete[]-mismatch 2013-04-15 18:24:09 +02:00
Sven Hesse c053f715d6 GOB: Remove unused member variable in SaveLoad_v6 2013-04-15 18:22:49 +02:00
Sven Hesse 172aed0441 GOB: Remove unused member variables in SaveLoad_Fascination 2013-04-15 18:22:18 +02:00
Sven Hesse ef26df5877 COMMON: Remove useless member variable FFT:_permutation 2013-04-15 18:21:29 +02:00
Sven Hesse fad5cf7243 VIDEO: Fix a typo (minus vs. plus) in the VMD decoder 2013-04-13 15:22:06 +02:00
Sven Hesse 3e1622d68a GOB: Add another Spanish DOS version of Geisha
As supplied by alestedx in bug report #3610207
2013-04-08 11:05:50 +02:00
Sven Hesse 0de198c997 GOB: Plug a leak 2013-03-20 08:28:45 +01:00
Sven Hesse 19d9071841 GOB: iterator++ -> ++iterator 2013-03-20 08:27:51 +01:00
Sven Hesse ef8e15255d GOB: Add a Spanish/Italian DOS version of Geisha
As supplied by einstein95 in bug report #3544449.
2012-08-05 10:43:41 +02:00
Sven Hesse d80d08128b Merge branch 'pregob' (WIP Once Upon A Time)
This is some in-progress work for supporting the mostly hard-coded
Once Upon A Time titles Abracadabra and Baba Yaga.
2012-07-30 01:50:59 +02:00
Sven Hesse b001168658 GOB: Implement the parents section in Once Upon A Time
The text lines are not drawn completely correct yet, because
apparently, GCTFile needs to wrap long lines.
2012-07-30 01:48:40 +02:00
Sven Hesse dd2768a2e4 GOB: Reorder a few things 2012-07-30 01:44:46 +02:00
Sven Hesse 25bc7467b4 GOB: Use Sound::sampleLoad in PreGob 2012-07-30 01:44:46 +02:00
Sven Hesse 3189729c97 GOB: Don't leak in sampleLoad() when loading fails 2012-07-30 01:44:46 +02:00
Sven Hesse 850472f21e GOB: Implement the proper Once Upon A Time title sequence 2012-07-30 01:44:46 +02:00
Sven Hesse f4cd726802 GOB: Add a class handling simple SEQ files 2012-07-30 01:44:46 +02:00
Sven Hesse 734329dcc1 GOB: Name the Once Upon A Time frame a bit more 2012-07-30 01:44:46 +02:00
Sven Hesse 4bc80cd881 GOB: Allow spaces in the Once Upon A Time character generator 2012-07-30 01:44:46 +02:00
Sven Hesse 943c6af82a GOB: Add the sounds in the Once Upon A Time character generator 2012-07-30 01:44:46 +02:00
Sven Hesse 9c32fd2360 GOB: Add PreGob::beep() 2012-07-30 01:44:46 +02:00
Sven Hesse 6533047514 GOB: Add the walking child in the character generator 2012-07-30 01:44:45 +02:00
Sven Hesse 20a96733a5 GOB: Add CMPFile::recolor() and ANIFile::recolor() 2012-07-30 01:44:45 +02:00
Sven Hesse baec4d8778 GOB: Move recolor() into class Surface 2012-07-30 01:44:45 +02:00
Sven Hesse 57b1b7ad24 GOB: Implement the Once Upon A Time character generator
Still missing the little sprite bouncing around, though.
2012-07-30 01:44:45 +02:00
Sven Hesse 10b9be2851 GOB: Add Util::toCP850Lower() / toCP850Upper() 2012-07-30 01:44:45 +02:00
Sven Hesse 5b02192477 GOB: Add Font::hasChar() 2012-07-30 01:44:45 +02:00
Sven Hesse 75e7cca692 GOB: Add support for entering non-ASCII CP850 characters 2012-07-30 01:44:45 +02:00
Sven Hesse 90415cf083 GOB: Implement GCT text drawing in the end section
The end section is now complete.
2012-07-30 01:44:45 +02:00
Sven Hesse d7c81c2755 GOB: Implement GCT text drawing in the Stork section
The only thing missing in the stork section now is the character
creator.
2012-07-30 01:44:45 +02:00
Sven Hesse e17d4a5c0c GOB: Implement GCT drawing 2012-07-30 01:44:45 +02:00
Sven Hesse 0b030dd341 GOB: Implement parts of the Stork section in Once Upon A Time
No GCT texts yet ("The stork is bringing a sweet baby to $PLACE
where $PEOPLE live"), and the character creator is also still
missing.
2012-07-30 01:44:45 +02:00
Sven Hesse a547633911 GOB: ANIObject can now predict the position/size of future frames 2012-07-30 01:44:44 +02:00
Sven Hesse df18bc9583 GOB: Implement parts of the Once Upon A Time end sequence
We don't yet support GCT files, so texts are still missing.
2012-07-30 01:44:44 +02:00
Sven Hesse 60f52ab9a0 GOB: Add the frame for normal Once Upon A Time game play 2012-07-30 01:44:44 +02:00
Sven Hesse 305ab6847a GOB: Reorganize and clean up PreGob / Once Upon A Time 2012-07-30 01:44:44 +02:00
Sven Hesse 24644c0012 GOB: Implement the Once Upon A Time "Bye Bye" screen 2012-07-30 01:44:44 +02:00
Sven Hesse 9d564ecd26 GOB: Implement the animal names bit Once Upon A Time 2012-07-30 01:44:44 +02:00
Sven Hesse 9e997fea1b GOB: Add "long" PreGob language suffixes 2012-07-30 01:44:44 +02:00
Sven Hesse 4663ab2373 GOB: Fix some broken German text in Once Upon A Time 2012-07-30 01:44:44 +02:00
Sven Hesse e477b7d2b9 GOB: Move the Once Upon A Time palettes into their own file 2012-07-30 01:44:44 +02:00
Sven Hesse a98ba5f038 GOB: Play a click sound in the Once Upon A Time menus 2012-07-30 01:44:44 +02:00
Sven Hesse 34cf81a4b6 GOB: Add some PreGob sound utility functions 2012-07-30 01:44:44 +02:00
Sven Hesse 233a3f54fc GOB: Stubbily implement the Once Upon A Time menus 2012-07-30 01:44:43 +02:00
Sven Hesse bccfdb559f GOB: Move the intro parts into OnceUpon::showIntro() 2012-07-30 01:44:43 +02:00
Sven Hesse 92bd9c864a GOB: Show the specific game title in Once Upon A Time 2012-07-30 01:44:43 +02:00
Sven Hesse 2f3aaf0e07 GOB: Show the Once Upon A Time fairytale quote 2012-07-30 01:44:43 +02:00
Sven Hesse 60cebba95c GOB: Show the Once Upon A Time wait/load screen 2012-07-30 01:44:43 +02:00
Sven Hesse 139b03c4bc GOB: Add a PreGob method to get a localized file name 2012-07-30 01:44:43 +02:00
Sven Hesse 4b3aa88c8a GOB: Add a simple class for PreGob TXT files 2012-07-30 01:44:43 +02:00
Sven Hesse 9af01cd584 GOB: Move the background saving into its own class BackBuffer 2012-07-30 01:44:43 +02:00
Sven Hesse 67d7c3f11f GOB: Show a mock-up of the Once Upon A Time title
The actual intro is described in a SEQ file. We don't support
those yet.
2012-07-30 01:44:43 +02:00
Sven Hesse ef3b4af9d8 GOB: Implement the copy protection in Once Upon A Time 2012-07-30 01:44:43 +02:00
Sven Hesse 412ae53854 GOB: Add PreGob animation utility functions 2012-07-30 01:44:43 +02:00
Sven Hesse aae8c60759 GOB: Verify the language in Once Upon A Time 2012-07-30 01:44:42 +02:00
Sven Hesse 3313302a15 GOB: Load the Once Upon A Time fonts 2012-07-30 01:44:42 +02:00
Sven Hesse 734fc767d2 GOB: Open the Once Upon A Time archives 2012-07-30 01:44:42 +02:00
Sven Hesse 4fc3a88c5f GOB: Add support for different methods of handling Endianness
The Once Upon A Time games handle endianness different in ANI, DEC
and RXY files than Geisha does. We need to support both approaches.
2012-07-30 01:44:42 +02:00
Sven Hesse 83896dea3e GOB: Add PreGob input/event utility functions 2012-07-30 01:44:42 +02:00