|
|
| version 1.1, 2003/11/26 15:08:42 | version 1.2, 2003/12/19 16:08:02 |
|---|---|
| Line 35 | Line 35 |
| #include <qpixmap.h> | #include <qpixmap.h> |
| #include <qpainter.h> | #include <qpainter.h> |
| #include "drawmng.h" | |
| #include "scrnmng.h" | #include "scrnmng.h" |
| Line 47 class emulationScreen : public QWidget | Line 48 class emulationScreen : public QWidget |
| protected: | protected: |
| void paintEvent(QPaintEvent *ev); | void paintEvent(QPaintEvent *ev); |
| void mousePressEvent(QMouseEvent *ev); | |
| void mouseReleaseEvent(QMouseEvent *ev); | |
| private: | private: |
| void setWindowSize(int width, int height); | void setWindowSize(int width, int height); |
| Line 54 private: | Line 57 private: |
| void clearOutOfRect(const QRect& target, const QRect& base); | void clearOutOfRect(const QRect& target, const QRect& base); |
| void clearOutOfScreen(); | void clearOutOfScreen(); |
| void make16mask(UINT32 bmask, UINT32 rmask, UINT32 gmask); | |
| public: | public: |
| emulationScreen(QWidget *parent, const char *name, WFlags f = 0); | emulationScreen(QWidget *parent, const char *name, WFlags f = 0); |
| ~emulationScreen(); | ~emulationScreen(); |
| Line 63 public: | Line 64 public: |
| BOOL createScreen(BYTE mode); | BOOL createScreen(BYTE mode); |
| void destroyScreen(); | void destroyScreen(); |
| RGB16 makePal16(RGB32 pal32) { | RGB16 makePalette16bpp(RGB32 pal32) { |
| RGB32 pal; | return drawmng_makepal16(&m_pal16mask, pal32); |
| pal.d = pal32.d & m_pal16mask.d; | |
| return (RGB16)((pal.p.g << m_l16g) + (pal.p.r << m_l16r) + (pal.p.b >> m_r16b)); | |
| } | } |
| void setScreenWidth(int width) { | void setScreenWidth(int width) { |
| Line 111 private: | Line 109 private: |
| QSize m_DefaultSize; | QSize m_DefaultSize; |
| int m_DefaultExtend; | int m_DefaultExtend; |
| RGB32 m_pal16mask; | PAL16MASK m_pal16mask; |
| BYTE m_r16b; | |
| BYTE m_l16r; | |
| BYTE m_l16g; | |
| }; | }; |
| #endif /* NP2_QT_QTDRAW_H__ */ | #endif /* NP2_QT_QTDRAW_H__ */ |