Age | Commit message (Collapse) | Author |
|
Now Engine::errorString is only used by error(), as its name suggests.
This also resolves the inconsistency between debug & debugN.
svn-id: r54023
|
|
svn-id: r54013
|
|
Rational: hexdump() is used for debug output. An even better alternative
might be to change it to return a string, instead of printing anything.
This way, it could be used inside e.g. GUI debug consoles.
This is left as an exercise to the interested developer :).
svn-id: r54010
|
|
String::format
svn-id: r54009
|
|
This makes our various debug*() functions fully symmetric, for now.
svn-id: r54008
|
|
This is a first step towards getting rid of all uses of regular printf,
fprintf, vprintf, vfprintf, puts, fputs, etc. in our codebase.
The name format() reflects the purpose of the function, and parallels
String.format() in Java, boost::format, and others.
svn-id: r54004
|
|
svn-id: r54003
|
|
svn-id: r53990
|
|
This is currently necessary for the PS2 port and possibly others.
svn-id: r53989
|
|
A new header file common/forbidden.h is included by scummsys.h and it
re-#defines numerous symbols like fopen(), fread(), system(), etc. with
garbage, in order to provoke compile errors in any code using them.
If a .cpp file really *must* use any of these (e.g. because it is a
backend file), then these redefinitions can be disabled by #defining
FORBIDDEN_SYMBOL_ALLOW_ALL as the first thing in the .cpp file. Whenever
this is done, an explanatory comment should be added.
Note that this system cannot catch all "bad" usages (notably the Lua
code in the sword25 engine), as it can only work if scummsys.h is
included.
svn-id: r53961
|
|
svn-id: r53931
|
|
svn-id: r53762
|
|
svn-id: r53586
|
|
svn-id: r53576
|
|
implicit conversion.
svn-id: r53508
|
|
for Intel's C++ compiler.
svn-id: r53507
|
|
svn-id: r53506
|
|
svn-id: r53497
|
|
svn-id: r53496
|
|
svn-id: r53480
|
|
Almost all places where we used XMLParser::parseIntegerKey were using
it like this:
XMLParser::parseIntegerKey(str.c_str(), ...)
Since this makes the code harder to read, I overloaded the method to
also accept Commmon::String directly.
Also removed all .c_str() invocations where necessary.
svn-id: r53479
|
|
svn-id: r53160
|
|
The return value of vsnprintf when the provided buffer is not large
enough to hold the formatted string is implementation-dependent:
C99: The size the formatted string would take up.
MSVC: -1, with no indication of how large the buffer should be.
IRIX: The number of characters actually written, which is at most
the size of the buffer minus one, as the string is truncated
to fit. This means the only way to be sure the entire string
is written is if the return value is less than the capacity - 1.
This change means that whenever we try to format a string where the size
is 1 below the built-in capacity, that the capacity will be needlessly increased.
If this turns out to be problematic we could make this behaviour __sgi conditional.
svn-id: r53143
|
|
In SCI01 and up, each typed word may be interpreted as multiple
class,group pairs. This patch adds support to the vocabulary and
parser. It uses the matcher support added in r52985.
This fixes parser issues in German LSL3, but needs testing.
svn-id: r52989
|
|
When switching to a theme that do not have the fonts needed to properly
display the current language, it now revert to the previously used theme
and display an error message telling the user to change the language
first if he wants to use the theme he selected.
svn-id: r52969
|
|
The advantage is that we get to do inlining and even use lwl and lwr instructions where appropriate. We have to do it ourselves because the PSP doesn't tolerate built-in instructions, but also we have a more efficient memcpy than the lib's.
svn-id: r52817
|
|
Resource names can be the same across types (ie. 'PICT' "Foo" and 'snd ' "Foo"), so this ensures that the right type is chosen in those cases.
svn-id: r52756
|
|
As Max pointed out to me, they don't work as expected when called from constructors/destructors.
svn-id: r52724
|
|
See r52722.
svn-id: r52723
|
|
svn-id: r52675
|
|
svn-id: r52618
|
|
This prevents accidental implicit rounding
and might also fix compilation on AmigaOS4 (bug #3060981).
svn-id: r52616
|
|
svn-id: r52593
|
|
svn-id: r52535
|
|
This is a better solution for the gcc aliasing problem that happens when aliasing a struct onto something else. What happens is that the compiler assumes no aliasing can happen when -O2 and -O3 are activated, and a call to READ_UINT32() followed by WRITE_UINT32() and another READ_UINT32() will be optimized to return the original read value instead of re-reading.
svn-id: r52480
|
|
This enables translators to use a different translation for these strings in
1x mode (e.g. 320x200 or 320x240) and in 2x or 3x modes.
svn-id: r52461
|
|
Currently static strings are marked with the _s() macro so that xgettext knows
the string needs to be translated. But there was no way to tell xgettext that
the string could get translated in different contexts. This is the role of this new
macro.
svn-id: r52460
|
|
If the translations.dat file is not found using the SearchMan, it now looks
for that file into the themepath directory and sub-directories (if the path is
defined).
svn-id: r52428
|
|
This makes it pass the test added in r52382.
svn-id: r52389
|
|
EOS problem was causing Discworld to crash and zip files not to load on the PSP.
svn-id: r52377
|
|
I need the write buffering for the new version of the PSP streams and thought the simplest way to implement it would be along the lines of BufferedReadStream. Sadly, I found a nasty little bug in BRS but that's taken care of.
Also, I adapted these streams for target-specific memory allocation by using virtual functions for allocation/deallocation.
svn-id: r52325
|
|
This change means there can now be different translations for the same
english string depending on the context. It is based on gettext msgctxt feature.
There is a new macro _c(msg, ctxt) that should be used instead of _(msg) in
the source code when we want to add a context to the message. For the
moment I have added contexts to only one message ("None") so that I could
test the changes. Context could be added also to get shorter translations when
GUI is in 1x mode.
I have also added back the fuzzy option to msmerge since it is useful when
adding contexts to populate the translations for the new contexts.
svn-id: r52308
|
|
svn-id: r52296
|
|
svn-id: r52261
|
|
svn-id: r52260
|
|
svn-id: r52257
|
|
svn-id: r52249
|
|
Previous commit of translation.cpp introduced a defined but not
implemented operator when the translation support was disabled.
This was probably fine since it was not used, but not very clean.
svn-id: r52241
|
|
svn-id: r52239
|
|
svn-id: r52210
|