Commit Graph

242 Commits

Author SHA1 Message Date
Johannes Schickel
eb22417639 SWORD25: Do not set Surface::pixels directly anymore. 2013-08-03 04:14:08 +02:00
Johannes Schickel
1550e9804b SWORD25: Take advantage of Surface::getPixels. 2013-08-03 04:02:52 +02:00
Johannes Schickel
5afa6f97f4 SWORD25: Prefer getBasePtr over direct Surface::pixels access. 2013-08-03 02:52:33 +02:00
Sven Hesse
989ea7cb56 JANITORIAL: Remove trailing whitespace 2013-07-14 19:01:47 +02:00
Eugene Sandulenko
f59512c47e RECORDER: Implement Events Recorder 2013-05-17 00:18:09 +03:00
Eugene Sandulenko
4a62d6c25a Merge pull request #320 from johndoe123/sword25-gfx
SWORD25: Optimized graphics drawing
2013-05-06 03:49:21 -07:00
Eugene Sandulenko
3c0c6a5cb1 SWORD25: Plug memory leak. CID 1003589 2013-04-24 01:23:31 +03:00
johndoe123
4fc57dac8f SWORD25: Fix blitting code
- Rename collectRenderQueue to preRender
- Only do forceRefresh() in Panel::setColor() and Text::setText() if the new values are different
- Move child object resorting from RenderObject::render() into RenderObject::preRender()
2013-04-20 00:34:32 +02:00
johndoe123
e935f85366 SWORD25: Change absolute Z calculation to match that of absolute x/y; remove old comment 2013-04-17 19:54:39 +02:00
johndoe123
0a0b2f397b SWORD25: Optimize graphics drawing code 2013-04-17 12:41:49 +02:00
Johannes Schickel
fe1a779441 SWORD25: Silence C++11 narrowing warnings. 2013-01-09 07:24:37 +01:00
Johannes Schickel
5f65cf9679 SWORD25: Get rid of casts on OSystem::copyRectToScreen calls. 2012-06-16 02:39:00 +02:00
Strangerke
04b6af9176 SWORD25: Janitorial: Apply coding conventions 2012-06-13 09:40:11 +02:00
Matthew Hoops
a658fc660e GRAPHICS: Move PNG to the ImageDecoder interface 2012-03-20 01:06:48 +01:00
Johannes Schickel
21fb4af154 SWORD25: Return 0 instead of false in Screenshot::createThumbnail.
This should "fix" a g++ warning.
2012-01-29 16:33:43 +01:00
D G Turner
7a0aabccbe SWORD25: Reduce usage of 'goto'.
Have refrained from changing the usage of 'goto' in the embedded LUA
interpreter code for the time being, as this is still in flux due to
the savegame issues.
2011-12-08 19:24:42 +00:00
Christoph Mallon
a78b2d777d JANITORIAL: Remove extra semicolons. 2011-11-27 12:54:22 +01:00
Johannes Schickel
61795739f8 COMMON: Rename Common::set_to to Common::fill.
This makes the name match with the name of the STL function with the same
behavior.
2011-11-16 18:06:30 +01:00
Eugene Sandulenko
1c711da8fc SWORD25: Fix regression introduced in 5dd8f2575b
Janitorial removed function call which had a side effect.
Thus the actor image load code crashed.
2011-07-10 18:10:58 +03:00
eriktorbjorn
5dd8f2575b JANITORIAL: Silence a couple of "variable set but not used" warnings. 2011-06-30 23:47:10 +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
a17049e228 SWORD25: removed useless warning in setVsync() 2011-06-29 17:16:28 +03:00
Eugene Sandulenko
15a16e556c SWORD25: Implement persistence functions for soundengine
Now sound is properly saved/restored. Implemented savegame versioning.
Compatibility with old saves pertained.
2011-06-29 17:16:25 +03:00
Eugene Sandulenko
bce549f42a SWORD25: Fix bug with loading saves when some saves are missing 2011-06-26 16:10:34 +03:00
Julien
e972c6cfd8 SWORD25: Add error checks after allocating memory with malloc 2011-06-23 15:15:57 +08:00
Julien
2f200ac493 ANALYSIS: Fix potential memory leak when using realloc
When reallocation is unsuccessful, the passed buffer is not freed. In this case, assigning the result (NULL) will result in a leak of the original memory buffer.
See http://msdn.microsoft.com/en-us/library/kkedhy7c.aspx
2011-06-23 15:11:36 +08: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
Eugene Sandulenko
f090eb6727 SWORD25: Fix image blending for black
This fixes exit menu.
2011-06-17 01:17:25 +03:00
Max Horn
a6e5b97e9f COMMON: Remove vfprintf call from XML parser 2011-06-06 11:19:09 +02:00
Max Horn
ac1c2124e5 SWORD25: Remove redundant bounds check 2011-06-06 11:19:07 +02:00
Max Horn
9c86e1a0a8 SWORD25: Fix whitespace 2011-06-06 11:19:07 +02:00
md5
62c026d3b6 SWORD25: Merged the PNG and thumbnail decoding code into a common class 2011-05-26 12:29:51 +03:00
md5
d5050463d5 SWORD25: Removed the leftover libpng code 2011-05-26 11:46:42 +03:00
Matthew Hoops
9539017ee3 ALL: initialise -> initialize 2011-05-25 11:17:11 -04:00
Max Horn
55e7ef1e08 SWORD25: Remove obsolete FORBIDDEN_SYMBOL_ALLOW_ALL defines 2011-05-23 19:48:14 +02:00
Alyssa Milburn
f1a7ec7117 SWORD25: Fix screenshot endianism issue 2011-05-23 12:12:26 +02:00
Alyssa Milburn
9983231294 SWORD25: De-hardcode target name in thumbnail code
This just uses the provided filename rather than trying to recreate
it with a hard-coded target (causing crashes with other targets).
(Also, add an error check rather then crashing there, just in case.)
2011-05-23 11:55:34 +02:00
md5
b3bc35c62a SWORD25: Added a version field for savegame thumbnails 2011-05-13 19:19:58 +03:00
md5
3ec466853a SWORD25: Replaced the PNG thumbnail encoding code, used in saved games
- Savegame thumbnails are now created using a flat image format,
instead of PNG. This allows us to remove the PNG encoding code used
in the engine. Note that the saved games we create cannot be used
with the original engine anyway, so this change does not break
savegame compatibility with the original game (it's already broken).
- Compatibility is preserved with older saved games that were made with
ScummVM.
- Moved the embedded thumbnail reading code out of the PNG loader class,
to stop it from needlessly checking every PNG file.
- With this change, libpng is no longer required for the sword25 engine
2011-05-13 18:49:14 +03:00
strangerke
69b1485a22 GIT: Clean up: Suppress SVN tags, now useless 2011-05-12 01:16:22 +02:00
md5
f20c8b963a SWORD25: Disabled code which isn't necessary with our PNG decoder 2011-05-05 22:12:38 +03:00
md5
d7334628bd SWORD25: Moved the thumbnail handling code to its appropriate place
PNGLoader is able to load images embedded in saved games already. This
helps remove some duplicate code
2011-05-05 22:03:15 +03:00
md5
2af3759a78 SWORD25: Fixed the thumbnail creation code, and removed a hack 2011-05-05 20:13:06 +03:00
md5
921030f4ef SWORD25: Initial code for showing savegame thumbnails
There is currently a bug and only the thumbnail of the first save slot is
shown
2011-05-05 18:33:22 +03:00
md5
9abc42019a SWORD25: Remove unused code 2011-05-05 12:54:31 +03: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
Johannes Schickel
da734a4af0 ALL/GRAPHICS: Remove Surface::bytesPerPixel. 2011-04-17 21:27:34 +02:00
Johannes Schickel
c3669443ec SWORD25: Prefer Surface::format over Surface::bytesPerPixel. 2011-04-17 20:58:07 +02:00
Johannes Schickel
b3f0eb8a9d SWORD25: Prefer Surface::create taking a PixelFormat over the one taking a byte depth.
I am not 100% sure whether the surfaces all use the same format as the screen,
but a quick test showed that it still works fine. In case this is wrong please
set them up with the correct format.
2011-04-17 16:31:49 +02:00