Skip to content
This repository
Browse code

there is no such thing as SDLx::Color

  • Loading branch information...
commit a66253c36c79a804998a280312655348379dd1a9 1 parent 155a625
Tobias Leich FROGGS authored

Showing 2 changed files with 6 additions and 6 deletions. Show diff stats Hide diff stats

  1. +4 4 src/SDLx/Validate.h
  2. +2 2 src/SDLx/Validate.xs
8 src/SDLx/Validate.h
@@ -69,9 +69,9 @@ char *_color_format( SV *color )
69 69 else if( sv_derived_from(color, "ARRAY") )
70 70 retval = "arrayref";
71 71 else if( sv_isobject(color) && sv_derived_from(color, "SDL::Color") )
72   - retval = "SDLx::Color";
  72 + retval = "SDL::Color";
73 73 else
74   - croak("Color must be number or arrayref or SDLx::Color");
  74 + croak("Color must be number or arrayref or SDL::Color");
75 75
76 76 return retval;
77 77 }
@@ -152,7 +152,7 @@ AV* __list_rgb( SV* color )
152 152 {
153 153 RETVAL = _color_arrayref((AV *)SvRV(color), sv_2mortal(newSVuv(0)));
154 154 }
155   - else if ( 0 == strcmp("SDLx::Color", format) )
  155 + else if ( 0 == strcmp("SDL::Color", format) )
156 156 {
157 157 RETVAL = (AV*)sv_2mortal((SV *)RETVAL);
158 158 SDL_Color *_color = (SDL_Color *)bag2obj(color);
@@ -189,7 +189,7 @@ AV* __list_rgba( SV* color )
189 189 {
190 190 RETVAL = _color_arrayref((AV *)SvRV(color), sv_2mortal(newSVuv(1)));
191 191 }
192   - else if ( 0 == strcmp("SDLx::Color", format) )
  192 + else if ( 0 == strcmp("SDL::Color", format) )
193 193 {
194 194 RETVAL = (AV*)sv_2mortal((SV *)RETVAL);
195 195 SDL_Color *_color = (SDL_Color*)bag2obj(color);
4 src/SDLx/Validate.xs
@@ -55,7 +55,7 @@ val_num_rgb( color )
55 55 unsigned int v = (( SvUV(AvARRAY(c)[0]) << 16 ) + ( SvUV(AvARRAY(c)[1]) << 8 ) + SvUV(AvARRAY(c)[2]));
56 56 RETVAL = newSVuv(v);
57 57 }
58   - else if( 0 == strcmp("SDLx::Color", format) )
  58 + else if( 0 == strcmp("SDL::Color", format) )
59 59 {
60 60 SDL_Color *_color = (SDL_Color*) bag2obj( color );
61 61 unsigned int v = ( (_color->r) << 16 ) + ( (_color->g) << 8 ) + _color->b;
@@ -81,7 +81,7 @@ val_num_rgba( color )
81 81 unsigned int v = (SvUV(AvARRAY(c)[0]) << 24) + (SvUV(AvARRAY(c)[1]) << 16) + (SvUV(AvARRAY(c)[2]) << 8) + SvUV(AvARRAY(c)[3] );
82 82 RETVAL = newSVuv(v);
83 83 }
84   - else if( 0 == strcmp("SDLx::Color", format) )
  84 + else if( 0 == strcmp("SDL::Color", format) )
85 85 {
86 86 SDL_Color *_color = (SDL_Color*)bag2obj( color );
87 87 unsigned int v = (((_color->r) << 24) + ((_color->g) << 16) + ((_color->b) << 8) + 0xFF) ;

0 comments on commit a66253c

Please sign in to comment.
Something went wrong with that request. Please try again.