Run tests with -Wno-self-assign-overloaded
Some tests explicitely assign the value of the variable type to itself.
Fixes warnings such as these:
./test/common/str.h:201:9: warning: explicitly assigning value of variable of type 'Common::String' to itself [-Wself-assign-overloaded]
foo10 = foo10;
~~~~~ ^ ~~~~~
./test/common/md5.h:17:3: warning: suspicious concatenation of string literals in an array initialization; did you mean to separate the elements with a comma? [-Wstring-concatenation]
"345678901234567890"
Use `clear` instead of `release` where possible.
Both clean up the span object. They differ in that `release` returns a pointer to
the internal data and `clear` destroys the internal data.
This adds a lot more unit tests for Common::INIFile and fixes some small
problems identified during their creation. Specifically:
* addSection() did not check the validity of the section name, which meant it
was possible to create a section that could not then be operated on by the
other functions (which all check validity)
* If allowNonEnglishCharacters was set, it was possible to create a key or
section name starting with '[' or '#', or including a carriage return. This
would not read back in correctly.
* Blank section and key names were considered valid, but neither would be
read back in correctly.
* The struct documentation did not mention whitespcae handling or that comments
include the '#' and carriage return.
This might help with bug #12182 where the comment suggests there is a problem
with loading the treasure data. To make sure it loads properly, added a lot
more error checking and error messages, and created unit tests for the same.
Large flat squares should get sorted below other flat things. In U8, the
definition of large is 128x128, but in Crusader they can also be larger than
that.
This fixes the paint order of hazard tape stripes in Crusader. It may also
improve paint order for Ultima 8 which has some big flat squares larger than
128x128 too (eg, shape 165 or 318 which are 256x256).
Also added tests for flat object sorting.
../scummvm/test/cxxtest/cxxtest/ValueTraits.h:120:52: warning: type qualifiers ignored on cast result type [-Wignored-qualifiers]
120 | ValueTraits( CXXTEST_NEW_CLASS n ) : _old( (CXXTEST_OLD_CLASS)n ) {} \
| ^~~~~~~~~~~~~~~~~~~~
CJK offsets were wrong compared to encodings.dat file and buffers were
read past their end.
Rewrote indexing to make it match the Python script and optimize
slightly
Try to use more of the built-in ScummVM rendering pipeline and remove redundant
types where possible. Unfortunately this is a bit of a mega-commit because all
the pieces were tied together, but the main changes are:
* Remove the Texture types, as they add little over ManagedSurface
* Remove the ScalerGump as we no longer use it - we should be using the
built-in ScummVM scalers
* Remove the Scaler types - the only remaining user after removing ScalerGump
was in hte AVI player. There we manually add the Crusader style interlaced
scaling, which was an outstanding TODO anyway.
* Remove now-unused functions from the RenderSurface family
* Remove the "default" mouse cursor as we never use it in ScummVM
* Remove the memset_n header which duplicates Common::Fill functions (fixes
#11969)
* Remove the fixed-width bitmap fonts which were used for the Pentagram
console.
I've tested the following things that this had the potential to break:
* U8 game, credits, movies, minimap, and ttf rendering
* Crusader game and movies
* Debug tools (shape viewer, touch-highlight)