Commit graph

377 commits

Author SHA1 Message Date
Le Philousophe
d3ab3da104 PSP: Avoid parsing the PNG headers twice
This avoids rewinding the stream which is always bad when loading the
PNG from a Zip archive.
2024-12-21 12:52:04 -06:00
Le Philousophe
da305f6779 PSP: Better error handling and reporting for PNG loading 2024-12-21 12:52:04 -06:00
Le Philousophe
77bbc3bfd2 PSP: Fix PNG palette loading
libpng never returns the palette size when the palette pointer argument
is nullptr.
If it worked before, it's because paletteSize was uninitialized and luck.
2024-12-21 12:52:04 -06:00
Eugene Sandulenko
75b6d4db51
RELEASE: This is 2.10.0git 2024-11-15 22:32:25 +01:00
Miro Kropacek
235da53455 Revert "BACKENDS: (PSP) Fix missing General Midi device error"
This reverts commit fcddbb0fc1.
2024-11-08 18:43:23 +02:00
Hubert Maier
4533e12280 JANITORIAL: BACKENDS: Fix typos 2024-09-16 02:13:34 +03:00
Le Philousophe
8140e087b6 PSP: Fix uint vs uint32 discrepancies 2024-09-08 00:47:36 +03:00
Cameron Cawley
42903e7e6e COMMON: Add inttypes.h to common/scummsys.h 2024-07-03 22:34:26 +01:00
Hubert Maier
c204e1295f JANITORIAL: Fix seach typo in mp3.cpp 2024-05-18 13:52:31 +02:00
Matthew Jimenez
5219c99400 GRAPHICS: Move PaletteManager definition to a separate header 2024-03-12 12:24:00 +02:00
rsn8887
bce07435c1 BACKENDS: (PSP) Include plugins when building psp_release 2024-02-21 16:58:13 -06:00
rsn8887
29f808bada BACKENDS: (PSP) Fix no rule error in makefile 2024-02-21 16:40:09 -06:00
rsn8887
042dfc01a2 BACKENDS: (PSP) Improve makefile 2024-02-21 13:18:12 -06:00
rsn8887
22f0f63f12 BACKENDS: (PSP) Improve analog stick pointer control 2024-02-20 19:23:19 -06:00
rsn8887
fcddbb0fc1 BACKENDS: (PSP) Fix missing General Midi device error 2024-02-16 10:25:13 -06:00
Le Philousophe
9bdf1233b1 BACKENDS: Migrate to Path API 2023-12-24 13:19:25 +01:00
Le Philousophe
01ebece807 COMMON: Make getDefaultConfigFileName return a Path instead of a String 2023-12-24 13:19:25 +01:00
Eugene Sandulenko
0acbc8ae4e
RELEASE: This is 2.9.0git 2023-12-03 22:09:08 +01:00
Cameron Cawley
bcc9259382 BACKENDS: Report if the backend supports cursors with alpha channels 2023-10-29 02:02:11 +02:00
Le Philousophe
caa7e5c8df ALL: Add limits for all codebase 2023-06-06 08:14:25 +02:00
elasota
3db67a33ac GRAPHICS: Add support for pixels with masks and inverted pixels 2023-02-19 23:51:09 +01:00
Lothar Serra Mari
baa0a1fa10 RELEASE: This is 2.8.0git 2023-01-20 20:31:01 +01:00
Eugene Sandulenko
fb7095f5a4
COMMON: Move all compression-related files to a separate directory 2022-12-01 11:53:02 +01:00
Le Philousophe
87bad2cc7d COMMON: Allow games to use overlay for something else than GUI
This can be used for subtitles without changing the mouse coordinates.
2022-11-12 19:12:05 +01:00
rsn8887
984341d73f BACKENDS: PSP: Remove unused code in RGBA8888 path 2022-11-06 10:59:02 -06:00
rsn8887
6ae4512a42 BACKENDS: PSP: Support RGBA8888 by swapping bytes 2022-11-05 14:00:32 -05:00
Le Philousophe
f61400075f PSP: Don't use unsafe sprintf and vsprintf 2022-10-23 22:46:19 +02:00
Le Philousophe
111d259015 ALL: Add limits.h for all codebase 2022-08-22 15:38:10 +02:00
Le Philousophe
a0f02d93c5 JANITORIAL: Refresh all portdefs
Make sure all needed includes are really included
2022-08-22 15:38:10 +02:00
Lothar Serra Mari
a07be8c665 RELEASE: This is 2.7.0git 2022-06-05 20:43:05 +02:00
Francisco Javier Trujillo Mata
df48fa7861 PSP: Remove legacy Makefile 2022-05-02 17:11:10 -05:00
Francisco Javier Trujillo Mata
1202099d61 PSP: Remove legacy PSP_HEAP_SIZE_KB macro 2022-05-02 17:11:10 -05:00
Francisco Javier Trujillo Mata
652846cac0 PSP: Remove standard libraries 2022-05-02 17:11:10 -05:00
Le Philousophe
9368fd133f PSP: Fix link specification for newer PSP toolchains
They added threads support and they need to be linked too if they exist
2022-04-19 19:45:44 +02:00
Le Philousophe
675695c708 PSP: Fix build failures with latest PSP toolchain
The new PSP toolchain automatically links system libraries which wasn't
the case before. The ordering of libraries builtin in GCC and our spec
file collided. This fixes the order.
PSP SDK includes time.h so it needs an exemption.
A warning was emitted about a if without curly braces which are needed.
2021-12-31 09:50:53 +01:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Orgad Shaneh
44219dfa1a BACKENDS: Use nullptr
Using clang-tidy modernize-use-nullptr
2021-11-14 15:51:59 +02:00
Cameron Cawley
5022489277 BACKENDS: Refactor the API for creating Mutexes 2021-11-12 20:19:45 +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
Le Philousophe
117927ce6c JANITORIAL: Remove unused HAVE_GCC3 variable 2021-11-01 21:46:15 +01:00
rsn8887
aa42de666c BACKENDS: PSP: Fix screen scaling 2021-10-02 17:45:26 -05:00
Eugene Sandulenko
9a4f0b7c66
RELEASE: This is 2.6.0git now 2021-10-01 16:04:48 +03:00
Eugene Sandulenko
580ec65220
RELEASE: This is 2.4.0git 2021-08-28 21:01:11 +02:00
Le Philousophe
68a327ecb1 BACKENDS: Harden grabOverlay in all platforms
Use specific copy code where applicable and replace duplicated code by
calls to copyBlit which optimizes blitting
2021-08-04 13:27:07 +02:00
Martin Gerhardy
a0c237f7b9 EVENTRECORDER: added new event for OSystem::getTimeAndDate 2021-07-09 19:23:21 +02:00
Martin Gerhardy
5af1192580 BACKENDS: fixed segfault in EventRecorder with buffer out of bounds writes
==3124361== Invalid write of size 8
==3124361==    at 0x483F803: memmove (vg_replace_strmem.c:1270)
==3124361==    by 0x4DBF61: SurfaceSdlGraphicsManager::grabOverlay(void*, int) const (surfacesdl-graphics.cpp:1753)
==3124361==    by 0x482051: ModularGraphicsBackend::grabOverlay(void*, int) (modular-backend.cpp:215)
==3124361==    by 0x434EE1: GUI::ThemeEngine::clearAll() (ThemeEngine.cpp:376)
==3124361==    by 0x40128E: GUI::EventRecorder::preDrawOverlayGui() (EventRecorder.cpp:558)
==3124361==    by 0x481DB2: ModularGraphicsBackend::updateScreen() (modular-backend.cpp:173)
==3124361==    by 0x559967: Graphics::Screen::updateScreen() (screen.cpp:62)
==3124361==    by 0x55991C: Graphics::Screen::update() (screen.cpp:56)
==3124361==    by 0x38AFC7: TwinE::TwineScreen::update() (twine.cpp:126)
==3124361==    by 0x3B8759: TwinE::Screens::adjustPalette(unsigned char, unsigned char, unsigned char, unsigned int const*, int) (screens.cpp:150)
==3124361==    by 0x3B8A89: TwinE::Screens::fadeToPal(unsigned int const*) (screens.cpp:207)
==3124361==    by 0x3B8403: TwinE::Screens::loadImage(int, int, bool) (screens.cpp:80)
==3124361==  Address 0x31453050 is 16 bytes after a block of size 512,000 alloc'd
==3124361==    at 0x483AB65: calloc (vg_replace_malloc.c:760)
==3124361==    by 0x55B38C: Graphics::Surface::create(unsigned short, unsigned short, Graphics::PixelFormat const&) (surface.cpp:75)
==3124361==    by 0x551111: Graphics::ManagedSurface::create(unsigned short, unsigned short, Graphics::PixelFormat const&) (managed_surface.cpp:153)
==3124361==    by 0x4352D5: GUI::ThemeEngine::setGraphicsMode(GUI::ThemeEngine::GraphicsMode) (ThemeEngine.cpp:453)
==3124361==    by 0x434A52: GUI::ThemeEngine::init() (ThemeEngine.cpp:324)
==3124361==    by 0x43501B: GUI::ThemeEngine::refresh() (ThemeEngine.cpp:394)
==3124361==    by 0x405780: GUI::GuiManager::screenChange() (gui-manager.cpp:603)
==3124361==    by 0x405C6B: GUI::GuiManager::processEvent(Common::Event const&, GUI::Dialog*) (gui-manager.cpp:677)
==3124361==    by 0x404EBA: GUI::GuiManager::runLoop() (gui-manager.cpp:429)
==3124361==    by 0x3FD847: GUI::Dialog::runModal() (dialog.cpp:77)
==3124361==    by 0x36D747: launcherDialog() (main.cpp:106)
==3124361==    by 0x36FF92: scummvm_main (main.cpp:552)

It looks like the _videoMode.overlayHeight in SurfaceSdlGraphicsManager::grabOverlay and ThemeEngine::_backBuffer::h are somehow out of sync after
starting the game in a different resolution as the gui was started with. So the overlayHeight is updated - but the backbuffer (Surface) is not resized.

This is with event recorder being active - right after starting the game and switching the resolution.
2021-06-19 14:34:52 +02:00
Orgad Shaneh
a05e54f00c JANITORIAL: Remove trailing whitespaces 2021-05-04 11:46:30 +03:00
rsn8887
8ab7d43079 BACKENDS: PSP: Fix pixelformat, fixes crash on startup 2021-04-30 22:29:24 -05:00
Orgad Shaneh
b49e6eb96f JANITORIAL: Fix some excess tabs 2021-04-15 23:18:08 +03:00
Eugene Sandulenko
5e7fe2dc57
JANITORIAL: Replace spaces in indentation with tabs 2021-04-15 21:20:36 +02:00