File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change 1616#include <SDL_gfxPrimitives.h>
1717#endif
1818
19+ int _calc_offset ( SDL_Surface * surface , int x , int y )
20+ {
21+ int offset ;
22+ offset = (surface -> pitch * y ) / surface -> format -> BytesPerPixel ;
23+ offset += x ;
24+ return offset ;
25+ }
26+
1927SV * get_pixel32 (SDL_Surface * surface , int x , int y )
2028{
2129 /* Convert the pixels to 32 bit */
@@ -52,14 +60,6 @@ SV * construct_p_matrix ( SDL_Surface *surface )
5260 return newRV_noinc ((SV * )matrix );
5361}
5462
55- int _calc_offset ( SDL_Surface * surface , int x , int y )
56- {
57- int offset ;
58- offset = (surface -> pitch * y ) / surface -> format -> BytesPerPixel ;
59- offset += x ;
60- return offset ;
61- }
62-
6363unsigned int _get_pixel (SDL_Surface * surface , int offset )
6464{
6565 unsigned int value ;
You can’t perform that action at this time.
0 commit comments