Cleanup: relieve frontends of the duty to call

midend_rewrite_statusbar() and check the result against the last
string returned. This is now done centrally in drawing.c, and the
front end status bar function need only do what it says on the tin.

While I'm modifying the prototype of drawing_init(), I've also
renamed it drawing_new() for the same reason as random_new() (it
_allocates_ a drawing object, rather than just initialising one
passed in).

[originally from svn r6420]
This commit is contained in:
Simon Tatham
2005-10-22 17:23:55 +00:00
parent a3b837c698
commit 240b6cab8c
7 changed files with 65 additions and 80 deletions

View File

@ -126,7 +126,7 @@ midend *midend_new(frontend *fe, const game *ourgame,
me->elapsed = 0.0F;
me->tilesize = me->winwidth = me->winheight = 0;
if (drapi)
me->drawing = drawing_init(drapi, drhandle);
me->drawing = drawing_new(drapi, me, drhandle);
else
me->drawing = NULL;