I whish I knew whether I am implementing an original bug here or if this is intended behavior. But it does achieve text output faithful to the original. And it even does actually look better...
This commit aims at getting the text almost pixel-exact like the original (from disasm and from comparison with an emulator).
It seems that the original messed up the upscaling (from 320x200 to 640x400). The whole method how they do it is weird. The text is rendered on a 320x200 pixel surface and this surface gets blitted in the center of a 640x400 pixel screen. Sometimes they
seem to assume to draw onto 320x200, sometimes onto 640x400 (e. g. the line height for the paragraph headlines is assumed to be 11, although the font height is 18; and it will use height 18 for all the other text lines). Also, the orginal will use different printing methods for the headlines and for the text blocks below, which also doesn't help to get this right...
Now, some credits text lines are still off by 1 pixel vertically due to my method of upscaling (at the very last moment in drawDirtyRects()). I find this a much cleaner approach than the original method which is just hacking up the whole graphics code to use 640x400 coords (except for the places they forgot, see above). But this also means I can't hit the odd lines for text positioning, thus the one pixel off sometimes...
The font style is diiferent for various strings (e.g. verbs are drawn outlined instead of shaded, converse line are drawn normally instead of shaded).
Also implement sjis version of "bullet" for the converse strings.
- The Japanese font is drawn in double resolution on the top layer. The rest of the graphics gets drawn in standard VGA resolution on the bottom layer, then scaled 2x and merged with the top layer.
- Adjust mouse handling. In dual layer mode the event manager reports mouse coordinates in double resolution, so these have to be scaled down.
Reorganize font code into sub classes to allow independent rendering of the Japanese ROM font. No actual implementation for the Japanese rendering yet.
For each engine:
- Make a new folder detection
- Move detection-related files inside the folder
- Add a new module "enginename/detection"
- Add DETECT_OBJS here
- Adjust the normal engine module to remove detect_objs
- Adjust every file for the new changes.
Up until last commit, everything was working fine but the amount of files changed was too large. This commit tries to reduce the changes.
- Add a fake constructor to Keymap, text-to-speech, setDescription (save-state)
- Redirecting functions for PopUpWidget::appendEntry, ButtonWidget::setLabel, GUIErrorMessage
- Use the above functions and constructors to reduce changes in Engines
- Fix warnings being in unicode. Only output english text in - Warnings, Errors, etc.
- Mark some strings as "translation" strings. (Not yet added to POTFILES)
- Remove some CP related things from po/modules.mk
- Previously used some Common::convertToU32 where it was not necessary, replace this with u32constructor
- Where necessary as in, where translated messages are used.
- GUIErrorMessage now takes in U32String
- error messages across some engines use U32Strings. they are changed because they show a message dialog.