At the third week I have implemented saveload menu and a bit of settings menu:
On the next week I will end working on settings menu and start implementing the first game scene.
At the third week I have implemented saveload menu and a bit of settings menu:
On the next week I will end working on settings menu and start implementing the first game scene.
At the second week I have implemented playing intro videos and startup menu:
To got startup menu working I have implemented:
From msk files flic decoder gets sprite bounds.
I plan to implement save load menu at next week.
he objective for first week was to implement reading script.dat file, which consists of serialized objects and scenes, including handlers and operations.
During the implementation I encountered a problem with ScummVm’s INIFile class.
The ini files in Red Comrades games are encoded using Windows CP-1251.
The problem is with this method
Because isAlnum function doesn’t support Windows CP-1251 codepage, it always returns false. As temporary workaround I have removed this function.
Another problem is that debugger can’t show those strings in readable way. To solve this problem I have decided to do transliteration.
During this week I have also implemented some opcodes.
For the next week I plan to implement playing intro videos. They are in avi format. I will do this very fast and will start to implement startup menu.
To get menu working I need to implement seven opcodes:
Resources of Red Comrades games are located in STR files.
These files are containers for resources.
Their structure is the following:
All fields are in Little-Endian, except magic number which is Big-Endian
ptrToString in ResourceDescription is unnecessary. I assume that it is located because container tool simply write internal structures. In engine after reading of descriptions the pointers are filled with addresses of strings.
The next week coding period begins and I have done some things before coding period:
At first week of the coding period I will impelent reading of script.dat file, which contains game objects, scenes and also object handlers.
The format of this structure is fully described here.
This blog is created for the ScummVM project I’m involved as a GSoC 2019 student.
Last year I have added support for Pink Panther games.
This year I will be working on adding support for Red Comrades 1 and Red Comrades 2.
During GSoC 2018, I was working on adding support of Pink Panther games to ScummVM: The Pink Panther: Passport To Peril and The Pink Panther: Hokus Pokus Pink.
The engine is now located in main ScummVM tree and work is continued in ScummVM’s main tree.
The games are completeable.
I have tested games and haven’t seen serious problems.
During GSOC I have fixed various bugs in ScummVM’s code.
The code for pink engine is in the repo:
https://github.com/scummvm/scummvm/tree/master/engines/pink
The commits that I made :
https://github.com/scummvm/scummvm/commits?author=whiterandrek
At the 12 week I have done:
What’s left:
From this project, I have known a lot about reverse-engineering and sprite graphics.
I was very happy to work with sev. He is very experienced reverse-engineer.
I will finish the project and will support it for the testing period.
At the eleventh week I have done:
Now the colors are implemented, only text is left. Text which is used in text files was written using Windows codepages(1250, 1251, 1252, 1255), depending on the language. To use text in ScummVM I need to convert it to UTF-32 and add unicode support for MacText.
Probably I will hardcode conversion tables, as I don’t see another way how to do it.
At the tenth week I have done:
What’s left:
This is a really hard task as in original colors were in RGB, despite engine uses 8-bit color.
To solve this problem, I will try to build the HSV model and find similar colors in the palette.