Show
Ignore:
Timestamp:
09/03/10 00:25:58 (21 months ago)
Author:
Carsten
Message:

Revision of Console code:

  • New "composite console" is the new default console, making it easy to add logging into a file and the graphical console during init, and making it unnecessary to reset the console pointer in DLLs that have been initialized before the graphical console.
  • Replaced several old/obsolete printf-statements (in the renderer DLLs) with their proper Console->Print() counterparts.
  • Put the Lua bindings to the global Console into separate files. This way the DLLs can include Console.hpp without being forced to link the Lua libraries in.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • cafu/trunk/Ca3DE/AppCafu.hpp

    r136 r149  
    3939 
    4040 
     41namespace cf { class CompositeConsoleT; } 
     42namespace cf { class ConsoleFileT; } 
     43namespace cf { class ConsoleStringBufferT; } 
    4144class MainFrameT; 
    4245 
     
    4851 
    4952    AppCafuT(); 
     53    ~AppCafuT(); 
     54 
     55    /// Returns the composite console that is also available via the global Console pointer. 
     56    cf::CompositeConsoleT& GetConComposite() const; 
     57 
     58    /// Returns the console that buffers all output. 
     59    cf::ConsoleStringBufferT& GetConBuffer() const { return *m_ConBuffer; } 
     60 
     61    // /// Returns the console that logs all output into a file (can be NULL if not used). 
     62    // cf::ConsoleFileT& GetConFile() const { return *m_ConFile; } 
    5063 
    5164    /// Returns whether we successfully set a custom video mode (screen resolution) during initialization. 
     
    6881    bool OnCmdLineParsed(wxCmdLineParser& Parser); 
    6982 
    70     bool        m_IsCustomVideoMode;  ///< Whether we successfully set a custom video mode (screen resolution) during initialization. 
    71     wxVideoMode m_CurrentMode;        ///< The video mode that we're currently using. 
    72     MainFrameT* m_MainFrame;          ///< The Cafu application main frame. 
     83    cf::ConsoleStringBufferT* m_ConBuffer;          ///< The console that buffers all output. 
     84    cf::ConsoleFileT*         m_ConFile;            ///< The console that logs all output into a file (can be NULL if not used). 
     85    bool                      m_IsCustomVideoMode;  ///< Whether we successfully set a custom video mode (screen resolution) during initialization. 
     86    wxVideoMode               m_CurrentMode;        ///< The video mode that we're currently using. 
     87    MainFrameT*               m_MainFrame;          ///< The Cafu application main frame. 
    7388}; 
    7489