added tilemap_get_scrollx / tilemap_get_scrolly

This commit is contained in:
Nicola Salmoria 2008-01-19 15:02:18 +00:00
parent be4bd611f0
commit e5b2e1f8ee
2 changed files with 32 additions and 0 deletions

View File

@ -655,6 +655,34 @@ void tilemap_set_scrolly(tilemap *tmap, int which, int value)
}
/*-------------------------------------------------
tilemap_get_scrollx - return the scroll value
for a row unit
-------------------------------------------------*/
int tilemap_get_scrollx(tilemap *tmap, int which)
{
if (which < tmap->scrollrows)
return tmap->rowscroll[which];
else
return 0;
}
/*-------------------------------------------------
tilemap_get_scrolly - return the scroll value
for a column unit
-------------------------------------------------*/
int tilemap_get_scrolly(tilemap *tmap, int which)
{
if (which < tmap->scrollcols)
return tmap->colscroll[which];
else
return 0;
}
/***************************************************************************
INTERNAL MAP ACCESS

View File

@ -518,6 +518,10 @@ int tilemap_get_scrolldy(tilemap *tmap);
void tilemap_set_scrollx(tilemap *tmap, int row, int value);
void tilemap_set_scrolly(tilemap *tmap, int col, int value);
/* return the scroll value for a row/column unit */
int tilemap_get_scrollx(tilemap *tmap, int row);
int tilemap_get_scrolly(tilemap *tmap, int col);
/* ----- internal map access ----- */