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 16
16
#include <SDL_gfxPrimitives.h>
17
17
#endif
18
18
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
+
19
27
SV * get_pixel32 (SDL_Surface * surface , int x , int y )
20
28
{
21
29
/* Convert the pixels to 32 bit */
@@ -52,14 +60,6 @@ SV * construct_p_matrix ( SDL_Surface *surface )
52
60
return newRV_noinc ((SV * )matrix );
53
61
}
54
62
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
-
63
63
unsigned int _get_pixel (SDL_Surface * surface , int offset )
64
64
{
65
65
unsigned int value ;
You can’t perform that action at this time.
0 commit comments