home *** CD-ROM | disk | FTP | other *** search
- #ifndef SOFTWAREHARDWARE2D_H
- #define SOFTWAREHARDWARE2D_H
-
- #include "Hardware2D.h"
- #include "Color.h"
- #include "Array2D.h"
- #include <windows.h>
- class SoftwareHardwarePicture2D;
-
- class SoftwareHardware2D : public Hardware2D
- {
- public:
- explicit SoftwareHardware2D(HWND wnd);
- virtual ~SoftwareHardware2D();
-
- virtual bool set_mode(unsigned sx, unsigned sy);
- virtual unsigned get_height();
- virtual unsigned get_width();
- virtual void stop_mode();
-
- virtual void fill(int left, int top, int right, int bottom, const Color & color);
- virtual void flip();
-
- virtual HardwarePicture2D * load_picture(const Color * colors, unsigned width, unsigned height, unsigned stride);
-
- private:
- friend class SoftwareHardwarePicture2D;
- void blit(const SoftwareHardwarePicture2D & pic, int left, int top, int alpha);
- void add_picture_count(int delta);
- // ╬≥Σσδ 2 private-≡ατΣσδα, ∞√ ∩εΩατ√Γασ∞ ≈Φ≥α≥σδ■ ΩεΣα (φε φσ Ωε∞∩Φδ ≥ε≡≤),
- // ≈≥ε ∩≡σΣ√Σ≤∙Φσ ∞σ≥εΣ√ ∩≡σΣφατφα≈σφ√ Σδ Σ≡≤µσ±≥Γσφφεπε Ωδα±±α,
- // ≥επΣα ΩαΩ ±δσΣ≤■∙Φσ Γδ ■≥± ≈α±≥ⁿ■ ≡σαδΦτα÷ΦΦ
- private:
- void start_viewport();
- typedef Array2D<Color> Canvas;
-
- HWND wnd;
- Canvas canvas;
- unsigned width;
- unsigned height;
- int picture_count;
- };
- #endif //SOFTWAREHARDWARE2D_H