Commit Graph
50 Commits
Author SHA1 Message Date
Donovan Watteau 980b693a6c TOLTECS: Fix unaligned access in Screen::addAnimatedSprite()
Use READ_LE_UINT16 instead of FROM_LE_16 to avoid unaligned memory
access, as seen on OpenBSD/loongson (mips64el) where it would SIGBUS
when trying to play the demo.
2022-06-07 07:37:32 +03:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
sluicebox b8390fa161 GRAPHICS: Add interface for horizontal shake 2019-11-19 00:20:40 +01:00
Johannes Schickel 8b9afc9d92 TOLTECS: Make GPL headers consistent in themselves. 2014-02-18 02:39:39 +01:00
Strangerke 30441cc7c1 TOLTECS: Fix spacing errors 2013-11-24 18:52:45 +01:00
Johannes Schickel 863ead081d TOLTECS: Take advantage of Surface::getPixels. 2013-08-03 04:02:53 +02:00
Filippos Karapetis dfea40cc11 TOLTECS: Remove dead code
The clearSprites() method is a leftover from the older sprite drawing code
2013-04-26 18:21:23 +03:00
Torbjörn Andersson 4b0d0ecdda TOLTECS: Work around undefined subtitle behaviour at script loading
It may be because of an underlying bug, but there is at least one
case where a script is unloaded and replaced by another script while
that script slot still has an active subtitle. This causes it to
print random garbage for me, and may be causing crashes for others.

I've discussed this patch with johndoe, and he was ok with it, so
let's see how it works out.
2013-03-15 18:48:44 +01:00
Filippos Karapetis bbec4acff5 TOLTECS: Fix bug #3600166 - "TOLTECS: Parrot speech cuts off Fenimore's in Cemetery" 2013-01-13 16:29:25 +02:00
Filippos Karapetis b7bfff1bfa TOLTECS: Fix bug #3599370 - "TOLTECS: Text on intro video not shown as per original" 2013-01-13 15:39:00 +02:00
Filippos Karapetis 1302f62b9f TOLTECS: Whitespace fixes 2013-01-13 15:23:55 +02:00
Torbjörn Andersson f7e4f4b354 TOLTECS: Adjust verb drawing to look more like original
Both the "wobble" and the positions were slightly off. I didn't
want to change _verbLineY because for one thing it doesn't seem to
affect the drawing of the verbs, and for another it seems to be
stored in savegames because... squirrel!
2013-01-04 00:40:17 +01:00
Torbjörn Andersson 49e96aa188 TOLTECS: Improve the shake screen effects during movies
I don't know how often the original shook the screen (perhaps as
often as it could?), but at least we now have the opportunity to
shake the screen more than once per movie frame.
2012-10-06 00:01:47 +02:00
Johannes Schickel 89abab97e3 JANITORIAL: Remove trailing whitespaces.
Powered by:
git ls-files "*.cpp" "*.h" "*.m" "*.mm" | xargs sed -i -e 's/[ \t]*$//'
2012-09-26 04:17:55 +02:00
Filippos Karapetis 72cdd019fc TOLTECS: Implement volume handling and toggling of speech/text 2012-09-11 00:34:23 +03:00
Johannes Schickel 99229fc7ab TOLTECS: Get rid of casts on CursorManager::replaceCursor calls. 2012-06-16 03:28:43 +02:00
Tarek Soliman a4798602d7 JANITORIAL: Fix missing whitespace in pointer cast
find -name '*.h' -or -name '*.cpp' | xargs sed -r -i 's@\(([A-Za-z0-9]+)\*\)@(\1 *)@g'

This seems to have caught some params as well which is not undesirable IMO.
It also caught some strings containing this which is undesirable so I
excluded them manually. (engines/sci/engine/kernel_tables.h)
2012-02-15 10:07:10 -06:00
Joost Peters 672e981b17 TOLTECS: Fix crash on Big Endian 2011-11-24 22:18:05 +01:00
Benjamin Haisch acd4d4098f TOLTECS: Fix bugs
- Save scene parameters before playing a movie and restore them afterwards (fixes crash)
- Fix text disappearing too fast
- Implement script function sfGetCameraChanged
- Replace nop script functions with stubs which print debug info when called
- Some cleanup, remove obsolete TODOs
2011-11-20 22:43:10 +01:00
Filippos Karapetis e9dc055089 TOLTECS: Reduced header dependencies 2011-11-20 22:43:10 +01:00
Benjamin Haisch 1cb95f36e7 TOLTECS: - More work on the menu system, saving and loading from there is now possible
- Add blastSprite method which draws a sprite directly to the frontScreen without the renderQueue
- Add F10 scancode in sfHandleInput to open the menu
2011-11-20 22:43:10 +01:00
Benjamin Haisch ce7f9a088c TOLTECS: - Work on the menu system (use strings from resources instead of hardcoded ones)
- ...and load the system strings from the resource on startup
- Only redraw menu screen when required
- Change parameters for some text functions from byte* to const byte*
- Rename some mouse vars
2011-11-20 22:43:10 +01:00
Benjamin Haisch 54cb86950c TOLTECS: Fixed odd bug in drawChar (I subtracted 2 from the font height before, though I don't recall why exactly I did that; now I use the font height as-is) 2011-11-20 22:43:08 +01:00
Benjamin Haisch 3c49d36d5f TOLTECS: Fix compilation. 2011-11-20 22:43:08 +01:00
Benjamin Haisch 22db6b1558 TOLTECS: - Fixed clipping bugs (in 256-color sprites and scaled sprites)
- Minor cleanup
2011-11-20 22:43:08 +01:00
Benjamin Haisch ce7febcd70 TOLTECS: Reworked the ArchiveReader and ResourceCache classes.
ResourceCache needs more work since resources are never freed (which is bad).
2011-11-20 22:43:07 +01:00
Filippos Karapetis 46257f7bb4 TOLTECS: Silenced MSVC warnings 2011-11-20 22:43:07 +01:00
Benjamin Haisch 1f4764ad1c TOLTECS: - Implemented RTL
- Fixed return values in savegame/loadgame
- Some minor cleanup
2011-11-20 22:43:07 +01:00
Benjamin Haisch 47ae908589 TOLTECS: - Fixed Screen::updateTalkText (text x position was read incorrectly and font color wasn't nibble-swapped)
- Hooked up the movie player; movies can be aborted with Escape (not with mouse clicks at the moment because I was too lazy to implement it; funny, writing this explanation probably took longer :))
2011-11-20 22:43:07 +01:00
Benjamin Haisch 4b13982116 TOLTECS: Implemented preliminary sound playback; some stuff is still missing (correct volumes etc.) 2011-11-20 22:43:07 +01:00
Benjamin Haisch 7b97e8cd93 TOLTECS: A lot of changes in the graphics code:
- Optimized drawing code; now only items (sprites, text, screen masks) which have changed from the previous frame are redrawn, this speeds up things a lot
- Implemented dirty rectangles using a microtile array
- The previously committed Microtile Array implementation from SEL seemed buggy so I wrote my own version which works nicely so far (and is less code and GPL), only MicroTileArray::getRectangles uses parts from the old version, this will be changed later
- One known bug related to dirty rectangles remains: Sometimes the background isn't restored correctly and gfx artifacts are visible
2011-11-20 22:43:06 +01:00
Benjamin Haisch ade8eec8cf TOLTECS: Moved sprite drawing code to sprite.cpp 2011-11-20 22:43:06 +01:00
Benjamin Haisch ca49ded9b3 TOLTECS: More changes to wrapGuiText 2011-11-20 22:43:06 +01:00
Benjamin Haisch 3c47914648 TOLTECS: Removed _tempString etc. and replaced it with GuiTextWrapState 2011-11-20 22:43:06 +01:00
Benjamin Haisch 20d60e6286 TOLTECS: Renamed some functions. 2011-11-20 22:43:06 +01:00
Benjamin Haisch 398d0daac0 TOLTECS: Adjust y position of talk text lines. 2011-11-20 22:43:06 +01:00
Benjamin Haisch aaded0f546 TOLTECS: Added Screen::getTextWidth 2011-11-20 22:43:06 +01:00
Benjamin Haisch a94503765d TOLTECS: - Fixed setDeltaPalette (sprites at night now look correct)
- Renamed TalkTextItem.rects/rectCount to lines/lineCount
- Workaround for font glitch in updateTalkText (text sets invalid font number)
2011-11-20 22:43:06 +01:00
Benjamin Haisch 6a83d7d851 TOLTECS: Cancel all talkText items when camera position is changed (fixes some crashes and odd behaviour) 2011-11-20 22:43:06 +01:00
Benjamin Haisch 367be5b345 TOLTECS: Merged text drawing routines into drawString 2011-11-20 22:43:06 +01:00
Benjamin Haisch bbf882016a TOLTECS: Fixed text command parsing in updateVerbLine 2011-11-20 22:43:05 +01:00
Benjamin Haisch b287588149 TOLTECS: Clear the text duration first in updateTalkText before adding text lines (else the durations add up and the text stays on screen a really long time) 2011-11-20 22:43:05 +01:00
Benjamin Haisch 59bbad2ac8 TOLTECS: Fixed clipping (the clipping of the right border with flipped sprites was buggy) 2011-11-20 22:43:05 +01:00
Benjamin Haisch c82349c1b8 TOLTECS: Finished sprite clipping. 2011-11-20 22:43:05 +01:00
Benjamin Haisch 5660ff5148 TOLTECS: Implemented buildColorTransTable (still TODO) and shadow sprite drawing. 2011-11-20 22:43:05 +01:00
Benjamin Haisch 98ac7885ac TOLTECS: Merged drawChar and drawChar2 2011-11-20 22:43:05 +01:00
Benjamin Haisch 51214a461a TOLTECS: Saving/loading is working; it still needs work but will suffice to make debugging somewhat easier. 2011-11-20 22:43:05 +01:00
Benjamin Haisch dd5567613f TOLTECS: - Renamed stuff and cleanups
- Beginnings of the saveload system (incomplete)
2011-11-20 22:43:05 +01:00
Benjamin Haisch f4e156b3b3 TOLTECS: Fixed tabs and formatting. 2011-11-20 22:43:05 +01:00
Eugene Sandulenko 7c2835313e TOLTECS: Initial checkin 2011-11-20 22:43:05 +01:00