Mercurial > hg > Game > Cerium
comparison Renderer/Engine/polygon.cc @ 1055:9ce0480cde63 draft
remove texture_image
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 14 Dec 2010 11:37:15 +0900 |
parents | 294bc9364bee |
children | b733c7903d07 |
comparison
equal
deleted
inserted
replaced
1054:ab16fc9a6570 | 1055:9ce0480cde63 |
---|---|
249 { | 249 { |
250 SDL_PixelFormat *fmt; | 250 SDL_PixelFormat *fmt; |
251 //Uint32 temp, pixel; | 251 //Uint32 temp, pixel; |
252 Uint8 red, green, blue; | 252 Uint8 red, green, blue; |
253 | 253 |
254 fmt = texture_image->format; | 254 fmt = texture_info.texture_image->format; |
255 | 255 |
256 if (tx<0) tx = 0; | 256 if (tx<0) tx = 0; |
257 if (texture_image->w-1< tx) tx = texture_image->w-1 ; | 257 if (texture_info.texture_image->w-1< tx) tx = texture_info.texture_image->w-1 ; |
258 if (ty<0) ty = 0; | 258 if (ty<0) ty = 0; |
259 if (texture_image->h-1< ty) ty = texture_image->h-1 ; | 259 if (texture_info.texture_image->h-1< ty) ty = texture_info.texture_image->h-1 ; |
260 | 260 |
261 | 261 |
262 | 262 |
263 //SDL_LockSurface(texture_image); | 263 //SDL_LockSurface(texture_image); |
264 char *p = get_pixel(tx,ty,texture_image); | 264 char *p = get_pixel(tx,ty,texture_info.texture_image); |
265 blue = (Uint8) p[0]; | 265 blue = (Uint8) p[0]; |
266 green = (Uint8) p[1]; | 266 green = (Uint8) p[1]; |
267 red = (Uint8) p[2]; | 267 red = (Uint8) p[2]; |
268 | 268 |
269 //printf("tx = %d ty = %d ", tx,ty); | 269 //printf("tx = %d ty = %d ", tx,ty); |