Open main menu

Difference between revisions of "Neverhood"

1,064 bytes removed ,  09:29, 1 June 2013
The multi-line macros should be fixed now.
(Added multiline macro issue)
(The multi-line macros should be fixed now.)
Line 9: Line 9:


==Known issues==
==Known issues==
* There are some function-like preprocessor macros, e.g. SetUpdateHandler(), SetMessageHandler(), and NextState(), which are not correctly used. Example:
<code>
#define SetMessageHandler(handler)                                                                                                  \
    _messageHandlerCb = static_cast <uint32 (Entity::*)(int messageNum, const MessageParam &param, Entity *sender)> (handler);      \
    debug(5, "SetMessageHandler(" #handler ")");                                                                                    \
    _messageHandlerCbName = #handler
...
    if (getGlobalVar(V_TNT_DUMMY_BUILT))
        SetMessageHandler(&Scene1202::hmSolved);
</code>
This is bad, because while it looks like the "if" covers the entire macro, it actually only covers the first line of it. The standard trick is to put the code in the macro inside "do { ... } while (0)" (without semicolon). But it's almost midnight here, and I don't want to accidentally mess anything up. Especially when I don't know how to test it.


* Using the video viewer to watch Willie Trombone's videos crashes. This happens because _renderQueue inside Screen::update() in screen.cpp:83 points to invalid render items:
* Using the video viewer to watch Willie Trombone's videos crashes. This happens because _renderQueue inside Screen::update() in screen.cpp:83 points to invalid render items:
408

edits