OpenTTD

Tasklist

FS#351 - Face customization to be made more comprehensive

Attached to Project: OpenTTD
Opened by jez9999 (jez9999) - Saturday, 23 September 2006, 22:50 GMT
Last edited by Patric Stout (TrueBrain) - Saturday, 23 June 2007, 22:44 GMT
Type Patch
Category Interface
Status Closed
Assigned To No-one
Operating System All
Severity Medium
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

You need to apply the .patch file attached to this post then compile for it to work. It works with the latest SVN revision as of the time of this post (rev 6502), although it's changing all the time so who knows in a week.

As you can see in the screenshot it allows extensive face customization, saving/loading of the current face to a config file variable, and a manual view/input of the current 'face code' (a 32 bit unsigned integer controlling the look of the face). It also includes significant rewriting of the face-drawing code (located in players.c) to make the structure of the player face variable more meaningful.

The one very minor bug I know about is:
Click Load or Save, then close the face dialog, leaving the red message dialog open. Open the face dialog again, then click load or save. The button doesn't appear to press in first time, as if SetWindowDirty() hadn't been called.
This task depends upon

Closed by  Patric Stout (TrueBrain)
Monday, 06 August 2007, 19:29 GMT
Reason for closing:  Out of date
Additional comments about closing:  Although such a patch would be welcome, this patch is outdated and doesn't seem to get an update any time soon.. closing. If you ever update the patch, feel free to reopen.
Comment by jez9999 (jez9999) - Saturday, 23 September 2006, 22:51 GMT
The screenshot referenced is the one posted to the TT-Forums, at this URL:
https://www.tt-forums.net/viewtopic.php?t=27545
Comment by jez9999 (jez9999) - Monday, 25 September 2006, 11:13 GMT
Version 2 of the patch (and screenshot) is attached.
Comment by jez9999 (jez9999) - Sunday, 05 November 2006, 00:16 GMT
Adding latest version of patch, v10.
Comment by KUDr (KUDr) - Sunday, 05 November 2006, 19:58 GMT
Latest version (DrawPlayerFace() in players.c reworked a bit).
I would like to commit it today if no objections will be thrown after anouncing it on #openttd.
Comment by KUDr (KUDr) - Sunday, 05 November 2006, 23:40 GMT
The last agreement we have made is, that:

1. Commit is postponed to after the 0.5.0 release. This is because the current patch breaks the compatibility with the old savegames. Internally it uses different bit layout inside the face code (uint32) variables. So if you load the old savegame into patched version, the face is totally different, than when you load the same savegame into the version without this patch. By other words, this patch is not 0.5 compliant. We must find some way how to solve this bakwards compatibility issue.

2. The new face customization GUI needs to be reworked a bit. The new part (right side with the arrows and numbers) will be hiden by default and it will only show - pop out to the right, like the station window does to the bottom when 'ratings' are clicked. The left side should look the same as before the patch (except this new button).

3. The coding style must stay 'ottd compliant'
Comment by Remko Bijker (Rubidium) - Thursday, 08 March 2007, 12:03 GMT
I have changed the bit usage of the face code quite a lot lately. This should solve the first issue (backward compatability). However, the patch is now very outdated and needs some major rewrites. Primarily because most of the wrapper function can be ditched now.

Loading...