Commit Graph
98 Commits
Author SHA1 Message Date
Martin Kiewitz 062d9eedce SCI: fixing view scaling code
fixes crash in sq5 with elevator on goliath

svn-id: r51520
2010-07-30 22:44:23 +00:00
Martin Kiewitz d5ced8ab9e SCI: using coordadjuster in GfxView
svn-id: r51276
2010-07-25 16:37:36 +00:00
Martin Kiewitz 2047e75d2b SCI: kCelWide/kCelHigh now adjust on hires views
somewhat fixes gk1 hires inventory issue

svn-id: r51245
2010-07-24 15:15:38 +00:00
Martin Kiewitz bcc010a56e SCI: remove some duplicate code
svn-id: r50535
2010-06-30 15:26:45 +00:00
Martin Kiewitz 4e999c8295 SCI: support for hires views in gk1
svn-id: r50533
2010-06-30 14:26:47 +00:00
Filippos Karapetis 3a2ac994d4 Handle empty clip rectangles in GfxView::drawScaled(). Fixes an assert in the first room of the game
svn-id: r50503
2010-06-29 20:13:57 +00:00
Martin Kiewitz 473c429b5c SCI: updated comment about transparent pixels in views
svn-id: r50454
2010-06-28 18:10:21 +00:00
Martin Kiewitz 06648cb186 SCI: fix regression of r50422, please no refactoring without proper testing - fixes animations in all sorts of games
svn-id: r50451
2010-06-28 16:56:15 +00:00
Max Horn 1453093391 SCI: Cleanup GfxView code (formatting etc.); also insert some asserts to protect scalingX/Y arrays
svn-id: r50425
2010-06-28 11:21:23 +00:00
Max Horn 2c01d10a36 SCI: Remove GfxView::getLoopInfo; add assert to GfxView::getCelInfo
The return value of GfxView::getCelInfo was used virtually everywhere
without a check for it being non-NULL. Hence instead of returning
NULL when the loop count is zero, it makes more sense to assert out
(instead of a segfault, or worse, random data being used).

svn-id: r50422
2010-06-28 11:20:33 +00:00
Max Horn 9f48a37671 SCI: Add const qualifiers to many GfxView methods and their return values.
This helps to ensure proper data encapsulation.
Also reformatted some overlong comments to 80 chars per line, and
fixed some other code formatting issues.

svn-id: r50421
2010-06-28 11:20:14 +00:00
Lars Skovlund 6864d09d68 SCI: Fix for large views in GK2. At least it does not segfault now.
svn-id: r50376
2010-06-27 13:15:01 +00:00
Martin Kiewitz f0145e6dcd SCI: implementing boundary checking for GfxPalette::createFromData(), sq5 has a broken picture 0 resource, which would result in either crash or at least bad read from memory depending on whats read there
svn-id: r50178
2010-06-23 11:47:14 +00:00
Martin Kiewitz 38cf6aa3e4 SCI: implemented kAssertPalette and a palvary fix for ::set, fixes erana's place in qfg1vga nighttime
svn-id: r50162
2010-06-22 19:01:43 +00:00
Martin Kiewitz 26e4e0e345 SCI: cleanup view decompression code
svn-id: r50053
2010-06-19 17:12:17 +00:00
Martin Kiewitz 602b32175a SCI: fixing detection of vga sci11 views for ega games (original change in r50025)
svn-id: r50028
2010-06-18 18:55:17 +00:00
Martin Kiewitz 3197dfc033 SCI: added more description about changes in r50025
svn-id: r50026
2010-06-18 17:53:35 +00:00
Martin Kiewitz 636ef64c68 SCI: making vga views work in ega games :P
svn-id: r50025
2010-06-18 17:40:13 +00:00
Matthew Hoops 3dda73d9a2 Add initial support for KQ6 Mac. Wrapper functions for read/writing to pointers are now used (found in util.*) for code that has different endianness in SCI1.1+ Mac games. Add support for Mac 'snd ' and 'CURS' resources. QFG1 Mac is not yet playable due to script compression.
svn-id: r49070
2010-05-18 04:17:58 +00:00
Martin Kiewitz eb2b3f352e SCI: adding upscaled hires mode 640x480 for kq6 and gk1, fixing valgrind error in GfxPortrait class, not using priority anymore when drawing hires cels (shouldnt be needed for kq6)
svn-id: r49040
2010-05-15 14:17:50 +00:00
Martin Kiewitz 59a255226f SCI: SCI_SCREEN_MASK_* now GFX_SCREEN_MASK_*, using enum - added new enum GFX_SCREEN_UPSCALED_*
svn-id: r49039
2010-05-15 08:57:13 +00:00
Martin Kiewitz faffc57136 SCI: removing one assert() from view loading, cause view 260 in kq6 really contains a celCount == 0 o_O
svn-id: r49024
2010-05-13 15:49:52 +00:00
Martin Kiewitz 86cd5b71fc SCI: adding some more assert()s in view data loading for clone :D
svn-id: r49023
2010-05-13 15:39:20 +00:00
Martin Kiewitz 49d41d891b SCI: figured out weird special mac sci1.1 view decompression (currently commented out for clone2727)
svn-id: r49020
2010-05-13 12:29:55 +00:00
Martin Kiewitz 7329e815af SCI: header size within sci1.1+ views doesn't include the actual header size word, adjust accordingly (should make mac view support possible now)
svn-id: r49019
2010-05-12 21:28:38 +00:00
Martin Kiewitz cabd18da9e SCI: renaming class View to GfxView
svn-id: r47891
2010-02-04 22:17:58 +00:00
Martin Kiewitz a79330e6d8 SCI: fix support for cels that are larger than 64k (sierra logo animation in sq6)
svn-id: r47873
2010-02-04 11:54:48 +00:00
Martin Kiewitz 72c2d360f7 SCI: renamed SciPalette to GfxPalette, Screen to GfxScreen, GfxPalette is now called directly w/o SciGui
svn-id: r47752
2010-01-31 16:21:11 +00:00
Martin Kiewitz 7929255cd9 SCI: cleaned up graphics classes, removed gfx&windowmgr, added gfxports, gfxcompare, gfxpaint16, gfxcache. kernel uses gfxports directly w/o going through SciGui
svn-id: r47745
2010-01-31 12:35:15 +00:00
Martin Kiewitz 981252b1fe SCI: view class fix for hires views that are larger than 64k (fixes kq7 cel corruption)
svn-id: r47661
2010-01-29 00:03:10 +00:00
Martin Kiewitz a45af3457a SCI: removing duplicate comment line that isnt right there (it documents the other view format)
svn-id: r47605
2010-01-27 18:11:49 +00:00
Martin Kiewitz e0d05a482c SCI: changed flags (uint16) to force (bool) for set/merge palette methods
svn-id: r47578
2010-01-26 22:45:52 +00:00
Martin Kiewitz 5fa0718356 SCI: created isAmiga32color(), using this method instead of comparing against viewType
svn-id: r47554
2010-01-25 12:34:40 +00:00
Johannes Schickel aed02365ec Strip trailing spaces/tabs.
svn-id: r47541
2010-01-25 01:39:44 +00:00
Martin Kiewitz 76dfdac6d4 SCI: added TODO inside kAnimate for scalesignal bit 1, added comment about scaling into view class
svn-id: r47330
2010-01-16 19:44:33 +00:00
Martin Kiewitz bc3405cc9e SCI: view scaling - dont fill left-over bytes if there are no left-over bytes :P
svn-id: r47329
2010-01-16 19:25:09 +00:00
Martin Kiewitz 971cfcbd9e SCI: support for upscaling implemented, included clipping
svn-id: r47328
2010-01-16 19:21:06 +00:00
Martin Kiewitz d1733bcf15 SCI: scaling support, upscaling not yet supported - not really tested, so there may be bugs
svn-id: r47325
2010-01-16 17:30:17 +00:00
Martin Kiewitz e29c4e7af7 SCI: View::drawScaled() created (doesnt do scaling yet), removed scaling variables from View::draw, gfx calls drawScaled() when scaleX/Y != 128, getting scaled rect inside kAnimate()
svn-id: r47322
2010-01-16 16:17:45 +00:00
Martin Kiewitz 944774e9f5 SCI: created getCelScaledRect() inside view class
svn-id: r47319
2010-01-16 14:20:00 +00:00
Martin Kiewitz 52eb58a3e5 SCI: View::getCelCount now validates input
svn-id: r47267
2010-01-12 18:24:37 +00:00
Martin Kiewitz 3145ee5379 SCI: changed displaceY and displaceX for cels to int16, also inserted cast to signed char for sci1 displaceX - should fix wii flickering and incorrect cel placement problems
svn-id: r47257
2010-01-11 20:31:12 +00:00
Martin Kiewitz 519e80ca8b SCI: implemented additional drawCel for hires views, fixes menu bar of kq6 - still need to fix coordinates and implement save/restoreBits for hires
svn-id: r47116
2010-01-07 14:46:29 +00:00
Martin Kiewitz 4701d0799c SCI: small cleanup in view drawing
svn-id: r47108
2010-01-07 13:56:56 +00:00
Filippos Karapetis 254850aa23 - Some work on kLocalToGlobal and kGlobalToLocal for SCI2+
- Removed the custom types MemoryHandle, LoopNo, CelNo (cause we ended up having code like LoopNo loopNo = ...)
- Improved the sanity checks in frameOut()

svn-id: r47087
2010-01-06 17:25:54 +00:00
Martin Kiewitz 1712e223e2 SCI: removed uint16 limit within view class (allows hires views)
svn-id: r47035
2010-01-05 19:55:05 +00:00
Filippos Karapetis 9606e7fca7 Some initial work on SCI1.1 view scaling (not working yet)
svn-id: r47027
2010-01-05 14:19:53 +00:00
Filippos Karapetis d99aa0f126 More renaming
svn-id: r47009
2010-01-05 01:37:57 +00:00