Week 3

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.

Week 2

At the second week I have implemented playing intro videos and startup menu:

 

To got startup menu working I have implemented:

  • drawing subsystem
  • sound subsystem
  • cursor
  • parsing msk files

From msk files flic decoder gets sprite bounds.

I plan to implement save load menu at next week.

Week 1

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:

  • SET
  • HIDE
  • ZBUFFER
  • TOTALINIT
  • PASSIVE
  • MUSIC
  • IMAGE

STR File Format

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.

Preparing for the coding period

The next week coding period begins and I have done some things before coding period:

  • Updated the fork of ScummVm repository
  • Wrote an introductory letter to scummvm-devel
  • Alexander Tkachov gave me a link to the game explorer tool for game data and scripts. This tool pointed me to the wiki which partly describes game structures.

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.

GSOC 2019

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.

GSOC Summary

Project description

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.

 

Goals achieved

Pink Engine:

Pull Request

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.

ScummVM’s library:

During GSOC I have fixed various bugs in ScummVM’s code.

Future work

  • Implement ActionText drawing of non-English versions.
  • Add another engine to ScummVM.

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

 

Week 12

At the 12 week I have done:

  1. Fixed walking bug.
  2. added conversion method from windows codepages to utf-32
  3. made text to draw for the English version of the game

What’s left:

  1. add unicode support for MacText, so other versions could draw text.

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.

Week 11

At the eleventh week I have done:

 

  1. added finding similar colors in the palette to represent ActionText’s RGB colors, which aren’t located in the palette.
  2. bugfixes

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.

Week 10

At the tenth week I have done:

 

  1. added unicode support for MacMenu
  2. implemented menu parser from win32 executable. It is more simple to get a menu from exe than hardcoding it for each language.
  3. implemented menu commands
  4. hidden debug output under debug levels and channels
  5. bugfixes

What’s left:

  1. finish ActionText

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.