Commit graph

76 commits

Author SHA1 Message Date
Eugene Sandulenko
5dcdfd2600
GOB: Dual-license the gob engine under LGPL
The major contributors provided their consent:
DrMcCoy, Strangerke, sdelamarre, sev.

The goal is to allow the re-release of this code under
Switch, which is incompatible with pure GPL
2024-01-08 01:44:04 +01:00
Simon Delamarre
c784323fb7 GOB: double video when render flag 0x2000 is set
Fixes the intro and the "three little cats" video size in the German version of Adibou1
2023-04-21 00:51:24 +02:00
Simon Delamarre
0099c3624c GOB: coordinates adjustment for games existing in several resolutions
This mechanism was used to accommodate games existing in several resolutions, while keeping the same script logic across versions.
Opcodes manipulating coordinates and lengths call the adjustCoords() function to double or halve their values depending on the adjustment needed.

Its usage has been confirmed only in a German version of Adibou1 for now, restrict the feature to this game.
2023-04-21 00:13:44 +02:00
Simon Delamarre
8bb49c1acf GOB: fix cursor still visible in breakout game of some Adibou2 versions
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).
2023-01-12 23:26:40 +01:00
Simon Delamarre
0ad57d3c09 GOB: fix a black screen after the paint game in some Adibou2 versions
Related to a weird video mode ("0x18"), in which some surfaces must not be reset when re-calling the initScreen() opcode.
2022-12-16 22:27:08 +01:00
Donovan Watteau
887693a3fe GOB: Fix AmigaOS and NDS builds
Poor things...
2022-12-02 13:06:10 +01:00
Simon Delamarre
6a1e2d5d21
GOB: misc format/style/typo fixes in Adibou2 changes 2022-12-02 11:44:35 +01:00
Simon Delamarre
2300f9c7e9
GOB: reduce header dependency in Adibou2 changes 2022-12-02 11:44:34 +01:00
Simon Delamarre
988d4882a2
GOB: fix a few cursor glitches in Adibou2
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.
2022-12-02 11:44:34 +01:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Bastien Bouclet
0ee30278fc GOB: Add override keywords 2020-02-09 12:43:15 +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
Johannes Schickel
ea21bc939a GOB: Make GPL headers consistent in themselves. 2014-02-18 02:39:34 +01:00
Sven Hesse
00fa997039 GOB: Move drawString into Font 2012-07-30 01:24:18 +02:00
Sven Hesse
ac7fbc4bf2 GOB: _renderFlags & 0x40 means the we should draw borders around hotspots
Probably a debug-only flag
2012-06-22 18:10:53 +02:00
Sven Hesse
b1e50b4e30 GOB: _renderFlags & 0x80 means "Do we have windows?" 2012-06-22 18:10:52 +02:00
Sven Hesse
2e16e7fc4c GOB: Add a workaround for the wrong German animal names in Little Red
The DOS, Amiga and Atari version of Little Red come with a small
screen, accessible through the main menu, that lets children read and
listen to animal names in 5 languages: French, German, English,
Spanish and Italian.

Unfortunately, the German names are partially wrong. This is
especially tragic because this is a game for small children and
they're supposed to learn something here. So I deem fixing this a
very good idea.

Just to be sure, someone should probably look over the French,
Spanish and Italian words too.
2012-06-18 17:44:04 +02:00
Sven Hesse
be25e31a0a GOB: Fix v7 cursors drawn by the scripts
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.
2012-05-29 17:12:06 +02:00
Sven Hesse
aa7c44a070 GOB: Hook up the PE cursors to v7 loadCursor
Addy Junior / Adibou2 now shows proper cursors.
Thanks to clone2727 for the constant nagging. :P
2012-05-29 14:22:07 +02:00
Sven Hesse
ac3593c631 GOB: Init "Diving" cursor 2011-09-14 18:54:28 +02:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
Sven Hesse
812680d187 GOB: Rename Draw::kSpritesCount to Draw::kSpriteCount
svn-id: r55729
2011-02-02 16:49:20 +00:00
Sven Hesse
c498d70dd2 GOB: Change SPRITES_COUNT into a const
svn-id: r55645
2011-01-30 00:02:42 +00:00
Sven Hesse
f23b4af682 GOB: Increase kFontCount for Addy
svn-id: r55548
2011-01-26 19:03:37 +00:00
Sven Hesse
a2afc0f4d1 GOB: Check font index for kFontCount
svn-id: r55547
2011-01-26 19:03:13 +00:00
Sven Hesse
6b85f809d9 GOB: Urban: Fix missing visuals at Cemetary/Lab
Urban Runner decouples _frontSurface and
_spritesArray[kFrontSurface] at that screen... *sigh*

svn-id: r55346
2011-01-20 10:20:57 +00:00
Sven Hesse
0d11ae143f GOB: Add a method to get a true palette color
svn-id: r55271
2011-01-16 22:28:49 +00:00
Sven Hesse
51fd528fe5 GOB: Change all drawing to use class Surface
svn-id: r52947
2010-09-30 13:02:16 +00:00
Arnaud Boutonné
5cd3ea41db GOB: Clean up of Fascination code
Move Fascination specific function to appropriate classes, plus some style modifications

svn-id: r52267
2010-08-21 18:16:04 +00:00
Sven Hesse
4415953393 GOB: Add constants for different surfaces/sprites
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
2010-08-08 00:35:18 +00:00
Johannes Schickel
cbbb78d9f2 Enforce conversion formatting on pointer casts in the DEV code.
svn-id: r49068
2010-05-17 22:46:53 +00:00
Arnaud Boutonné
816e318134 Fascination: - Suppress the recently added oFascin_keyFunc, replace it with a check in o1_keyFunc. This fixes the animation speed regression
- Rename Amiga-specific protracker functions
- Rewrite winDecomp.

svn-id: r48011
2010-02-08 23:12:42 +00:00
Sven Hesse
d4949d03d4 Minor style-related changes
svn-id: r47839
2010-02-03 03:25:50 +00:00
Arnaud Boutonné
ac6e9e07a3 Fascination - Fix screen transition
svn-id: r47830
2010-02-03 00:51:09 +00:00
Arnaud Boutonné
f072709f25 Fascination - Add a window specific function, modify checkmouse() function in order to use it (without breaking the other games). Windows are no longer "transparent"
svn-id: r47828
2010-02-02 23:39:19 +00:00
Johannes Schickel
aed02365ec Strip trailing spaces/tabs.
svn-id: r47541
2010-01-25 01:39:44 +00:00
Arnaud Boutonné
d90c60e879 Fix a regression in the first part of the intro (gitches when the paper and the rat are moving).
svn-id: r44518
2009-10-01 12:19:01 +00:00
Arnaud Boutonné
ff70b554ea Playtoons - implement some functions related to hotspot texts
Fascination - initial version of several 'Fascination Window' functions, proper naming of most of fascination OPCODEDRAW and OPCODEGOB functions

svn-id: r44472
2009-09-29 22:43:30 +00:00
Arnaud Boutonné
6a9cc3b1e0 - Implement _pattern variable
- Add oPlaytoons_putPixel and Playtoons specific spriteOperation (using _pattern)

svn-id: r44103
2009-09-15 12:15:22 +00:00
Arnaud Boutonné
033bedd906 Gob/Adi2 - In playtoons and later, there are 50 more sprite pointers
svn-id: r43949
2009-09-04 21:22:09 +00:00
Sven Hesse
081fa85b14 Playtoons uses a variable space that exceeds 32767 bytes. Changing a few variables to unsigned makes the construction mode not crash anymore (though it now hangs in a loop)
svn-id: r43713
2009-08-24 22:37:09 +00:00
Sven Hesse
02ca620d7c Caching the subtitle font and color, because some don't assign those
svn-id: r42706
2009-07-24 21:31:58 +00:00
Sven Hesse
adc537161a Adding subtitle support to Woodruff
svn-id: r42705
2009-07-24 21:31:00 +00:00
Sven Hesse
3823ae285f Giving Font its own real class
svn-id: r42277
2009-07-09 02:54:10 +00:00
Max Horn
3d3da173b0 GOB: Turned _spritesArray into a Common::Array (of fixed size) to detect out-of-bounds access to it (since access is controlled by scripts, this could (and does :/) easily happen. Also removed an obsolete swap() method, and fixed one case where _spritesArray was indeed accessed out of bounds
svn-id: r41305
2009-06-06 21:37:30 +00:00
Max Horn
0989bb0b90 GOB: Got rid of class ReferenceCounter; changed SurfaceDesc::Ptr to SurfaceDescPtr (a Common::SharedPtr); and changed many SurfaceDesc pointers to references
svn-id: r41299
2009-06-06 20:03:13 +00:00
Arnaud Boutonné
4ff69f6cd0 Gob- Add a fascination-specific (and yet unknown) renderflag vaue
svn-id: r40206
2009-04-29 16:23:38 +00:00
Arnaud Boutonné
ee92913683 Patch #2725859 : Added some MD5 to the gob engine, modified the way the first STK and TOT is declared, added inter and draw skeleton for Fascination
svn-id: r40059
2009-04-21 21:44:37 +00:00
Sven Hesse
5f8323bd50 Plugging leaks
svn-id: r35355
2008-12-14 04:33:28 +00:00
Sven Hesse
5d9c8b7c47 Changing the GobEngine to use its dirty rects also for OSystem-copies, instead of relying on kFeatureAutoComputeDirtyRects
svn-id: r35239
2008-12-04 18:38:55 +00:00