Currently, the usages associated with savegames have been omitted.
These will probably need a different prefix constant as it is likely
foreign variants still use "DREAMWEB.*" for savegames, while using
a different prefix for the datafiles. We may even migrate away from
this naming convention as this causes savegame collisions when multiple
language variants are present, which could cause issues.
The usages in the Room members of the constant g_roomData structure have
also been omitted, as the members are copied into the savegame format,
thus replacing these and fixing other accesses is not trivial.
This new variable removes the need for duplicates strings of the form
"DREAMWEB.*" spread throughout the dreamweb engine, replacing them with
a common const string on the engine holding the datafile name prefix.
This will reduce binary size and it should also simplify adding support
for foreign language variants, where the datafile name prefix is
changed.
To demostrate usage and prove this, showPCX() is migrated to using this.
This reverts commit 0ff60284ce.
We do not want to encourage people to rename all files in their games.
Instead, we should properly support the foreign versions.
find -name '*.h' -or -name '*.cpp' | xargs sed -r -i 's@\(([A-Za-z0-9]+)\*\)@(\1 *)@g'
This seems to have caught some params as well which is not undesirable IMO.
It also caught some strings containing this which is undesirable so I
excluded them manually. (engines/sci/engine/kernel_tables.h)
I read it as "this is how the original code expects save slots to
be initialized", but I guess it could be read as "the original
engine had 21 save slots". Which it didn't.
At Filippos's and wjp's suggestion. I don't really understand what
it does (other than printing the mouse over text), so I had simply
copied and pasted from another function.
... and probably also to some that don't need it; since it seems better to
err on the wrong side here for now, I did not check every struct as to whether
it really needs this. On the long run, it would be better if the code did not
rely on any kind of packing anyway.
SetObject::name and DynObject::id are stored at the exact same offset,
and have the exact same meaning (see also objectMatches()). Now they
also have the same name, objId.