// Easy iteration thru pixels, see green.cpp and tile.cpp for examples // NOTE: using this class could be a bit slower than manipulating the bits directly.. // // changes to 0.20 // - pixelformat-aware functions red() green() blue() and putrgb() // - dot16() dot24() and dot32() added // - get/put dot() removed, use above #include "plugin.h" #ifndef _PIXELSH #define _PIXELSH class pixels { private: _frame m_f; pixel8 *p8; // pointer to a row of 8-bit pixels pixel16 *p16; pixel24 *p24; pixel32 *p32; __inline void updaterowp(); public: int x, y; pixels(const _frame &f) { m_f = f; x = -1; y = 0; p8 = 0; next(); } __inline pixel8 dot8() { return p8[x]; } __inline pixel16 dot16() { return p16[x]; } __inline pixel24 dot24() { return p24[x]; } __inline pixel32 dot32() { return p32[x]; } __inline void dot8(pixel8 c) { p8[x] = c; } __inline void dot16(pixel16 c) { p16[x] = c; } __inline void dot24(pixel24 c) { p24[x] = c; } __inline void dot32(pixel32 c) { p32[x] = c; } __inline byte red(); __inline byte green(); __inline byte blue(); __inline void putrgb(byte r, byte g, byte b); __inline void moveto(int tox, int toy) { if(tox