When these lines were edited, I likely opened _ChineseText.cpp in the
wrong encoding, and therefore saved it in the wrong encoding, mangling
the characters
This reverts commit cd69f5f3ae.
the Ja2.rc file needs to be in the add_executable target for the icon
to appear, and that one requires WinMain.
so get rid of dummy.cpp and put sgp/sgp.cpp in there
Language is now just built once per app (still some JA2UB conditionals
going on in there) but building everything should now take eight times
less work
This one is big, but unless I missed something, should be all be
trivial.
scripted-diff with the following, then manually tweaked whatever needed:
```
if [ $# -ne 3 ]; then
echo "Usage: $0 '<pattern>' '<replacement>' '<filename>'"
exit 1
fi
pattern="$1"
replacement="$2"
filename="$3"
if [ ! -f "$filename" ]; then
echo "Error: File $filename does not exist."
exit 1
fi
sed -i '/'"$pattern"'/ {
:loop
$ !{
N
/'"$pattern"'.*\n.*#endif/ {
s/'"$pattern"'/'"$replacement"'/
s/#else/} else {/
s/#endif/}/
P
D
}
/'"$pattern"'/ b loop
}
}' "$filename"
echo "Replacement complete in $filename"
```
h/t to Grok2 for the sed command
eventually we'll switch between CHINESE and other languages during
runtime, so even if language is not chinese, these symbols must still
be there
these symbol names aren't used so this is fine
gather all ENGLISH|GERMAN|CHINESE etc preprocessor hell into a single
library, so to restrict the number of targets that need to be built 8x
this still has UB/EDITOR definitions so that still needs to be dealt
with before we can build it only 8 times
Requires accompanying GameDir change.
Removed ItemFlag as an xml tag and added bitmask flags as their own individual tags. Makes modding easier when the flags can be modified without math in the xml files
Simplified rework foodsystem allowed items
now no more need for a tag when checking IsItemLegal for Food System
ontop of checking for foodpoints, now also check if is drug
as a result, as previously, all eatable food will be excluded without food system,
but now only if it isn't a drug at the same time
and no more tag to check for that in items.xml needed
simplified the previous commit, now no more need for a tag
when checking IsItemLegal for Food System, ontop of checking for foodpoints, now also check if is drug
as a result, as previously, all eatable food will be excluded without food system, but now only if it isn't a drug at the same time
and no more tag to check for that in items.xml needed
no food items if the food system is off
whether the item is exclusive is defined by tag in items.xml
replaced previous way of decision, which used Item[usItemIndex].foodtype > 0 as criteria
that also restricted dual use items (i.e. drugs that also have a foodtype, like coffee, etc.)
no food items if the food system is off
whether the item is exclusive is defined by tag in items.xml
replaced previous way of decision, which used Item[usItemIndex].foodtype > 0 as criteria
that also restricted dual use items (i.e. drugs that also have a foodtype, like coffee, etc.)