1,554
edits
m (fix typo) |
(Add theme caching ideas) |
||
Line 35: | Line 35: | ||
** The text "Norwegian Bokmål" isn't rendered correctly since our fonts do not have the letter "Å". | ** The text "Norwegian Bokmål" isn't rendered correctly since our fonts do not have the letter "Å". | ||
*** If we decide to use Latin-1 fonts instead, we should also update the About dialog to use accented characters where appropriate. | *** If we decide to use Latin-1 fonts instead, we should also update the About dialog to use accented characters where appropriate. | ||
== Some ideas about theme caching == | |||
Solution will look something like this: | |||
./scummvm --gui-theme=classic --create-gui-cache 320x200 | |||
you get classic-320x200.tcc file | |||
./scummvm --gui-theme=classic --create-gui-cache 320x240 | |||
you get classic-320x240.tcc file | |||
Then concatenate the two and probably dump it into C array. Porters should do that by themselves for all resolutions supported by their platform. I.e. we have generic XxY theme, and all specific resolutions are derived from it. | |||
=== tcc (theme cache) file format === | |||
This theme cache will be plainly a dump of all evaluated variables from HashMap. They will be loaded with loadAll() method in HashMap. | |||
'RESL', length, "320x200", number of vars, dumped vars | |||
dumped vars are: | |||
"varname", int16 value,... | |||
This format will let easily concatenate several generated theme cache files. | |||
Probably there will be some optimisations in loadAll() method, which will malloc one big chunk of those vars, and since we have their keys as ''const char *'', then it can alloc one big chunk for variables name as well and then pass pointers inside of it to respective members. Of course, that will be specially flagged as it will not be possible to free() any of those chunks deliberately. |