Commit Graph
1719 Commits
Author SHA1 Message Date
Johannes Schickel 8201df7bb6 GRAPHICS: Move NewFont code to a separate file. 2011-07-01 21:10:25 +02:00
Johannes Schickel 16ba176b4f GRAPHICS: Fix SJIS PCE font loading. 2011-07-01 06:13:11 +02:00
Johannes Schickel 77bfaa1bb4 GRAPHICS: More default parameter remove in SJIS code. 2011-07-01 05:51:10 +02:00
Johannes Schickel 933ee5b156 GRAPHICS: Remove default values from FontSJIS::drawChar.
drawChar is overloaded in FontSJIS. One takes a "Surface &" as first
parameter another one "void *", they furthermore have the exact same
number of required parameters. The one "void *" just had a few extra
parameters with default values. This resulted in a bug in SCUMM, where
"VirtScreen *" (a subclass of Surface) was passed instead of "VirtScreen &"
and thus the method taking "void *" was incorrectly used.

To make it easier to spot such bugs in the future I just removed the default
values and thus disallow such calls.
2011-07-01 05:42:54 +02:00
Johannes Schickel 685e32dbd7 GRAPHICS: Offer support for PCE font data of SJIS.FNT. 2011-07-01 05:42:54 +02:00
Johannes Schickel c047f871d6 GRAPHICS: Cleanup SJIS font code a bit. 2011-07-01 05:42:54 +02:00
Ori Avtalion aa0f307e06 ALL: Require DECLARE_SINGLETON to be used in the Common namepsace
Silences the clang warning:

  static data member specialization of '_singleton' must
  originally be declared in namespace 'Common'; accepted as a C++0x
  extension [-Wc++0x-extensions]

Wrapping "namespace Common {}" around the macro assignment causes clang
to complain about a spurious semicolon, and removing the semicolon at
the end of the macro causes some editors to misbehave.

Changing the requirement of using the macro in one namespace (the
global) to another (Common) seems a small price to pay to
silence a warning.
2011-06-30 22:41:41 +03:00
Eugene Sandulenko d2962531cb GRAPHICS: Generalized arbitrary bit depth images processing in PNG decoder.
This fixes 1bpp image rengering.
2011-06-26 21:19:27 +03:00
Littleboy b694a78f62 ANALYSIS: Add static casts to is* functions
This fixes a potential problem with passing char values that would be sign-extended and yield unexpected results.
See http://msdn.microsoft.com/en-us/library/ms245348.aspx
2011-06-23 08:52:52 -04:00
Julien 8a5bda72cc BACKENDS/GRAPHICS: Silence non zero-terminated terminated buffers warnings by initializing the buffers to 0 2011-06-23 15:11:37 +08:00
Julien 7a882600c6 GRAPHICS: Allocate Common::PEResources on the heap in WinFont::loadFromPE() 2011-06-23 15:11:36 +08:00
Julien c52cc84912 AUDIO/BACKENDS/GRAPHICS: Add error checks after allocating memory with malloc 2011-06-23 15:11:36 +08:00
Filippos Karapetis 784180ef68 GRAPHICS: Cleanup and simplification of some PNG decoder code 2011-06-20 21:32:19 +03:00
Max Horn 88913c0139 ALL: Remove trailing whitespaces
This tries to make our code a bit more compliant with our code formatting
conventions. For future use, this is the command I used:
  git ls-files "*.cpp" "*.h" | xargs sed -i -e 's/[ \t]*$//'
2011-06-20 00:59:48 +02:00
eriktorbjorn abf26b0614 GRAPHICS: Fix Valgrind warning
The stream class uses free() to automatically dispose of the buffer
so it must be allocated with malloc(), not "new".
2011-06-17 05:56:23 +02:00
Eugene Sandulenko 7d76962721 GRAPHICS: Fix decoding of 4bpp PNGs
Fixes checkbox in options menu in Sword25.
2011-06-16 23:35:02 +03:00
CeRiAl d809756c8d SCALERS: Fix Normal1xAspect scaler bug reported in bug #3313709 2011-06-14 22:43:28 +02:00
Willem Jan Palenstijn a1f12c25ca ARM: Fix normal2x scaler for width % 4 != 0
The first jump to 'thin:' didn't leave r14 (remaining width)
in the right state.
2011-06-10 21:31:03 +02:00
CeRiAl ef3484646a SCALERS: Fix for compiling for ARM without using ASM scalers 2011-06-10 21:30:45 +02:00
Alyssa Milburn 1529287082 GRAPHICS: Move comment to the right function. 2011-06-08 19:30:22 +02:00
eriktorbjorn a826c4422f JANITORIAL: Unbreak building with --disable-translation
I don't know if there is more code that can be removed when
disabling translations, but this is the obvious obstacle.
2011-06-07 06:21:04 +02:00
Thierry Crozat 197ef8f178 GRAPHICS: Add kLocalizedFont in FontManager
This makes it easy to get a localized font for the current
TranslationManager charset if one has been loaded. It tries
first to find one for the BigGUI or GUI fonts and then looks
for any acceptable font.

Also only use lower case font name for the FontManager HashMap.
This is to avoid issues with the case when looking for a font by
its name. There was for example an issue for font helvB12 that is
named helvb12 in the scummmodern theme.
2011-06-06 23:20:10 +01:00
Thierry Crozat 6b13782967 GRAPHICS: Move genLocalizedFontFilename() to FontManager class
It was defined in ThemeEngine class , but I moved it to make it
possible to use localized font in other places.
2011-06-06 23:20:09 +01:00
Thierry Crozat 592cca5402 GRAPHICS: Get rid of kSODFont (ScummFont)
OSD is now using the kGUIFont instead. The main advantage is that
the kGUIFont can be used for translated text while only ASCII
characters were present in ScummFont.
2011-06-06 23:20:08 +01:00
Max Horn ce32745d9c BACKENDS: Replace OSystem::disableCursorPalette by setFeatureState calls 2011-06-04 11:55:56 +02:00
Max Horn 91b889e2d3 COMMON: Rename kFeatureCursorHasPalette -> kFeatureCursorPalette 2011-06-04 11:55:56 +02:00
Matthew Hoops ad9c46344c GRAPHICS: flavour -> flavor 2011-05-25 10:50:47 -04:00
Matthew Hoops eea482fa43 ALL: behaviour -> behavior 2011-05-25 10:50:46 -04:00
Matthew Hoops 1277975c66 ALL: neighbour -> neighbor 2011-05-25 10:50:46 -04:00
Matthew Hoops efcf278bdf GRAPHICS: Optimize the convertYUV420ToRGB function a bit more
A template is used to avoid a bytesPerPixel check on every pixel and less deferences are done
2011-05-24 18:22:48 -04:00
Max Horn 90d3fc9f5b GRAPHICS: Rename some members of NewFont 2011-05-23 12:13:02 +02:00
Matthew Hoops 5fdf2796d6 GRAPHICS: Cleanup formatting 2011-05-19 18:38:09 -04:00
Matthew Hoops 1ee5ef9c6f GRAPHICS: Allow auxiliary surface functions to be used for 32bpp surfaces 2011-05-19 18:38:09 -04:00
Matthew Hoops 410be8bb79 GRAPHICS: Update links to info on PICT+JPEG 2011-05-18 23:21:20 -04:00
Matthew Hoops affb6a38a1 GRAPHICS: Add some docs and sanity checks to the YUV to RGB code 2011-05-18 10:05:13 -04:00
Matthew Hoops 0addffbfd3 GRAPHICS: Add a YUV to RGB table lookup for use with Theora
Based on the video/mpeg_player.* one, which is based on lots of other things (too many to name, go see the file)
2011-05-18 10:05:13 -04:00
md5 9bbfa2846b COMMON: Added compilation safeguards for the png decoder 2011-05-13 20:34:25 +03:00
strangerke 69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
peres 6ddf6693ce GRAPHICS: use the new interpolate16_5_3 2011-05-07 08:38:53 +09:00
peres 2dddcbf41d GRAPHICS: implement the long awaited interpolate16_5_3 2011-05-07 08:38:32 +09:00
Matthew Hoops 4a3d94a60e GRAPHICS: Add a new MacCursor class for handling CURS/crsr cursors 2011-05-05 19:26:44 -04:00
Max Horn a48b705c54 GRAPHICS: Turn printf into warning 2011-05-02 13:40:25 +02:00
Johannes Schickel 71bdb86e02 Merge pull request #16 "Add a PixelFormat to Graphics::Surface.".
For further discussion check here:
https://github.com/scummvm/scummvm/pull/16

Conflicts:
	graphics/png.cpp
2011-05-01 16:54:45 +02:00
Ori Avtalion 9414d7a6e2 JANITORIAL: Reduce header dependencies in shared code
Some backends may break as I only compiled SDL
2011-04-28 15:08:58 +03:00
Ori Avtalion cd6ee0589d JANITORIAL: Format forward declarations to follow convention 2011-04-28 12:20:34 +03:00
md5 27e4a1dee5 PNG: Changed getPalette() to properly return a copy of the image palette 2011-04-27 13:44:19 +03:00
md5 99e3028459 PNG: Improved code readability a bit 2011-04-27 13:43:03 +03:00
Johannes Schickel 33a88e5cac PNG: This PNG::getPalette.
Formerly the palette parameter was a value copy, which was assigned in
getPalette. That did not make much sense, thus I changed it to be a reference.
Since I am not quite sure whether this really shouldn't make a palette copy
I added an TODO comment about it.
2011-04-25 15:45:05 +02:00
Johannes Schickel da734a4af0 ALL/GRAPHICS: Remove Surface::bytesPerPixel. 2011-04-17 21:27:34 +02:00
Johannes Schickel 3fd919060c GRPAHICS: Do not access Surface::bytesPerPixel anymore. 2011-04-17 20:58:08 +02:00