21 Commits

Author SHA1 Message Date
neuromancer c478c5c541 IMAGE: correctly decode PICT images with offsets 2026-04-03 15:31:25 +02:00
Cameron Cawley 751167c988 IMAGE: Use a 24bpp pixel format for true colour PICT images 2025-07-13 20:01:28 +03:00
Matthew Jimenez 4a01560a44 IMAGE: Replace palette byte arrays with Palette class 2025-02-27 00:04:00 +02:00
Eugene Sandulenko 0988c49f5b IMAGE: Put PICT parser debug messages into 'ggraphics' debug channel 2025-02-22 15:51:24 +01:00
Torbjörn Andersson 9e4a4f8c77 GRAPHICS: Cleaned up and renamed unpackBitsRgn()
This is actually used for images without Rgn as well. The new code
should be easier to understand, and it handles all of the black and
white images from the Mac versions of Loom, Indy 3, Indy 4, MI1, and
MI2. It's still unfortunate - and perhaps unnecessary - that we had two
different decoders for Rect/Rgn, but I'm not comfortable modifying the
old one. Maybe later.
2024-10-28 08:24:59 +01:00
AndywinXp 679d3eab25 IMAGE: PICT: Add opcodes PnPat, ShortLine, ShortLineFrom 2024-10-28 08:24:59 +01:00
never 3dfb5efbfe IMAGE: PICT: Added rowbytes checking if there is lack of PixMap headers
This fixes rendering for certain PICT files, for example
for opcode 0098 http://cd.textfiles.com/fantaziasampler/CLIPART/PCT/FC19.PCT
for opcode 0099 https://github.com/nevernever69/PICT_FILES/blob/main/pict-2000.dat
for opcode 009A https://www.fileformat.info/format/macpict/sample/ec987832ed03482aa788f99677e06e84/download
for opcode 0090 http://cd.textfiles.com/fantaziasampler/CLIPART/PCT/FC10.PCT
for opcode 0091 https://github.com/nevernever69/PICT_FILES/blob/main/pict-1001.dat
and for testing this files use hardcoded palette
2024-01-02 00:55:25 +02:00
Eugene Sandulenko ff6c4424bd IMAGE: Added PackBitsRgn and BitsRgn opcodes to PICT decoder
Used in SCUMM Mac GUI
2023-12-26 17:52:52 +01:00
Torbjörn Andersson 1ae0fe2d1e GRAPHICS: Assume PICT are version 2 by default
The version number decides if opcodes are 1 or 2 bytes, but we don't
know for sure which it is until the first opcode has been handled. But
the way the o_versionOp1 opcode is defined, we should recognize it it
regardless, so going from assumed version 2 to confirmed version 1
should be no problem. I do not have any test case to confirm this,
though.

What I do know is that going from assumed version 1 to confirmed version
2 does not work, so we want _version to be well defined (even if wrong)
from the beginning.
2022-11-22 07:10:20 +01:00
Eugene Sandulenko e5f558f2dc IMAGE: Hid debug ouptut deeper and improve wording 2022-07-09 13:35:55 +02:00
Pragyansh Chaturvedi 846f9e2479 GRAPHICS: IMAGE: Add version identifier for PICT, Implement o_clip function 2022-07-04 19:37:30 +02:00
Donovan Watteau 5b1ec56f96 JANITORIAL: Fix some lost or outdated URLs in comments 2022-05-19 07:57:31 +03:00
Thunderforge fd129ebc0c JANITORIAL: "Mac OS X" and "OS X" to "macOS" in comments
Apple's desktop operating system was formerly called "Mac OS X" and "OS X", but since 2016 it has been called "macOS" (starting with version 10.12).

Changing across all comments and documentation to use this current terminology, except in cases where the historical versions are explicitly referenced. No code changes are made; we should consider changing those in future PRs.
2022-01-29 14:15:05 +01:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Orgad Shaneh 7a4e5612de JANITORIAL: Replace new[]/memset with new[]()
Mostly done using the following Ruby script:

(Dir.glob('**/*.cpp') + Dir.glob('**/*.h')).each do |file|
  s = File.read(file, encoding: 'iso8859-1')
  t = s.gsub(/(([\w_.\[\]]+)\s*=\s*new\s+\S+?\[[^\]]+?\](?!\())([^\{\}]*?)\n\s+memset\(\s*\2\s*,\s*0\s*,[^;]*;/m, '\1()\3')
  if t != s
    File.open(file, 'w') { |io| io.write(t) }
  end
end
2021-11-10 19:53:15 +01:00
D G Turner aee09409e8 IMAGE: Fix Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
2019-11-30 22:08:44 +00:00
sluicebox b195ff5e19 GRAPHICS: Add support for PICT opcode $90 BitsRect
Add limited support for unpacked PICT bits which FPFP Mac requires.

SCI games use packed PICT bits unless an image is less than 8 bytes
per row in which case they can't be packed, like FPFP's shovel icon.

Fixes bug #7059 which prevents the game from being completed.
2019-03-31 14:02:58 +03:00
Bastien Bouclet 360e1e97c9 IMAGE: Check the output surface bounds when writing QT encoded PICT images 2018-09-14 19:54:52 +02:00
Eugene Sandulenko 3b5236c9de IMAGE: Init memory before usage 2016-05-31 17:12:18 +02:00
Matthew Hoops acec700c11 IMAGE: Share the same pool of codecs between PICT and QuickTime 2014-02-28 00:32:06 -05:00
Matthew Hoops 740b6e8fbd IMAGE: Move all ImageDecoders to image/ 2014-02-28 00:27:28 -05:00