home *** CD-ROM | disk | FTP | other *** search
/ Game.EXE 2002 April / Game.EXE_04_2002.iso / Alawar / SoftwareHardware2D.h < prev    next >
Encoding:
C/C++ Source or Header  |  2002-03-02  |  1.2 KB  |  43 lines

  1. #ifndef SOFTWAREHARDWARE2D_H
  2. #define SOFTWAREHARDWARE2D_H
  3.  
  4. #include "Hardware2D.h"
  5. #include "Color.h"
  6. #include "Array2D.h"
  7. #include <windows.h>
  8. class SoftwareHardwarePicture2D;
  9.  
  10. class SoftwareHardware2D : public Hardware2D
  11. {
  12. public:    
  13.     explicit SoftwareHardware2D(HWND wnd);
  14.     virtual ~SoftwareHardware2D();
  15.     
  16.     virtual bool set_mode(unsigned sx, unsigned sy);
  17.     virtual unsigned get_height();
  18.     virtual unsigned get_width();
  19.     virtual void stop_mode();
  20.  
  21.     virtual void fill(int left, int top, int right, int bottom, const Color & color);
  22.     virtual void flip();
  23.  
  24.     virtual HardwarePicture2D * load_picture(const Color * colors, unsigned width, unsigned height, unsigned stride);
  25.  
  26. private:    
  27.     friend class SoftwareHardwarePicture2D;
  28.     void blit(const SoftwareHardwarePicture2D & pic, int left, int top, int alpha);
  29.     void add_picture_count(int delta);
  30.     // ╬≥Σσδ   2 private-≡ατΣσδα, ∞√ ∩εΩατ√Γασ∞ ≈Φ≥α≥σδ■ ΩεΣα (φε φσ Ωε∞∩Φδ ≥ε≡≤), 
  31.     // ≈≥ε ∩≡σΣ√Σ≤∙Φσ ∞σ≥εΣ√ ∩≡σΣφατφα≈σφ√ Σδ  Σ≡≤µσ±≥Γσφφεπε Ωδα±±α,
  32.     // ≥επΣα ΩαΩ ±δσΣ≤■∙Φσ  Γδ ■≥±  ≈α±≥ⁿ■ ≡σαδΦτα÷ΦΦ
  33. private:    
  34.     void start_viewport();
  35.     typedef Array2D<Color> Canvas;
  36.  
  37.     HWND wnd;
  38.     Canvas canvas;
  39.     unsigned width;
  40.     unsigned height;
  41.     int picture_count;
  42. };
  43. #endif //SOFTWAREHARDWARE2D_H