[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
This looked weird to me:
in al_put_pixel:
if (bitmap->locked) {
x -= bitmap->lock_x;
y -= bitmap->lock_y;
if (x < bitmap->cl || y < bitmap->ct ||
x > bitmap->cr || y > bitmap->cb) {
return;
}
al_get_pixel looks more likely:
if (bitmap->locked) {
x -= bitmap->lock_x;
y -= bitmap->lock_y;
if (x < 0 || y < 0 || x > bitmap->lock_w || y > bitmap->lock_h) {
TRACE("al_get_pixel out of bounds\n");
memset(&color, 0, sizeof(ALLEGRO_COLOR));
return color;
}
Peter