AndywinXp
d504f3f18b
SWORD1: PSX: Improve accuracy of sprite clipping code
2023-10-16 23:20:51 +02:00
AndywinXp
2392177a7c
SWORD1: PSX: Fix y coordinate for sprite drawing
...
Now sprites don't randomly go up and down when being
animated :-) This was taken from disasm.
2023-10-16 12:59:17 +02:00
AndywinXp
ebaa3857bb
SWORD1: Change NULL to nullptr
...
This engine has somehow escaped the big NULL
purge from when we switched to C++11
2023-10-16 08:45:15 +02:00
AndywinXp
c1cd0dec79
SWORD1: Fix uninit variable issues
...
Coverity issues:
CID 1522857
CID 1522855
CID 1522854
CID 1522853
CID 1522852
2023-10-16 08:34:49 +02:00
AndywinXp
c03fe08881
SWORD1: SOUND: Implement sound effects playing and fading
2023-10-12 23:54:24 +02:00
AndywinXp
d222359fde
SWORD1: More thread-safeness measures as part of #14638
...
This commit deals with all the copyRectToScreen calls which, during
a palette fade, can collide with screen updates. These changes are
verified with a Thread Sanitizer enabled build.
I know that the latest commits have introduced lots of locks, and
I'm going to optimize the optimizable, but first I have to reach a
no-crash point :-)
2023-09-28 11:00:20 +02:00
AndywinXp
dcc37481dc
SWORD1: Add screen access mutex in critical places
...
This was deemed necessary by the fact that we have the main thread
and the timer thread which are constantly reaching out to functions which
update the screen in one form or another. By putting locks around calls to
_system->updateScreen() and _system->getPaletteManager()->setPalette()
we should be able to avoid issues like the one described in bug #14638 .
I marked all places which seem sensitive enough when the main thread and
the timer are both in full operation. I might dial it back in the future after
we are sure that the original issue is gone.
2023-09-25 09:28:56 +02:00
AndywinXp
0d0a8ad11e
SWORD1: Add more toggleable debug information
...
Pressing SHIFT-M shows a debug mouse cursor, and
pressing CTRL-G shows the walk grid.
Also, moved the showDebugInfo() function to sword1.cpp
because it seemed more appropriate.
2023-09-24 21:18:36 +02:00
AndywinXp
913f1da913
SWORD1: Implement more robust post-video palette workaround
2023-09-24 18:58:57 +02:00
AndywinXp
b9107e27ee
SWORD1: Implement pause button and on-screen debug text
...
You can now pause the game via the 'P' key! Also, using CTRL-T
when ScummVM is in debug mode, toggles some on-screen debug
information which was also available in the original DOS version by
launching the game as "sword rev text". Implementing all of this also
meant that I had to finally implement the FPS counter.
I frankly don't know if the PSX version was supposed to have this, but
it appears to work right out of the box...
2023-09-23 13:21:27 +02:00
AndywinXp
8b3f16e923
SWORD1: Rewrite main menu code
...
This now matches the source code and the executable;
this fixes a lot of inaccuracies, implements the tombstone
"death font", implements the Speed setting.
The askForCd() routine is now more accurate as well.
2023-09-21 21:41:22 +02:00
D G Turner
311784a48c
SWORD1: Fix Signed vs. Unsigned GCC Compiler Warning
2023-09-03 02:56:25 +01:00
AndywinXp
461009e823
SWORD1: Free palette resource only when actually using it
2023-09-02 11:32:51 +02:00
AndywinXp
7b8efd9845
SWORD1: Fix fade to cut palette
2023-09-02 11:32:51 +02:00
AndywinXp
e658ce8a16
SWORD1: Fix fade palette for Mac version
2023-09-02 11:32:51 +02:00
AndywinXp
67052e2ef5
SWORD1: Address other issues from code review
2023-09-02 11:32:51 +02:00
AndywinXp
dbe1a2df4f
SWORD1: Make changes for code review
2023-09-02 11:32:51 +02:00
AndywinXp
f564ad8ea8
SWORD1: Fix unused var warning
2023-09-02 11:32:51 +02:00
AndywinXp
4ab197b16f
SWORD1: Implement fades on the main menu
...
Had to reshuffle some stuff to make it work properly,
and in order to set up everything for future changes.
2023-09-02 11:32:51 +02:00
AndywinXp
394642598c
SWORD1: Implement accurate fading routines
2023-09-02 11:32:51 +02:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+
2021-12-26 18:48:43 +01:00
sluicebox
674ed112aa
JANITORIAL: Update more old bug tracker numbers
...
I missed the six digit ones and a few others in:
93eeffc84d
2021-06-09 14:28:52 -06:00
sluicebox
93eeffc84d
JANITORIAL: Update old bug tracker numbers
2021-03-03 02:15:05 +02:00
Johannes Schickel
f4724e7a46
SWORD1: Make GPL headers consistent in themselves.
2014-02-18 02:39:38 +01:00
Eugene Sandulenko
a08af2952e
SWORD1: Fix unitialized variables. CID 1002991
2013-10-30 09:18:14 +02:00
Johannes Schickel
c386a5520f
SWORD1: Replace inRange with CLIP.
2011-09-08 00:19:43 +02:00
Johannes Schickel
928cb5ab11
SWORD1: Made code conform a bit better to our formatting guidelines.
...
Most is automatically converted via astyle + some manual fixes, hopefully I
did not miss anything astyle messed up...
2011-09-07 23:54:34 +02:00
strangerke
69b1485a22
GIT: Clean up: Suppress SVN tags, now useless
2011-05-12 01:16:22 +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
Max Horn
0ce2ca4e00
COMMON: Replace MKID_BE by MKTAG
...
MKID_BE relied on unspecified behavior of the C++ compiler,
and as such was always a bit unsafe. The new MKTAG macro
is slightly less elegant, but does no longer depend on the
behavior of the compiler.
Inspired by FFmpeg, which has an almost identical macro.
2011-04-12 16:53:15 +02:00
Johannes Schickel
83f66284a7
SWORD1: Adapt to setPalette RGBA->RGB change.
2011-02-15 22:16:48 +01:00
Max Horn
2d1c8a3533
ALL: Fix whitespaces / indention
...
svn-id: r55818
2011-02-07 23:01:06 +00:00
Max Horn
ab039812e7
COMMON: OSystem now has a PaletteManager
...
svn-id: r55806
2011-02-07 17:52:38 +00:00
David Turner
7d5dcc2a0a
SWORD1: Fix possible uninitialized memory read in Screen object.
...
This was detected during playtest with Valgrind during Act 5 (Spain).
svn-id: r55658
2011-01-30 14:41:27 +00:00
Filippos Karapetis
e74e4814e4
SWORD1: Fixed bug #3087855 - "SWORD1: Code analysis warnings"
...
svn-id: r53488
2010-10-15 13:07:31 +00:00
Torbjörn Andersson
54b2a8c98d
JANITORIAL: Cleanup (mostly whitespace)
...
svn-id: r53161
2010-10-12 04:19:58 +00:00
Torbjörn Andersson
72eb9ec9ea
Fixed a bunch of cppcheck warnings. Mostly about checking if a pointer is null
...
before freeing it, which isn't necessary.
svn-id: r46941
2010-01-03 19:37:43 +00:00
Max Horn
51933629d1
Changed foo(void) to foo() in almost all non-backend source files
...
svn-id: r45616
2009-11-02 21:54:57 +00:00
Max Horn
8ba75fc522
Fix code formatting (esp. 'if(' -> 'if (' etc., but also indention and other things)
...
svn-id: r44495
2009-09-30 16:16:53 +00:00
Johannes Schickel
b3c6751b9b
Strip trailing whitespaces in the whole code base.
...
svn-id: r40867
2009-05-24 15:17:42 +00:00
Johannes Schickel
c8aec4c696
SWORD1: Commit of parentheses patch from salty-horse. (from -devel "Enabling -Wparentheses in the Makefile").
...
svn-id: r39762
2009-03-30 12:11:22 +00:00
Fabio Battaglia
81cfb9ffd5
sword1: clean background buffers before writing on them in psx decoding functions
...
svn-id: r39480
2009-03-17 09:21:14 +00:00
Fabio Battaglia
f7e4f15218
sword1: cleanup
...
svn-id: r39479
2009-03-17 08:22:51 +00:00
Fabio Battaglia
a9da116ceb
sword1: optimize drawing routine for screen 54
...
svn-id: r39477
2009-03-17 08:03:29 +00:00
Fabio Battaglia
3c9b4e0f07
sword1: enable psx background caching for screen 54 (bull's head) too
...
svn-id: r39475
2009-03-17 07:46:04 +00:00
Fabio Battaglia
88ff058bd7
sword1: cache decompressed psx version backgrounds, to avoid uncompressing them at every screen update.
...
svn-id: r39462
2009-03-16 23:10:50 +00:00
Fabio Battaglia
c40d2d2f50
sword1: added caching for train.plx when playing psx version
...
svn-id: r39461
2009-03-16 22:25:37 +00:00
Max Horn
f9ecd95d69
Whitespace cleanup: Convert space followed by tab to just tab
...
svn-id: r39203
2009-03-07 19:24:31 +00:00
Fabio Battaglia
2913a561cc
Avoid using unnecessary buffers in psxShrinkedBackgroundToIndexed
...
svn-id: r39074
2009-03-02 13:46:50 +00:00
Fabio Battaglia
ed65593bb3
Avoid using unnecessary buffers in psxBackgroundToIndexed
...
svn-id: r39072
2009-03-02 11:30:23 +00:00