Only cursors drawn from scripts must be copied in _cursorSprites, not the ones loaded from executable.
This simplifies a lot of globals from the Draw object, that were needed only in the cursor-from-exec case.
Note: other GOB games are not impacted even if shared code from draw_v2.cpp, inter_v1.cpp is modified (_cursorHotspotsX and _doCursorPalettes are non-null only in Adibou 2).
When cursors are drawn by scripts (_isCursorFromExe == false), do not reset cursorSprite when a cursor change is detected in animateCursor() (it may already contain the wanted cursor) and ensure palette is set to non-external for all cursor indexes.
Try to mimic more closely what is done in the executable.
Fixes black squares sometimes blinking around the cursor (just after selecting the character, when hoovering seeds bags in the vegetable garden...), and fix a temporarily disappearing "waiting" cursor in some "change CD" screens.
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.
When the cursor name is "", then that cursor is drawn by the scripts
instead of loaded from cursor32.dll. That cursor does not have its own
palette then.
Fixes the cursors in the "paint" game in Adibou2.
Add
static const int kFrontSurface = 20;
static const int kBackSurface = 21;
static const int kAnimSurface = 22;
static const int kCursorSurface = 23;
static const int kCaptureSurface = 30;
to class Draw and substitute the raw numbers in other files with
those aliases, for readability.
svn-id: r51852
- Fix a potential bug in winDraw
- Add a hack (and a todo) to work around the missing texts and windows in Amiga, Atari and early PC floppy version.
svn-id: r48053
- Suppressed dirty traces. This has to be reviewed/rewritten. It looks better without.
- Add initialization of two variables in one exceptional case in winDraw. (Thanks Cyx)
svn-id: r47616
Fascination - initial version of several 'Fascination Window' functions, proper naming of most of fascination OPCODEDRAW and OPCODEGOB functions
svn-id: r44472