src/Graphics.hh
changeset 409 1a03ff151abc
parent 408 e6cfc44266af
equal deleted inserted replaced
408:e6cfc44266af 409:1a03ff151abc
     1 #ifndef GRAPHICS_HH
     1 #ifndef GRAPHICS_HH
     2 #define GRAPHICS_HH
     2 #define GRAPHICS_HH
     3 
     3 
     4 #include "GraphicsPointer.hh"
     4 #include "GraphicsPointer.hh"
     5 #include "Types.hh"
     5 #include "Types.hh"
       
     6 #include "Config.hh"
     6 
     7 
     7 /** 
     8 /** 
     8  * Parameters used by Graphics
     9  * Parameters used by Graphics
     9  */
    10  */
    10 struct GraphicsConfiguration {
    11 struct GraphicsConfig {
    11     /** Initial resolution to use */
    12     /** Initial resolution to use */
    12     PixelCoordinate resolution;
    13     PixelCoordinate resolution;
    13     
    14     
    14     /* Use fullscreen mode at startup */
    15     /* Use fullscreen mode at startup */
    15     bool fullscreen;
    16     bool fullscreen;
       
    17 
       
    18     /** Defaults */
       
    19     GraphicsConfig (void) : resolution(GRAPHICS_RESOLUTION_WIDTH, GRAPHICS_RESOLUTION_HEIGHT), fullscreen(GRAPHICS_FULLSCREEN) { }
    16 }; 
    20 }; 
    17 
    21 
    18 #include "GameState.hh"
    22 #include "GameState.hh"
    19 #include "Input.hh"
    23 #include "Input.hh"
    20 #include "Timer.hh"
    24 #include "Timer.hh"
    21 #include "Engine.hh"
    25 #include "Engine.hh"
    22 #include "Config.hh"
       
    23 
    26 
    24 #include "GameMessageView.hh"
    27 #include "GameMessageView.hh"
    25 
    28 
    26 #include <ClanLib/core.h>
    29 #include <ClanLib/core.h>
    27 #include <ClanLib/gl.h>
    30 #include <ClanLib/gl.h>
    85 
    88 
    86 public:
    89 public:
    87     /**
    90     /**
    88      *
    91      *
    89      */
    92      */
    90     Graphics (Engine &engine, GameState &state, const GraphicsConfiguration &config);
    93     Graphics (Engine &engine, GameState &state, const GraphicsConfig &config);
    91     
    94     
    92     /**
    95     /**
    93      * Returns a CL_Font that can be used for drawing text
    96      * Returns a CL_Font that can be used for drawing text
    94      */
    97      */
    95     CL_Font& getSimpleFont (void) { return simple_font; }
    98     CL_Font& getSimpleFont (void) { return simple_font; }