~ubuntu-branches/debian/squeeze/stella/squeeze

« back to all changes in this revision

Viewing changes to src/wince/FrameBufferWinCE.hxx

  • Committer: Bazaar Package Importer
  • Author(s): Luca Falavigna, Franczen Attila, Luca Falavigna
  • Date: 2008-11-08 12:04:12 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20081108120412-w6xq87vzgokstfey
Tags: 2.6.1-0ubuntu1
[ Franczen Attila ]
* New upstream release (LP: #183571).
* Updated policy to 3.8.0.

[ Luca Falavigna ]
* debian/patches/gcc-4.3: fix FTBFS with gcc-4.3 compiler.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
//  SS  SS   tt   ee      ll   ll  aa  aa
9
9
//   SSSS     ttt  eeeee llll llll  aaaaa
10
10
//
11
 
// Copyright (c) 1995-2005 by Bradford W. Mott and the Stella team
 
11
// Copyright (c) 1995-2008 by Bradford W. Mott and the Stella team
12
12
//
13
13
// See the file "license" for information on usage and redistribution of
14
14
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
15
15
//
16
16
// Windows CE Port by Kostas Nakos
 
17
// $Id: FrameBufferWinCE.hxx,v 1.16 2008/02/06 13:45:24 stephena Exp $
17
18
//============================================================================
18
19
 
19
20
#ifndef FRAMEBUFFER_WINCE_HXX
32
33
#define FORMAT_555 2
33
34
#define FORMAT_OTHER 3
34
35
 
 
36
#if _WIN32_WCE <= 300
35
37
typedef struct _RawFrameBufferInfo
36
38
{
37
39
   WORD wFormat;
42
44
   int  cxPixels;
43
45
   int  cyPixels;
44
46
} RawFrameBufferInfo;
45
 
 
 
47
#endif
46
48
 
47
49
class FrameBufferWinCE : public FrameBuffer
48
50
{
50
52
 
51
53
        FrameBufferWinCE(OSystem *osystem);
52
54
        ~FrameBufferWinCE();
53
 
        virtual void setPalette(const uInt32* palette);
 
55
        virtual void setTIAPalette(const uInt32* palette);
 
56
        virtual void setUIPalette(const uInt32* palette);
54
57
        virtual bool initSubsystem();
55
58
        virtual BufferType type() { return kSoftBuffer; } 
56
 
        virtual void setAspectRatio() ;
57
 
    virtual bool createScreen();
58
 
    virtual void toggleFilter();
 
59
    virtual void setAspectRatio() { return; };
 
60
    virtual bool createScreen() { return true; };
 
61
    virtual void toggleFilter() { return; };
59
62
    virtual void drawMediaSource();
60
63
    virtual void preFrameUpdate();
61
64
    virtual void postFrameUpdate();
62
 
    virtual void scanline(uInt32 row, uInt8* data);
63
 
    virtual Uint32 mapRGB(Uint8 r, Uint8 g, Uint8 b);
64
 
    virtual void hLine(uInt32 x, uInt32 y, uInt32 x2, OverlayColor color);
65
 
    virtual void vLine(uInt32 x, uInt32 y, uInt32 y2, OverlayColor color);
66
 
    virtual void fillRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h, OverlayColor color);
67
 
    virtual void drawChar(const GUI::Font* font, uInt8 c, uInt32 x, uInt32 y, OverlayColor color);
68
 
    virtual void drawBitmap(uInt32* bitmap, Int32 x, Int32 y, OverlayColor color, Int32 h = 8);
 
65
        virtual void scanline(uInt32 row, uInt8* data) { return; };
 
66
    virtual Uint32 mapRGB(Uint8 r, Uint8 g, Uint8 b) { return 0xFFFFFFFF; };
 
67
    virtual void hLine(uInt32 x, uInt32 y, uInt32 x2, int color);
 
68
    virtual void vLine(uInt32 x, uInt32 y, uInt32 y2, int color);
 
69
    virtual void fillRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h, int color);
 
70
    virtual void drawChar(const GUI::Font* font, uInt8 c, uInt32 x, uInt32 y, int color);
 
71
    virtual void drawBitmap(uInt32* bitmap, Int32 x, Int32 y, int color, Int32 h = 8);
69
72
    virtual void translateCoords(Int32* x, Int32* y);
70
73
    virtual void addDirtyRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h);
71
 
        virtual void enablePhosphor(bool enable)  { return; };
72
 
    virtual uInt32 lineDim();
73
 
        void wipescreen(void);
74
 
        virtual void cls() { return; };
 
74
        virtual void enablePhosphor(bool enable, int blend)  { return; };
 
75
    virtual uInt32 lineDim() { return 1; };
 
76
        virtual string about();
 
77
        virtual void setScaler(Scaler scaler) { return; };
 
78
        void wipescreen(bool atinit=false);
75
79
        void setmode(uInt8 mode);
76
80
        uInt8 rotatedisplay(void);
77
81
        
78
82
        private:
79
83
 
80
84
        void lateinit(void);
81
 
        void PlothLine(uInt32 x, uInt32 y, uInt32 x2, OverlayColor color);
82
 
    void PlotvLine(uInt32 x, uInt32 y, uInt32 y2, OverlayColor color);
83
 
        void PlotfillRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h, OverlayColor color);
 
85
        void PlothLine(uInt32 x, uInt32 y, uInt32 x2, int color);
 
86
    void PlotvLine(uInt32 x, uInt32 y, uInt32 y2, int color);
 
87
        void PlotfillRect(uInt32 x, uInt32 y, uInt32 w, uInt32 h, int color);
84
88
        void GetDeviceProperties(void);
85
89
 
86
 
        uInt16 pal[256], myWidth, myWidthdiv4, myHeight, guipal[kNumColors-256], scrwidth, scrheight;
87
 
        Int32 pixelstep, linestep, scrpixelstep, scrlinestep;
88
 
        uInt32 displacement;
 
90
        uInt16 pal[256+kNumColors], myWidth, myWidthdiv4, myHeight, scrwidth, scrheight;
 
91
        Int32 pixelstep, pixelstepdouble, linestep, linestepdouble, scrpixelstep, scrlinestep;
 
92
        uInt32 paldouble[256+kNumColors], displacement;
89
93
        bool SubsystemInited;
90
94
        uInt8 *myDstScreen;
91
95
 
92
 
        bool issmartphone, islandscape, legacygapi;
 
96
        bool issmartphone, islandscape, issquare, legacygapi, screenlocked;
93
97
        enum {SM_LOW, QVGA, VGA} devres;
94
98
        uInt16 minydim, optgreenmaskN, optgreenmask;
95
 
        Int32 pixelsteptimes5, pixelsteptimes6;
 
99
        Int32 pixelsteptimes5, pixelsteptimes6, pixelsteptimes8, pixelsteptimes12, pixelsteptimes16;
96
100
        GXDisplayProperties gxdp;
97
101
        uInt8 displaymode;
98
102
 
99
103
        public:
100
104
        bool IsSmartphone(void) { return issmartphone; }
101
105
        bool IsSmartphoneLowRes(void) { return (issmartphone && devres==SM_LOW); }
 
106
        bool IsVGA(void) { return (devres==VGA); }
102
107
        uInt8 getmode(void) { return displaymode; }
 
108
        bool IsLandscape(void) { return islandscape; }
 
109
        void GetScreenExtents(uInt16 *x, uInt16 *y) { *x = scrwidth; *y = scrheight; return; }
103
110
};
104
111
 
105
112
#endif