GSoC/GCI Archive
Google Code-in 2012 Copyleft Games Group

Hedgewars: Command line parsing

completed by: Rowan D

mentors: koda, Andrey Korotaev, Xeli, Sheepy

Remember to join our IRC channel when working on this task! We are on #hedgewars at freenode.net. If you are new to IRC, read this tutorial from a past GCI participant.

Your task

Hwengine is the program that runs our engine directly. It calls requires at least three parameters, a local datapath, the official datapath and the replay file. Any other option is called with a long and rather strict set of optional arguments. Make the all these arguments configurable, each with its proper option.

For example, right now you set video resolution like this --set-video [screen width] [screen height] [color dept] while we would like to have --video [screen width]x[screen height] --depth [color dept] for each possible argument.

Check out hedgewars/ArgParsers.inc to read how argument parsing is done.

Deliverable

A working patch, that applies cleanly to our source tree. This patch should be in the form of a pull from clone, hg export or unified diff format (in order of preference) implementing the functionality required.