*** video.hh.orig Tue Jul 12 22:43:56 2005 --- video.hh Tue Jul 12 23:21:45 2005 *************** *** 73,79 **** unsigned flags; }; ! typedef GraphicsState GS; /* -------------------- Drawable -------------------- */ --- 73,79 ---- unsigned flags; }; ! typedef GraphicsState _GS; /* -------------------- Drawable -------------------- */ *************** *** 87,114 **** virtual PackedColor map_color(int r, int g, int b) = 0; virtual PackedColor map_color(int r, int g, int b, int a) = 0; ! virtual void blit (const GS &gs, int x, int y, const Surface* s) = 0; ! virtual void blit (const GS &gs, int x, int y, const Surface* s, const Rect& r) = 0; virtual Uint32 get_pixel (int x, int y) = 0; //! Set a single pixel ! virtual void set_pixel (const GS &gs, int x, int y) = 0; //! Set multiple pixels at once ! virtual void set_pixels (const GS &gs, int n, const int *x, const int *y); //! Draw a horizontal line ! virtual void hline (const GS &gs, int x, int y, int w); //! Draw a vertical line ! virtual void vline (const GS &gs, int x, int y, int h); //! Draw an arbitrary line ! virtual void line (const GS &gs, int x1, int y1, int x2, int y2); //! Draw a filled box. ! virtual void box (const GS &gs, int x, int y, int w, int h); //! Return size of drawable: Rect (0,0,width, height) virtual Rect size() const = 0; --- 87,114 ---- virtual PackedColor map_color(int r, int g, int b) = 0; virtual PackedColor map_color(int r, int g, int b, int a) = 0; ! virtual void blit (const _GS &gs, int x, int y, const Surface* s) = 0; ! virtual void blit (const _GS &gs, int x, int y, const Surface* s, const Rect& r) = 0; virtual Uint32 get_pixel (int x, int y) = 0; //! Set a single pixel ! virtual void set_pixel (const _GS &gs, int x, int y) = 0; //! Set multiple pixels at once ! virtual void set_pixels (const _GS &gs, int n, const int *x, const int *y); //! Draw a horizontal line ! virtual void hline (const _GS &gs, int x, int y, int w); //! Draw a vertical line ! virtual void vline (const _GS &gs, int x, int y, int h); //! Draw an arbitrary line ! virtual void line (const _GS &gs, int x1, int y1, int x2, int y2); //! Draw a filled box. ! virtual void box (const _GS &gs, int x, int y, int w, int h); //! Return size of drawable: Rect (0,0,width, height) virtual Rect size() const = 0; *************** *** 162,171 **** PackedColor map_color(int r, int g, int b, int a); Rect size() const { return Rect(0,0,m_surface->w, m_surface->h); } ! void box (const GS &gs, int x, int y, int w, int h); ! void line (const GS &gs, int x1, int y2, int x2, int y2); ! void blit (const GS &gs, int x, int y, const Surface* s, const Rect &r); ! void blit (const GS &gs, int x, int y, const Surface* src); /* ---------- Static methods ---------- */ --- 162,171 ---- PackedColor map_color(int r, int g, int b, int a); Rect size() const { return Rect(0,0,m_surface->w, m_surface->h); } ! void box (const _GS &gs, int x, int y, int w, int h); ! void line (const _GS &gs, int x1, int y2, int x2, int y2); ! void blit (const _GS &gs, int x, int y, const Surface* s, const Rect &r); ! void blit (const _GS &gs, int x, int y, const Surface* src); /* ---------- Static methods ---------- */ *************** *** 242,260 **** set_color (gc, c.r, c.g, c.b); } ! inline void set_color (GS &gs, PackedColor c) { gs.pcolor=c; } ! inline void enable_clipping(GS &gs) { clear_flags (gs.flags, GS_NOCLIP); } ! inline void disable_clipping (GS &gs) { set_flags (gs.flags, GS_NOCLIP); } ! inline void clip (GS &gs, const Rect& r) { gs.cliprect = r; enable_clipping(gs); } --- 242,260 ---- set_color (gc, c.r, c.g, c.b); } ! inline void set_color (_GS &gs, PackedColor c) { gs.pcolor=c; } ! inline void enable_clipping(_GS &gs) { clear_flags (gs.flags, GS_NOCLIP); } ! inline void disable_clipping (_GS &gs) { set_flags (gs.flags, GS_NOCLIP); } ! inline void clip (_GS &gs, const Rect& r) { gs.cliprect = r; enable_clipping(gs); } *** video.cc.orig Tue Jul 12 22:44:02 2005 --- video.cc Tue Jul 12 23:22:30 2005 *************** *** 52,62 **** /* -------------------- Clipping helper routines -------------------- */ namespace { ! inline bool NOCLIP(const GS &gs) { return gs.flags & GS_NOCLIP; } ! bool clip_hline (const GS &gs, int &x, int &y, int &w) { const Rect &cliprect = gs.cliprect; if (y < cliprect.y || y >= cliprect.y + cliprect.h) --- 52,62 ---- /* -------------------- Clipping helper routines -------------------- */ namespace { ! inline bool NOCLIP(const _GS &gs) { return gs.flags & GS_NOCLIP; } ! bool clip_hline (const _GS &gs, int &x, int &y, int &w) { const Rect &cliprect = gs.cliprect; if (y < cliprect.y || y >= cliprect.y + cliprect.h) *************** *** 73,79 **** return w > 0; } ! bool clip_vline (const GS &gs, int &x, int &y, int &h) { const Rect &cliprect = gs.cliprect; if (x < cliprect.x || x >= cliprect.x + cliprect.w) --- 73,79 ---- return w > 0; } ! bool clip_vline (const _GS &gs, int &x, int &y, int &h) { const Rect &cliprect = gs.cliprect; if (x < cliprect.x || x >= cliprect.x + cliprect.w) *************** *** 104,115 **** return false; } ! bool clip_rect (const GS &gs, Rect &r) { r.intersect (gs.cliprect); return r.w > 0 && r.h > 0; } ! inline bool clip_pixel (const GS &gs, int x, int y) { return gs.cliprect.contains(x,y); } } --- 104,115 ---- return false; } ! bool clip_rect (const _GS &gs, Rect &r) { r.intersect (gs.cliprect); return r.w > 0 && r.h > 0; } ! inline bool clip_pixel (const _GS &gs, int x, int y) { return gs.cliprect.contains(x,y); } } *************** *** 120,126 **** /* `Xlib.h' also defines a type named `Drawable' so we have to specify the namespace explicitly and cannot simply use a using-declaration. */ ! void px::Drawable::set_pixels (const GS &gs, int n, const int* x, const int* y) { const int *xp = x, *yp = y; for (int i=n; i; --i) --- 120,126 ---- /* `Xlib.h' also defines a type named `Drawable' so we have to specify the namespace explicitly and cannot simply use a using-declaration. */ ! void px::Drawable::set_pixels (const _GS &gs, int n, const int* x, const int* y) { const int *xp = x, *yp = y; for (int i=n; i; --i) *************** *** 127,151 **** set_pixel(gs, *xp++, *yp++); } ! void px::Drawable::hline (const GS &gs, int x, int y, int w) { for (int i=w; i; --i) set_pixel (gs, x++, y); } ! void px::Drawable::vline (const GS &gs, int x, int y, int h) { for (int i=h; i; --i) set_pixel (gs, x, y++); } ! void px::Drawable::box (const GS &gs, int x, int y, int w, int h) { for (int i=h; i; --i) hline (gs, x, y--, w); } ! void px::Drawable::line(const GS &, int /*x1*/, int /*y1*/, int /*x2*/, int /*y2*/) { } --- 127,151 ---- set_pixel(gs, *xp++, *yp++); } ! void px::Drawable::hline (const _GS &gs, int x, int y, int w) { for (int i=w; i; --i) set_pixel (gs, x++, y); } ! void px::Drawable::vline (const _GS &gs, int x, int y, int h) { for (int i=h; i; --i) set_pixel (gs, x, y++); } ! void px::Drawable::box (const _GS &gs, int x, int y, int w, int h) { for (int i=h; i; --i) hline (gs, x, y--, w); } ! void px::Drawable::line(const _GS &, int /*x1*/, int /*y1*/, int /*x2*/, int /*y2*/) { } *************** *** 169,181 **** return *pixel_pointer(x,y); } ! void set_pixel (const GS &gs, int x, int y) { if (NOCLIP(gs) || clip_pixel(gs, x, y)) { *pixel_pointer(x, y) = gs.pcolor; } } ! void set_pixels(const GS &gs, int n, const int* xlist, const int* ylist, Uint32 color) { const int *xp = xlist, *yp = ylist; if (NOCLIP(gs)) { for (int i=n; i > 0; --i) { --- 169,181 ---- return *pixel_pointer(x,y); } ! void set_pixel (const _GS &gs, int x, int y) { if (NOCLIP(gs) || clip_pixel(gs, x, y)) { *pixel_pointer(x, y) = gs.pcolor; } } ! void set_pixels(const _GS &gs, int n, const int* xlist, const int* ylist, Uint32 color) { const int *xp = xlist, *yp = ylist; if (NOCLIP(gs)) { for (int i=n; i > 0; --i) { *************** *** 191,197 **** } } ! void hline (const GS &gs, int x, int y, int w) { if (NOCLIP(gs) || clip_hline(gs, x, y, w)) { PIXELT* dst = pixel_pointer(x, y); for (; w > 0; --w) --- 191,197 ---- } } ! void hline (const _GS &gs, int x, int y, int w) { if (NOCLIP(gs) || clip_hline(gs, x, y, w)) { PIXELT* dst = pixel_pointer(x, y); for (; w > 0; --w) *************** *** 199,205 **** } } ! void vline (const GS &gs, int x, int y, int h) { if (NOCLIP(gs) || clip_vline(gs, x, y, h)) { PIXELT* dst = pixel_pointer(x, y); int offset = pitch() / bypp(); --- 199,205 ---- } } ! void vline (const _GS &gs, int x, int y, int h) { if (NOCLIP(gs) || clip_vline(gs, x, y, h)) { PIXELT* dst = pixel_pointer(x, y); int offset = pitch() / bypp(); *************** *** 223,229 **** public: Surface24 (SDL_Surface *s=0) : Surface(s) {} ! void set_pixel (const GS &gs, int x, int y) { if (NOCLIP(gs) || clip_pixel(gs, x, y)) { Uint8* p = static_cast (pixel_pointer(x, y)); SDL_GetRGB(gs.pcolor, m_surface->format, p,p+1,p+2); --- 223,229 ---- public: Surface24 (SDL_Surface *s=0) : Surface(s) {} ! void set_pixel (const _GS &gs, int x, int y) { if (NOCLIP(gs) || clip_pixel(gs, x, y)) { Uint8* p = static_cast (pixel_pointer(x, y)); SDL_GetRGB(gs.pcolor, m_surface->format, p,p+1,p+2); *************** *** 274,280 **** } ! void Surface::box (const GS &gs, int x, int y, int w, int h) { Rect r (x, y, w, h); if (NOCLIP(gs) || clip_rect (gs, r)) { SDL_Rect dr; --- 274,280 ---- } ! void Surface::box (const _GS &gs, int x, int y, int w, int h) { Rect r (x, y, w, h); if (NOCLIP(gs) || clip_rect (gs, r)) { SDL_Rect dr; *************** *** 283,289 **** } } ! void Surface::line (const GS &gs, int x1, int y1, int x2, int y2) { SDL_Rect s; sdl::copy_rect(s, gs.cliprect); SDL_SetClipRect (m_surface, &s); --- 283,289 ---- } } ! void Surface::line (const _GS &gs, int x1, int y1, int x2, int y2) { SDL_Rect s; sdl::copy_rect(s, gs.cliprect); SDL_SetClipRect (m_surface, &s); *************** *** 299,305 **** SDL_SetClipRect (m_surface, 0); } ! void Surface::blit (const GS &gs, int x, int y, const Surface* s, const Rect &r_) { Rect r(r_); if (NOCLIP(gs) || clip_blit (gs.cliprect, x, y, r)) { SDL_Rect r1; --- 299,305 ---- SDL_SetClipRect (m_surface, 0); } ! void Surface::blit (const _GS &gs, int x, int y, const Surface* s, const Rect &r_) { Rect r(r_); if (NOCLIP(gs) || clip_blit (gs.cliprect, x, y, r)) { SDL_Rect r1; *************** *** 310,316 **** } } ! void Surface::blit (const GS &gs, int x, int y, const Surface* src) { assert (src != 0); blit (gs, x, y, src, src->size()); } --- 310,316 ---- } } ! void Surface::blit (const _GS &gs, int x, int y, const Surface* src) { assert (src != 0); blit (gs, x, y, src, src->size()); } *** px-lua.cc.orig Tue Jul 12 23:31:47 2005 --- px-lua.cc Tue Jul 12 23:31:50 2005 *************** *** 16,22 **** /* function to register type */ static void toluaI_reg_types (lua_State* tolua_S) { ! tolua_usertype(tolua_S,"GS"); tolua_usertype(tolua_S,"Font"); tolua_usertype(tolua_S,"V2"); tolua_usertype(tolua_S,"Surface"); --- 16,22 ---- /* function to register type */ static void toluaI_reg_types (lua_State* tolua_S) { ! tolua_usertype(tolua_S,"_GS"); tolua_usertype(tolua_S,"Font"); tolua_usertype(tolua_S,"V2"); tolua_usertype(tolua_S,"Surface"); *************** *** 257,264 **** { const Rect* clipr = ((const Rect*) tolua_getusertype(tolua_S,2,0)); { ! GS* toluaI_ret = (GS*) new GS(*clipr); ! tolua_pushusertype(tolua_S,(void*)toluaI_ret,tolua_tag(tolua_S,"GS")); } } return 1; --- 257,264 ---- { const Rect* clipr = ((const Rect*) tolua_getusertype(tolua_S,2,0)); { ! _GS* toluaI_ret = (_GS*) new _GS(*clipr); ! tolua_pushusertype(tolua_S,(void*)toluaI_ret,tolua_tag(tolua_S,"_GS")); } } return 1; *************** *** 271,283 **** static int toluaI_px_px_GS_delete00(lua_State* tolua_S) { if ( ! !tolua_istype(tolua_S,1,tolua_tag(tolua_S,"GS"),0) || !tolua_isnoobj(tolua_S,2) ) goto tolua_lerror; else { ! GS* self = (GS*) tolua_getusertype(tolua_S,1,0); if (!self) tolua_error(tolua_S,"invalid 'self' in function 'delete'"); delete self; } --- 271,283 ---- static int toluaI_px_px_GS_delete00(lua_State* tolua_S) { if ( ! !tolua_istype(tolua_S,1,tolua_tag(tolua_S,"_GS"),0) || !tolua_isnoobj(tolua_S,2) ) goto tolua_lerror; else { ! _GS* self = (_GS*) tolua_getusertype(tolua_S,1,0); if (!self) tolua_error(tolua_S,"invalid 'self' in function 'delete'"); delete self; } *************** *** 290,296 **** /* get function: cliprect of class GS */ static int toluaI_get_px_px_GS_cliprect(lua_State* tolua_S) { ! GS* self = (GS*) tolua_getusertype(tolua_S,1,0); if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'cliprect'"); tolua_pushusertype(tolua_S,(void*)&self->cliprect,tolua_tag(tolua_S,"Rect")); return 1; --- 290,296 ---- /* get function: cliprect of class GS */ static int toluaI_get_px_px_GS_cliprect(lua_State* tolua_S) { ! _GS* self = (_GS*) tolua_getusertype(tolua_S,1,0); if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'cliprect'"); tolua_pushusertype(tolua_S,(void*)&self->cliprect,tolua_tag(tolua_S,"Rect")); return 1; *************** *** 299,305 **** /* set function: cliprect of class GS */ static int toluaI_set_px_px_GS_cliprect(lua_State* tolua_S) { ! GS* self = (GS*) tolua_getusertype(tolua_S,1,0); if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'cliprect'"); if (!tolua_istype(tolua_S,2,tolua_tag(tolua_S,"Rect"),0)) tolua_error(tolua_S,"#vinvalid type in variable assignment."); --- 299,305 ---- /* set function: cliprect of class GS */ static int toluaI_set_px_px_GS_cliprect(lua_State* tolua_S) { ! _GS* self = (_GS*) tolua_getusertype(tolua_S,1,0); if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'cliprect'"); if (!tolua_istype(tolua_S,2,tolua_tag(tolua_S,"Rect"),0)) tolua_error(tolua_S,"#vinvalid type in variable assignment."); *************** *** 310,316 **** /* get function: pcolor of class GS */ static int toluaI_get_px_px_GS_pcolor(lua_State* tolua_S) { ! GS* self = (GS*) tolua_getusertype(tolua_S,1,0); if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'pcolor'"); tolua_pushnumber(tolua_S,(double)self->pcolor); return 1; --- 310,316 ---- /* get function: pcolor of class GS */ static int toluaI_get_px_px_GS_pcolor(lua_State* tolua_S) { ! _GS* self = (_GS*) tolua_getusertype(tolua_S,1,0); if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'pcolor'"); tolua_pushnumber(tolua_S,(double)self->pcolor); return 1; *************** *** 319,325 **** /* set function: pcolor of class GS */ static int toluaI_set_px_px_GS_pcolor(lua_State* tolua_S) { ! GS* self = (GS*) tolua_getusertype(tolua_S,1,0); if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'pcolor'"); if (!tolua_istype(tolua_S,2,LUA_TNUMBER,0)) tolua_error(tolua_S,"#vinvalid type in variable assignment."); --- 319,325 ---- /* set function: pcolor of class GS */ static int toluaI_set_px_px_GS_pcolor(lua_State* tolua_S) { ! _GS* self = (_GS*) tolua_getusertype(tolua_S,1,0); if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'pcolor'"); if (!tolua_istype(tolua_S,2,LUA_TNUMBER,0)) tolua_error(tolua_S,"#vinvalid type in variable assignment."); *************** *** 411,417 **** { if ( !tolua_istype(tolua_S,1,tolua_tag(tolua_S,"Drawable"),0) || ! !tolua_istype(tolua_S,2,tolua_tag(tolua_S,"const GS"),0) || !tolua_istype(tolua_S,3,LUA_TNUMBER,0) || !tolua_istype(tolua_S,4,LUA_TNUMBER,0) || !tolua_istype(tolua_S,5,tolua_tag(tolua_S,"Surface"),0) || --- 411,417 ---- { if ( !tolua_istype(tolua_S,1,tolua_tag(tolua_S,"Drawable"),0) || ! !tolua_istype(tolua_S,2,tolua_tag(tolua_S,"const _GS"),0) || !tolua_istype(tolua_S,3,LUA_TNUMBER,0) || !tolua_istype(tolua_S,4,LUA_TNUMBER,0) || !tolua_istype(tolua_S,5,tolua_tag(tolua_S,"Surface"),0) || *************** *** 421,427 **** else { Drawable* self = (Drawable*) tolua_getusertype(tolua_S,1,0); ! const GS* gs = ((const GS*) tolua_getusertype(tolua_S,2,0)); int x = ((int) tolua_getnumber(tolua_S,3,0)); int y = ((int) tolua_getnumber(tolua_S,4,0)); Surface* s = ((Surface*) tolua_getusertype(tolua_S,5,0)); --- 421,427 ---- else { Drawable* self = (Drawable*) tolua_getusertype(tolua_S,1,0); ! const _GS* gs = ((const _GS*) tolua_getusertype(tolua_S,2,0)); int x = ((int) tolua_getnumber(tolua_S,3,0)); int y = ((int) tolua_getnumber(tolua_S,4,0)); Surface* s = ((Surface*) tolua_getusertype(tolua_S,5,0)); *************** *** 441,447 **** { if ( !tolua_istype(tolua_S,1,tolua_tag(tolua_S,"Drawable"),0) || ! !tolua_istype(tolua_S,2,tolua_tag(tolua_S,"const GS"),0) || !tolua_istype(tolua_S,3,LUA_TNUMBER,0) || !tolua_istype(tolua_S,4,LUA_TNUMBER,0) || !tolua_istype(tolua_S,5,tolua_tag(tolua_S,"Surface"),0) || --- 441,447 ---- { if ( !tolua_istype(tolua_S,1,tolua_tag(tolua_S,"Drawable"),0) || ! !tolua_istype(tolua_S,2,tolua_tag(tolua_S,"const _GS"),0) || !tolua_istype(tolua_S,3,LUA_TNUMBER,0) || !tolua_istype(tolua_S,4,LUA_TNUMBER,0) || !tolua_istype(tolua_S,5,tolua_tag(tolua_S,"Surface"),0) || *************** *** 452,458 **** else { Drawable* self = (Drawable*) tolua_getusertype(tolua_S,1,0); ! const GS* gs = ((const GS*) tolua_getusertype(tolua_S,2,0)); int x = ((int) tolua_getnumber(tolua_S,3,0)); int y = ((int) tolua_getnumber(tolua_S,4,0)); Surface* s = ((Surface*) tolua_getusertype(tolua_S,5,0)); --- 452,458 ---- else { Drawable* self = (Drawable*) tolua_getusertype(tolua_S,1,0); ! const _GS* gs = ((const _GS*) tolua_getusertype(tolua_S,2,0)); int x = ((int) tolua_getnumber(tolua_S,3,0)); int y = ((int) tolua_getnumber(tolua_S,4,0)); Surface* s = ((Surface*) tolua_getusertype(tolua_S,5,0)); *************** *** 499,505 **** { if ( !tolua_istype(tolua_S,1,tolua_tag(tolua_S,"Drawable"),0) || ! !tolua_istype(tolua_S,2,tolua_tag(tolua_S,"const GS"),0) || !tolua_istype(tolua_S,3,LUA_TNUMBER,0) || !tolua_istype(tolua_S,4,LUA_TNUMBER,0) || !tolua_isnoobj(tolua_S,5) --- 499,505 ---- { if ( !tolua_istype(tolua_S,1,tolua_tag(tolua_S,"Drawable"),0) || ! !tolua_istype(tolua_S,2,tolua_tag(tolua_S,"const _GS"),0) || !tolua_istype(tolua_S,3,LUA_TNUMBER,0) || !tolua_istype(tolua_S,4,LUA_TNUMBER,0) || !tolua_isnoobj(tolua_S,5) *************** *** 508,514 **** else { Drawable* self = (Drawable*) tolua_getusertype(tolua_S,1,0); ! const GS* gs = ((const GS*) tolua_getusertype(tolua_S,2,0)); int x = ((int) tolua_getnumber(tolua_S,3,0)); int y = ((int) tolua_getnumber(tolua_S,4,0)); if (!self) tolua_error(tolua_S,"invalid 'self' in function 'set_pixel'"); --- 508,514 ---- else { Drawable* self = (Drawable*) tolua_getusertype(tolua_S,1,0); ! const _GS* gs = ((const _GS*) tolua_getusertype(tolua_S,2,0)); int x = ((int) tolua_getnumber(tolua_S,3,0)); int y = ((int) tolua_getnumber(tolua_S,4,0)); if (!self) tolua_error(tolua_S,"invalid 'self' in function 'set_pixel'"); *************** *** 527,533 **** { if ( !tolua_istype(tolua_S,1,tolua_tag(tolua_S,"Drawable"),0) || ! !tolua_istype(tolua_S,2,tolua_tag(tolua_S,"const GS"),0) || !tolua_istype(tolua_S,3,LUA_TNUMBER,0) || !tolua_istype(tolua_S,4,LUA_TNUMBER,0) || !tolua_istype(tolua_S,5,LUA_TNUMBER,0) || --- 527,533 ---- { if ( !tolua_istype(tolua_S,1,tolua_tag(tolua_S,"Drawable"),0) || ! !tolua_istype(tolua_S,2,tolua_tag(tolua_S,"const _GS"),0) || !tolua_istype(tolua_S,3,LUA_TNUMBER,0) || !tolua_istype(tolua_S,4,LUA_TNUMBER,0) || !tolua_istype(tolua_S,5,LUA_TNUMBER,0) || *************** *** 537,543 **** else { Drawable* self = (Drawable*) tolua_getusertype(tolua_S,1,0); ! const GS* gs = ((const GS*) tolua_getusertype(tolua_S,2,0)); int n = ((int) tolua_getnumber(tolua_S,3,0)); const int x = ((const int) tolua_getnumber(tolua_S,4,0)); const int y = ((const int) tolua_getnumber(tolua_S,5,0)); --- 537,543 ---- else { Drawable* self = (Drawable*) tolua_getusertype(tolua_S,1,0); ! const _GS* gs = ((const _GS*) tolua_getusertype(tolua_S,2,0)); int n = ((int) tolua_getnumber(tolua_S,3,0)); const int x = ((const int) tolua_getnumber(tolua_S,4,0)); const int y = ((const int) tolua_getnumber(tolua_S,5,0)); *************** *** 559,565 **** { if ( !tolua_istype(tolua_S,1,tolua_tag(tolua_S,"Drawable"),0) || ! !tolua_istype(tolua_S,2,tolua_tag(tolua_S,"const GS"),0) || !tolua_istype(tolua_S,3,LUA_TNUMBER,0) || !tolua_istype(tolua_S,4,LUA_TNUMBER,0) || !tolua_istype(tolua_S,5,LUA_TNUMBER,0) || --- 559,565 ---- { if ( !tolua_istype(tolua_S,1,tolua_tag(tolua_S,"Drawable"),0) || ! !tolua_istype(tolua_S,2,tolua_tag(tolua_S,"const _GS"),0) || !tolua_istype(tolua_S,3,LUA_TNUMBER,0) || !tolua_istype(tolua_S,4,LUA_TNUMBER,0) || !tolua_istype(tolua_S,5,LUA_TNUMBER,0) || *************** *** 569,575 **** else { Drawable* self = (Drawable*) tolua_getusertype(tolua_S,1,0); ! const GS* gs = ((const GS*) tolua_getusertype(tolua_S,2,0)); int x = ((int) tolua_getnumber(tolua_S,3,0)); int y = ((int) tolua_getnumber(tolua_S,4,0)); int w = ((int) tolua_getnumber(tolua_S,5,0)); --- 569,575 ---- else { Drawable* self = (Drawable*) tolua_getusertype(tolua_S,1,0); ! const _GS* gs = ((const _GS*) tolua_getusertype(tolua_S,2,0)); int x = ((int) tolua_getnumber(tolua_S,3,0)); int y = ((int) tolua_getnumber(tolua_S,4,0)); int w = ((int) tolua_getnumber(tolua_S,5,0)); *************** *** 589,595 **** { if ( !tolua_istype(tolua_S,1,tolua_tag(tolua_S,"Drawable"),0) || ! !tolua_istype(tolua_S,2,tolua_tag(tolua_S,"const GS"),0) || !tolua_istype(tolua_S,3,LUA_TNUMBER,0) || !tolua_istype(tolua_S,4,LUA_TNUMBER,0) || !tolua_istype(tolua_S,5,LUA_TNUMBER,0) || --- 589,595 ---- { if ( !tolua_istype(tolua_S,1,tolua_tag(tolua_S,"Drawable"),0) || ! !tolua_istype(tolua_S,2,tolua_tag(tolua_S,"const _GS"),0) || !tolua_istype(tolua_S,3,LUA_TNUMBER,0) || !tolua_istype(tolua_S,4,LUA_TNUMBER,0) || !tolua_istype(tolua_S,5,LUA_TNUMBER,0) || *************** *** 599,605 **** else { Drawable* self = (Drawable*) tolua_getusertype(tolua_S,1,0); ! const GS* gs = ((const GS*) tolua_getusertype(tolua_S,2,0)); int x = ((int) tolua_getnumber(tolua_S,3,0)); int y = ((int) tolua_getnumber(tolua_S,4,0)); int h = ((int) tolua_getnumber(tolua_S,5,0)); --- 599,605 ---- else { Drawable* self = (Drawable*) tolua_getusertype(tolua_S,1,0); ! const _GS* gs = ((const _GS*) tolua_getusertype(tolua_S,2,0)); int x = ((int) tolua_getnumber(tolua_S,3,0)); int y = ((int) tolua_getnumber(tolua_S,4,0)); int h = ((int) tolua_getnumber(tolua_S,5,0)); *************** *** 619,625 **** { if ( !tolua_istype(tolua_S,1,tolua_tag(tolua_S,"Drawable"),0) || ! !tolua_istype(tolua_S,2,tolua_tag(tolua_S,"const GS"),0) || !tolua_istype(tolua_S,3,LUA_TNUMBER,0) || !tolua_istype(tolua_S,4,LUA_TNUMBER,0) || !tolua_istype(tolua_S,5,LUA_TNUMBER,0) || --- 619,625 ---- { if ( !tolua_istype(tolua_S,1,tolua_tag(tolua_S,"Drawable"),0) || ! !tolua_istype(tolua_S,2,tolua_tag(tolua_S,"const _GS"),0) || !tolua_istype(tolua_S,3,LUA_TNUMBER,0) || !tolua_istype(tolua_S,4,LUA_TNUMBER,0) || !tolua_istype(tolua_S,5,LUA_TNUMBER,0) || *************** *** 630,636 **** else { Drawable* self = (Drawable*) tolua_getusertype(tolua_S,1,0); ! const GS* gs = ((const GS*) tolua_getusertype(tolua_S,2,0)); int x1 = ((int) tolua_getnumber(tolua_S,3,0)); int y1 = ((int) tolua_getnumber(tolua_S,4,0)); int x2 = ((int) tolua_getnumber(tolua_S,5,0)); --- 630,636 ---- else { Drawable* self = (Drawable*) tolua_getusertype(tolua_S,1,0); ! const _GS* gs = ((const _GS*) tolua_getusertype(tolua_S,2,0)); int x1 = ((int) tolua_getnumber(tolua_S,3,0)); int y1 = ((int) tolua_getnumber(tolua_S,4,0)); int x2 = ((int) tolua_getnumber(tolua_S,5,0)); *************** *** 651,657 **** { if ( !tolua_istype(tolua_S,1,tolua_tag(tolua_S,"Drawable"),0) || ! !tolua_istype(tolua_S,2,tolua_tag(tolua_S,"const GS"),0) || !tolua_istype(tolua_S,3,LUA_TNUMBER,0) || !tolua_istype(tolua_S,4,LUA_TNUMBER,0) || !tolua_istype(tolua_S,5,LUA_TNUMBER,0) || --- 651,657 ---- { if ( !tolua_istype(tolua_S,1,tolua_tag(tolua_S,"Drawable"),0) || ! !tolua_istype(tolua_S,2,tolua_tag(tolua_S,"const _GS"),0) || !tolua_istype(tolua_S,3,LUA_TNUMBER,0) || !tolua_istype(tolua_S,4,LUA_TNUMBER,0) || !tolua_istype(tolua_S,5,LUA_TNUMBER,0) || *************** *** 662,668 **** else { Drawable* self = (Drawable*) tolua_getusertype(tolua_S,1,0); ! const GS* gs = ((const GS*) tolua_getusertype(tolua_S,2,0)); int x = ((int) tolua_getnumber(tolua_S,3,0)); int y = ((int) tolua_getnumber(tolua_S,4,0)); int w = ((int) tolua_getnumber(tolua_S,5,0)); --- 662,668 ---- else { Drawable* self = (Drawable*) tolua_getusertype(tolua_S,1,0); ! const _GS* gs = ((const _GS*) tolua_getusertype(tolua_S,2,0)); int x = ((int) tolua_getnumber(tolua_S,3,0)); int y = ((int) tolua_getnumber(tolua_S,4,0)); int w = ((int) tolua_getnumber(tolua_S,5,0)); *************** *** 1052,1062 **** tolua_function(tolua_S,"V2","new",toluaI_px_px_V2_new01); tolua_function(tolua_S,"V2","operator_set",toluaI_px_px_V2_operator_set00); tolua_function(tolua_S,"V2","operator_get",toluaI_px_px_V2_operator_get00); ! tolua_cclass(tolua_S,"GS",""); ! tolua_function(tolua_S,"GS","new",toluaI_px_px_GS_new00); ! tolua_function(tolua_S,"GS","delete",toluaI_px_px_GS_delete00); ! tolua_tablevar(tolua_S,"GS","cliprect",toluaI_get_px_px_GS_cliprect,toluaI_set_px_px_GS_cliprect); ! tolua_tablevar(tolua_S,"GS","pcolor",toluaI_get_px_px_GS_pcolor,toluaI_set_px_px_GS_pcolor); tolua_cclass(tolua_S,"Drawable",""); tolua_function(tolua_S,"Drawable","delete",toluaI_px_px_Drawable_delete00); tolua_function(tolua_S,"Drawable","map_color",toluaI_px_px_Drawable_map_color00); --- 1052,1062 ---- tolua_function(tolua_S,"V2","new",toluaI_px_px_V2_new01); tolua_function(tolua_S,"V2","operator_set",toluaI_px_px_V2_operator_set00); tolua_function(tolua_S,"V2","operator_get",toluaI_px_px_V2_operator_get00); ! tolua_cclass(tolua_S,"_GS",""); ! tolua_function(tolua_S,"_GS","new",toluaI_px_px_GS_new00); ! tolua_function(tolua_S,"_GS","delete",toluaI_px_px_GS_delete00); ! tolua_tablevar(tolua_S,"_GS","cliprect",toluaI_get_px_px_GS_cliprect,toluaI_set_px_px_GS_cliprect); ! tolua_tablevar(tolua_S,"_GS","pcolor",toluaI_get_px_px_GS_pcolor,toluaI_set_px_px_GS_pcolor); tolua_cclass(tolua_S,"Drawable",""); tolua_function(tolua_S,"Drawable","delete",toluaI_px_px_Drawable_delete00); tolua_function(tolua_S,"Drawable","map_color",toluaI_px_px_Drawable_map_color00);