src/proto2/Graphics.hh
author terom
Mon, 10 Nov 2008 16:49:09 +0000
branchno-netsession
changeset 31 d0d7489d4e8b
parent 25 af75a1894a32
child 35 e21cfda0edde
child 58 a53f5ad69500
permissions -rw-r--r--
add initial code written so far
25
af75a1894a32 simple proto *almost* works
terom
parents:
diff changeset
     1
#ifndef GRAPHICS_HH
af75a1894a32 simple proto *almost* works
terom
parents:
diff changeset
     2
#define GRAPHICS_HH
af75a1894a32 simple proto *almost* works
terom
parents:
diff changeset
     3
af75a1894a32 simple proto *almost* works
terom
parents:
diff changeset
     4
// XXX: forward-declare for Engine
af75a1894a32 simple proto *almost* works
terom
parents:
diff changeset
     5
class Graphics;
af75a1894a32 simple proto *almost* works
terom
parents:
diff changeset
     6
af75a1894a32 simple proto *almost* works
terom
parents:
diff changeset
     7
#include "GameState.hh"
af75a1894a32 simple proto *almost* works
terom
parents:
diff changeset
     8
#include "Engine.hh"
af75a1894a32 simple proto *almost* works
terom
parents:
diff changeset
     9
af75a1894a32 simple proto *almost* works
terom
parents:
diff changeset
    10
#include <ClanLib/core.h>
af75a1894a32 simple proto *almost* works
terom
parents:
diff changeset
    11
#include <ClanLib/gl.h>
af75a1894a32 simple proto *almost* works
terom
parents:
diff changeset
    12
#include <ClanLib/display.h>
af75a1894a32 simple proto *almost* works
terom
parents:
diff changeset
    13
af75a1894a32 simple proto *almost* works
terom
parents:
diff changeset
    14
#define GRAPHICS_WINDOW_TITLE "Kisna Glista"
af75a1894a32 simple proto *almost* works
terom
parents:
diff changeset
    15
#define GRAPHICS_UPDATE_INTERVAL_MS 100
af75a1894a32 simple proto *almost* works
terom
parents:
diff changeset
    16
af75a1894a32 simple proto *almost* works
terom
parents:
diff changeset
    17
class Graphics {
af75a1894a32 simple proto *almost* works
terom
parents:
diff changeset
    18
    private:
af75a1894a32 simple proto *almost* works
terom
parents:
diff changeset
    19
        Engine &engine;
af75a1894a32 simple proto *almost* works
terom
parents:
diff changeset
    20
        GameState &state;
af75a1894a32 simple proto *almost* works
terom
parents:
diff changeset
    21
    
af75a1894a32 simple proto *almost* works
terom
parents:
diff changeset
    22
        CL_SlotContainer slots;
af75a1894a32 simple proto *almost* works
terom
parents:
diff changeset
    23
af75a1894a32 simple proto *almost* works
terom
parents:
diff changeset
    24
        CL_Timer update_timer;
af75a1894a32 simple proto *almost* works
terom
parents:
diff changeset
    25
        
af75a1894a32 simple proto *almost* works
terom
parents:
diff changeset
    26
        CL_DisplayWindow win;
af75a1894a32 simple proto *almost* works
terom
parents:
diff changeset
    27
        CL_InputDevice &keyboard;
af75a1894a32 simple proto *almost* works
terom
parents:
diff changeset
    28
    
af75a1894a32 simple proto *almost* works
terom
parents:
diff changeset
    29
    public:
af75a1894a32 simple proto *almost* works
terom
parents:
diff changeset
    30
        Graphics (Engine &engine, GameState &state);
af75a1894a32 simple proto *almost* works
terom
parents:
diff changeset
    31
af75a1894a32 simple proto *almost* works
terom
parents:
diff changeset
    32
    private:
af75a1894a32 simple proto *almost* works
terom
parents:
diff changeset
    33
        void check_input (void);
af75a1894a32 simple proto *almost* works
terom
parents:
diff changeset
    34
        void do_redraw (void);
af75a1894a32 simple proto *almost* works
terom
parents:
diff changeset
    35
af75a1894a32 simple proto *almost* works
terom
parents:
diff changeset
    36
        void on_update (void);
af75a1894a32 simple proto *almost* works
terom
parents:
diff changeset
    37
af75a1894a32 simple proto *almost* works
terom
parents:
diff changeset
    38
};
af75a1894a32 simple proto *almost* works
terom
parents:
diff changeset
    39
af75a1894a32 simple proto *almost* works
terom
parents:
diff changeset
    40
#endif /* GRAPHICS_HH */