adonthell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Adonthell-devel] Slowly getting back to coding


From: Kai Sterker
Subject: [Adonthell-devel] Slowly getting back to coding
Date: Tue, 1 Feb 2011 19:26:01 +0100

After quite a break, I'm finally back to coding. Aside from the GUI
stuff I committed a while ago, I deviated from my todo list and worked
on a few minor issues instead. Gotta warm up a bit, at first ;-).

For one, I've added support for the 1440x900 display of my MacBook.
That means, the maximum view size we (or at least you Artists) need to
worry about is 720x512. Minimum view size remains at 512x360. I kinda
like the symmetry of those numbers :-).

As I had all but forgotten about that issue (and wrongly believed
there was a problem with SDL at first), I'll see to it that the
program quits immediately when something is so wrong that it doesn't
make sense to continue. glog already has this feature: whenever a
FATAL error is logged, it'll throw in an exit afterwards. I added the
same behaviour to our glog replacement (for those too lazy to bother
with installing glog). I admit, I'm one of those ;-).

Along the same lines, the non-glog logging honors the GLOG_minloglevel
environment vairable to adjust the amount of stuff written to stderr.
Values 3 to 0 correspond to the glog levels of FATAL, ERROR, WARNING
and INFO. Values less than zero will turn on even more verbose logging
(using the VLOG macro). So -1 will enable VLOG(1) messages, -2 to see
VLOG(2) ... you get the idea :-).

One thing I tried to achieve, but failed for now was to log Python
exceptions caught in python::show_traceback() via glog. The options
here seem to be resorting to non-public Python C API to get at the
stacktrace object internals, or doing lengthy operations on Python
side with the danger of triggering more exceptions. Too bad. Thinking
of it, maybe that would also be a good place to exit as soon as
something goes wrong.

Logging in general could use some revision, I guess. There is still a
lot of printing to stderr in certain places, while other places seem a
bit too verbose. Maybe I do some more cleanup in that area, as it
doesn't really require lots of thinking.

In time, I do want to get back to serious stuff, however. There's
still the Python implementation for the dialogue window, speech
bubbles, Python console, Load/Save dialogue and other UI elements on
my list. And I might add a fix for the shadow on the stairs (or
composite objects in general) to my list.

Kai



reply via email to

[Prev in Thread] Current Thread [Next in Thread]