Age | Commit message (Collapse) | Author |
|
These are flagged by GCC if -Wswitch-default is enabled.
|
|
- Remove unused parameters
- Initialize potentially uninitialized variables
- Use Common::String instead of a fixed buffer
- Remove redundant parentheses
- Change float suffix to be uppercase
- Fix spacing
- Fix integer left shifts with boolean variables
- Fix potential division by zero
- Fix missing breaks
|
|
Fixes bp_function and bp_address not printing the created breakpoint, as
happens with the other bp_ commands.
|
|
Fixes the help for bp_action: 'none' arg should be 'ignore'
|
|
|
|
The _gfxScreen instance is nullptr for SCI32 games, thus this console
command previously caused a segfault.
|
|
reg32_t was a transitive solution, before reg_t's were
adapted to use 32-bit addresses internally, and before
support for SCI3 was added. It was introduced as another
way to handle large script offsets in SCI3, and was only
used for the program counter (PC). It's no longer
needed, as we now support SCI3 script offsets using
reg_t's, so we can use make_reg32 in all cases where
we need to access offsets over 64KB
|
|
|
|
|
|
This flag is removed for a few reasons:
* Engines universally set this flag to true for widths > 320,
which made it redundant everywhere;
* This flag functioned primarily as a "force 1x scaler" flag,
since its behaviour was almost completely undocumented and users
would need to figure out that they'd need an explicit non-default
scaler set to get a scaler to operate at widths > 320;
* (Most importantly) engines should not be in the business of
deciding how the backend may choose to render its virtual screen.
The choice of rendering behaviour belongs to the user, and the
backend, in that order.
A nearby future commit restores the default1x scaler behaviour in
the SDL backend code for the moment, but in the future it is my
hope that there will be a better configuration UI to allow users
to specify how they want scaling to work for high resolutions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
See matchKernelBreakpointPattern() for samples. The main envisioned use is
DoSound*,!DoSoundUpdateCues
to match all DoSound sub-functions except DoSoundUpdateCues.
|
|
|
|
This changes the syntax for bpk and logkernel:
Enable breakpoint on kernel call:
bpk FrameOut
Enable logging for kernel call:
bpk FrameOut log
For backward compatibility this has an alias: logkernel FrameOut
Removing a kernel call breakpoint is done with bp_del/bc now.
|
|
|
|
|
|
|
|
|
|
The action can be set using the new console command bp_action/bpact.
|
|
|
|
|
|
Bad resources that need to be blacklisted sometimes seem to have
the same size as good resources. In such cases, the bad resources
can be identified by hash instead. Adding a hash output to
resource_info will make it easy for users to provide the hash of
questionable resources inside of resource bundles that we do not
have access to.
Refs Trac#9797.
|
|
This ensures that all object name reading code works the same and
is in one place in the codebase.
|
|
ObjMap owns Objects, so every time this map gets copied instead of
referenced, it creates a copy of every single object in the
associated script. This is expensive, and it breaks things like
the `Object::syncBaseObject` call in savegame.cpp, which hasn't
actually been doing anything since
58190c36b4cc84b3200239211d91b0291301db56 because it has been
operating on copies.
|
|
Basically just grepped for getOffset calls being assigned to
uint16s and expanded those to uint32 when they looked trivial.
While some of these changes seem superfluous, at least for the
US/English SCI3 games where potentially impacted game scripts are
not large enough to have a problem with 16-bit offsets (e.g. when
feature detecting the sound type), at least some of these changes
are necessary for correct operation of the find_callk debugger
command in SCI3 games. There should not be a reason why any of
these variables need to be kept as uint16, in any case.
|
|
|
|
|
|
This command lists all resources that are currently loaded into
memory, plus the number of locks that exist on each loaded
resource.
|
|
1. KQ4 sound 104 has an extra 0xFC (MIDI Stop command/kEndOfTrack)
at the end of the resource, which causes an out-of-bounds read
because the filtering loop continues after the first 0xFC and
unconditionally attempts to read 2 bytes (expecting there to
always be a delta value + a command, whereas in this file there
is only another kEndOfTrack command). This is corrected by
exiting the filtering loop when a kEndOfTrack is encountered
and there is not enough data remaining in the resource to
continue reading.
2. KQ5 sound 699 is truncated, which causes the parser to attempt
to read past the end of the resource. This is addressed by
adding bounds checks that exit the mix loop early if there is
no more data available to read. This allows truncated sounds
to be played as far as possible (previously, trying to read
truncated resources would result in a fatal error).
3. midiMixChannels allocates an arbitrary amount of raw memory
for the mixed MIDI sequence, without performing any bounds
checking when writing to this memory, potentially leading to
a crash or silent corruption of adjacent memory. This is
mitigated by using SciSpan instead of a raw pointer for the
mixed data.
Fixes Trac#9727.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1. pushi opcode now displays decimal value and selector value (if
one exists) in-line
2. lofsa, lofss, and super opcodes now display resolved
object/class names
3. Opcode arguments are visually aligned
|
|
|
|
|
|
This allows references in memory to be dumped to disk for
examination by other tools. In the case of SCI32 bitmaps, data
is output in 8-bit TGA format without transparency, which allows
the current palette to also be examined. (The alternative would
be to use 32-bit TGA to display transparency, and lose the
palette, or dump to a more complicated format that supports 1-bit
transparency.)
|
|
|