Commit Graph
59 Commits
Author SHA1 Message Date
Willem Jan Palenstijn ee9e6b94ae DRASCULA: Fix build 2013-10-17 13:40:26 +02:00
Eugene Sandulenko bc08216659 DRASCULA: Fix potential buffer overrun. CID 1003310 2013-10-17 13:43:21 +03:00
Filippos Karapetis d531484350 DRASCULA: Some renaming. Also, get rid of some extraneous globals
This removes the superfluous talkHeight, talkWidth and timeDiff
variables. It also changes _loadedDifferentChapter to be a boolean
2013-08-19 03:08:58 +03:00
Johannes Schickel acfdfd46d1 DRASCULA: Take advantage of Surface::getPixels. 2013-08-03 04:02:50 +02:00
Johannes Schickel 2131d2d2f5 DRASCULA: Prefer getBasePtr over direct Surface::pixels access. 2013-08-03 02:52:32 +02:00
Filippos Karapetis 00c0986562 DRASCULA: More animation cleanup. Separate subfunction of animation_12_5() 2013-01-04 23:06:19 +02:00
D G Turner a0dbe45a45 DRASCULA: Add fix for crash/OOB memory accesses in bug #3440895
This bug is "DRASCULA-IT: Crash/graphic glitch at castle towers".
The crash was due to width and height values being passed to
copyBackground() being invalid due to out of bounds read from
the factor_red array. This adds debugging statements and fixes
the crash by clipping accesses to the maximum index of factor_red.

This doesn't however fix the observed GFX glitch, but stops it being
a segfault.
2011-11-25 06:30:10 +00:00
Eugene Sandulenko 6d4189e2ed DRASCULA: Fix warnings 2011-11-02 23:18:10 +00: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
Marcus Comstedt 379b3104a4 DRASCULA: Handle pitch in code using lockScreen()
The surface returned by OSystem::lockScreen() can have a pitch which
differs from w * bytesPerPixel, so modify the code to take this into
account.  Fixes FMV problems on Dreamcast.
2011-05-05 00:04:10 +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
David Turner 96174d6842 DRASCULA: Fixed Code to allow Quit/RTL Function and avoid Memory Leakage.
A memory leakage was traced down to a failure to call the engine destructor.
This was due to the engine directly calling OSystem quit() i.e. _system->quit(), rather than
just allowing engine::run() to return.
Have removed this code and implemented the changes required to allow graceful Quit/RTL to occur.

svn-id: r55583
2011-01-28 08:07:50 +00:00
Eugene Sandulenko f53211fbad Drascula: Move more cursor-related blits to cursorSurface.
svn-id: r49715
2010-06-15 10:22:19 +00:00
Eugene Sandulenko 671ed4873f Drascula: Fixed bug #2826608.
Bug #2826608: "DRASCULA: Cursor GFX error" fixed by introducing
separate buffer for cursors. This also fixes the root cause of
the problem.

svn-id: r49713
2010-06-15 10:21:42 +00:00
Eugene Sandulenko e8b72467e1 Drascula: ease load on backend.
svn-id: r49709
2010-06-15 10:20:26 +00:00
Eugene Sandulenko 27c27c82b1 Drascula: add more pic-related debug output.
svn-id: r49708
2010-06-15 10:20:10 +00:00
Eugene Sandulenko c933bec975 Drascula: Optimized blitting code.
svn-id: r49700
2010-06-15 10:17:34 +00:00
Torbjörn Andersson 763b1c7cb0 Fixed a glitch when a one-word text (e.g. "TOTENKOPF" in the first room, when
playing the German translation) doesn't fit on the screen at the desired
position.

svn-id: r48850
2010-04-29 03:54:20 +00:00
Max Horn fc50408ce3 DRASCULA: Simplify playFLI and its subroutines
svn-id: r48217
2010-03-09 23:36:18 +00:00
Nicola Mettifogo 56bf7a20d3 Renamed ArjFile to ArchiveMan, and _arj to _archives.
svn-id: r48000
2010-02-08 18:17:32 +00:00
Nicola Mettifogo b658c61155 Let ArjFile return a SeekableReadStream instead of implementing
the same interface itself. The caller is now responsible for
deleting the returned streams.

svn-id: r47994
2010-02-08 16:14:04 +00:00
Nicola Mettifogo a9a0fdc694 Reduced references to _arj to the minimum. It is passed as a
SeekableReadStream everywhere.

svn-id: r47993
2010-02-08 16:13:31 +00:00
Nicola Mettifogo c453f214e6 Close the FLI file only from the routine that opened it.
svn-id: r47990
2010-02-08 16:12:22 +00:00
Johannes Schickel aed02365ec Strip trailing spaces/tabs.
svn-id: r47541
2010-01-25 01:39:44 +00:00
Filippos Karapetis 4af0cfbdbd Cleanup
svn-id: r43056
2009-08-04 21:56:59 +00:00
Filippos Karapetis d14f0ccfb5 Removed the superfluous VGA buffer, replacing it with direct writes to the video buffer
svn-id: r43048
2009-08-04 17:22:18 +00:00
Torbjörn Andersson 2e13d89233 Added word-wrapping to Drascula's conversation options. Fixes bug #2826607.
svn-id: r42755
2009-07-25 13:07:50 +00:00
Eugene Sandulenko d116a94e2b Normalized types for several variables. Formatting
svn-id: r40521
2009-05-13 11:59:49 +00:00
Eugene Sandulenko 696897b058 Whoa! Removing trailing spaces.
svn-id: r35648
2009-01-01 15:06:43 +00:00
Filippos Karapetis c655d72f5a - Fixed centerText() to print text at the correct height
- Removed some duplicate code

svn-id: r34569
2008-09-16 07:16:26 +00:00
Max Horn 880bc085b1 Fixed compiler warnings
svn-id: r34567
2008-09-15 22:37:45 +00:00
Filippos Karapetis 7cac97629a Remove a workaround in textFitsCentered(). The blind man's dialog is a bit better placed now
svn-id: r34560
2008-09-15 14:17:51 +00:00
Filippos Karapetis 7cf7f4bbf6 Rewrote the very confusing centerText() function into something that makes more sense, and matches the way that the original printed text on screen (in most cases)
Fixes bugs #2102657 - "DRASCULA: Crash when talking to the piano player" and #2111820 - "DRASCULA: Dialog texts too long"

svn-id: r34558
2008-09-15 13:37:28 +00:00
Filippos Karapetis 371af75374 Slight cleanup of centerText()
svn-id: r34531
2008-09-14 18:30:08 +00:00
Filippos Karapetis 8316aba03d Fix for bug #2110375 - "DRASCULA: Mouse visible in screen saver", a regression from moving mouse handling to OSystem
svn-id: r34526
2008-09-14 16:21:31 +00:00
Torbjörn Andersson b86a047164 Indentation.
svn-id: r34513
2008-09-13 15:23:23 +00:00
Filippos Karapetis cbf561a0a0 - Moved more animation data inside drascula.dat
- Merged copyRect and copyRectClip
- Added enums for all the possible character directions and removed duplicate directions
- Extended the talk sequence commands a bit
- Removed unnecessary buffer faceBuffer and the unneeded casts between byte * and char * that were used

svn-id: r34503
2008-09-12 12:54:16 +00:00
Filippos Karapetis a12e2b8037 - Merged openDoor() and closeDoor()
- Cleaned up updateDoor()
- Bugfixes to exitRoom() and gotoObject()
- Moved cursor-related functions to interface.cpp
- alapuertakeva -> roomExits

svn-id: r34493
2008-09-11 14:49:04 +00:00
Filippos Karapetis 224f95537b Code optimizations from Fingolfin
svn-id: r34491
2008-09-11 12:04:45 +00:00
Filippos Karapetis c6af2e81e8 Cleanup
svn-id: r34490
2008-09-11 09:37:42 +00:00
Filippos Karapetis 02aad34ec7 Fixed the hotspot for the crosshair cursor
svn-id: r34489
2008-09-11 09:33:15 +00:00
Filippos Karapetis fa3d3e3643 - The game's cursor is now handled via ScummVM's cursor manager, instead of the game itself (this means that there might be regressions where the cursor is visible when it shouldn't be)
- Removed the textSurface pointer, which was used in the Spanish version. Non-Spanish versions of the game hold the font data in the tableSurface buffer (which contains picture 96). The font data for Spanish versions is in picture 974. Now both versions load their font data from the tableSurface buffer
- hay_que_load -> loadedDifferentChapter
- Merged withoutVerb() and selectVerb()
This is a big change, it might lead to regressions!

svn-id: r34488
2008-09-11 09:31:45 +00:00
Filippos Karapetis dc304dbde2 Cleanup. Simplified converse()
svn-id: r34460
2008-09-09 11:20:34 +00:00
Filippos Karapetis d431bfa137 Removed some unneeded sanity checks that have been introduced with the latest cleanups
svn-id: r34183
2008-08-26 10:59:59 +00:00
Filippos Karapetis 0a2a468d83 Simplified several calls to copyBackground()
svn-id: r34181
2008-08-26 08:21:21 +00:00
Eugene Sandulenko 19b6334418 Patch #2045543: Possible fix for Drascula's decodeRLE()
svn-id: r33973
2008-08-17 18:58:23 +00:00
Filippos Karapetis cca355acd7 Removed duplicate code
svn-id: r32727
2008-06-17 18:27:03 +00:00
Filippos Karapetis 930ba6d02d drawSurface1 -> bgSurface
svn-id: r32644
2008-06-10 18:54:32 +00:00
Filippos Karapetis aac3270de1 endianess fixes
svn-id: r32639
2008-06-09 18:03:11 +00:00