~ubuntu-branches/ubuntu/trusty/enigma/trusty-proposed

« back to all changes in this revision

Viewing changes to src/ecl-lua.pkg

  • Committer: Package Import Robot
  • Author(s): Erich Schubert
  • Date: 2013-04-06 14:54:02 UTC
  • mfrom: (1.1.10)
  • Revision ID: package-import@ubuntu.com-20130406145402-jgjrtk7hac8gtvza
Tags: 1.20-dfsg.1-1
* New upstream release (Closes: #704595)
  (Repacked: dropped zipios++ source and main menu music)
* Update watch file, sf.net again.
* Fix documentation links (Closes: #653508)
* Conflict with enigma-level-previews to encourage deinstallation
  (Pregenerated level previews were only used with version 1.01)
* Use dh7 for building instead of CDBS
* Update to policy 3.9.4.0 (no changes)
* Register documentation with doc-base

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// -*- Mode: C++ -*-
2
 
 
3
 
$#include "SDL.h"
4
 
$#include "ecl.hh"
5
 
$using namespace ecl;
6
 
 
7
 
module ecl
8
 
{
9
 
    typedef unsigned int Uint32;
10
 
 
11
 
    class Rect {
12
 
        int x;
13
 
        int y;
14
 
        int w;
15
 
        int h;
16
 
        Rect(int xx, int yy, int ww, int hh);
17
 
        ~Rect();
18
 
    };
19
 
 
20
 
    class V2 {
21
 
        V2();
22
 
        V2(double x, double y);
23
 
        double operator[] (int idx);
24
 
    };
25
 
 
26
 
    typedef Uint32 PackedColor;
27
 
 
28
 
    class GS {
29
 
        GS (const Rect &clipr);
30
 
        ~GS();
31
 
 
32
 
        Rect cliprect;
33
 
        PackedColor pcolor;
34
 
    };
35
 
 
36
 
    class Drawable {
37
 
    public:
38
 
        virtual ~Drawable() {}
39
 
 
40
 
        virtual PackedColor map_color(int r, int g, int b) = 0;
41
 
        virtual PackedColor map_color(int r, int g, int b, int a) = 0;
42
 
 
43
 
        virtual void blit (const GS &gs, int x, int y, Surface* s) = 0;
44
 
        virtual void blit (const GS &gs, int x, int y, Surface* s, const Rect& r) = 0;
45
 
 
46
 
        virtual Uint32 get_pixel (int x, int y) = 0;
47
 
 
48
 
        //! Set a single pixel
49
 
        virtual void set_pixel  (const GS &gs, int x, int y) = 0;
50
 
 
51
 
        //! Set multiple pixels at once
52
 
        virtual void set_pixels (const GS &gs, int n, const int *x, const int *y);
53
 
 
54
 
        //! Draw a horizontal line
55
 
        virtual void hline (const GS &gs, int x, int y, int w);
56
 
 
57
 
        //! Draw a vertical line
58
 
        virtual void vline (const GS &gs, int x, int y, int h);
59
 
 
60
 
        //! Draw an arbitrary line
61
 
        virtual void line  (const GS &gs, int x1, int y1, int x2, int y2);
62
 
 
63
 
        //! Draw a filled box.
64
 
        virtual void box   (const GS &gs, int x, int y, int w, int h);
65
 
 
66
 
        //! Return size of drawable: Rect (0,0,width, height)
67
 
        virtual Rect size() const = 0;
68
 
    };
69
 
 
70
 
 
71
 
    class Surface : public Drawable {
72
 
        ~Surface();
73
 
 
74
 
        int width();
75
 
        int height();
76
 
    };
77
 
 
78
 
    class Screen {
79
 
        Surface *get_surface();
80
 
        void update_all();
81
 
        void update_rect(const Rect& r);
82
 
        void flush_updates();
83
 
        void set_caption(const char* str);
84
 
    };
85
 
 
86
 
    class Font {
87
 
        ~Font();
88
 
        int get_lineskip();
89
 
        int get_height();
90
 
 
91
 
        int get_width(const char *str);
92
 
 
93
 
        Surface *render(const char *str);
94
 
        void render(Surface *s, int x, int y, const char * str);
95
 
    };
96
 
}