File: Compass.h

package info (click to toggle)
sear 0.5.0-5
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 3,408 kB
  • ctags: 2,580
  • sloc: cpp: 14,902; sh: 10,890; makefile: 172
file content (45 lines) | stat: -rw-r--r-- 926 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// This file may be redistributed and modified only under the terms of
// the GNU General Public License (See COPYING for details).
// Copyright (C) 2000-2003 Alistair Riddoch

#ifndef SEAR_COMPASS_H
#define SEAR_COMPASS_H

#include "renderers/Sprite.h"

namespace Sear
{

class Render;

class Compass
{
  public:
    Compass(float x, float y);
    
    virtual ~Compass();

    virtual void setup();
    
    /** update the compass angle using Eris data, and factor in the
    camera's rotation too */
    void update(double cameraRotation);
    virtual void draw(Render*, bool select);
    
    virtual void click();
 //   virtual void release();
   // virtual bool key(int,int);

    //void setAngle(float angle) { m_angle = angle; }
    int width();
    
protected:
    float m_x, m_y;
    float m_angle;
    
    Sprite m_compassCase, m_compassNeedle, m_needleShadow;
};

} // of namespace Sear

#endif // SEAR_COMPASS_H