Commit Graph

35 Commits

Author SHA1 Message Date
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