Matthew Duggan
4c035486e7
ULTIMA8: Fix MSVC uninitialized value warning
...
There actually should be no way it can be used uninitialized, but make the
compiler happy.
2023-12-10 10:46:15 +11:00
Matthew Duggan
d8c297b2d9
ULTIMA: NUVIE: Fix memory leak on character morph
2023-12-10 10:18:37 +11:00
Matthew Duggan
841857faee
ULTIMA: NUVIE: Fix screen update rect size
2023-12-10 10:18:19 +11:00
Matthew Duggan
ac3131ecb4
ULTIMA8: Fix possible uninitialized variable use
...
Identified by xcode flow analysis - if the treasure data was bad, it's possible
for the max/min count to be left uninitialized.
2023-12-10 10:04:30 +11:00
Matthew Duggan
90f9aaaadb
ULTIMA8: Fix unused variable warning
2023-12-10 10:04:30 +11:00
Matthew Duggan
48ff3a6c92
ULTIMA: NUVIE: Fix memory leak on script load failure
2023-12-10 10:04:30 +11:00
Matthew Duggan
c33020fcd0
ULTIMA: NUVIE: Avoid crash if save file does not open
2023-12-09 13:56:10 +11:00
Matthew Duggan
12a47d956e
ULTIMA: NUVIE: Add support for ScummVM keymapper
...
Mostly maintain backward compatibility with Nuvie's keyboard mapper, but update
human-readable descriptions to match ScummVM standard.
2023-12-09 13:56:10 +11:00
Matthew Duggan
dca991cc54
ULTIMA: NUVIE: Remove thin SDL compat wrappers
2023-12-09 13:56:10 +11:00
Matthew Duggan
d85afbefdf
ULTIMA: NUVIE: Clean up more unused screen features
2023-12-09 13:56:10 +11:00
Matthew Duggan
b4414af5aa
ULTIMA: NUVIE: Remove nuvie-specific scaler code
...
Scalers have all been disabled in ScummVM, and should all be handled through
the main ScummVM system now.
2023-12-09 13:56:10 +11:00
Matthew Duggan
bb6c14a007
ULTIMA: NUVIE: Add switch toggling for Martian Dreams UI
2023-12-09 13:56:09 +11:00
Matthew Duggan
b9a9cfd806
ULTIMA: NUVIE: Add an asset viewer to assist debugging
...
Added a simple viewer like the one in Pentagram that can look at tiles and
shapes inside the game.
2023-12-09 13:56:09 +11:00
Matthew Duggan
a7d6bbac50
ULTIMA: NUVIE: Small whitespace fixes
2023-12-09 13:56:09 +11:00
Matthew Duggan
3ec5733995
ULTIMA: NUVIE: Remove now-unused debug function
2023-12-09 13:56:09 +11:00
Matthew Duggan
d5b5c73149
ULTIMA: NUVIE: Clean up by reducing variable scope
...
Replaced c-style variable declarations at the front of the function and moved
the declaration closer to use to reduce their scope and improve readability.
2023-12-09 13:56:09 +11:00
Matthew Duggan
02e75c657e
ULTIMA: NUVIE: Use nullptr instead of 0 for pointers
2023-12-09 13:56:09 +11:00
Matthew Duggan
bfd975ed4d
ULTIMA: NUVIE: Remove some unused util functions
2023-12-09 13:56:08 +11:00
Matthew Duggan
4493bdcf5c
ULTIMA: NUVIE: Use foreach style loops for cleaner code
...
Includes some small other cleanups in MapWindow.
2023-12-09 13:56:08 +11:00
Matthew Duggan
724b048312
ULTIMA: NUVIE: Yet more const correctness
2023-12-09 13:56:08 +11:00
Matthew Duggan
e5b83a7942
ULTIMA: NUVIE: Improve constness of Configuration
...
Minimize the number of places where the Configuration can potentially be
modified to make it more clear where that happens.
2023-12-09 13:56:08 +11:00
Matthew Duggan
7755e3430b
ULTIMA: NUVIE: Fix unused field warnings
2023-12-09 13:56:08 +11:00
Matthew Duggan
1af6406c92
ULTIMA: NUVIE: Fix crash if conversation active on quit
2023-12-09 13:56:08 +11:00
Matthew Duggan
a7eabd18c7
ULTIMA: NUVIE: Replace more defines with const or enum
2023-12-09 13:56:08 +11:00
Matthew Duggan
1b0d284760
ULTIMA: NUVIE: Use an enum for compass directions
...
Adds a little type safety to direction operations and lets the compiler decide
size.
2023-12-09 13:56:07 +11:00
Matthew Duggan
e40737dbad
ULTIMA: NUVIE: Avoid crashes on some corrupt data
...
These differences also occur in the PC98 version, but we should always avoid
running off the end of the buffers.
2023-12-09 13:56:07 +11:00
Matthew Duggan
69f3f9eff8
ULTIMA: NUVIE: Clear game ptr if load fails
2023-12-09 13:56:07 +11:00
Matthew Duggan
a2494e6525
ULTIMA: NUVIE: Remove some old sdl compat functions
2023-12-09 13:56:07 +11:00
Matthew Duggan
424a674dcc
ULTIMA: NUVIE: Remove some redundant casts
2023-12-09 13:56:07 +11:00
Matthew Duggan
4182695bc7
ULTIMA: NUVIE: Remove some unused functions
2023-12-09 13:56:07 +11:00
Matthew Duggan
1103ee130d
ULTIMA: NUVIE: Reduce use of #define for numeric consts
...
Generall static const int is preferred over defines for numerical constants as
it provides some type safety.
2023-12-09 13:56:07 +11:00
Matthew Duggan
112238ef18
ULTIMA: NUVIE: Remove redundant casts for new widgets
...
These should all be subclasses of GUI_Widget so the explicit casts are not
needed.
2023-12-09 13:56:06 +11:00
Matthew Duggan
4f3cb346d3
ULTIMA: NUVIE: Use initializer list in more constructors
...
Round 3, almost finished.
2023-12-09 13:56:06 +11:00
Matthew Duggan
a19279f90e
ULTIMA: NUVIE: Further improve const correctness
2023-12-09 13:56:06 +11:00
Matthew Duggan
93f3e5b5a4
ULTIMA: NUVIE: Clean up brackets on return statements
...
Most of these brackets are unneccessary and just make the code slightly harder
to read.
Also added a few missing trivial const modifiers I noticed in the process.
2023-12-09 13:56:06 +11:00
Matthew Duggan
db9edb80e3
ULTIMA: NUVIE: Use initializer list in more constructors
2023-12-09 13:56:06 +11:00
Matthew Duggan
3738debab1
ULTIMA: NUVIE: Improve const correctness
...
A lot of parts of the engine did not constify pointers, and made many
unneccessary copies of objects as a result.
This is a huge change in line count but most of the changes are simply adding
"const".
2023-12-09 13:56:05 +11:00
Matthew Duggan
578cfefd0a
ULTIMA: NUVIE: Replace uses of NULL with nullptr
...
nullptr keyword is preferred as it provides a little bit of type safety not
provided by NULL.
2023-12-09 13:56:05 +11:00
Matthew Duggan
b2326fae3e
ULTIMA: NUVIE: Fix missing initializers identified by Coverity
...
To make the result cleaner:
* Use initializer lists instead of assignment in constructors
* Replace NULL with nullptr in these places
Both of these need to be done more globally, but this change is
a starting point to address the Coverity items.
2023-12-09 13:56:05 +11:00
Matthew Duggan
ad7f203615
ULTIMA: NUVIE: Rename member to avoid name clash
...
`error` is used in scummvm as a function to report errors.
2023-12-09 13:56:05 +11:00
Eugene Sandulenko
ec2dd2726b
ENGINES: Added optional parameter to canSave/LoadGameStateCurrently() for indicating the reason
2023-12-08 12:21:16 +01:00
Matthew Jimenez
623585674b
ULTIMA8: Remove istring class in favor of explicit ignore case comparisons
2023-12-04 21:46:54 -06:00
Lars Sundström
c927aacc10
Revert "ULTIMA: Add "remorse" engine to list of supported engines"
...
This reverts commit a5f690877e
.
This was not the right thing to do since remorse is based on the
Ultima8 engine
2023-12-03 21:38:43 +01:00
Lars Sundström
a5f690877e
ULTIMA: Add "remorse" engine to list of supported engines
...
The game "Crusader: No Remorse" is listed as supported on ScummVM
Wiki. The remorse engine was not picked up by the configure script
which caused the game to be detected by ScummVM but when trying to
launch it would fail with not finding any engine for it.
Add the remorse engine to the Ultima configure.engine to make it
work.
2023-12-03 21:13:54 +01:00
Lothar Serra Mari
dcb4d9e91b
ULTIMA: Add detection entry for alternative Ultima 6 version [TRAC #14659 ]
2023-12-03 19:48:31 +01:00
Cameron Cawley
59b0dd0b3d
ULTIMA: Disable unused code when Ultima 1 is disabled
2023-11-30 21:24:21 +00:00
Cameron Cawley
72a4ac3150
ULTIMA: Enable the base engine by default
2023-11-30 21:22:50 +00:00
Coen Rampen
318dda4884
ULTIMA/NUVIE: Error msg when FM-Towns load fails
2023-11-24 21:26:16 +01:00
PushmePullyu
eb91759277
ULTIMA: ULTIMA6: Fix roof drawing
...
SDL_LoadBMP() was changed to convert to screen pixel format in
commit c4970c95dc
"Fix crash in GUI on surface blit".
The change causes roofs to be drawn garbled when game style is set to
"new style", as the blitting code expects an unconverted bitmap.
Adjust roof drawing to use ManagedSurface::blitFrom instead.
2023-11-20 09:53:57 +11:00
PushmePullyu
eba5780aab
ULTIMA: ULTIMA6: Fix assert on loading roof bitmap
...
Do not ignore palette when loading bitmaps via SDL_LoadBMP.
Prevents the following assert on game start when roof drawing
is enabled:
"graphics/managed_surface.cpp:298:
void Graphics::ManagedSurface::blitFromInner(const Graphics::Surface&,
const Common::Rect&, const Common::Rect&, const byte*):
Assertion `!destFormat.isCLUT8() && srcPalette' failed."
The bug was introduced in c4970c95dc
"Fix crash in GUI on surface blit"
Fixes #14687
2023-11-20 09:53:57 +11:00